Skip to content
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

Sector Alarm's API called too often! #149

Open
jlatvala opened this issue Jan 4, 2023 · 10 comments
Open

Sector Alarm's API called too often! #149

jlatvala opened this issue Jan 4, 2023 · 10 comments

Comments

@jlatvala
Copy link

jlatvala commented Jan 4, 2023

A week ago our sector alarm was suddenly armed. No-one was near sector's keypad, no-one used sector's mobile app or website. And Home Assistant's logbook doesn't have any entries about arming.
Also sector's mobile app's and website's log/history did not show the arm event at all (it showed disarm action after I disarmed the system).

While checking the history of events from sector's website, I noticed that also some other events were missing (for example I disarmed our system also another day and disarm event was not shown at all in history in sector's website).

So, there were two different kind of problems:

  1. system armed automatically and no clue why or who/what did it. No clues in Home Assistant or sector website's history.
  2. events missing in sector's website.

I called Sector Alarm and described the problem and also told that I am using home automation system, which uses sector's API.
Also they didn't see the missing events or who/what armed our system.

This problem was trasferred to lower level tech support and after a week they called me back.
The resolution was that my home automation system (= this HA custom component) calls Sector Alarm's API too often. And it causes problems.

They said, that if API is called (e.g. to fetch statuses etc.), it can be called only once per 10 minutes. Otherwise it causes this kind of problems.
--> needs to be fixed. At least default update frequency, maybe also forcing 600 be the lowest allowed value. Not sure if something else needs to be done.

@elden1337
Copy link

plus one on this one. Is there any solution possible without damaging the usage of the integration too much?

@zucram
Copy link

zucram commented Apr 22, 2023

Having an update frequency of 10 min basically makes the integration useless right? Since it will take 10 min to do anything, including locking/unlocking? Or is that instant?

@elden1337
Copy link

Ive set the update to 3600 now and am arming/disarming through home assistant to trick the state.

@zucram
Copy link

zucram commented Apr 22, 2023

But if the update frequency is 1 hour does that mean it takes 1 hour for HA to arm/disarm?

@elden1337
Copy link

It should check state on arm/disarm.

@elden1337
Copy link

But, as customer to sector this is a stupid way of providing an api as I told them. Either they provide it ans accept normal polling or dont provide it at all.

@vasaru
Copy link

vasaru commented Sep 5, 2023

Customer service called me today to tell me that the "programming department" had noticed that I was polling their service constantly and that it was causing issues with my services. They asked me not to poll their API more often than once every 30 minutes. I kindly asked if they had any plans of allowing better access to their API but didn't get an answer.

@elden1337
Copy link

Customer service called me today to tell me that the "programming department" had noticed that I was polling their service constantly and that it was causing issues with my services. They asked me not to poll their API more often than once every 30 minutes. I kindly asked if they had any plans of allowing better access to their API but didn't get an answer.

Have had the same discussion multiple times. They then wanted me to pay more money to get the "new" alarm system which i declined. Unfortunately I don't think they'r going to continue the journey on the current version based on those discussions.

@mandelflanders
Copy link

mandelflanders commented Dec 15, 2023

I had a Sector Alarm service tech here earlier today to replace a expired smoke detector. When running diagnostic to verify operation of the new smoke-detectors I had to disable the integration in homeassistant.
Apparently, the API calls from homeassistant occur about once a minute, and that is often enough that they can interrupt the local system from sending alarms, camera images etc from cameras/sensors/smoke detectors to the central hub.

The tech was not able to run a full diagnostic since it got interrupted by API-calls (that apparently have higest processing-priority for the local system) until I manually disabled it in HA.

It seems like an oversight from sector alarm to treat API calls in this way, but his theory was that the API-calls could if unlucky potentially block communication if a burglar alarm or smoke alarm is triggered.

In a normal scenario the API calls are only called by a active user, so then it sortof makes sense to have it high prio, but when we call the API this often from the integration, it seems to be causing problems.

@JohanKSE
Copy link

I have the same issues and finally spent some time investigating it. It seems that this is all related to a change in communication from the main unit due to 3G close here in Sweden. The current plattform is deemed outdated and wukk eventually be replaced with their new version "Sector Smart Alarm System". The new system will however not support external API:s (according to Sector Alarms technical dept). For the time the workaround (at least for me) is to change MIN_SCAN_INTERVAL to 300 while I consider if I should change solution or just live with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants