Battery state suddenly missing
Please provide as much detail as possible. It's helpful to include Home Assistant debug logs from this integration. Instructions for enabling debugging are available at https://github.com/pyalarmdotcom/alarmdotcom/wiki/How-to-Test-&-Debug#enable-code-debugging. (Alarmdotcom debug logs are verbose, so don't forget to disable debug logging when you're done!)
Describe the bug Battery state is missing from all entities. Just became unavailable a couple of hours ago.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior Battery states worked previously
Screenshots If applicable, add screenshots to help explain your problem.
Home Assistant Version: 2024.6.3
Additional context Add any other context about the problem here.
I can confirm that I'm seeing this too and I haven't changed anything on the home assistant side since the last time this was working (last night when I went to bed). I'm thinking they probably changed something on the ADT side to cause this.
Probably not company specific as I'm with Brink's, but good to know that I'm not alone.
happening here also just noticed
Same here. I’m with a small, local provider, so not company specific.
Finally saw something in the logs this morning. Not sure how relevant:
Logger: pyalarmdotcomajax
Source: /usr/local/lib/python3.12/site-packages/pyalarmdotcomajax/__init__.py:1050
First occurred: 03:23:03 (3 occurrences)
Last logged: 06:52:19
Failed to get system metadata.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pyalarmdotcomajax/__init__.py", line 1047, in _async_get_system
return [json_rsp["data"]]
~~~~~~~~^^^^^^^^
KeyError: 'data'
And:
This error originated from a custom integration.
Logger: py.warnings
Source: custom_components/alarmdotcom/controller.py:164
integration: Alarm.com (documentation, issues)
First occurred: 03:23:03 (1 occurrences)
Last logged: 03:23:03
/usr/local/lib/python3.12/site-packages/pyalarmdotcomajax/__init__.py:1205: RuntimeWarning: coroutine 'AlarmController.is_logged_in' was never awaited if not self.is_logged_in():
So, after also having the problem with trying to arm without a code, I deleted and re-installed the integration. There are actually now no sensors for the batteries at all.
So, after also having the problem with trying to arm without a code, I deleted and re-installed the integration. There are actually now no sensors for the batteries at all.
The reason why you don't have any battery sensors after reinstalling the package is because those sensors are created based on what is discovered from the alarmdotcom website when you first configure the package, and when you removed it it removed the sensor entities. Now it's not able to re-discover them until the integration code gets updated to account for whatever they changed on the alarmdotcom website site. This isn't some new symptom, it's just the same root issue manifesting for you in a different way. The site is likely just returning the data in a different format than it was previously and the integration now needs to be updated to account for that.
So does this explain why I used to have my alarm.com smoke detectors show up in the HA integration, but they stopped doing so about a year or two ago? Thanks.
So does this explain why I used to have my alarm.com smoke detectors show up in the HA integration, but they stopped doing so about a year or two ago? Thanks.
That may or may not be related. It could be some kind of change in the format of that data, or maybe alarmdotcom just stopped supporting them, difficult to say. You should try to get some debug log data to see if there are any errors showing up related to that and open a new issue ticket for it here if one doesn't already exist for that type of problem.
Following as I'm having the same issue
I have 2 Alarm.com accounts at 2 different houses with 2 different providers. Both of these are showing on my HA's Alarm.com Integrations page.
Both "hubs" have sensors with battery sensors that no longer work.
I too am having this issue with battery sensors not working.
Thanks for reporting this. I've been caught up for the past few months with work and family life and haven't been able to focus on this project. The bad news is that I'm moving next month, which means more distractions, but I'll be moving from an apartment into a house in which I'll be using an Alarm.com system. (I've been developing this integration blind, for the most part, using the limited access I have to an alarm system at my sister's house.) With direct access to an Alarm.com system in my own home, I'll be more incentivized to stay on top of things. Stay tuned.
Thanks for your hard work and dedication to this project. Perhaps when you update it you can also take a look to see why it is no longer reporting smoke/fire/CO alarms.
@elahd Thanks for the work you have done on this integration so far, it is one of the best working 3rd-party integrations I have in my HA implementation. Congratulations on the move to the house! I am sure you will find all sorts of fun new dev projects.
Was there a solution to this?
Alarm.com dropped support for reporting battery states for devices that report "graded" states (High/Med/Low/Critical). They still provide data for devices that report battery life as a percentage (like some smart locks), so that's still reported in v4 beta. Closing this ticket.