I researched a bit on the ComfoAir binding to reduce the CPU consumption and added the known RXTX serial optimization. I also add smaller changes to prevent unlimit thread growth (theoretically) and remove the flush() function.
- Add CPU workaround for RXTX event listener thread
- Remove flush() function, not required and sometimes the binding hangs there
- Use ScheduledExecutorService instead of creating new Threads with Thread.sleep(…)
I already uploaded the changes to github https://github.com/csowada/openhab/tree/comfoair-optimize/bundles/binding/org.openhab.binding.comfoair
This modification runs since a week without any issues.
Also create a pull request so your changes, if accepted, get included in the official release and carried forward.
Yes i will do that if I got feedback from other users. And I have to setup the new IDE enviroment first , I still used the 1.8 IDE setup.
I’m struggling for ages with this binding - don’t get it running
Are your changes already integrated into v1.8.2? If not can you pls send me a download link to your latest jar file?
Within the next days I can test a lot and give you feedback.
Thanks & Regards
I’ve created a new version of this modified binding. The old version worked well with version 1.8.x, now I’ve ported the changes to the newest code base. So it works in openHAB 1.x and 2.x.
You can download the snapshot here:
And now I also create a PR on github
I need tester for this modification. I hope I can motivate some people here to help.
as soon as I have connected my ComfoAir to openhab (hopefully sometime next week), I can start testing your improved binding and provide feedback.
I’ve installed your improved binding yesterday on my openhab 1.x system. So far it’s running without any problems! Thank you very much. If I’ll come across something, I’ll let you know.
After running for about 3 days, I just noticed that the binding logged errors in openhab.log:
Error writing to serial port ...
(many log entries per second).
Please note that the comfoair unit is not connected directly to the machine running openhab. It is connected to a raspberry and I am accessing it via a virtual serial port from openhab (I use ser2net on the rpi and socat on the machine running openhab). Anyway, I do not think that this actually caused the problem, since another service using the same setup and connected to the same raspberry continued to work.
I tried to do reload the comfoair binding with
but then openhab crashed and before I could save the logs, openhab was restarted automatically by monit (which also deletes the logs, sorry)
Is there anything you want me to do if this will happen again?
Mh, not good. Maybe the removed flush command is missing on your setup and maybe this flush command is depended on the used serial driver (ser2net vs. ftdi usb serial converter) on operating system level.
I created a version with flush, could you please check both versions if possible.
Hey there, short update…
I have installed the version with flush, added more logging and disabled automatic restarts from monit. Again I have seen the same error messages, but this time I have seen that the socat instance running on the openhab machine crashed (so actually there was no longer a virtual serial port to talk to). So it is obvious why the binding generated the error messages.
I have no idea why socat crashed (I am using the same setup for the DSMR binding and this has been running without problems for ages).
Anyway, I have installed your first binding again (without flush) and I am trying to troubleshoot the virtual serial port issue further. The binding itself is running perfectly.
Do you still need testers or is your version already the one available with openhab2 download? I got error messages with the current openhab2 binding - does it make sense to test your binding on a comfoair 550?
The update was merged into the main repository. But it is easy to test, so feel free to check it.