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

Documentation of installation process for beginners #3

Open
Phi2k opened this issue Nov 1, 2023 · 0 comments
Open

Documentation of installation process for beginners #3

Phi2k opened this issue Nov 1, 2023 · 0 comments

Comments

@Phi2k
Copy link

Phi2k commented Nov 1, 2023

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.

  1. 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).

  1. 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
  2. get the address with ls /dev/tty* (might be different depending on system) for me it was /dev/ttyUSB0
  3. 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
  4. run the server as a service in order to launch directly after a reboot
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

1 participant