rubenbe / comfospottwin40

Control your Zehnder ComfoSpot Twin 40
MIT License
9 stars 0 forks source link

Documentation of installation process for beginners #3

Open Phi2k opened 1 year ago

Phi2k commented 1 year ago

This is a more detailed Documentation to get the code running. Disclaimer: currently it looks like only one sensor per bus is supported.

1) Buy exactly the adapter as described. Others do not seem to work. (The internal jumper was already correctly set to NC in my case - so no need to open the device) 2) I tested the code on a raspberry pi with latest os and on macOS Sonoma 3) make sure python and pip is installed 4) clone the repository: git clone https://github.com/rubenbe/comfospottwin40 5) go to the project folder 6) install the requirements: pip install -r requirements.txt 7) install the project: python setup.py install

Now everything should be ready.

8) launch the server: python3 server.py --mqtt 'xxx.xxx.xxx.xxx' while xxx is the IP address of the mqtt broker. in my case the mqtt plugin of IOBroker. I did not have success to pass a URI. I therefore had to setup the broker without username and password and stick to the default port 1883. (solved with latest update. you can define a port) The server then posts its state every second in the terminal: ❶: 🔀🏠➡️ ⏸️ 0s (100 ma)🌡️ __C, % ♻️ __C, %; ❷: 🔀🏠⏸️ ⏸️ 0s (100 ma)🌡️ __C, % ♻️ __C, %; ❸: 🔀🏠⏸️ ⏸️ 0s (100 ma)🌡️ __C, % ♻️ __C, %

You should be able to change the setting from the mqtt broker. If not make sure that all MQTT-Topics are set correctly. Empty topics "(null)" might cause issues and the server will not accept commands from MQTT).

9) connect the waveshare adapter. At least for the Xwell d12 you have to switch the wires of the bus relative to the original controller. A=B and B=A 10) get the address with ls /dev/tty* (might be different depending on system) for me it was /dev/ttyUSB0 11) disconnect the original controller (switching off is not sufficient) and start the real test: python3 server.py --mqtt 'xxx.xxx.xxx.xxx' --dev /dev/ttyUSB0 --state state.json 12) run the server as a service in order to launch directly after a reboot