-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
TaHoma API usage warning from Somfy #289
Comments
I have received it too... |
Thanks @thijsdejong. We haven't received it ourselves yet, but I got another report as well. Could you share your polling interval with me? (and which version of ha-tahoma) are you running. I would like to understand if there is possibly a bug that could cause bad behaviour.
This is actually a great point. The original integration was using this endpoint regularly to fetch new state data, where our new version is only using it on startup or when the session is disconnected. We try to be respectful to the Somfy servers and it is good to start the dialogue again. |
I'm currently on 5528c04, but have always been very quick to update to the latest version of the integration. I have never touched the polling interval, but it seems to be set to 30 seconds (i assume this is the default). Furthermore I have 24 devices (windows and covers), not sure if that makes a difference. |
Hi. I have also gotten this report today. I am on v 2.3.0. |
I also got the email. Using the integration in HomeAssistant. Not sure where to find any version or polling interval though ? |
Hi! maybe it helps... Thanks for your great work!!! Cheers |
Version info can be found in HACS. Current version is 2.3.3 (aka 5528c04, you can find that here in the repo) I got the same message, so maybe the default polling of 30 seconds is too much.. |
Using 2.3.3 via HACS |
Thanks all for reporting! We are investigating and @tetienne will reach out to his contacts at Somfy to get this clarified. By the way, none of the developers of this integration did receive the email, thus we really need your input and thoughts. Apparently not only the What I don't understand yet is that the mail mentions the '/setup' endpoint especially, but this is not used by the Somfy integration at all... And on the Home Assistant Community forum we have seen quite some reports of this issue with the Somfy integration as well.
According to the API documentation of tahomalink.com, we are allowed to pull the event listener up to every second. The bitter thing about this situation is that we rewrote the tahoma integration from scratch to remove all the 'expensive' API calls and move to their light weight event listener... It looks like the main issue is around the We will work on an updated version of this integration tomorrow and it would be great if some people could give it a try with debug logging turned on. |
It seems that Somfy mailed all user with their own API key of official supported API, while they have issues with people using /setup endpoint of their Tahomalink website... I received the mail as well, even though I didn't use the official api for at least two months anymore. I think your rewrite of the integration with using /setup is great and probably what Somfy is after. Once Somfy is rate limiting /setup I guess this integration is still 'safe'. Though there might be some people using the old version causing issues. I wouldn't be surprised that when rate limiting is implemented the biggest issues will be found on their own website using /setup to much. I wouldn't but to much effort into it now, I think the integration is already on the right track. |
We just released v2.3.4, with improved debug logging. Could you please update and run this integration with debug logging enabled. Run it for a while and please share your full log here (or via email, see profile). |
debug log
|
Thanks @llevering, please keep it running for a while. The We are mainly looking for any exceptions or errors and for the message |
Please excuse my ignorance, where should I be putting the following? logger: |
configuration.yaml as stated here https://www.home-assistant.io/integrations/logger/ . It's just like any other configuration. Edit: Here are some logs during a Tahoma box update. Did not execute any commands, verified in the log in the tahoma app that no devices moved.
|
you can add it to your configuration.yaml file. Beware to respect the indentation: logger:
default: critical
logs:
custom_components.tahoma: debug |
Thanks. I thought it might be but wanted to get the right answer so i can start logging now and get some logs for the team. Will post something here in an hour or so. |
As said by Mick, please only post in case of error messages or |
Couldn't it be that Somfy reacts on old situations with a very very long delay? Just my thoughts as I know how slow Somfy usually is - I am in direct contact with a roller motor developer ;) |
possible, except the official API way does not use the /setup endpoint... so their email is quite strange... |
Please, keep the reported log messages to the minimum, ie. any exceptions or errors messages and the message |
Removed all of the 'finished fectching...' from the logs. My limited understanding of the log makes me thing nothing API related here.
|
@mdeakin99 thanks for sharing! Indeed your log looks clean as well, just messages related to the event polling mechanism. Please keep the integration running with debug logging for a few days to understand if we even call the |
I did recieve the same warning email. My take was that I got it because I'm actually running the old integration and this one in parrallel. Well I'm going to disable the old one today and go to latest version of this one. Also, I was tempted to answer: "OK Somfy, how about a LOCAL API!" |
Just wrote a summary for Somfy and was about to reply, too bad they are sending out from no-reply@somfy.com. I know this is doesn't really belong here, but in case someone from Somfy will look at this: You need to keep conversation with your customers going! What I have seen in the past 10 years since I started using TaHoma made me think to not buy anything for the next home from Somfy. |
Still not a single mention of the /setup endpoint 👍 |
ok, thank you, is it better to use the official integration then? |
It depends on the devices you would like to control. The official API is quite limited but does work well with some of them, and is not gonna be targeted by Somfy. The unofficial one virtually supports every devices that can be linked to Tahoma, but as you well know, it's future isn't written yet... |
I have IO roller shutters and IO thermostat. |
We only call |
@iMicknl So when I restart normally and there are no errors, this Also, did someone check with Somfy if calling their API once every 30 seconds is OK or if that is still too much (since that would result in 43200 API calls a day)? |
From what I understood, I don't think the polling interval is really the issue. It's maintaining open a connection to the client that they don't like, which is required to get regular updates of sensors and devices states. |
No. I just edited my previous post to clarify. When the TaHoma integration is loaded, we call
As @vlebourl mentioned, their main issue is keeping the connection open. Increasing the polling interval should not matter, since the connection is still open in the background and Somfy needs to collect all events. A future possibility could be to only register and open the event listener after an action has been executed, however this means that Home Assistant can not respond to state updates outside Home Assistant. (which sucks in my opinion). |
@iMicknl OK thanks and I take it there is no way to avoid this But my underlying fear is that I get banned and won't be able to control my devices via HA. I don't like the fact they communicated it in this way, if they just add rate limiters to the |
Currently this is not possible. You could create a new issue with a feature request, but I don't think this will be built soon, since there are some other pressing issues.
Every time you login on tahomalink.com, you will pull |
Any resolution in this topic? Did anyone contact Somfy and discuss? A local API would solve this elegantly and simply - like the Philips Hue. My tahoma-box goes from valuable to worthless. Tahoma-integration stopped working today. Updated the gateway, and updated the Tahoma plugin to v2.3.4. But no luck, and no particular warning in the log file. Like @TheNr1Guest I depend on controlling this from HA. This is frustrating. I only have stateless devices, so I would be fine with not getting state changes outside of HA? Worst case, can anyone point me to how to modify the integration to open a session only when I send a command? |
For me it is still working, what errors are you seeing? As mentioned earlier, I sent a few lines with my feelings about this notification to Somfy. I actually got a reply asking about which integrations I use and if they are developed by myself or a third-party plugin available on an open-source platform I did replied (just now) and asked if they can provide me any data about the issue they see. Please get in contact with them on developer at somfy.com and express your thoughts, need and feedback. |
We are waiting on a response from Somfy, but we have shared our concerns... At the moment there is not much we can do.
@larsvinc that is weird. Can you login via tahomalink.com? Are you using the TaHoma box or Connexoon?
Could you create a new issue for this? It looks like multiple users are requesting this functionality, thus would be good to track in a new GitHub issue. |
Since yesterday I get all kind of 'Bad credentials' warnings/exceptions. Decided to restart HA in the hope to fix it, however now I get 'Bad auth'. I am wondering if this is just some other random Somfy glitch, or if they have started to block people. I see I can still login in to Tahomalink.com so credentials are ok (I have a Connexxon, so I get the credentials error, however the /setup endpoint with all data is still loading the developer console). Are other people experiencing issues? |
Same problem ! |
Yes, I did as well. After the first reboot did not work (same bad auth error) I decided to wait until later that day. After I rebooted later, it started to work again. |
I confirm, after another reboot (30 minutes later for me) it works again ;) |
Fixed here now as well. Probably a random glitch then. |
I did face similar behavior yesterday, however Home Assistant was able to recover from it. My update interval is 60 seconds. I have seen this behavior more often around updates. First, fetching the event listener will take a very long time (15 to 30 seconds). The next calls won't be able to connect to the host and afterwards a 'Server is down for maintenance' html page is returned. Afterwards, they will throw a few 'Bad Credentials' errors and if you probably don't poll to aggressively, the event listener will recover from it after a while. Would be great if the Overkiz / Somfy API would return a better exception than 'Bad Credentials' in this state...
|
I experienced similar misbehavoiur today: I am considering connecting a rapberry pi to a dismantled telis 4 remote to make my own local "gateway"... |
@larsvinc was your scene executed or did you face another error below this one? This can happen when we lose the session, but the 'backoff' logic will relogin in that case. It doesn't have to be related to the BadCredentials error, but it can be if that is the next error in the log. |
Oh oh, it looks like the first changes have been implemented. I am currently not using my covers (due to the weather), thus not sure if this change really impacts us. Could someone give the integration a try (with the latest updates)? Please also mention your polling interval. Mine is set to 60 seconds.
|
Just wanted to come here to say that I have not been banned by using this component. So far so good 👍 @iMicknl I am running the latest version with a polling interval of 45 seconds. My logs look the same as you posted (without any errors). |
Great to hear! We just received word from Somfy about this integration and it certainly moving in the right direction. We will work on some small adjustments, but most important is that the polling interval should be 30 seconds. (where it is allowed to poll every second in case of an active action, for fast feedback). |
[ moderator ]
Here is a list of other threads related to this issue:
[ \moderator ]
I just recieved the following email from Somfy. This is the only way I use their api, so I thought it would be relevant to let you know.
Recieved
6-10-2020 18:24
fromTaHoma By Somfy <no-reply@somfy.com>
The text was updated successfully, but these errors were encountered: