Alarm Decoder: Chime Status

I would like to be able to see the status of the chime on my alarm and be able to toggle it in the same way that I can arm and disarm the alarm within Home Assistant.

This is possible now via the AD component https://home-assistant.io/components/alarmdecoder/

How? The documentation says nothing about this and the Home Assistant UI still only shows ARM HOME and ARM AWAY. Additionally, no new sensors are registered and no information is provided in any existing alarm control panel components.

You could create a Shell Command, that can be called when you toggle the switch on or off similar to what you can do with IP cameras. If you setup the AD2USB/ AD2PI to use ser2sock then all you have to do is issue the telnet command with the chime on or off command, you could even us the pythonAPI (https://github.com/nutechsoftware/alarmdecoder) or the webui http://www.alarmdecoder.com/swagger/index.html#/alarmdecoder

See this for `ser2sock example:

Again it might not be right out of the box, but you can easily program a toggle for it.

@goyney Looks like chime status is sent with every messages from the alarm, which is good.

My thinking is adding a attribute to the alarm for tracking the state of the chime and seeing if I can add a “Chime” button next to the arm home, arm away, disarm buttons that would allow toggling it (since it needs the code as well). I am hoping to not have to fork the state card for the alarm to get this.

I am hoping to have some time to work on this towards the end of the week.

2 Likes

@hawk259 Did you ever get a chance to work on the chime support?

I added chime, ac_power, backlight_on, battery_low, check_zone, entry_delay_off, programming_mode, ready, zone_bypassed as a attributes to the alarm panel, which was pretty easy and I have them all working. I have chime setup like this:

sensor:
  - platform: template
    sensors:
      alarm_chime:
        friendly_name: 'Alarm Chime'
        value_template: "{{ states.alarm_control_panel.alarm_panel.attributes.chime | capitalize() }}"
        icon_template: >
          {%- if states.alarm_control_panel.alarm_panel.attributes.chime == 'true' %}
              mdi:bell-ring
          {% else %}
              mdi:bell-off
          {%- endif %}  

I haven’t figured out a way to toggle chime via HA yet. I thought there was a option to add a keypad to the alarm panel, but I can’t seem to find it.

Would this be enough?

That sensor example is good stuff! I assumed the “Away” and “Home” buttons send the code plus “2” for away and “3” for stay. Chime is “9” on most pads. Not easy to add that in some fashion?

Possible yes, but not sure how easy/quick it is going to be.

From what I can tell, I need to either fork more-info-alarm_control_panel.html and create a alarmdecoder specific one or I need to figure out a way to allow the generic one to detect a chime functionality is enabled and add the button.

I will keep looking, but right now I am not seeing what the best way to do it.

Hey, can you share your code for adding chime, ac_power, etc… All the new sensors you added as attributes?

Just added a PR:

1 Like

Thank you! I created a custom_component with your changes and have full control over my chime! I hope your MR goes in because this adds some good functionality to the component.

Hey @hawk259, I’ve taken your changes one step further and incorporated a service to actually toggle the chime. With those changes and yours, we can literally create a toggle switch for chime status and control.

- platform: template
  switches:
    alarm_chime:
      friendly_name: Chime
      value_template: "{{ is_state_attr('alarm_control_panel.alarm_panel', 'chime', true) }}"
      turn_on:
        service: alarm_control_panel.alarm_toggle_chime
        data:
          code: !secret alarm_code
      turn_off:
        service: alarm_control_panel.alarm_toggle_chime
        data:
          code: !secret alarm_code
      icon_template: >-
          {% if is_state_attr('alarm_control_panel.alarm_panel', 'chime', true) %}
            mdi:bell-ring
          {% else %}
            mdi:bell-off
          {% endif %}

It looks like your original PR got all mucked up after they dropped 0.60.0, so I pulled in just your changes into my addition of the service call. My PR is here: https://github.com/home-assistant/home-assistant/pull/11271

They won’t merge my PR because I incorporated changes from a previous PR (yours). You’re all properly credited on the changes you provided, so it might be easier for you to close your PR and let them accept mine. That way, you don’t have to deal with the rebasing stuff. If that is okay with you, go ahead and close your PR. If not, shoot me a message so we can work this all out and get our very useful functionality merged in!

1 Like

@goyney Thank you! Sorry I disappeared, got sick and it lasted way longer than I expected.

Looks good!

2 Likes

Thank you for all your help, @hawk259. Everything got merged last night and will likely make the 0.61.0 release. I hope you are feeling better!

1 Like