-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running scenes gives unknown device ID error #345
Comments
This is occurring for me as well, but all the time, rather than just when running a scene. One example effect is that it causes the alarm state not to be fetched: e.g. when I turn off the alarm through the alarm.com app, it stays marked as "armed". When I then arm it from homeassistant, it does get armed (alarm.com app sees that), but homeassistant doesn't know that (still shows disarmed). I think this used to happen rarely, and cause delays in homeassistant updating; but now it seems to happen almost all the time. This makes me wondering whether we're hitting some kind of rate-limiting on the alarm.com server. That being said, the ID for my "UnkonwnDevice" (sic) is 10726749; when using the Web UI, the call to https://www.alarm.com/web/api/settings/manageDevices/deviceCatalogs/6785477 only has IDs of the form It would be super helpful if we could get the exception to dump the entire page payload that it's looking at to try and understand what's going on. Also perhaps a dump of whatever device IDs pyalarmdotcom is holding? |
Same here. I just updated from 2023.10.x to 2023.11.1. I don't THINK this was happening before; I think it is new with 2023.11. But it is really blowing up my logs.
|
More info... For me, this seems to be isolated to v3.0.10. I reverted to v3.0.9 and the error is gone. |
Can confirm I'm not getting the log messages with v3.0.9. There's still a significant delay (2 minutes?) between turning the alarm on and having homeassistant realize that it's on (alarm.com finds out immediately), so I'm still not convinced what's going on. |
I had requested scenes. I see that it was implemented but I can't find them as an option. I still have the same choices I've always had, did I miss a checkbox somewhere to enable it? |
think i found it outside the integration but inside the HA scenes folder but I also get **Failed to call service scene/turn_on. Unknown device ID '26155923'. |
@elahd It looks like there were some issues with v3.0.10 and quite a few people had to roll back to the previous version. Just curious if you have had a chance to look into it and what your thoughts are? Thanks! |
I just released 3.0.11, which is a re-release of 3.0.9. This is in interim solution to stopping those log messages. The code base has become too messy since I rolled out WebSocket support and started chasing session timeout issues. I'm working on a refactor that I'll release as a beta in a week or so. With that said, I won't ever be able to fix the lag that exists between a sensor triggering and the action being reported via API. Alarm.com has server-side logic that delays state reporting and that prevents a sensor from reporting the same status more than once in a 3 min period. The same delays exist on their own website and app. |
Thanks for working on this! About the delay, it definitely seems like the app notices the state change long before homeassistant does. For example, when arming the alarm, within a couple of seconds I usually get a notification from the alarm.com app, and checking the app shows the alarm is armed; it takes homeassistant a few more minutes to notice (more than 3, I think, but less than 10 for sure). I think this is worse with 3.0.10 compared to 3.0.9, presumably because some of those polls are failing, so the status only updates on the next successful poll. |
Just to add myself to the list of people who are having this issue and wish it gone.
Update: I'm on the 3.0.10 version of the integration |
This is fixed in v3.0.12. |
Describe the bug
Running a scene often times gives an unknown device ID error. The device does show up correctly.
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/alarmdotcom/base_device.py:198
Integration: Alarm.com (documentation, issues)
First occurred: 9:37:39 AM (11 occurrences)
Last logged: 9:43:30 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/pyalarmdotcomajax/devices/registry.py", line 299, in get
return self._devices[device_id]
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 10294121
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 233, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
update_callback()
File "/config/custom_components/alarmdotcom/base_device.py", line 91, in _handle_coordinator_update
super()._handle_coordinator_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 469, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 743, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 787, in _async_generate_attributes
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alarmdotcom/base_device.py", line 198, in extra_state_attributes
raw = self._controller.api.devices.get(self._adc_id).raw_attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyalarmdotcomajax/devices/registry.py", line 301, in get
raise UnkonwnDevice(device_id) from err
pyalarmdotcomajax.exceptions.UnkonwnDevice: Unknown device ID '10294121'.
To Reproduce
Clicking 'Activate' on a scene.
Expected behavior
Running the scene.
Home Assistant Version:
2023.11.0
Additional context
The text was updated successfully, but these errors were encountered: