Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem VS1 and Vitoconnect #68

Open
SGK-IoT opened this issue Jan 4, 2025 · 229 comments
Open

Problem VS1 and Vitoconnect #68

SGK-IoT opened this issue Jan 4, 2025 · 229 comments

Comments

@SGK-IoT
Copy link

SGK-IoT commented Jan 4, 2025

I was using the Optolink splitter without the Vitoconnect because I didn't have the CP2102, and it worked.

Today I upgraded my system with the CP2102 from AZDelivery. I configured it in the settings_ini.py using /dev/ttyS0 and /dev/ttyAMA0 now I'm getting the error: 'bytes' object cannot be interpreted as an integer

I am using a Pi 3B+ with the Optolinksplitter for the KW protocol.

Full console output:

python3 optolink_switch.py

optolinkvs1
awaiting Vitoconnect...
Server listening on 0.0.0.0:65234
Broker granted the following QoS: 0
'bytes' object cannot be interpreted as an integer
exit close
closing serViCon
reset protocol
closing serViDev
cancel poll timer
exiting TCP/IP client
disconnect MQTT client

settings_ini.txt

@philippoo66
Copy link
Owner

philippoo66 commented Jan 4, 2025

hi @silaskreuze2008 !

as far as I remember the KW protocol never got tested with vitoconnect, so we have to do some 'pioneer work' now ;-)

you set log_vitoconnect = True - that's fine! does the vitolog.txt contain anything?

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

No Vitolog is completely empty.

I just tried to set the port of the CP2102 to none again, and it seems to work again, so maybe it's something serial-related or something to do with my Pi. I enabled the serial connection, etc.

Edit:
I tried setting vs1protocol from true to false now I'm getting, of course, no connection to my heating unit, but the 'bytes' object cannot be interpreted as an integer error that doesn't exist anymore.

@philippoo66
Copy link
Owner

philippoo66 commented Jan 4, 2025

I found something in detect_f8_read() what might have caused the type err and tried to fix it. Could you please try with the new viconn_util.py?!

@philippoo66
Copy link
Owner

philippoo66 commented Jan 4, 2025

detect_f8_read() is more or less the only function which is not used when there is no Vitoconnect...

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

Seems better!?

Now I'm getting this error: module 'viconn_util' has no attribute 'wait_for_vicon'

@philippoo66
Copy link
Owner

I'll check...

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

I just replaced the complete file with the version from the main branch....

@philippoo66
Copy link
Owner

philippoo66 commented Jan 4, 2025

main branch is wrong! you need to take the viconn_util from vs1test branch

@philippoo66
Copy link
Owner

in fact viconn_util from main branch has no wait_for_vicon(). there it is called detect_vs2()... ;-)

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

Now im oinly getting any further than this:

optolinkvs1
awaiting Vitoconnect...
Server listening on 0.0.0.0:65234
Broker granted the following QoS: 0
('Vitoconnect not detected within timeout', 120)
exit close
closing serViCon
reset protocol
closing serViDev
cancel poll timer
exiting TCP/IP client
disconnect MQTT client
closing vitolog

vitolog.txt

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

This is my CP2102

@philippoo66
Copy link
Owner

hm, did you regard the sequence when starting?

@philippoo66
Copy link
Owner

nothing is coming from the Vitoconnect...

@philippoo66
Copy link
Owner

did you cross tx and rx when connecting the CP2102 board?

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

did you cross tx and rx when connecting the CP2102 board?

Yes, I did. I have my Vito connected to a USB extension. I'm going to try if that's the problem.

Right start sequence is:

  1. Start the script and wait for awaiting Vitoconnect...
  2. Then turn on the VicoConnect.
    Right?

@philippoo66
Copy link
Owner

that's right.

by the way - last week the Vitonnect thing stopped working at Viessmann site, ref #46 (reply in thread) I'm not sure if it 'returned' already..

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 4, 2025

Viessmann servers seem to be working now...

It worked! at least kind of.
The Vitoconnect connected, and I could control my heating unit, but then the script timed out.

I'm using a Optolink 2.

vitolog.txt

@philippoo66
Copy link
Owner

hm, timed out? the final line in the log says the opto device responded (1 byte, seems to be common with vs1). after that nothing more. I'm not sure what caused / what happened. wait, I'll analyse the traffic. vs1 I can't read just by heart...

@philippoo66
Copy link
Owner

philippoo66 commented Jan 5, 2025

