koochyrat / comfort2 Goto Github PK
View Code? Open in Web Editor NEWCytech Comfort 2 Alarm MQTT Bridge (Home Assistant/OpenHAB compatible)
License: Apache License 2.0
Cytech Comfort 2 Alarm MQTT Bridge (Home Assistant/OpenHAB compatible)
License: Apache License 2.0
How could i use the same solution in node-red ? Would be possible to adjust de code ?
Thanks,
M D
Hello,
Thank you for your fantatsic work.
It was quite pretty easy to integrate it in my home-assistant setup.
However, I do have an issue with the binary_sensor. If I want to get them working, I need to comment the availability_topic line from the binary_sensor section in the yalm file. I plan to check if this is not related to my current version of home-assistant but this "availability_topic" feature works properly for the other components used with mqtt (Alarm Control Panel, Sensor). So,it looks not related to HA version.
Also, could you please modify your comfort2.py code in order to manage non-consecutive VIRTUAL INPUTS. In my case, I've got two VI at Input 2 and 3 and the remaining from 9 to 16.
Thanks
Hello,
While using Comfort with Away mode, Day mode and Security Off, there are no issue with what is reported to HA components : Alarm Control Panel, Alarm message and Alarm Counter.
However, if I use the Night mode, the Alarm Control Panel show Pending while counting down before enabling the alarm. Bur once the Comfort system goes to Night mode, the Alarm Control Panel keep showing "Pending".
I've seen that there is no on_message callback to process Night mode message in Comfort2.py. I've tried to add the following code but it doesn't help :
if msg.topic == ALARMCOMMANDTOPIC:
if self.connected:
if msgstr == "ARM_HOME":
self.comfortsock.sendall(("\x03m!03"+self.comfort_pincode+"\r").encode()) #arm to 03 day mode
elif msgstr == "ARM_NIGHT":
self.comfortsock.sendall(("\x03m!02"+self.comfort_pincode+"\r").encode()) #arm to 02 night mode
elif msgstr == "ARM_AWAY":
self.comfortsock.sendall(("\x03m!01"+self.comfort_pincode+"\r").encode()) #arm to 01 away mode
elif msgstr == "DISARM":
self.comfortsock.sendall(("\x03m!00"+self.comfort_pincode+"\r").encode()) #arm to 00 disarm mode
Also, I've seen that we can use a code to disarm the alarm from HA. But, in this case, e must also use a code to arm it from HA. This is not the case with Comfort Hardware. I guess, this is not possible to change it as it's related to the Alarm Control Panel component behavior, right ?
Thank you.
When triggering an alarm the comfort2.py process crashes:
root@xxx:~# systemctl status [email protected]
โ [email protected] - Comfort 2
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-08-17 16:07:50 CEST; 2 days ago
Process: 250477 ExecStart=/usr/bin/python3 /opt/comfort2mqtt/comfort2.py (code=exited, status=1/FAILURE)
Main PID: 250477 (code=exited, status=1/FAILURE)
CPU: 3min 47.156s
Aug 17 16:07:50 xxx python3[250477]: File "/opt/comfort2mqtt/comfort2.py", line 422, in <module>
Aug 17 16:07:50 xxx python3[250477]: mqttc.run()
Aug 17 16:07:50 xxx python3[250477]: File "/opt/comfort2mqtt/comfort2.py", line 374, in run
Aug 17 16:07:50 xxx python3[250477]: amMsg = ComfortAMSystemAlarmReport(line[1:])
Aug 17 16:07:50 xxx python3[250477]: File "/opt/comfort2mqtt/comfort2.py", line 150, in __init__
Aug 17 16:07:50 xxx python3[250477]: self.parameter = int(data[4:6],16)
Aug 17 16:07:50 xxx python3[250477]: ValueError: invalid literal for int() with base 16: '\x1e2'
Aug 17 16:07:50 xxx systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Aug 17 16:07:50 xxx systemd[1]: [email protected]: Failed with result 'exit-code'.
Aug 17 16:07:50 xxx systemd[1]: [email protected]: Consumed 3min 47.156s CPU time.
When arming the system usually any open zone will prevent reaching the "armed" state unless the arming is forcefully confirmed by pressing the hash (#
) sign on the keypad.
If comfort2.py is running it seems to auto-confirm any open zone. While this might be a handy feature in certain situations, in my case it led to a window being left open by mistake when leaving the house.
Hi Koochyrat,
I decided to investigate HA for the sake of connecting my comfort2 alarm unit.
The comfort2.Py runs well on a debian unit, Mgtt explorer can publish/subscribe to it and to the alarm unit. My HA Mqtt can publish/subscribe too.
I just copy your config HA file and add the HA alarm control panel card.
I cant see the panel (secoff,night,away...) The card just show "DISARM", and the status "unavailable";
Could you give a hand please?
Thank you
philippe
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.