openv / vcontrold

:fire: vcontrold Daemon for control and logging of Viessmann® type heating devices
https://github.com/openv/openv/wiki
GNU General Public License v3.0
100 stars 54 forks source link

Problem set Command P300 #133

Open bennatzen opened 10 months ago

bennatzen commented 10 months ago

Hi there,

got an issue while I am trying to set values. Is the probleme the same like in issue https://github.com/openv/vcontrold/issues/123 ? vito.xml:

<devices>
<device ID="204B" name="V200WO1C" protocol="P300"/>
</devices>

<command name="setTempWWsoll" protocmd="setaddr">
<addr>6000</addr>
<len>2</len>
<unit>UT</unit>
<description>Setze Warmwassersolltemperatur in Grad C</description>
</command>
<protocol name="P300">
      <pid>41</pid>
      <macros>
        <macro name="GETADDR">
          <command>SEND 00 01</command>
        </macro>
        <macro name="SETADDR">
          <command>SEND 00 02</command>
        </macro>
      </macros>
      <commands>
        <command name="getaddr">
          <send>GETADDR $addr $hexlen;RECV $len $unit</send>
        </command>
        <command name="setaddr">
          <send>SETADDR $addr $hexlen;SEND BYTES $unit;RECV 1 SR</send>
        </command>
        <command name="gettestaddr">
          <send/>
        </command>
      </commands>
vctrld>setTempWWsoll 50
DEBUG:Sat Sep 16 11:02:05 2023 : Command: setTempWWsoll 50
DEBUG:Sat Sep 16 11:02:05 2023 : Send Exp: V*10 [V=50.000000]
DEBUG:Sat Sep 16 11:02:05 2023 : Type: short (bytes: F4 01 )
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 41
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 07
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 00
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 02
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 60
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 00
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 01
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: F4
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 01
DEBUG:Sat Sep 16 11:02:05 2023 : >SENT: 5F
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 06 (20.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: received 06
DEBUG:Sat Sep 16 11:02:05 2023 : >FRAMER: framer_set_actaddr framer_current_addr = 0060 (was FFFF)
DEBUG:Sat Sep 16 11:02:05 2023 : >FRAMER: Command send
DEBUG:Sat Sep 16 11:02:05 2023 : >FRAMER: no preset result
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 41 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: received 41
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 06 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: received 06
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 03 (10.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 02 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 60 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 00 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 01 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 04 (10.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: len=1 70 (0.0 ms)
DEBUG:Sat Sep 16 11:02:05 2023 : <RECV: received 03 02 60 00 01 04 70
DEBUG:Sat Sep 16 11:02:05 2023 : >FRAMER: framer_reset_actaddr framer_current_addr = FRAMER_NO_ADDR (was 0060)
DEBUG:Sat Sep 16 11:02:05 2023 : >FRAMER: ERROR address 6000 code 4
DEBUG:Sat Sep 16 11:02:05 2023 : Error in recv, terminating
DEBUG:Sat Sep 16 11:02:05 2023 : Error executing setTempWWsoll 50
ERR: >FRAMER: ERROR address 6000 code 4
Error in recv, terminating
Error executing setTempWWsoll 50

Any ideas? I can't fix it :(

bennatzen commented 10 months ago

I changed the KW2 Protocol entry to SEND 00 02. Now it works. Any idea?

SEND 04;WAIT 05 SEND 01 F7 SEND 00 02