Wenn dies dein erster Besuch hier ist, lies bitte zuerst die Hilfe - Häufig gestellte Fragen durch. Du musst dich vermutlich registrieren, bevor du Beiträge verfassen kannst. Klicke oben auf 'Registrieren', um den Registrierungsprozess zu starten. Du kannst auch jetzt schon Beiträge lesen. Suche dir einfach das Forum aus, das dich am meisten interessiert.
ich möchte mich für die interessanten Beiträge in diesem Thread bedanken.
Darauf aufbauend habe ich (v.a. zu meinem eigenen Vergnügen) ein Python-Paket zur Steuerung der Viessmann-Heizung über Optolink erstellt. https://github.com/joppi588/pyvcontrol
Ich habe mir Mühe gegeben, das objektorientiert und strukturiert zu programmieren, evtl. ist es ja für den einen oder anderen von Interesse.
b) die wichtigere Frage: was für Daten (welcher Inhalt) soll das sein? Hast du das bei dir mal abgefragt? Ich kriege nur 0xff
Die Seriennummer, wie der Definition dazu sagt (ecnsysControllerSerialNumber bzw. ecnsysDeviceBoilerSerialNumber). Evtl. können das ja nur die neueren Modelle, meine gibt leider wohl auch nix raus. Oder es stimmt was mit der Kommunikation nicht.
Mir ist da gerade wieder der Fehler untergekommen, den du ja schon "bearbeitet" hast, hier passt wohl aber immer noch was nicht mit der Ausgabe der Adresse:
Code:
[FONT=monospace][COLOR=#000000]2021-01-13 03:51:48 ERROR plugins.viessmann_dev Received 0 bytes chunk from {addr} - this probably is a communication error, possibly a wrong datapoint address?[/COLOR][/FONT]
Du meinst was da raus kommen soll? Wie der Name HexByte2AsciiByte schon sagt... AsciiByte bzw. einfach Ascii ??
Ich meine, was für Daten das geben soll. Die Heizung gibt sonst nirgendwo ASCII raus, nicht beim Typ in 0x00f8, nicht bei der Betriebsart oder sonstwo.
a) woher kommt die Erwartung, dass es dort ACSII gibt?
b) die wichtigere Frage: was für Daten (welcher Inhalt) soll das sein? Hast du das bei dir mal abgefragt? Ich kriege nur 0xff
Eben ist mir gerade noch ein Fehler mit der Aussentemp aufgefallen, da es gerade 0 Grad C sind:
Code:
2021-01-10 18:32:43 WARNING logics.viess_test Lese Aussentemperatur
2021-01-10 18:32:43 DEBUG plugins.viessmann_dev Attempting to read address 0800 for command Aussentemperatur
2021-01-10 18:32:43 DEBUG plugins.viessmann_dev Build read packet for command Aussentemperatur
2021-01-10 18:32:43 DEBUG plugins.viessmann_dev Created command Aussentemperatur to be sent as hexstring: 01f7080002 and as bytes: bytearray(b'\x01\xf7\x08\x00\x02')
2021-01-10 18:32:43 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7080002
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring faff and as bytes b'\xfa\xff'
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 0800, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Rawdatabytes formatted: faff and unformatted: bytearray(b'\xfa\xff')
2021-01-10 18:32:44 DEBUG plugins.viessmann_dev Matched command Aussentemperatur and read transformed value 6553.0 (integer raw value was 65530) and byte length 2
2021-01-10 18:32:44 WARNING logics.viess_test Wert lesen: 6553.0
EDIT: Fehler gefunden, das sind Minus Werte, und in der Definition von Viessmann steht auch, dass es SInt ist, habe die Unit auf IS10 gesetzt, jetzt passt es.
Da ich das hier gerade Gebaut habe, wollte ich es für andere die es gebrauchen können bereit stellen. Es ist eine Logic die ich einmal am Tag aufrufe und die bei einer Abweichung von 2 Minuten die Zeit an der Heizung wieder neu Synchronisiert.
Code:
#!/usr/bin/env python3
# viess_fixtime.py
from datetime import datetime
plug = sh.plugins.return_plugin('viessmann')
if plug is not None:
sys_cur_time_dt = shtime.now()
sys_cur_time = sys_cur_time_dt.strftime('%Y%m%d%W%H%M%S')
logger.debug(f'sys_cur_time={sys_cur_time}')
logger.debug(f'sys_cur_time_dt={sys_cur_time_dt}')
viess_cur_time = plug.read_addr('088e')
logger.debug(f"viess_cur_time={viess_cur_time}")
viess_cur_time_dt = datetime.strptime(viess_cur_time, '%Y-%m-%dT%H:%M:%S')
logger.debug(f"viess_cur_time_dt={viess_cur_time_dt}")
timediff = shtime.time_diff(sys_cur_time_dt, viess_cur_time_dt, 'm')
if timediff <= -2 or timediff >= 2:
logger.warning(f'Update Viessmann Systemtime, Timediff: {timediff:.0f} Min.')
plug.write_addr('088e', sys_cur_time)
else:
logger.error("can't get viessmann plugin")
Also, bei deinen Logdaten scheint meine Theorie keinen Bestand mehr zu habe. Vielleicht haben sie das mit dem Protokoll geändert, oder ich habe tatsächlich nur zufällig passende Daten gefunden.
Also, bei deinen Logdaten scheint meine Theorie keinen Bestand mehr zu habe. Vielleicht haben sie das mit dem Protokoll geändert, oder ich habe tatsächlich nur zufällig passende Daten gefunden.
Die zwei Adressen stehen für die Seriennummer genauer ecnsysControllerSerialNumber=0xF000 und ecnsysDeviceBoilerSerialNumber=0xF010 (je nach Heizungstyp das eine oder das andere)
Evtl. gibt ja meine Heizung da nix zurück, sind aber globale Adressen die Viessmann in der Vitosoft immer abfragt. Genauso wie ecnsysDeviceIdent=0x00F8 bei "uns" als AnlagenTyp definiert.
Also, abgesehen davon, dass ich da bei mir keine Daten bekomme - weilches Format müsste denn da gelesen werden? Die anderen Adressen, bei denen "Strings" rauskommen, liefern ja nur Binärdaten und die werden aus im Plugin hinterlegten Feldern auf Strings umgesetzt...
Ja, den Fehler hast du ja jetzt nach dem PR korrigiert, die Funktion read_temp_addr funktionierte nicht, wenn man Großbuchstaben in der Hex Adresse hatte.
Im ursprünglichen Debug-Log war ein seltsamer Fehler, der so nicht auftauchen sollte - er hat erst das temp_cmd definiert und dann nicht gefunden. Hattest du da was am Code geändert?
Das hing auch mit dem gleichen Fehler zusammen. Den Fehler musste ich erstmal finden und beheben.
Die Frage aus deinem nächsten Beitrag verstehe ich nicht. Was soll da rauskommen? Und ein String mit 16mal 0xFF ist kaum sinnvoll...
Die zwei Adressen stehen für die Seriennummer genauer ecnsysControllerSerialNumber=0xF000 und ecnsysDeviceBoilerSerialNumber=0xF010 (je nach Heizungstyp das eine oder das andere)
Evtl. gibt ja meine Heizung da nix zurück, sind aber globale Adressen die Viessmann in der Vitosoft immer abfragt. Genauso wie ecnsysDeviceIdent=0x00F8 bei "uns" als AnlagenTyp definiert.
Die Ergebnisse vom nächsten Versuch sehen jetzt nicht so aus, als wären es nutzbare Informationen. Vielleicht unterscheidet sich das zwischen den Protokollen, vielleicht war das bei mir auch nur Zufall. Aber als Lösung für dein Problem wohl nicht geeignet.
Ich bin das mit der Adresse nochmal angegangen:
Dazu meine Tabelle die ich aus den Infos zusammen getragen habe, ich hoffe ich habe die "vituelle" Adresse dann richtig berechnet? (Dem Ergebnis nach stimmt das aber nicht, oder es geht so einfach nicht)
0=Freigabe aus;1=Freigabe nach WW-Schaltzeiten;2=Freigabe durch
Party/Externe Umschaltung
HK_PumpenbefehlA1M1
2509
10
0
1
Int (Byte)
-
0=Heizkreispumpe aus;1=Heizkreispumpe ein;2=Heizkreispumpe
ein;3=Heizkreispumpe ein reduziert
HK_RSWSBetriebA1M1
250A
11
0
1
Int (Byte)
-
0=aktiv;1=inaktiv
HK_RaumsolltemperaturaktuellA1M1
250B
12
0
2
Int (Byte)
Div10
°C
HK_Frostgefahr_aktivA1M1
250F
16
135
1
Int (Byte)
-
0=inaktiv;1=aktiv
Eine Sonderheit stellt noch der letzte Datensatz von HK_Frostgefahr_aktivA1M1 dar. Denn dieser Wertet ein spezielles Bit aus dem einen Byte aus.
Hier nochmal ein lesen der kompletten Werte (hintereinander). Letztes mal hatte ich ja leider eine Verzögerung von einer Stunde (wegen dem Fehler mit lower()), weswegen die Werte wahrscheinlich nicht mehr zu vergleichen waren.
Code:
2021-01-10 11:24:41 WARNING logics.viess_test Lese alle 22 Byte von HK1:
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '2500', 'len': 22, 'unit': 'IUNON', 'set': False} for command te
mp_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Attempting to read address 2500 for command temp_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250016 and as bytes: bytearray(b'\x01\xf7%\x00\x16'
)
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250016
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Trying to receive 22 bytes of the response
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Received 22 bytes chunk of response as hexstring 020200000000fa0201030101d200000001fa02ffffff and as byte
s b'\x02\x02\x00\x00\x00\x00\xfa\x02\x01\x03\x01\x01 \xd2\x00\x00\x00\x01\xfa\x02\xff\xff\xff'
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 2500, responsedatacode: 1, valuebytecount: 22, responsetypecode: 1
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Rawdatabytes formatted: 020200000000fa0201030101d200000001fa02ffffff and unformatted: bytearray(b'\x02\x0
2\x00\x00\x00\x00\xfa\x02\x01\x03\x01\x01\xd2\x00\ x00\x00\x01\xfa\x02\xff\xff\xff')
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 95780965661507184985942032071777437886258926946615 810
(integer raw value was 95780965661507184985942032071777437886258926946615 810) and byte length 22
2021-01-10 11:24:41 WARNING logics.viess_test Wert lesen: 95780965661507184985942032071777437886258926946615 810
2021-01-10 11:24:41 WARNING logics.viess_test Lese HK_AufheiztimerA1M1 ab Position 2, 4 Byte (Double)
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '2501', 'len': 4, 'unit': 'IU10', 'set': False} for command temp
_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Attempting to read address 2501 for command temp_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250104 and as bytes: bytearray(b'\x01\xf7%\x01\x04'
)
2021-01-10 11:24:41 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250104
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Trying to receive 4 bytes of the response
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Received 4 bytes chunk of response as hexstring ffffffff and as bytes b'\xff\xff\xff\xff'
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 2501, responsedatacode: 1, valuebytecount: 4, responsetypecode: 1
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffffffff and unformatted: bytearray(b'\xff\xff\xff\xff')
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 429496729.5 (integer raw value was 4294967295) and by
te length 4
2021-01-10 11:24:43 WARNING logics.viess_test Wert lesen: 429496729.5
2021-01-10 11:24:43 WARNING logics.viess_test Lese HK_VT_Solltemperatur_A1M1 ab Position 6, 2 Byte (Double-SInt)
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '2505', 'len': 2, 'unit': 'IS10', 'set': False} for command temp
_cmd
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Attempting to read address 2505 for command temp_cmd
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250502 and as bytes: bytearray(b'\x01\xf7%\x05\x02'
)
2021-01-10 11:24:43 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250502
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring ffff and as bytes b'\xff\xff'
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 2505, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffff and unformatted: bytearray(b'\xff\xff')
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value -0.1 (integer raw value was -1) and byte length 2
2021-01-10 11:24:45 WARNING logics.viess_test Wert lesen: -0.1
2021-01-10 11:24:45 WARNING logics.viess_test Lese HK_WW_Freigabe_vonA1M1 ab Position 8, 1 Byte (Int)
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '2507', 'len': 1, 'unit': 'IUINT', 'set': False} for command tem
p_cmd
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Attempting to read address 2507 for command temp_cmd
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250701 and as bytes: bytearray(b'\x01\xf7%\x07\x01'
)
2021-01-10 11:24:45 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250701
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Trying to receive 1 bytes of the response
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Received 1 bytes chunk of response as hexstring ff and as bytes b'\xff'
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 2507, responsedatacode: 1, valuebytecount: 1, responsetypecode: 1
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ff and unformatted: bytearray(b'\xff')
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 255.0 (integer raw value was 255) and byte length 1
2021-01-10 11:24:47 WARNING logics.viess_test Wert lesen: 255.0
2021-01-10 11:24:47 WARNING logics.viess_test Lese HK_PumpenbefehlA1M1 ab Position 10, 1 Byte (Int)
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '2509', 'len': 1, 'unit': 'IUINT', 'set': False} for command temp_cmd
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Attempting to read address 2509 for command temp_cmd
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250901 and as bytes: bytearray(b'\x01\xf7%\t\x01')
2021-01-10 11:24:47 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250901
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Trying to receive 1 bytes of the response
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Received 1 bytes chunk of response as hexstring ff and as bytes b'\xff'
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 2509, responsedatacode: 1, valuebytecount: 1, responsetypecode: 1
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ff and unformatted: bytearray(b'\xff')
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 255.0 (integer raw value was 255) and byte length 1
2021-01-10 11:24:49 WARNING logics.viess_test Wert lesen: 255.0
2021-01-10 11:24:49 WARNING logics.viess_test Lese HK_RSWSBetriebA1M1 ab Position 11, 1 Byte (Int)
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '250a', 'len': 1, 'unit': 'IUINT', 'set': False} for command temp_cmd
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Attempting to read address 250a for command temp_cmd
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250a01 and as bytes: bytearray(b'\x01\xf7%\n\x01')
2021-01-10 11:24:49 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:51 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:51 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:51 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250a01
2021-01-10 11:24:51 DEBUG plugins.viessmann_dev Trying to receive 1 bytes of the response
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Received 1 bytes chunk of response as hexstring ff and as bytes b'\xff'
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 250a, responsedatacode: 1, valuebytecount: 1, responsetypecode: 1
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ff and unformatted: bytearray(b'\xff')
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 255.0 (integer raw value was 255) and byte length 1
2021-01-10 11:24:52 WARNING logics.viess_test Wert lesen: 255.0
2021-01-10 11:24:52 WARNING logics.viess_test Lese HK_RaumsolltemperaturaktuellA1M1 ab Position 12, 2 Byte
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '250b', 'len': 1, 'unit': 'IU10', 'set': False} for command temp_cmd
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Attempting to read address 250b for command temp_cmd
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250b01 and as bytes: bytearray(b'\x01\xf7%\x0b\x01')
2021-01-10 11:24:52 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:53 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250b01
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Trying to receive 1 bytes of the response
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Received 1 bytes chunk of response as hexstring ff and as bytes b'\xff'
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 250b, responsedatacode: 1, valuebytecount: 1, responsetypecode: 1
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ff and unformatted: bytearray(b'\xff')
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 25.5 (integer raw value was 255) and byte length 1
2021-01-10 11:24:54 WARNING logics.viess_test Wert lesen: 25.5
2021-01-10 11:24:54 WARNING logics.viess_test Lese HK_Frostgefahr_aktivA1M1 ab Position 16, 1 Byte (Int)
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '250f', 'len': 1, 'unit': 'IUINT', 'set': False} for command temp_cmd
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Attempting to read address 250f for command temp_cmd
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250f01 and as bytes: bytearray(b'\x01\xf7%\x0f\x01')
2021-01-10 11:24:54 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-10 11:24:55 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250f01
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Trying to receive 1 bytes of the response
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Received 1 bytes chunk of response as hexstring ff and as bytes b'\xff'
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 250f, responsedatacode: 1, valuebytecount: 1, responsetypecode: 1
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ff and unformatted: bytearray(b'\xff')
2021-01-10 11:24:56 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 255.0 (integer raw value was 255) and byte length 1
2021-01-10 11:24:56 WARNING logics.viess_test Wert lesen: 255.0
Die erste Debug-Ausgabe sieht im Prinzip nicht verkehrt aus, auch wenn ich an den Werten nicht viel erkennen kann.
(Hinweis: poste Logs bitte nicht als Quote, sondern als Code, sonst verschwindet der Code beim Zitieren, das ist immer etwas anstrengend, bis man dann die richtige Stelle wiederfindet)
Die Ergebnisse vom nächsten Versuch sehen jetzt nicht so aus, als wären es nutzbare Informationen. Vielleicht unterscheidet sich das zwischen den Protokollen, vielleicht war das bei mir auch nur Zufall. Aber als Lösung für dein Problem wohl nicht geeignet.
An Position 12 2 Bytes wäre 01 d2, also 46,6 Grad. Welche Temperatur soll das sein? Ist der Wert plausibel?
Im ursprünglichen Debug-Log war ein seltsamer Fehler, der so nicht auftauchen sollte - er hat erst das temp_cmd definiert und dann nicht gefunden. Hattest du da was am Code geändert?
Ja, die Fehlerausgabe an der Stelle und ggf. die Ausgaben von read_addr und read_temp_addr könnte man noch anpassen.
Außerdem will ich noch einen anderen Datentyp einbauen, der "raw hex" ausgibt, weil die Int-Wandlung nicht hilft, wenn man den richtigen Datenpunkt erst finden muss.
Was meinst du mit "große Buchstaben akzeptieren"?
Die Frage aus deinem nächsten Beitrag verstehe ich nicht. Was soll da rauskommen? Und ein String mit 16mal 0xFF ist kaum sinnvoll...
Oh und meinst du, du kannst die Konvertierung HexByte2AsciiByte ergänzen? So dass da ein String auf Adresse F010 oder F000 raus kommt? Gelesen werden da 16 Byte.
2021-01-09 09:37:15 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': 'f000', 'len': 16, 'unit': 'IUNON', 'set': False} for command temp_cmd
2021-01-09 09:37:15 DEBUG plugins.viessmann_dev Attempting to read address f000 for command temp_cmd
2021-01-09 09:37:15 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:37:15 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7f00010 and as bytes: bytearray(b'\x01\xf7\xf0\x00\x10')
2021-01-09 09:37:15 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7f00010
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Trying to receive 16 bytes of the response
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Received 16 bytes chunk of response as hexstring ffffffffffffffffffffffffffffffff and as bytes b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \xff\xff\xff\
xff'
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Response decoded to: commandcode: f000, responsedatacode: 1, valuebytecount: 16, responsetypecode: 1
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffffffffffffffffffffffffffffffff and unformatted: bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\x ff\xff\xff\xff\xff\xff\xff')
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 340282366920938463463374607431768211455 (integer raw value was 340282366920938463463374607431768211455) an
d byte length 16
2021-01-09 09:37:16 WARNING logics.viess_test Wert lesen: 340282366920938463463374607431768211455
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': 'f010', 'len': 16, 'unit': 'IUNON', 'set': False} for command temp_cmd
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Attempting to read address f010 for command temp_cmd
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7f01010 and as bytes: bytearray(b'\x01\xf7\xf0\x10\x10')
2021-01-09 09:37:16 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7f01010
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Trying to receive 16 bytes of the response
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Received 16 bytes chunk of response as hexstring ffffffffffffffffffffffffffffffff and as bytes b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \xff\xff\xff\
xff'
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Response decoded to: commandcode: f010, responsedatacode: 1, valuebytecount: 16, responsetypecode: 1
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffffffffffffffffffffffffffffffff and unformatted: bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\x ff\xff\xff\xff\xff\xff\xff')
2021-01-09 09:37:18 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 340282366920938463463374607431768211455 (integer raw value was 340282366920938463463374607431768211455) an
d byte length 16
2021-01-09 09:37:18 WARNING logics.viess_test Wert lesen: 340282366920938463463374607431768211455
In deinem Beispiel hieße das, dass du entweder an 350C oder 350B 2 Bytes lesen könntest, die mit IU10 den gewünschten Wert ergeben könnten.
Wenn ich das richtig verstanden habe, meinst du, dass man einfach anstatt die "richtige" Adresse so wie definiert auszulesen, die Adresse um die Anzahl der Byte hochrechnet um dort direkt auszulesen? Könnte gehen, wenn die Heizung nicht ein Filter hat wo man was Lesen/Schreiben kann.
Die Adressen mag das Plugin aber nicht:
EDIT: hab den Code angepasst, damit er auch große Buchstaben akzeptiert bzw. umwandelt mit lower()
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev scheduler_get: name = plugins.viessmann_dev.cyclic
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '250b', 'len': 2, 'unit': 'IU10', 'set': False} for command temp_cmd
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev Attempting to read address 250b for command temp_cmd
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250b02 and as bytes: bytearray(b'\x01\xf7%\x0b\x02')
2021-01-09 09:55:27 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5 2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250b02
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring ffff and as bytes b'\xff\xff'
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 250b, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffff and unformatted: bytearray(b'\xff\xff')
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 6553.5 (integer raw value was 65535) and byte length 2
2021-01-09 09:55:29 WARNING logics.viess_test Wert lesen: 6553.5
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '350b', 'len': 2, 'unit': 'IU10', 'set': False} for command temp_cmd
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Attempting to read address 350b for command temp_cmd
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7350b02 and as bytes: bytearray(b'\x01\xf75\x0b\x02')
2021-01-09 09:55:29 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7350b02
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring ffff and as bytes b'\xff\xff'
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 350b, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffff and unformatted: bytearray(b'\xff\xff')
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 6553.5 (integer raw value was 65535) and byte length 2
2021-01-09 09:55:31 WARNING logics.viess_test Wert lesen: 6553.5
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '250c', 'len': 2, 'unit': 'IU10', 'set': False} for command temp_cmd
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Attempting to read address 250c for command temp_cmd
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7250c02 and as bytes: bytearray(b'\x01\xf7%\x0c\x02')
2021-01-09 09:55:31 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:55:33 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-09 09:55:33 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:55:33 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7250c02
2021-01-09 09:55:33 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring ffff and as bytes b'\xff\xff'
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 250c, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffff and unformatted: bytearray(b'\xff\xff')
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 6553.5 (integer raw value was 65535) and byte length 2
2021-01-09 09:55:34 WARNING logics.viess_test Wert lesen: 6553.5
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Adding temporary command config {'addr': '350c', 'len': 2, 'unit': 'IU10', 'set': False} for command temp_cmd
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Attempting to read address 350c for command temp_cmd
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Build read packet for command temp_cmd
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7350c02 and as bytes: bytearray(b'\x01\xf75\x0c\x02')
2021-01-09 09:55:34 DEBUG plugins.viessmann_dev Starting sync loop - attempt 1/5
2021-01-09 09:55:35 DEBUG plugins.viessmann_dev Starting sync loop - attempt 2/5
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Got sync. Commencing command send
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Successfully sent packet: 01f7350c02
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Trying to receive 2 bytes of the response
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Received 2 bytes chunk of response as hexstring ffff and as bytes b'\xff\xff'
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Response decoded to: commandcode: 350c, responsedatacode: 1, valuebytecount: 2, responsetypecode: 1
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Rawdatabytes formatted: ffff and unformatted: bytearray(b'\xff\xff')
2021-01-09 09:55:36 DEBUG plugins.viessmann_dev Matched command temp_cmd and read transformed value 6553.5 (integer raw value was 65535) and byte length 2
2021-01-09 09:55:36 WARNING logics.viess_test Wert lesen: 6553.5
Sieht das richtig aus für dich?
Nebenbei könnte man die Fehlerausgabe etwas anpassen, damit man weiss um welche Adresse es geht (wenn man nicht gerade Debug aktiviert hat hilft die Meldung einem nicht weiter).
2021-01-08 23:52:55 ERROR plugins.viessmann_dev Received 0 bytes chunk - this probably is a communication error, possibly a wrong datapoint address?
Wir verarbeiten personenbezogene Daten über die Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen. Weitere Informationen findest Du in unserer Datenschutzerklärung.
Indem Du unten auf "ICH stimme zu" klickst, stimmst Du unserer Datenschutzerklärung und unseren persönlichen Datenverarbeitungs- und Cookie-Praktiken zu, wie darin beschrieben. Du erkennst außerdem an, dass dieses Forum möglicherweise außerhalb Deines Landes gehostet wird und bist damit einverstanden, dass Deine Daten in dem Land, in dem dieses Forum gehostet wird, gesammelt, gespeichert und verarbeitet werden.
Einen Kommentar schreiben: