![]() |
|
Comfort to MQTT - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Software Applications (https://www.comfortforums.com/forum-4.html) +--- Forum: Comfort with Home Assistant (https://www.comfortforums.com/forum-143.html) +--- Thread: Comfort to MQTT (/thread-4407.html) Pages:
1
2
|
- meep - 10-09-2016 I managed to get comfort talking to Mqtt and node-red via ucm/232 and a usb/serial convertor. Works great both to and from. It\'s on Windows though so I needed to completely re-write the perl driver to work. I\'ll share it here when I\'ve got it refined. - idheath - 10-09-2016 [user=5265]meep[/user] wrote: Quote:I managed to get comfort talking to Mqtt and node-red via ucm/232 and a usb/serial convertor. Works great both to and from.Thanks v.much - meep - 10-10-2016 Well, I managed to get this working on windows with Win32::SerialPort in Perl. (just couldn\'t hack the above code to work so started afresh). It\'s a long way from cab123\'s original driver in terms of code but owes a lot to his concept, structure and techniques. It\'s also got a LOT less error checking implemented so is really just a proof of concept at this stage and would require a few more additions to make it more robust. While this does send and receive between comfort and MQTT, and you can check these messages in Node-Red, I added a Trace function to allow key messages be printed to the console - really helps with debugging. Code: !/usr/bin/perlThis can be tested with something like the command below at the command line. Obviously change your own Mosquito server and port details. (note, you must first issue the login (LI) command to Comfort, with a user code, or it will keep returning \'NA\' as the response); Code: mosquito_pub -h 192.168.1.199 -p 1883 -t comfort/to -m \"z?\"Attached is an example of this running. You can see the initial receipt of the \"z?\" query from MQTT and the response from comfort sent back. Then you can see Comfort reporting activity Input 05 (that\'s the result of me opening and closing a window with a contact sensor). NB: For some reason, the forum is stripping backslashes from the code segments above. I\'ve tried to add them back in but if you\'re trying to run this and it\'s failing, it mey be due to a missing \'\\\' somewhere. - cab123 - 10-11-2016 Hey! I\'m very happy to see you are having fun with this! I don\'t have much more javascript examples, aside from what i already shared, it\'s pretty basic stuff. i would recommend you to switch to a linux box for these server-side protocols - they will run forever, will never complain, and be readily available to serve you anytime :-) A small raspberry Pi is cheap to buy/run and has enough horsepower to do this and much more. - meep - 10-11-2016 Cheers, it\'s more getting to grips with node-red and regex to be honest, getting there slowly. I run all my stuff on a single unraid server through a combination of dockers and vms. I went with a Windows vm as I needed to pass through the usb/serial adapter and as I\'ll likely need to run comfigurator for a while, thought I\'d go with Windows as I wouldn\'t need to keep swapping connections etc. Might switch back to a Linux vm as I get more comfortable with it all. Thanks for the inspiration on this and taking the time to document it here, really helped me realise what I needed to do was possible. - jelockwood - 07-11-2019 @cab123 If you\'re still working on this any plans to implement an MQTT broker on the UCM/Pi module? Obviously one could use the UCM/Eth03 and then link to a standard external Raspberry Pi but would seem to make sense to do the Comfort side of this using the dedicated Pi module. - mattbrain - 07-12-2019 The alphaWerk components uses MQTT as their backend & Mosquitto is installed on the CM3. It is locked to localhost only by default but can be opened up to external devices easily. There is also nothing stopping you from installing different software, hardware notes are available to use your own tools to talk to comfort and manage the watchdog timer. |