ok, master (Viconn) says read addr 5706, 1 byte. slave (opto) responds 55. seems to be right. I don't know why after that the Viconn does not continue

@philippoo66
Copy link
Owner

5706 is KonfiKTMaxGWG, length 1 byte. So everthing correct so far.

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 5, 2025

let my try again

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 5, 2025

Again im only getting:

optolinkvs1
awaiting Vitoconnect...
Server listening on 0.0.0.0:65234
Broker granted the following QoS: 0
('Vitoconnect not detected within timeout', 120)
exit close
closing serViCon
reset protocol
closing serViDev
cancel poll timer
exiting TCP/IP client
disconnect MQTT client
closing vitolog

but while its running the vitoconnect is working fine.

vitolog.txt

@philippoo66
Copy link
Owner

hm, communication is running well, but does not start with reading f8 (device ident).

perhaps you need to stop everything, wait for some minutes and after that start again regrading the sequence?!

@philippoo66
Copy link
Owner

without waiting some time, it is possible that Viessmann just think it's some timeout and continues afterwards (after restarting the script).

Up to now I've no idea how to detect the connection other that detecting the reading of f8 which alssways happens first usually...

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 5, 2025

also with the Opto 2?

@philippoo66
Copy link
Owner

philippoo66 commented Jan 5, 2025

f8 always gets read initially. let me check if I have another idea detecting communication even if reading something else

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 5, 2025

do you need more logs?

@philippoo66
Copy link
Owner

I changed the detection to a 'not too safe way'. could you try?! viconn_util of vs1test branch...

@philippoo66
Copy link
Owner

philippoo66 commented Jan 5, 2025

now the wait_for_vicon() returns true as soon as the response to a read request is of the demanded length.... as I said - not very safe ...

@philippoo66
Copy link
Owner

are you still awake and 'in action'? otherwise I'd go to bed now. tomorrow is another day... ;-)

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Ich glaube nicht das queue append, ... , ... In der Konsole steht ich teste in ca 10min mal

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

bekomme jetzt daten über MQTT, aber kein queue append, ... , ... in der Konsole

@philippoo66
Copy link
Owner

philippoo66 commented Jan 29, 2025

das ist durchaus interessant, weil nur die Daten aus der queue nach MQTT gepostet werden. Aber egal, hauptsache wir sind weiter.

nochmal nachgefragt - die aktuelle Vers. 10?

und du sagst "daten über MQTT" - die mit Namen aus der Polllist, welche mit einfach nur Adresse, oder beide?

kannst du mal nen Screenshot posten?!

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Wollte gerade den Screenshot machen, jetzt ist wieder nur der Online-Status drin.

@philippoo66
Copy link
Owner

