core: AlarmDecoder Broken in 0.104.0 and 0.104.1

Home Assistant release with the issue:

0.104.1

Last working Home Assistant release (if known):

0.103.6 Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io running in Proxmox VM Integration:

https://www.home-assistant.io/integrations/alarmdecoder/

Description of problem: AlarmDecoder started returning “Unknown” state after upgrade from 0.103.6 to 0.104.0. This issue corresponded with repeated log entries as below:

AlarmDecoder unexpectedly lost connection.

The issue was not resolved by upgrading to 0.104.1. Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):


alarmdecoder:
  device:
    type: serial
    path: '/dev/ttyUSB0'


Traceback (if applicable):


Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 24 (14 by maintainers)

Most upvoted comments

Did it change? I applied the fix ages ago and it has worked consistently.

I’m running HA core 2021.1.4 and OS 5.10 with AlarmDecoder 1.13.2 as a custom_components folder ever since that last break a year or so ago. Still works for me.

@rezanaima, @cbflorida sorry if this wasn’t clear. Let me try to elaborate. The latest version of Home Assistant does have a working AlarmDecoder integration with no custom_component necessary. In fact, it’s probably a good idea to remove your AlarmDecoder custom_component if you have one to make sure that you get all the latest AlarmDecoder integration updates.

The issue initially described in this thread was due to the fact AlarmDecoder was updated to version 1.13.9 from 1.13.2 and 1.13.9 had issues, thus causing it to break in Home Assistant. These issues should now be fixed based on my post above. I’m looking for people to test this fix to confirm that it works for them so that we can again try updating the AlarmDecoder component from 1.13.2 to 1.13.9+ without causing problems.

Hopefully that clears it up.

Prior to .104, my alarmdecoder was working perfectly. After .104 (when the alarmdecoder component started using 1.13.9), I was experiencing the same symptoms as described by others here.

For anyone out there who is a total n00b like me… note that you have to copy over all of the files from the HA Git into your custom component folder, not just manifest.json. I took the following steps to resolve, and hope this helps somebody out there. It’s entirely possible that I did something wrong and am over complicating this, so I’m totally open to feedback 😃.

  1. Using whatever method you prefer (Configurator, Cloud9 IDE, etc.), create a new folder within your Home Assistant config directory called “custom_components” then, within that folder, a new folder named “alarmdecoder”.

  2. Copy each of the files from the following into your new folder. [https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/alarmdecoder]

  3. Like @springstan instructed, open manifest.json and edit the existing line:

"requirements": ["alarmdecoder==1.13.9"],

to

"requirements": ["alarmdecoder==1.13.2"],

Make sure that you saved this change.

  1. Restart Home Assistant. You should now be reverted back to alarmdecoder 1.13.2 and everything is like it was before. NOTE: if you continue to have an issue, you may need to check to ensure that your device path is accurate. I believe this only applies for those using the “serial” method (e.g. plugging your AD2USB directly into your HA box). Instead of using the “dynamic” path (something similar to “/dev/ttyUSB2” for example), try putting the static/persistent path of the device. Prior to doing this, I experienced occasional issues on reboot or plugging in other USB devices resulting in my path changing, so this was the most resilient mitigation that I discovered.

From my current configuration.yaml:

alarmdecoder: device: type: serial path: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A101A44B-if00-port0 #path: /dev/ttyUSB2 baudrate: 115200 panel_display: true

I’m assuming that, when this issue is resolved at a parent level (i.e. alarmdecoder and/or HA release is updated and fixes the issue), we should just delete the entire alarmdecoder folder to revert back to default configuration for this component.

Reverted to 1.13.2 and it fixed my problem.

You can test it by creating a custom_component for alarmdecoder which will override the built-in component. Please see this guide: Loading components Then change the following line https://github.com/home-assistant/home-assistant/blob/4b67508330ac970608df43302f103a9d1eedb37a/homeassistant/components/alarmdecoder/manifest.json#L5 to

"requirements": ["alarmdecoder==1.13.2"], 

and restart your HA instance.