Logger: custom_components.alarmdotcom.base_device
Source: custom_components/alarmdotcom/base_device.py:63
Integration: Alarm.com ([documentation](https://github.com/pyalarmdotcom/alarmdotcom), [issues](https://github.com/pyalarmdotcom/alarmdotcom/issues))
First occurred: 4:08:33 PM (1 occurrences)
Last logged: 4:08:33 PM
custom_components.alarmdotcom.base_device: No device data available for None (94269538-127).
Logger: pyalarmdotcomajax
Source: custom_components/alarmdotcom/alarmhub.py:208
Integration: Alarm.com ([documentation](https://github.com/pyalarmdotcom/alarmdotcom), [issues](https://github.com/pyalarmdotcom/alarmdotcom/issues))
First occurred: 9:35:40 AM (7185 occurrences)
Last logged: 7:35:26 PM
Error fetching data from Alarm.com. Got 403 status when fetching data for device type DeviceType.SYSTEM. User is already logged in. Giving up on device type.
Error fetching data from Alarm.com. Got 403 status when fetching data for device type DeviceType.PARTITION. User is already logged in. Giving up on device type.
Error fetching data from Alarm.com. Got 403 status when fetching data for device type DeviceType.SENSOR. User is already logged in. Giving up on device type.
Logger: homeassistant
Source: custom_components/alarmdotcom/base_device.py:104
Integration: Alarm.com (documentation, issues)
First occurred: 9:35:40 AM (2395 occurrences)
Last logged: 7:35:26 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
update_callback()
File "/config/custom_components/alarmdotcom/base_device.py", line 104, in _handle_coordinator_update
"raw_state_text": self._device.raw_state_text,
AttributeError: 'NoneType' object has no attribute 'raw_state_text'
I’m working on a release that greatly simplifies the underlying code and incorporates instant updates for device events. It’s a big lift on top of work and family life, but I’ll be able to release soon. Sorry for the trouble here – I know how annoying it is to have something like this break.
FWIW, rolling back the changes in 2.2.2 will just resurface other bugs. That’s why I’m leaving it as-is.
On Tue, Mar 28, 2023 at 2:17 PM _Mike @.***> wrote:
@Anrolosia Thanks. I heard you guys like refactoring, so the next release is going to be a more structural refactor instead of a fix for this specific bug 😬.
Currently, the integration makes one API call for every device type (contact sensor, thermostat, partition, etc.). This means that every minute or so (depending on your settings), the integration makes like 15 calls to Alarm.com. Refreshing is a heavy operation.
I recently found an endpoint on ADC’s API that returns data for just about all device types in a single call. I’m going to use that single endpoint instead. This will significantly reduce complexity and the number of calls made on each refresh. I’m hoping that this will smooth out a lot of these harder to track down issues.
@mikesalz: Realistically, 2 weeks.
I’ve reworked the polling part of the library to use the single endpoint I mentioned in https://github.com/pyalarmdotcom/alarmdotcom/issues/234#issuecomment-1476500954. This cuts the number of requests needed to poll by ~75%. This should speed things up a bit, and I’m hoping that this eliminates some of the errors that have caused update failures in the past. This, unfortunately, required lots of downstream changes, but it’s done now.
I’m also able to connect to ADC’s WebSocket API and can receive messages, but processing those messages is a pain in the ass. The identifiers used to represent device states in the WS API are different than use those used everywhere else on their platform, so I need to build an dedicated WebSocket translator for each device type. I’m going to try my luck outsourcing this work to Copilot or ChatGPT this week.
Once that’s done, I’ll release an update for pyalarmdotcomajax with WebSocket support for people here to test (via the pyalarmdotcomajax CLI) while I work on updating the actual Home Assistant integration.
@mikesalz Just bump back and be patient.
I am reasonably sure this inconsistent delay in status change is on ADC side. I can watch their direct cloud panel and see delays of 5-25 seconds before it shows the panel state change I make locally. This also coincides perfectly with my SMS notifications from ADC. I think they just experience delays in polling on their end at random for whatever reason. As soon as ADC sees state change, HA is seeing it, if refresh interval is low enough in the integration.
After a few more hours of my house sitting completely idle while I was gone, I came back to find the integration is continuing to poll perfectly fine without glitching out. Unless I see something new in the next day or so, I’d considering the polling issue finally resolved.
Thank you to everyone for all of your work! As someone who has to deal with the willy nilly shifts of closed-source APIs all the time myself, I totally feel your pain on this one! 🤗
so yea, at 5 seconds its very responsive considering it is cloud based. arm/disarming as well as state changes were fairly immediate. going back to 15 seconds for now. also lost my smoke sensor entities which you seem to be aware of
fire_alert smoke_detected and high_heat_alarm the freeze alarm has never worked but it did not disappear
Test out v3.0.4-beta.1.
@mikesalz if you want, you can remove the Repo from HACS then it will stop reminding you and then add it back when fix is in.
Hey @elahd , I also have this issue, and so HomeAssistant is not able to set the alarm anymore. If it can help you, I rolled back to version 2.2.1, and it worked again, so something included in 2.2.2 refactoring must be the culprit ^^ Thanks and good luck fixing this issue!