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
101 stars 54 forks source link

P300 set_addr bug using unit off #13

Closed hmueller01 closed 6 years ago

hmueller01 commented 6 years ago

P300 set_addr is still not fully working. While vclient -h localhost:3002 -c "setGwgBetriebsart_M2 Heizen und WW" works vclient -h localhost:3002 -c "unit off" -c "setGwgBetriebsart_M2 1" sets 2 (Heizen und WW with my vcontrold.xml definition instead of 1 = Nur WW) So it looks like the buffer gets not filled correct in case of unit off (so it is the content of the last command). Need to look into this in more detail.

[27273] Fri Nov 17 18:22:09 2017 : Command: setGwgBetriebsart_M2 Heizen und WW
[27273] Fri Nov 17 18:22:09 2017 : Process 27273 tries to aquire lock
[27273] Fri Nov 17 18:22:09 2017 : Process 27273 got lock
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: open device /dev/vitoir0 ProtocolID 41
[27273] Fri Nov 17 18:22:09 2017 : Configuring serial interface /dev/vitoir0
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 04
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 05 (420.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 05
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: closed
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 16
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 00
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 00
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 06 (10.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 06
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: opened
[27273] Fri Nov 17 18:22:09 2017 : Heizen und WW -> 02
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 41
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 06
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 00
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 02
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 33
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 23
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 01
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 02
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 61
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 06 (20.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 06
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: addr was still active FE06
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: Command send
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: no preset result
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 41 (20.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 41
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 05 (0.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 05
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=5 01 (0.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 5F (10.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 01 02 33 23 01 5F
[27273] Fri Nov 17 18:22:09 2017 : 00 -> OK
[27273] Fri Nov 17 18:22:09 2017 : OK
[27273] Fri Nov 17 18:22:09 2017 : Command: quit
[27273] Fri Nov 17 18:22:09 2017 : >SEND: 04
[27273] Fri Nov 17 18:22:09 2017 : <RECV: len=1 06 (20.0 ms)
[27273] Fri Nov 17 18:22:09 2017 : <RECV: received 06
[27273] Fri Nov 17 18:22:09 2017 : >FRAMER: closed
[27273] Fri Nov 17 18:22:09 2017 : Process 27273 released lock
[27273] Fri Nov 17 18:22:09 2017 : Closed connection (fd:5)

One more thing is not correct. >FRAMER: addr was still active FE06 is a LOG_ERR which should be avoided. I still do not fully understand the need/use of the framer_set_actaddr(), framer_preset_result() code.

Hardy74 commented 6 years ago

Hallo,

wirkt das Fix auch gegen folgendes Problem?

vclient -h localhost:3002 -c "setTempWWsoll 54" SRV ERR: >FRAMER: error 15 Fehler recv, Abbruch Fehler beim ausfuehren von setTempWWsoll 54 setTempWWsoll 54: server error

Das Setzen der Raumtemperaturen funktioniert bei gleichen unit-Einstellungen (UTI) einwandfrei. Adresse von setTempWWsoll: 6300, vielleicht stimmt die ja auch wieder mal nicht!? (VScotHO1, P300).

speters commented 6 years ago

Update wg. falsch in Datenbank geschaut: WWsoll auf 0x6300 ist korrekt für VScotHO1. Valide Werte sind 10..95. RTSoll liegt auf 0x2306. Werte 3..37. Jeweils ein Byte ohne Umrechung.

Hardy74 commented 6 years ago

Das wars, nun gehts. Danke!