Ankündigung

Einklappen
Keine Ankündigung bisher.

Viessmann Plugin Neuentwicklung Python Hilfe

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    puuhh..

    Zitat von TCr82 Beitrag anzeigen
    Bin dann nochmal zur Heizung gelaufen und habe auch nachgesehen, ob das Lämpchen an/aus geht... und ja das tut es - allerdings brauchte es ein wenig Zeit.
    Das muss es gewesen sein.... das schreiben mit dem Plugin funktioniert *schäm*

    Was mich wohl gestern in die Irre geleitet hat ist das hier:

    Zitat von TCr82 Beitrag anzeigen
    Ok, der Fehler kommt nicht mehr, aber der Status ändert sich nicht an der Heizung:
    Die Antwort vom schreiben ist 00 und ich habe das interpretiert als den Wert der Abfrage... gesendet hatte ich ja nämlich an.
    Und da dann auch das Licht am Knopf sich nicht geändert hat, bin ich wohl vorschnell zum falschen entschluß gekommen.

    Kommentar


      Achso. Nee, bei KW gibts als Antwort auf Schreiben "00" (OK) oder keine Antwort -> Fehler.

      Den neuen Wert musst du so oder so nochmal extra lesen.

      Aber dann bin ich ja beruhigt Passt auch, denn alle aktuellen Änderungen sind schon im develop und gehen damit ins 1.8er Release

      Kommentar


        Zitat von TCr82 Beitrag anzeigen
        Aber ich denke das mit der Adresse 2500 & 3500 hat sich erstmal erledigt, denn die ist in der Viessmann DB zu meiner Heizung Doppelt definiert... nämlich z.B. auch in der Betriebsart, weswegen der von mir genannte Fehler auch passt und nicht verwundern sollte!
        Ich habe herausgefunden, was hier los ist.

        Die Adresse ist zwar doppelt definiert, aber ich habe übersehen, dass von der Adresse nur ein Teil ausgewertet wird.

        Hier z.B.

        Code:
          <EventType>
            <ID>HK_RaumsolltemperaturaktuellM2~0x3500</ID>
            <SDKDataType>Double</SDKDataType>
            <Unit>°C</Unit>
            <AccessMode>Read</AccessMode>
            <Conversion>Div10</Conversion>
            <Address>0x3500</Address>
            <FCRead>Virtual_READ</FCRead>
            <FCWrite>undefined</FCWrite>
            <Parameter>Byte</Parameter>
            <BlockLength>22</BlockLength>
            <BytePosition>12</BytePosition>
            <ByteLength>2</ByteLength>
            <BitPosition>0</BitPosition>
            <BitLength>0</BitLength>
            <OptionList>NoLogging</OptionList>
          </EventType>
        Um an die Daten von HK_RaumsolltemperaturaktuellM2 zu kommen, muss man also 22 Byte von Adresse 0x3500 lesen und von dem Wert 2 Byte von Position 12 auswerten.

        Das bedeutet wiederum, dass - selbst wenn wir das Plugin so anpassen, dass es von der Position die X Byte auswertet, dass er sich daran Aufhängen wird, sobald die Adresse ein weiteres Mal für einen anderen Namen (mit neuer Position) angegeben wird.
        Zuletzt geändert von TCr82; 08.01.2021, 21:48.

        Kommentar


          Bei HK_AktuelleBetriebsartM2 klappt es deswegen, da wir hier nur das erste Byte auswerten...

          Code:
            <EventType>
              <ID>HK_AktuelleBetriebsartM2~0x3500</ID>
              <DataType>Dropdown</DataType>
              <SDKDataType>Int</SDKDataType>
              <AccessMode>Read</AccessMode>
              <Conversion>NoConversion</Conversion>
              <ConversionFactor>0</ConversionFactor>
              <ConversionOffset>0</ConversionOffset>
              <Address>0x3500</Address>
              <FCRead>Virtual_READ</FCRead>
              <FCWrite>undefined</FCWrite>
              <Parameter>Byte</Parameter>
              <BlockLength>22</BlockLength>
              <BytePosition>1</BytePosition>
              <ByteLength>1</ByteLength>
              <BitPosition>0</BitPosition>
              <BitLength>0</BitLength>
              <OptionList>NoLogging;FMS</OptionList>
              <ValueList>0=Abschaltbetrieb;1=Reduzierter Betrieb;2=Normalbetrieb;3=Normalbetrieb</ValueList>
              <BlockFactor>0</BlockFactor>
              <MappingType>0</MappingType>
            </EventType>

          Kommentar


            Ich hab mal etwas rumgetestet, ich glaube das nämlich nicht so, wie es da steht.

            An 00f8 liest man zwei Bytes für den Datentyp, bei der W01C ist das 20 4d. Wenn ich jetzt von 00f7 3 Bytes lese, bekomme ich 00 20 4d, also gehe ich davon aus, dass ich 00f7 00f8 00f9 lese.

            Die Theorie, dass ich pro "Adresse" eine variable Anzahl von Bytes lesen kann, widerspricht der Bezeichnung als "Adresse" und nicht als "Code" oder so.
            Das Beispiel mit (Speicher-)Adresse 00f8 und 00f7 würde das bestätigen.

            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. Probier das doch mal aus... übers WebIf kannst du ja recht freizügig testen. Lass nebenher das Debug-Log laufen, dann kannst du auch die Hex-Daten mitplotten.

            Ich würde für diesen Testbetrieb den cyclic scheduler deaktivieren (geht leider nur über die Items, oder über die interaktive Konsole)

            Kommentar


              Moin,

              also ich hab das Ausprobiert:

              Als erstes mal die Ausgabe vom Lesen der zwei Adressen 2500 und 3500 mit 22 Byte

              Code:
              [FONT=monospace][COLOR=#000000]2021-01-09  08:54:28 DEBUG    plugins.viessmann_dev Adding temporary command config {'addr': '2500', 'len': 22, 'unit': 'IUNON', 'set': False} for command temp_cmd [/COLOR]
              2021-01-09  08:54:28 DEBUG    plugins.viessmann_dev Attempting to read address 2500 for command temp_cmd
              2021-01-09  08:54:28 DEBUG    plugins.viessmann_dev Build read packet for command temp_cmd
              2021-01-09  08:54:28 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-09  08:54:28 DEBUG    plugins.viessmann_dev Starting sync loop - attempt 1/5
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Starting sync loop - attempt 2/5
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Got sync. Commencing command send
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Successfully sent packet: 01f7250016
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Trying to receive 22 bytes of the response
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Received 22 bytes chunk of response as hexstring 020200000000e00201030101d200000001e002ffffff and as bytes b'\x02\x02\x00\x00\x00\x00\xe0\x02\x01\x03\x01\x01 \
              xd2\x00\x00\x00\x01\xe0\x02\xff\xff\xff'
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Response decoded to: commandcode: 2500, responsedatacode: 1, valuebytecount: 22, responsetypecode: 1
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Rawdatabytes formatted: 020200000000e00201030101d200000001e002ffffff and unformatted: bytearray(b'\x02\x02\x00\x00\x00\x00\xe0\x02\x01\x 03\x01\x01\xd2\x00\x00
              \x00\x01\xe0\x02\xff\xff\xff')
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Matched command temp_cmd and read transformed value 95780965659242265551716265658965216491874728336687 618 (integer raw value was 95780965659242265551716265658
              965216491874728336687618) and byte length 22
              2021-01-09  08:54:30 WARNING  logics.viess_test   Wert lesen: 95780965659242265551716265658965216491874728336687 618
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Adding temporary command config {'addr': '3500', 'len': 22, 'unit': 'IUNON', 'set': False} for command temp_cmd
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Attempting to read address 3500 for command temp_cmd
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Build read packet for command temp_cmd
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Created command temp_cmd to be sent as hexstring: 01f7350016 and as bytes: bytearray(b'\x01\xf75\x00\x16')
              2021-01-09  08:54:30 DEBUG    plugins.viessmann_dev Starting sync loop - attempt 1/5
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Starting sync loop - attempt 2/5
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Got sync. Commencing command send
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Successfully sent packet: 01f7350016
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Trying to receive 22 bytes of the response
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Received 22 bytes chunk of response as hexstring 0202adb448006d0101030101aa000000016d01ffffff and as bytes b'\x02\x02\xad\xb4H\x00m\x01\x01\x03\x01\x01\xaa\x 0
              0\x00\x00\x01m\x01\xff\xff\xff'
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Response decoded to: commandcode: 3500, responsedatacode: 1, valuebytecount: 22, responsetypecode: 1
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Rawdatabytes formatted: 0202adb448006d0101030101aa000000016d01ffffff and unformatted: bytearray(b'\x02\x02\xad\xb4H\x00m\x01\x01\x03\x01 \x01\xaa\x00\x00\x00\x
              01m\x01\xff\xff\xff')
              2021-01-09  08:54:32 DEBUG    plugins.viessmann_dev Matched command temp_cmd and read transformed value 95780965626923607471030045026567179098504464836657 666 (integer raw value was 95780965626923607471030045026
              567179098504464836657666) and byte length 22
              2021-01-09  08:54:32 WARNING  logics.viess_test   Wert lesen: 95780965626923607471030045026567179098504464836657 666[/FONT]
              Zitat von Morg Beitrag anzeigen
              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?
              Zuletzt geändert von TCr82; 09.01.2021, 10:03.

              Kommentar


                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
                Zuletzt geändert von TCr82; 09.01.2021, 09:52.

                Kommentar


                  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.

                  Der ursprüngliche Antwortcode bei dir war

                  Code:
                  hex: 02 02 00 00 00 00 e0 02 01 03 01 01 d2 00 00 00 01 e0 02 ff ff ff
                  pos: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22
                  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...

                  Kommentar


                    Zitat von Morg Beitrag anzeigen
                    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)
                    Basis Adresse 2500
                    Name Adresse BytePos BitPos Bytes Typ Konvertierung Einheit
                    HK_AktuelleBetriebsartA1M1 2500 1 0 1 Int (Byte) - 0=Abschaltbetrieb;1=Reduzierter Betrieb;2=Normalbetrieb;3=Normalbetrieb
                    HK_AufheiztimerA1M1 2501 2 0 4 Double (Byte) Div10 Sekunden
                    HK_VT_Solltemperatur_A1M1 2505 6 0 2 Double (Sint) Div10 °C
                    HK_WW_Freigabe_vonA1M1 2507 8 0 1 Int (Byte) - 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

                    Kommentar


                      Zitat von Morg Beitrag anzeigen
                      Was meinst du mit "große Buchstaben akzeptieren"?
                      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.

                      Zitat von Morg Beitrag anzeigen
                      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.

                      Zitat von Morg Beitrag anzeigen
                      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.

                      Kommentar


                        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.

                        Zitat von TCr82 Beitrag anzeigen
                        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...

                        Kommentar


                          Zitat von Morg Beitrag anzeigen
                          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.
                          Wie komme ich denn sonnst an die Daten heran?
                          Zitat von Morg Beitrag anzeigen
                          Also, abgesehen davon, dass ich da bei mir keine Daten bekomme - weilches Format müsste denn da gelesen werden?
                          Du meinst was da raus kommen soll? Wie der Name HexByte2AsciiByte schon sagt... AsciiByte bzw. einfach Ascii ??

                          Kommentar


                            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")

                            Kommentar


                              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.
                              Zuletzt geändert von TCr82; 10.01.2021, 18:40.

                              Kommentar


                                Zitat von TCr82 Beitrag anzeigen
                                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

                                Kommentar

                                Lädt...
                                X