Posted: Monday Sep 2nd, 2024 08:06 pm |
|
1st Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Hi All,
I decided to take the great work done by @koochyrat and others and update the scripts to integrate a bit more with Home Assistant.
https://github.com/djagerif/comfort2mqtt
A quick disclaimer: I am not a programmer, I tinker a lot, so please don't be too critical of this HA Addon. I do have a day job so time, and skill, to figure things out and trying to make it work is limited.
Feel free to test and comment and if there is something that is broken, and I am able to fix it, then I will give it my best shot.
Development was done on an old CM9000-ULT with a Cbus integration. Anything else is a best-effort bonus that I can't test or develop for.
The documentation is extensive, I tried to put EVERYTHING in there so if you don't understand something, please read the docs again, it should be in there somewhere.
You will need to configure your own flags, sensors, counters, zones etc. I only programmed a few system objects as a start.
IngoAttachment: Screenshot 2024-09-03 050724.jpg (Downloaded 49 times) Last edited on Tuesday Sep 3rd, 2024 04:09 am by Ingo
|
Posted: Tuesday Sep 3rd, 2024 03:48 am |
|
2nd Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Thanks Chiu. Unfortunately my images are not hosted anywhere as they are local to my PC so can't be posted by a quick paste. I will add them as files. Attachment: Screenshot 2024-09-02 211819.jpg (Downloaded 48 times) Last edited on Tuesday Sep 3rd, 2024 04:08 am by Ingo
|
Posted: Tuesday Sep 3rd, 2024 03:53 am |
|
3rd Post |
Posted: Tuesday Sep 3rd, 2024 03:57 am |
|
4th Post |
Posted: Tuesday Sep 3rd, 2024 03:59 am |
|
5th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Image
Last edited on Sunday Dec 1st, 2024 10:06 am by slychiu
|
Posted: Wednesday Sep 4th, 2024 07:51 pm |
|
6th Post |
Howser
Member
back to top
|
Looks interesting.
I have gone UcmPi (in NodeRed) to MQTT (home assistant) and SHAC to MQTT (home assistant) with two way control.
|
Posted: Tuesday Oct 22nd, 2024 05:33 pm |
|
7th Post |
clivesanders
UCM Pi Users
back to top
|
Hi @Ingo Great piece of work! I have Just loaded this on my system and it works great I get only one error pop up have copied below I dont think it is my config but may be. I have been using the Koochyrat implementation on a seperate server fom HA for many years and have always wanted to fully integrate with HA but did not have the abilities you do! Was looking at the @posixx version yesterday and fell foul of the paho-mqtt v2.0.0 incompatibility issues. By chance saw your work and reconfiguered my MQTT sensors and all is good. THANK YOU!!Rgds Clive
Traceback (most recent call last): File "/comfort2/comfort2.py", line 2877, in <module> mqttc.run() File "/comfort2/comfort2.py", line 2443, in run self.publish(ALARMSTATUSTOPIC, SMsg.modename,qos=2,retain=True) # Idle, Alert etc. ^^^^^^^^^^^^^ AttributeError: 'ComfortS_SecurityModeReport' object has no attribute 'modename'[code]
|
Posted: Tuesday Oct 22nd, 2024 07:28 pm |
|
8th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Hi Clive.
I think it is receiving some output of "S?" that is not expected. Please send me the output of the S? command and also what model and firmware you are using. Set the logging to debug as this will log all command values, especially the ones just before it throws an exception.
The documentation states only 00 - 03 as return values.
Ingo
|
Posted: Wednesday Oct 23rd, 2024 12:38 am |
|
9th Post |
clivesanders
UCM Pi Users
back to top
|
Hi Ingo, appreciate you getting back to me. Here is the log file rgds Clive
2024-10-23 00:07:11 DEBUG r?00F00F000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:27 DEBUG ER00
2024-10-23 00:08:27 INFO Ready To Arm...
2024-10-23 00:08:27 DEBUG SM000140
2024-10-23 00:08:27 DEBUG EX0205
2024-10-23 00:08:27 DEBUG SM000140
2024-10-23 00:08:31 DEBUG PS00
2024-10-23 00:08:31 DEBUG SM000040
2024-10-23 00:08:31 DEBUG SM000140
2024-10-23 00:08:32 DEBUG MD0203
2024-10-23 00:08:32 INFO Armed Night Mode
2024-10-23 00:08:32 DEBUG AM0903
2024-10-23 00:08:32 DEBUG KL01000000
2024-10-23 00:08:32 DEBUG S?13
Traceback (most recent call last):
File "/comfort2/comfort2.py", line 2877, in <module>
mqttc.run()
File "/comfort2/comfort2.py", line 2443, in run
self.publish(ALARMSTATUSTOPIC, SMsg.modename,qos=2,retain=True) # Idle, Alert etc.
^^^^^^^^^^^^^
AttributeError: 'ComfortS_SecurityModeReport' object has no attribute 'modename'
[23:08:32] WARNING: Halt add-on with exit code 1
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun comfort2mqtt (no readiness notification)
s6-rc: info: service legacy-services successfully started
[00:08:36] WARNING: TLS encryption option disabled.
[00:08:36] INFO: Starting Comfort to MQTT...
2024-10-23 00:08:36 DEBUG Starting new HTTP connection (1): supervisor:80
2024-10-23 00:08:36 DEBUG http://supervisor:80 "GET /addons/self/info HTTP/11" 200 9727
2024-10-23 00:08:36 INFO Importing the add-on configuration options
2024-10-23 00:08:36 INFO Completed importing addon configuration options
2024-10-23 00:08:36 DEBUG The following variable values were passed through via the Home Assistant
2024-10-23 00:08:36 DEBUG MQTT_USER = mqttbroker
2024-10-23 00:08:36 DEBUG MQTT_PASSWORD = ******
2024-10-23 00:08:36 DEBUG MQTT_SERVER = 172.30.33.9
2024-10-23 00:08:36 DEBUG MQTT_PROTOCOL = TCP/1883 (Unsecure)
2024-10-23 00:08:36 DEBUG COMFORT_ADDRESS = 192.168.1.77
2024-10-23 00:08:36 DEBUG COMFORT_PORT = 1001
2024-10-23 00:08:36 DEBUG COMFORT_LOGIN_ID = ******
2024-10-23 00:08:36 DEBUG COMFORT_CCLX_FILE = 13MeadowCt_2018_v1.3_DRdis_DSdis.cclx
2024-10-23 00:08:36 DEBUG MQTT_CA_CERT = ca.crt
2024-10-23 00:08:36 DEBUG MQTT_CLIENT_CERT = client.crt
2024-10-23 00:08:36 DEBUG MQTT_CLIENT_KEY = client.key
2024-10-23 00:08:36 DEBUG MQTT_LOG_LEVEL = DEBUG
2024-10-23 00:08:36 DEBUG COMFORT_TIME= False
2024-10-23 00:08:36 WARNING MQTT Transport Layer Security disabled.
2024-10-23 00:08:36 INFO Comfigurator (CCLX) File detected, 236514 Bytes
2024-10-23 00:08:36 INFO Connecting to Comfort (192.168.1.77) on port 1001
2024-10-23 00:08:36 INFO MQTT Broker Connection Success
2024-10-23 00:08:36 DEBUG Subscribed to 16 Zone Outputs
2024-10-23 00:08:36 DEBUG Subscribed to 32 Zone Inputs
2024-10-23 00:08:36 DEBUG Subscribed to 0 RIO Outputs
2024-10-23 00:08:36 DEBUG Subscribed to 254 Flags
2024-10-23 00:08:36 DEBUG Subscribed to 32 Sensors
2024-10-23 00:08:36 DEBUG LU03
2024-10-23 00:08:36 INFO Comfort Login Ok - User 3
2024-10-23 00:08:36 DEBUG Subscribed to 255 Counters
2024-10-23 00:08:36 DEBUG Subscribed to 0 Responses
2024-10-23 00:08:36 DEBUG Synchronizing Comfort Data...
2024-10-23 00:08:36 DEBUG Synchronization Done.
2024-10-23 00:08:41 DEBUG b?00000000000000000000000000
2024-10-23 00:08:41 DEBUG Zones Bypassed: 0
2024-10-23 00:08:41 DEBUG V?FE078C22400100
2024-10-23 00:08:42 INFO Comfort II ULTRA detected (Firmware 7.140)
2024-10-23 00:08:42 DEBUG EL1111FFFFFFFF
2024-10-23 00:08:42 DEBUG 1 Installed SEM(s) detected
2024-10-23 00:08:42 DEBUG Hardware Model CM9000-ULT
2024-10-23 00:08:43 DEBUG DL7FF9045C172F00E2
2024-10-23 00:08:43 DEBUG SN015C172F00
2024-10-23 00:08:43 INFO Refresh Key: 5C172F00
2024-10-23 00:08:43 INFO Serial Number: C086172
2024-10-23 00:08:45 DEBUG M?0203
2024-10-23 00:08:45 INFO Armed Night Mode
2024-10-23 00:08:45 DEBUG Z?00000000
2024-10-23 00:08:45 DEBUG Max. Reported Zones/Inputs: 32
2024-10-23 00:08:45 DEBUG z?000000000000000000000000000000
2024-10-23 00:08:46 DEBUG Max. Reported SCS/RIO Inputs: 120
2024-10-23 00:08:46 DEBUG Y?0E010000
2024-10-23 00:08:46 DEBUG Max. Reported Outputs: 32
2024-10-23 00:08:46 DEBUG y?000000000000000000000000000000
2024-10-23 00:08:48 DEBUG Max. Reported SCS/RIO Outputs: 120
2024-10-23 00:08:48 DEBUG f?00F9FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
2024-10-23 00:08:50 DEBUG S?00
2024-10-23 00:08:50 DEBUG a?130000000000000000
2024-10-23 00:08:50 DEBUG r?0100100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?0110100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?000010FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?0010100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?0020100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?0030100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:51 DEBUG r?0040100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?0050100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?0060100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?0070100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?0080100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?0090100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:52 DEBUG r?00A0100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:53 DEBUG r?00B0100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:53 DEBUG r?00C0100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:53 DEBUG r?00D0100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:53 DEBUG r?00E0100000000000000000000000000000000000000000000000000000000000000000
2024-10-23 00:08:53 DEBUG r?00F00F000000000000000000000000000000000000000000000000000000000000
|
Posted: Wednesday Oct 23rd, 2024 03:32 am |
|
10th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Yes, this is the culprit, I'll have to investigate this as it's undocumented.
2024-10-23 00:08:32 DEBUG S?13
I do however notice that you are running a firmware version that is quite old and not tested. I suggest upgrading the firmware to either the latest, or to at least one that has been tested against this Add-on. The minimum is 7.201 if I remember correctly but I personally run the latest 8.013 released earlier this week.
Last edited on Wednesday Oct 23rd, 2024 03:39 am by Ingo
|
Posted: Wednesday Oct 23rd, 2024 08:54 am |
|
11th Post |
clivesanders
UCM Pi Users
back to top
|
Hi Ingo, All fixed it needed a firmware upgrade. I saw it was throwing a 13 out in response to the S? and I think looking at the version updates there is mention of an extra byte being sent by the S? query. Upgraded to latest on Comfort and UCM and all works fine, thanks again for this really great add-on and exemplary documentation. Rgds Clive
2024-10-23 08:49:14 DEBUG SM000040 2024-10-23 08:49:14 DEBUG SM000140 2024-10-23 08:49:14 DEBUG MD0203 2024-10-23 08:49:14 INFO Armed Night Mode 2024-10-23 08:49:14 DEBUG AM0903 2024-10-23 08:49:14 DEBUG KL01000000 2024-10-23 08:49:14 DEBUG S?00 2024-10-23 08:49:14 DEBUG DT2024102308491601 2024-10-23 08:49:14 DEBUG AL130000BF0203 2024-10-23 08:49:14 DEBUG KL01000000 2024-10-23 08:49:14 DEBUG OP0201 2024-10-23 08:49:14 DEBUG SM000140 2024-10-23 08:49:14 DEBUG OP0401 2024-10-23 08:49:14 DEBUG OP0301 2024-10-23 08:49:17 DEBUG SM000000
[code]Last edited on Wednesday Oct 23rd, 2024 08:55 am by clivesanders
|
Posted: Wednesday Oct 23rd, 2024 09:20 am |
|
12th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
I'm glad it's sorted. Enjoy.
|
Posted: Saturday Nov 23rd, 2024 06:23 am |
|
13th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5665 |
Status: |
Offline
|
back to top
|
Hi Ingo, I have been testing this on a Rpi5 after installing Home assistant 13.2.
I am not getting the correct status, it is always unavailable
In your instructions we need to configure the MQTT broker add on, as below,
But cannot see these parameters in MQTT Broker add on or in Devices and services > Integrations. How can I get the these settings?
Option: Comfort TCP Port (Optional) The Comfort UCM/Eth03 TCP port used for connectivity. UCM/ETh03 can be changed so please check your Comfort configuration and use the port that is configured for access. Note that only one client can connect to any given TCP port. The default is '1002'
Option: Comfort system IP address The Comfort UCM/Eth03 IP address or Hostname used for connectivity.
Option: Comfort User Login ID Cytech Comfort User Login ID with the appropriate rights. Login ID has minimum 4 and a maximum of 6 characters. For full functionality you need at least Local Arm/Disarm and Remote Arm/Disarm capabilities on Comfort. See the Comfigurator Programming Guide, Security Settings and Sign-in Codes sections for more information on user creation and rights.
Option: Comfort Configuration file (Optional) Comfort Configuration file, also referred to as the 'CCLX' file to be used for object enrichment EG. Zone Names etc. Place this file in the Home Assistant _configs/<comfort2mqtt slug> folder.
To upload a file to the _configs directory you could use something like Samba share Add-on or similar allowing filesystem access to selected directories on Home Assistant.
Note These settings are in the Comfort to MQTT add on configuration
Last edited on Sunday Nov 24th, 2024 04:51 am by slychiu
|
Posted: Saturday Nov 23rd, 2024 06:30 am |
|
14th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5665 |
Status: |
Offline
|
back to top
|
this is my overview screen but i think it is because I cannot st the MQTT parameters for log in et
Attachment: Screenshot 2024-11-23 142951.jpg (Downloaded 16 times) Last edited on Saturday Nov 23rd, 2024 06:31 am by slychiu
|
Posted: Saturday Nov 23rd, 2024 07:14 am |
|
15th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
No, it will only be 'Unavailable' when you lose connection to Comfort.
Set your Addon logging to DEBUG and restart the Addon to see if it lists any obvious issues.Last edited on Saturday Nov 23rd, 2024 07:16 am by Ingo
|
Posted: Sunday Nov 24th, 2024 04:36 am |
|
16th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5665 |
Status: |
Offline
|
back to top
|
I finally decided to start all over again, and reinstalled Home Assiistant, your add on and MQTT and the configuration.yaml again. Finally got it working, thanks. Attachment: Screenshot 2024-11-24 123207.jpg (Downloaded 14 times)
|
Posted: Sunday Nov 24th, 2024 07:33 am |
|
17th Post |
Posted: Monday Nov 25th, 2024 11:16 am |
|
18th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5665 |
Status: |
Offline
|
back to top
|
A question/observation:
When you arm from the keypad, you can use the user code in Comfort
But when you disarm, the Comfort user code is not accepted. You have to use the code in Option: Comfort User Login ID - this code can arm and disarm comfort
The cclx file is supposed to be uploaded to _configs/<comfort2mqtt slug> folder. There is no _configs folder. Is it the main homeassistant folder?
There is also a /addon_configs folder with subdirectory comfort2mqtt/
|
Posted: Monday Nov 25th, 2024 11:47 am |
|
19th Post |
Ingo
UCM Pi Users
Joined: | Sunday Jan 21st, 2007 |
Location: | South Africa |
Posts: | 582 |
Status: |
Offline
|
back to top
|
Thanks for that. I see my documentation somehow did not copy the "addon" portion of "_configs" I will update that for the next release to reflect "addon_configs".
|
Posted: Monday Nov 25th, 2024 12:05 pm |
|
20th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5665 |
Status: |
Offline
|
back to top
|
I did that. The comfort cclx file seems to be mainly used in the logs
|
Current time is 12:43 pm | Page: 1 2 |
|