Comfort Automation/ Security System Forums

Full Version: Comfort 2 Alarm working with Home Assistant!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
I\'m not able to test this as my house is being renovated, but perhaps you could use the Custom Bypass button in your MQTT Alarm Control panel to send # like this:

  payload_arm_away: \'away\'
  payload_arm_home: \'day\'
  payload_arm_night: \'night\'
  payload_arm_vacation: \'vacation\'
  payload_disarm: \'off\'
  payload_arm_custom_bypass: \'#\'
I will give it a try, thanks.


Edit: I\'ve tried this and it works. The only drawbacks are that the virtual keypad text obviously doesn\'t reflect the function \'#\' and you need to enter your code when \'arming\' to CUSTOM_BYPASS. A minor hassle for this workaround.

Apart from that it works like a charm. Now you can do Local Arm without a hitch.
I found the following in the config options.

code_arm_required: false

I don\'t know how I missed this but now arming to any mode does not require a pin code. It\'s only required for Disarm. The \'virtual # key\' now works fine.
FYI, this is my alarm config. I use the REMOTE_CODE option to avoid having to save the disarm code in the config. Also allows for different users to log in:
###### Alarm Control Panels ####### https://www.home-assistant.io/integratio...anel.mqtt/
- name: \'Comfort Alarm\'
  unique_id: comfort_alarm_panel_1
  state_topic: \'homeassistant/alarm/comfort/alarm_mode/status\'
  command_topic: \'homeassistant/alarm/comfort/alarm_mode/set\'
  code_arm_required: false
  code_disarm_required: true
  payload_arm_away: \'away\'
  payload_arm_home: \'day\'
  payload_arm_night: \'night\'
  payload_arm_vacation: \'vacation\'
  payload_disarm: \'off\'
  payload_arm_custom_bypass: \'#\'
  code: REMOTE_CODE
  command_template: >
    { \"action\": \"{{ action }}\", \"code\": \"{{ code }}\" }
Interesting! I will have to read up on that command_template of yours.
Hi @posixx, Just found this add-on it seemed to be just what I have been looking for.  I have been running the KoochyRat python script on a seperate device and it would be great to have it now run on HA with all the rest of the home automation.  However I thin there is a breaking change to paho-mqtt as it fails with the following error I\'m afraid my Python skills can\'t manage this can you or indeed anyone else help?  It is running on the latest version of Home Assistant

mqttc = Comfort2(DOMAIN) File \"/usr/lib/python3.8/site-packages/paho/mqtt/client.py\", line 772, in __init__ raise ValueError( ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see docs/migrations.rst for [code]
There have been a number of breaking changes with Paho MQTT 2.0. I\'m not a Python programmer, so I asked ChatGTP to do the conversion of the comfort2.py file to support version 2.Have a look at the attached file, I don\'t have any way to test it at the moment so no guarantees that it will work.
These are the key changes ChatGPT said it made:
Initialization of the MQTT Client:
In Paho-MQTT 2.0, the client setup has been simplified, and username_pw_set remains the same but handling of credentials is clearer.

Connection Management:
loop_start() and other loop methods are still used but clarified in Paho-MQTT 2.0.

Error Handling and Callbacks:
Improved handling of connection failures and publish acknowledgements with the use of wait_for_publish().
Thanks, I had similar thoughts re AI so thank you! When I get chance I will run up a test box and try the AI mods on the koochyrat version as I know that works. I remember now that I rolled paho-mqtt back to an earlier version when I upgraded the server it presently runs on.  I am in the process of trying to get everthing running under Home Assistant and the interface to Comfort is the only sticking point at the moment so was deligheted to see the posixx work.
I did fork his code and tried to get an earlier version of paho-mqtt loaded by docker but HA threw it out when I tried to install the add-on.
Appreciate your support @Sota
Rgds
Well tried a few AI iterations without success and then noticed the work @Ingo had done in another section of the forum which worked out of the box using the latest version of HA.Big Grin
Quote:Well tried a few AI iterations without success and then noticed the work @Ingo had done in another section of the forum which worked out of the box using the latest version of HA.Big Grin

Thats here http://www.comfortforums.com/view_topic.php?id=5511&forum_id=27&jump_to=27065#p27065
Pages: 1 2 3 4 5 6 7 8 9