rubenbe / comfospottwin40 Goto Github PK
View Code? Open in Web Editor NEWControl your Zehnder ComfoSpot Twin 40
License: MIT License
Control your Zehnder ComfoSpot Twin 40
License: MIT License
Hello Ruben,
it might be easier to use Getair's WIFI SmartControl Hub and integrate an IoT device through it. (I'm following your work excitedly and eager to see a solution. I would love to use your work later to integrate my ComfoSpot into KNX).
Greetings,
Sven
Manufacturer (Getair)(LED-, Touch- and Wifi-Control)
https://www.getair.eu/en/control-unit/app-and-voice-control/
Customer from Getair:
Kermi: (LED-, Touch- and Wifi-Control)
https://www.kermi.de/raumklima/produkte/wohnraumlueftung/dezentrales-system/
ZewoTherm (LED-, Touch- and Wifi-Control)
https://www.zewotherm.com/de/produkte/wohnraumlueftung/dezentrale-wohnraumlueftung/lueftungsgeraete-smart-steuern.html
Zehnder: (LED- and Touch-Control)
https://www.zehnder-systems.de/produkte-und-systeme/komfortable-wohnraumlueftung/comfospot-twin40
I run two waveshare adapters on one raspberry pi and noticed that the assignment of the device address after a reboot is random. This is unfortunate as the assigned hardware might get swapped after a reboot.
I have no fix yet but assigning persistent device names on system level might solve this:
https://rolfblijleven.blogspot.com/2015/02/howto-persistent-device-names-on.html
Is there an easier way to connect to the serial adapter? e.g. by serial number instead of the device address?
About once per week I get the following exception causing the script to stop.
I suppose this is a system error (it did not happen on my first setup on a Raspberry Pi Zero. The current setup is Raspberry Pi 5, 2x Docker container and 2x serial hardware both containers reporting to two separate MQTT broker.
Is it possible to catch this error (e.g. like that: https://forums.raspberrypi.com/viewtopic.php?t=201976#p1256252) or at least cause the container to exit that it can restart properly? Current situation is that this error does not trigger a restart. My current workaround would be to schedule a restart every day.
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-22' coro=<Mqtt.listen() done, defined at /comfospot/comfospot40/mqtt.py:30> exception=MqttError('Disconnected during message iteration')>
Traceback (most recent call last):
File "/comfospot/comfospot40/mqtt.py", line 32, in listen
async for message in messages:
File "/usr/lib/python3.11/site-packages/aiomqtt/client.py", line 684, in _generator
raise MqttError(msg)
aiomqtt.error.MqttError: Disconnected during message iteration
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/serial/serialposix.py", line 500, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/comfospot/server.py", line 103, in <module>
asyncio.run(
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/comfospot/server.py", line 46, in main
state = x.result()
^^^^^^^^^^
File "/comfospot/comfospot40/parser.py", line 86, in run
self.parserdata, self.parserstate = await self.parserstate(self.parserdata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/comfospot/comfospot40/parser.py", line 58, in search_preamble
readbyte = await self._ser.read(1)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/streams.py", line 693, in read
await self._wait_for_data('read')
File "/usr/lib/python3.11/asyncio/streams.py", line 525, in _wait_for_data
await self._waiter
File "/usr/lib/python3.11/site-packages/serial_asyncio/__init__.py", line 115, in _read_ready
data = self._serial.read(self._max_read_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/serial/serialposix.py", line 509, in read
raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Thank you very much
This is a more detailed Documentation to get the code running.
Disclaimer: currently it looks like only one sensor per bus is supported.
Now everything should be ready.
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).
After I moved my installation to docker containers I almost gave up because I did not get it working. Reason for the system not working was wrong strings in the MQTT. After installation lots of settings like e.g. speed come with "(null)". If you do not change these to the expected values the server will not accept any changes from MQTT at all.
Is it possible to directly set all MQTT topics to a working preset?
I will go "all in" and install another 5 fans which means I need a second controller for the 2nd floor of the building.
I now run into the issue that both instances will post the same mqtt topics "comfospot40".
therefore the feature request to parse the system name as argument of server.py e.g. --name.
If I read the code right it would just be changing line 10 in "mqtt.py" ?!
Workarround would be a second mqtt adapter in IOBROKER reachable under a different port. However, last time I checked I was not able to pass a port to the mqtt IP in the form xxx.xxx.xxx.xxx:port and only the standard port was working.
Thanks for the support.
Just in case this helps somebody. I’m pretty sure that this system is also compatible.
I am not able to test.
Hi this looks really cool and I will try to implement this for x-well d12
Can you give some more details (I have only about a year experience with IOBroker etc.) on:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.