siehst du denn in der Konsole, dass es läuft`?

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Mein Konsolen-Output:
konsole viconn.txt

@philippoo66
Copy link
Owner

ok. irgendwas geht schief mit der Erkennung. ich bau mal mehr debug ausgaben ein

@philippoo66
Copy link
Owner

ok, eingebaut. ich hab jetzt die Sache mit dem Datenformat auch mehr so gemacht wie im Splitter (imm serlog hab ich sie ja einfach nur weitergeschickt)
Vers 11

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Sobald ich das Skript starte, kommt das:

python vs1listener.py

disconnect MQTT client
Traceback (most recent call last):
  File "/home/silas/viconn/viconn-listener/vs1listener.py", line 230, in <module>
    main()
  File "/home/silas/viconn/viconn-listener/vs1listener.py", line 147, in main
    buff2.append(data2)
TypeError: 'bytes' object cannot be interpreted as an integer

@philippoo66
Copy link
Owner

vers 12 schon oben. hoffe da is das besser

@philippoo66
Copy link
Owner

mann, mann, mann, angebich ist python doch so unempfindlich was typen anbetrifft, aber hier schein es (ich) ein echtes Probelm zu haben...

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Bekomme jetzt wieder Sachen im MQTT-Explorer.

konsole viconn.txt
mqtt.txt

@philippoo66
Copy link
Owner

ok. so soll das sein (mqtt.txt)

@philippoo66
Copy link
Owner

ich könnte jetzt die debug ausgaben und so wieder rausprogrammieren (Schalter...)?

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Ein Schalter klingt gut.

@philippoo66
Copy link
Owner

Die werte sehen teilweise noch recht komisch aus wenn ich genauer hingucke...

@philippoo66
Copy link
Owner

kann das sein, dass die Adressen bei dir nicht passen?!

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

kann das sein, dass die Adressen bei dir nicht passen?!

woran kann ich das sehen/nachlesen

Habe eine Vitotronic 200 KW1-Steuerung.

@philippoo66
Copy link
Owner

warte, ich schaue....

@philippoo66
Copy link
Owner

es gibt 4 KW1 Steuerungen, deine ist die erste:

0x2094;0x0100;0x0103;;;Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer ; V200KW1

DP_V200KW1.txt

das hier sind angeblich die Adressen (~0x...) - kannst du die mal mit denen in der settings_ini abgeichen?! ich programmier währennddessen die Schalter...

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

Bekomme jetzt ein queue append
mqtt.txt

Könntest du noch mal gucken, ob ich das mit den Adressen richtig gemacht habe?
adressen.txt

@philippoo66
Copy link
Owner

das append war ja im letzen konsole viconn.txt auch schon drin.

formal ist das adressen.txt korrekt, aber das sind Datenpunkte einer Wärmepumpe!? hast du eine Wärmepumpe?

gemäss dem DP_ ... .txt wäre es

    ("Aussentemperatur", 0x5525, 2, 0.1, True),
    ("Kesseltemperatur", 0x0810, 2, 0.1, False),
    ("Kesselsolltemperatur", 0x5502, 1, 1, False),
    ("Brennerstarts", 0x088A, 4, 1, False),
    ("Vorlauftemperatur", 0x0810, 2, 0.1, False),
    ("Warmwassertemperatur", 0x0812, 2, 0.1, False),
    ("Warmwasser-Solltemperatur", 0x6300, 1, 1, False),
usw.

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 29, 2025

up, ne eine wärmepumpe habe ich nicht

Ich machs morgen mal neu

@philippoo66
Copy link
Owner

ich hab jetzt vers. 14 hochgeladen. da is der fdebug schalter im code, aktuell noch auf true. in handle_received() gibt es einen fshowall, wenn der auf false gesetzt wird, wird in MQTT nur noch ausgegeben, was zu den Adressen im poll_list passt.

@philippoo66
Copy link
Owner

schau mal was im DP txt dich interessieren könnte. Int und SInt sind 2 bytes, das S steht für signed. byte ist 1 byte. Int4 sind 4 Bytes. das Scaling steht da aber nicht mit drin. Wir müssten mal @FransOv nach der Excel für eine V200KW1 fragen... ;-)

@FransOv
Copy link
Collaborator

FransOv commented Jan 29, 2025

Welche soll dass sein?

Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer	V200KW1
Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 Softwarestand 5 (mit Anbindung Vitosolic 100/200 über KM-Bus), kein Unterschied der Daten zu Softwarestand 4	V200KW1_5
Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 Softwarestand 4 (mit Anbindung Vitosolic 100/200 über KM-Bus)	V200KW1_4
Vitotronic 200 KW1  oder KW4 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 oder KW5 Softwarestand 6 (mit Anbindung Anschlußerweiterung 0-10V über KM-Bus)	V200KW1_6

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 30, 2025

Welche soll dass sein?

Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer	V200KW1
Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 Softwarestand 5 (mit Anbindung Vitosolic 100/200 über KM-Bus), kein Unterschied der Daten zu Softwarestand 4	V200KW1_5
Vitotronic 200 KW1 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 Softwarestand 4 (mit Anbindung Vitosolic 100/200 über KM-Bus)	V200KW1_4
Vitotronic 200 KW1  oder KW4 Witterungsgeführte, digitale Kessel- und Heizkreisregelung, für 1 Heizkreis ohne Mischer Technische Produktbeschreibung: Vitotronic 200 KW1 oder KW5 Softwarestand 6 (mit Anbindung Anschlußerweiterung 0-10V über KM-Bus)	V200KW1_6

Die Erste

@SGK-IoT
Copy link
Author

SGK-IoT commented Jan 30, 2025

ich hab jetzt vers. 14 hochgeladen. da is der fdebug schalter im code, aktuell noch auf true. in handle_received() gibt es einen fshowall, wenn der auf false gesetzt wird, wird in MQTT nur noch ausgegeben, was zu den Adressen im poll_list passt.

Debug-Schalter für MQTT scheint zu funktionieren.

@FransOv
Copy link
Collaborator

FransOv commented Jan 30, 2025

Tab V200KW1 ist an die Excel im Wiki hinzugefügt.
https://github.com/user-attachments/files/18600707/Viessmann.Parameter.Adresses.xlsx

@philippoo66
Copy link
Owner

supi, danke @FransOv !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants