-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
This is a more detailed Documentation to get the code running.
Disclaimer: currently it looks like only one sensor per bus is supported.
- 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)
- I tested the code on a raspberry pi with latest os and on macOS Sonoma
- make sure python and pip is installed
- clone the repository: git clone https://github.com/rubenbe/comfospottwin40
- go to the project folder
- install the requirements: pip install -r requirements.txt
- install the project: python setup.py install
Now everything should be ready.
- 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).
- 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 - get the address with ls /dev/tty* (might be different depending on system) for me it was /dev/ttyUSB0
- 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 - run the server as a service in order to launch directly after a reboot
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels