Comments (20)
I am receiving the same error repeatedly, as well.
from alarmdotcom.
This error is really blowing up my logs. @elahd Do you happen to have any idea what the issue is? I'm happy to help test any potential fixes. Thanks!
from alarmdotcom.
Same here, exact same error. 37 occurances since March 22.
from alarmdotcom.
Are you able to test a new version of pyalarmdotcomajax? See #391.
from alarmdotcom.
This looks like a combination of an Alarm.com server issue and a weak recovery mechanism in the integration. I've been seeing a lot the same errors in my browser's web console when logged into the Alarm.com website:
v6 of pyalarmdotcomajax should be more robust and will pollute your error logs less during recovery.
from alarmdotcom.
@elahd is this a standalone python script or can you incorporate it into home assistant ?
from alarmdotcom.
It's both. The pyalarmdotcom Python package interfaces with Alarm.com and is used by the alarmdotcom Home Assistant integration. The bundled adc CLI helps with debugging.
The issues with real time updates can't be fixed in the HA integration alone, they need to be fixed in pyalarmdotcomajax.
from alarmdotcom.
just installed the beta version. Real time updates are back. I'll report back if something goes wrong.
from alarmdotcom.
Same errors after less than an hour...
from alarmdotcom.
from alarmdotcom.
The websocket doesn’t recover
from alarmdotcom.
@MicroDraco Can you try running the stream command with the -d
flag to enable debugging mode? This will reveal the actual error that blocks recovery.
adc stream -d -u "USERNAME" -p "PASSWORD"
from alarmdotcom.
home-assistant_2024-04-03T22-23-40.187Z.log
it seems as if the websocket recovered ONCE while I was at work, then failed to reconnect after an hour.
from alarmdotcom.
home-assistant_alarmdotcom_2024-04-03T23-48-09.422Z.log
here is another set of debugs logs
from alarmdotcom.
@MicroDraco Thanks for that. I updated the branch with some fixes. The client's connection is now as stable as the Alarm.com website (so not very stable), but it's better at reconnecting once the connection is lost.
The reconnect workflow will run when:
- The ADC server kicks you off. (WebSocket error 104, which impacts both the pyadc client and the alarm.com website.)
- The main alarm.com session expires. (HTTP error 401)
- Timeout / authentication / other HTTP 4xx errors
- All other errors will kill the client.
The workflow is:
- Wait a random amount of time before reconnecting, up to a minute.
- Request a new auth token for the WebSocket connections. (If the main login session has expired, log back in to alarm.com first.)
- Try reconnecting to the WebSocket endpoint.
- Wait 5 seconds. If we're still connected to the server, do a full pull refresh to update state.
The client will die if 25 consecutive connection attempts fail or if the server asks for an OTP (it shouldn't).
There's no way to track the actual events that were lost while disconnected. That is, if a door was closed while connected, then was opened and closed again while disconnected, that opened event will be lost. Alarm.com doesn't have a good interface for requesting historical events. The "activity" page on their website doesn't present event data in a way that can be (easily) processed programmatically.
To test, run the pip install
command you ran before to pull the latest code.
from alarmdotcom.
I see no changes on the repo? Last change was two weeks ago.
from alarmdotcom.
It's the refactor-2024 branch at https://github.com/pyalarmdotcom/pyalarmdotcomajax/tree/refactor-2024
from alarmdotcom.
I want to incorporate this into the home assistant integration but I get an error "Setup failed for custom integration 'alarmdotcom': Unable to import component: cannot import name 'API_URL_BASE' from 'pyalarmdotcomajax.const' (/usr/local/lib/python3.12/site-packages/pyalarmdotcomajax/const.py)".
I'm not sure what files to replace.
from alarmdotcom.
from alarmdotcom.
Hi @elahd I can help testing, would be possible to give me the intructions to migrate and what you need to test? thanks!
from alarmdotcom.
Related Issues (20)
- Forced Migration to Service Provider Website HOT 10
- Failed to load HOT 1
- scenes? HOT 2
- Use of TEMP_CELSIUS and TEMP_FAHRENHEIT deprecated in HA Core 2025.1 HOT 1
- v3.0.12 release notes have incorrect credit HOT 1
- context - user_id is null
- Failed to call service update / install. Empty filename HOT 2
- Unable to install via HACS HOT 3
- Reloading integration every couple days HOT 3
- Status "bouncing" on sensors HOT 8
- Change login user/password HOT 2
- Camera Feed Help HOT 6
- Door/Window Chime Toggle HOT 4
- Unexpected WebSocket error HOT 1
- Deprecated Climate Auxiliary Heater HOT 1
- Deprecated Magic Numbers
- Unexpected Websocket Error HOT 1
- Arming Without a Code Causes Error After 2024.6 Upgrade HOT 13
- Battery state suddenly missing HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alarmdotcom.