I fixed the P300 setaddr command, which send the data (SEND BYTES) after the checksum. Because framer_send() can be called several times before the message is complete, I moved sending the checksum to framer_receive() instead of framer_send() and using a local static variable to calculate the checksum step by step. Workes fine with my device ID="20CB" name="VScotHO1". Did not yet test the KW protocol again (hope my changes do not break that).
Also fixed that P300 code produced lots of logging output without debug (-g) set.
Please test the code and write results here. Hope that it finds it's way to the official trunk if everything works fine.
Don't forget to change
to
in vcontrold.xml P300 protocol definition.
Tried that patch, my device ID is "204B". Setaddr itself is working, although an error message is also displayed:
Thank you very much for your response. Unfortunately I got no email for your response.
Ok. It works, but the response check fails. I found a bug in the log code
this should be changed to
to see how much we really received. But this will not fix the problem.
As written in http://openv.wikispaces.com/Protokoll+300 Vitodens does not return the written data. But returns the length of written data. This code only works for me because I have written 1 byte and the CRC is counted as that one byte. :-(
The whole code should be changed to
Can you please check this.
Thanks Holger
Tried that change. Works very well! No errors are shown.
Thank you very much, now it is perfect.
Tried the patch, my device ID "20CB" ExtID "000C" Vitodens 200-W WB2B
Works perfekt !
Vielen Dank Holger Müller.
New patch file with the changes from 2015-11-05.
Hi,
it would be really helpfull for me, if anybody could describe how to apply the diff file to an installation on a Raspberry Pi 2. Unfortunately, the command "patch < P300_set_setaddr_patch...diff" does not lead to a sufficient solution.
Hi,
I just grabbed a new source code from sourceforge and my patch file from 30.11.2015. Copied that to vcontrold-code-106-trunk/vcontrold.
Works perfect.
Holger
Hi,
I installed the patch file and one code at the end could not changed in farmer.c. So i change it manualy again. After that i receiver this error:
DEBUG:Thu Nov 3 12:39:58 2016 : Typ: short (Bytes: E0 01 )
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 41
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 09
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 00
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 02
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 60
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 00
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 02
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: E0
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 01
DEBUG:Thu Nov 3 12:39:58 2016 : >SEND: 4E
DEBUG:Thu Nov 3 12:39:58 2016 : <recv: len="1" 15="" (390.0="" ms)="" debug:thu="" nov="" 3="" 12:39:58="" 2016="" :="" \<recv:="" received="">FRAMER: error 15 DEBUG:Thu Nov 3 12:39:58 2016 : Fehler recv, Abbruch DEBUG:Thu Nov 3 12:39:58 2016 : Fehler beim ausfuehren von setTempWWSoll 48 ERR: >FRAMER: error 15
Fehler recv, Abbruch
Fehler beim ausfuehren von setTempWWSoll 48</recv:>
I checked the code from parser.c and framer.c, this looks ok. Any Idea?
Thanks a lot and Regards
Torsten
Last edit: Poldilein 2016-11-03
Hi Torsten,
check your vito.xml.
<addr>6300</addr>
<len>1</len>
<unit>UTI</unit>
<description>Setze die Warmwassersolltemperatur in Grad C
</description>
I think <len> ist the main problem, perhaps <addr> also wrong.</addr></len>
Hi Chactzsf,
thanks for your fast reply.
mmmhh i think this is correct because, before applying the patch it works (with the checksum length 2 error) and the getcommand also works...
<addr>6000</addr>
<len>2</len>
<unit>UT</unit>
<description>SETZEN WW - Betriebsdaten WW: Warmwassersolltemperatur (10..60 (95))</description>
Or think i wrong and the length has to be 1 when setting the parameter?
Changing length from 2 to 1 :
DEBUG:Thu Nov 3 22:14:23 2016 : <recv: len="1" 06="" (30.0="" ms)="" debug:thu="" nov="" 3="" 22:14:23="" 2016="" :="" \<recv:="" received="">FRAMER: addr was still active FE06 DEBUG:Thu Nov 3 22:14:23 2016 : >FRAMER: Command send
DEBUG:Thu Nov 3 22:14:23 2016 : >FRAMER: no preset result
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 41 (10.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: received 41
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 06 (10.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: received 06
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 03 (0.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 02 (0.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 60 (0.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 00 (0.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 01 (10.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <RECV: len=1 04 (0.0 ms)
DEBUG:Thu Nov 3 22:14:23 2016 : <recv: len="1" 70="" (0.0="" ms)="" debug:thu="" nov="" 3="" 22:14:23="" 2016="" :="" \<recv:="" received="" 03="" 02="" 60="" 00="" 01="" 04="">FRAMER: ERROR address 6000 code 4 DEBUG:Thu Nov 3 22:14:23 2016 : Fehler recv, Abbruch DEBUG:Thu Nov 3 22:14:23 2016 : Fehler beim ausfuehren von setTempWWSoll 48 ERR: >FRAMER: addr was still active FE06</recv:></recv:>
Best regards...
Torsten
Last edit: Poldilein 2016-11-03
Hi Torsten,
first of all is "getTempWWsoll" working properly or also appears an error message there?
Please check your vcontrold.xml.
Is the "UTI" unit included in your file?
<unit name="Temperatur 1Byte ganzzahlig">
<abbrev>UTI</abbrev>
<calc get="V" set="V">
<type>uchar</type>
<entity>Grad Celsius</entity>
</calc></unit>
If not, insert the unit in vcontrold.xml and change to "<unit>UTI</unit>" for setTempWWSoll in the vito.xml
Hi,
thanks for your help!!!
getTempWWsoll is working fine. Like all other get commands too:
/vcon/vclient -h localhost -p 3002 -c 'detail getTempWWSoll'
detail getTempWWSoll:
getTempWWSoll: SEND 00 01 60 00 02;RECV 2 UT
Bit (BP): 255
Unit: Temperatur (UT)
Type: short
Get-Calc: V/10
Set-Calc: V*10
Einheit: Degrees Celsius
But the Unit is UT not UTI!
UTI is defined in the vcontrold.xml too:
<unit name="Temperatur 1Byte ganzzahlig">
<abbrev>UTI</abbrev>
<calc get="V" set="V">
<type>uchar</type>
<entity>Degrees Celsius</entity>
</calc></unit>
But the set command in vito.xml is UT not UTI??!?
<addr>6000</addr>
<len>1</len>
<unit>UT</unit>
<description>SETZEN WW - Betriebsdaten WW: Warmwassersolltemperatur (10..60 (95))</description>
Changing the Unit from UT to UTI ---> same Error :-(
Best regards
Torsten
Last edit: Poldilein 2016-11-04
Hi Torsten,
here is my debug view:
vctrld>setTempWWsoll 50
DEBUG:Sat Nov 5 11:30:41 2016 : Befehl: setTempWWsoll 50
DEBUG:Sat Nov 5 11:30:41 2016 : Send Exp:V [V=50.000000]
DEBUG:Sat Nov 5 11:30:41 2016 : Typ: uchar (Bytes: 32 )
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 41
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 06
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 00
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 02
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 63
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 00
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 01
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 32
DEBUG:Sat Nov 5 11:30:41 2016 : >SEND: 9E
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 06 (50.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <recv: received="" 06="" debug:sat="" nov="" 5="" 11:30:41="" 2016="" :="">FRAMER: Command send
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 41 (10.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: received 41
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 05 (0.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: received 05
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 01 (0.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 02 (10.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 63 (0.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 00 (0.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 01 (0.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <RECV: len=1 6C (10.0 ms)
DEBUG:Sat Nov 5 11:30:41 2016 : <recv: received="" 01="" 02="" 63="" 00="" 6c="" debug:sat="" nov="" 5="" 11:30:41="" 2016="" :="" -=""> OK
DEBUG:Sat Nov 5 11:30:41 2016 : OK</recv:></recv:>
For comparison, my files:
Last edit: chcatzsf 2016-11-05
Hello,
yeah the solution is near :-D Setting the temperature works.. but the deamon crash after writing
the temperature...
DEBUG:Sat Nov 5 14:42:19 2016 : <RECV: len=1 00 (0.0 ms)
DEBUG:Sat Nov 5 14:42:19 2016 : <RECV: len=1 02 (0.0 ms)
DEBUG:Sat Nov 5 14:42:19 2016 : <RECV: len=1 6A (0.0 ms)
DEBUG:Sat Nov 5 14:42:19 2016 : <recv: received="" 01="" 02="" 60="" 00="" 6a="" debug:sat="" nov="" 5="" 14:42:19="" 2016="" :="" -=""> OK
DEBUG:Sat Nov 5 14:42:19 2016 : OK
OK</recv:>
pi@raspberrypi:/vcon $ /vcon/vclient -h localhost -p 3002 -c 'getTempWWSoll'
[6990] Sat Nov 5 14:43:10 2016 : timeout wait:vctrld>
[6990] Sat Nov 5 14:43:10 2016 : Fehler bei der Server Kommunikation
pi@raspberrypi:/vcon $
I have to restart the deamon so that the get commands working again :-(
Best regards
Torsten