-
Notifications
You must be signed in to change notification settings - Fork 12
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
Setup errors #23
Comments
Since the last two HA upgrades, Sector Alarm has setup issue for me too.
|
They might actually have changed their api instead of just the version. Left my computer at work, but will try to take a look tomorrow. |
Haven't tested this hasscomponent, but can confirm that asyncsector currently requires "v1_1_72" |
Yeah, I just updated to the latest version, and then it works fine. |
If we can get #20 up and running we can get rolling updates I guess? |
I opened mgejke/asyncsector#12 for a discussion on maybe doing this automatically in asyncsector... |
During the last weekend, when I updated to 0.99.2, I got the component to work for a while. That was still version 1_1_71 then. After two restarts of HA, the error message was back again. Today I changed version to 1_1_72, but the error remains, i.e. the component is not working for me. |
I have also changed to version to 1_1_72. After some restarts it works, after some restarts i doesn't. A bit of "hit and miss". |
Mostly "miss" actually. Several restarts today, but no working alarm setup. Also tried to change to version to 1_1_73 just to check, but not working. |
Could they have added a random version? |
I've tried a couple of times manually playing with my asyncsector build, and it seems to consistently report v1_1_73 as current version, and using --auto seems to work correctly. A couple of timeouts, but no version errors, so I do not think random version is an issue... I believe I saw some older treads where accounts were blacklisted because of too frequent API calls, could this be an issue? Oh and I want to try to work on implementing the auto-feature in hass-sectoralarm, but I'm a little fuzzy on how to add a custom "asyncsector" module in my testing... You know if I can add a specific branch of my own github-repo as a dependency? Also, if it is at all practical when running hass in a docker environment? |
Ok so I got hass-sectoralarm working with autoversion almost without change, only a slight adjustment in init.py: Allow async calls during init by changing line 56 from: Also, waiting for an update to asyncsector, change REQUIREMENTS (line 20) from: 'asyncsector==0.2.0' to: 'https://github.com/loial/asyncsector/archive/feature-autoversion.zip#asyncsector==0.2.0' And it seems to work :) However, I'm not sure if this object is setup only once at Hass startup, or on every update? In the latter case, theres a versiin check on EVERY update, which is probably unneccessary, and I should figure out how to cache the retrieved version code... |
@loial I tried your changes in the init.py, but it doesn't work for me. |
This file has the two changes: Also in configuration.yaml, the version needs to be set to 'auto' |
Like this?
|
oh, sorry, I should be specific :) |
Sorry, I realized that and edited my previous comment. However, the above config didn't work with your init.py. |
Hmm... I'm running this in an docker environment, so it's sort of "clean" on each startup... don't know if this is different than your setup... otherwise, I have the same config as yours... Have you tried disabling thermometers? (The response from that API is sometimes REALLY slow, and might timeout) Also, check the logs and see if there are any hints (usually the last line in a block of related error messages) |
Should be able to save it in an input? |
This is very strange. Suddenly, after a failed update from 0.99.2 to 0.99.3, Sector Alarm setup worked for me without any change of setting. I am using your |
Hm, setup still fails once in a while. Could it be that the component times out when this happens? In that case, could the time waiting for response be increased? |
I've written before, the thermometers are really slow, try not using them. (and I'll try to look at PR and stuff...) |
I did set the thermostats to 'false' last week. It worked ONE time, i.e. one restart of HASS. I would be quite happy if I at least can get the correct status on the alarm. |
I tried the adjusted init.py file by @loial and changed version to 'auto'. After the first restart of HA, I got the following error in the log: 2019-10-04 19:52:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component sector_alarm During handling of the above exception, another exception occurred: Traceback (most recent call last): However... |
I changed version to 'v1_1_71' in the config, however the component does not start.
Now I'm getting this in my log:
2019-09-17 19:47:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component sector_alarm
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/asyncsector/asyncsector.py", line 39, in login
AsyncSector.Base + AsyncSector.Login, json=self._auth)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request
await resp.start(conn)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read
await self._waiter
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 168, in _async_setup_component
hass, processed_config
File "/config/custom_components/sector_alarm/init.py", line 63, in async_setup
if not await async_sector.login():
File "/usr/local/lib/python3.7/site-packages/asyncsector/asyncsector.py", line 45, in login
return True
File "/usr/local/lib/python3.7/site-packages/async_timeout/init.py", line 45, in exit
self._do_exit(exc_type)
File "/usr/local/lib/python3.7/site-packages/async_timeout/init.py", line 92, in _do_exit
raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
Any clue?
The text was updated successfully, but these errors were encountered: