you helped me once before and did a great job at it, so I was hoping you could help me out again. A week ago or so, I installed the newest update for my Somfy Tahoma and my two Connexoon boxes. Since then I am having trouble with the plugin on OpenHab. I get the infamous Authentication Challenge messages. Apart from the Somfy updates I did not update any device, add any device or made any changes to my Somfy and OpenHAB setups (OpenHAB v3.0.1).
If it is okay with you I would like to ask for your help and send you my OpenHAB.log file? I set org.openhab.binding.somfytahoma to TRACE.
But as I am unsure whether or not the problem affects others since the update, I wanted to post my message here instead of just PMing you.
What I tried:
Making sure both the Tahoma and Connexoon app on both my iPhone and on my wife’s phone are not logged in > this covers all other Somfy clients I have in the house besides OpenHAB
Stopping OpenHAB
After a wait period of approx 10. minutes I restarted OpenHAB
I was then able to interact with my Somfy devices through OpenHAB for approximately 1 day, after which I got Authentication errors once more > repeating the above mentioned steps fixes the problem again for approx. 1 day and then it starts all over again and again and again
Hello Gregory,
yes please - PM me your trace openhab.log, I will check what causes the problems, maybe some changes in the core have affected the functionality.
There should not be any changes in the binding in 3.0.1, more are coming with 3.1 version.
Since last week I also keep getting communication errors due to the authentication challenge. Everything was working fine, I did not apply any updates recently or change anything. I noticed that the Somfy bridge started going on and offline and after 24 hours couldn’t connect at all.
I already tried all suggested solutions in connection with the authentication challenge but without success so far.
I sent Ondrej my “fresh” log files. As soon as there is a diagnosis, one of us will surely share it here.
An addition to my previous post: during the time OpenHAB returns Authentication Challenge errors and I can’t control Somfy equipment through OpenHAB, I still can login and use the equipment just fine using the Tahoma and Connexoon apps on my phone. I don’t know if this information helps, but the more info the better I guess.
thanks @Lolodomo for an inspiration. What is the behaviour of Cozytouch when you do not set a login cookie in the next login? Does it generate the “too many requests” error when you do login more frequently?
Thanks
Ondrej
Votre compte avait en effet bloqué suite à un nombre de requête trop important, je viens de le débloquer. Utilisez-vous une application tierce pour piloter votre TaHoma ?
in english
Your account has been locked due to too many request. Do you use a third party app to control your tahoma ?
Hello
I called the support and was told that Openhab is doing too many requests. This is why the account was locked. I was asked to set a new password and at the same time set the Tahoma thing refresh rate to 2 hours for the moment and wait until the account gets unlocked.
Btw the Somfy support was very competent and helpful.
Matthieu
I removed my previous messages because what I said was totally wrong !
The number of requests does not depend on how many things you setup. It only depends on how many bridges you setup. In normal setup, you defined one bridge.
This bridge will trigger per default 120+12=132 requests per hour.
And the discovery service will trigger 2 requests per hour.
This is not a lot with the default values.
Of course, if you set your refresh interval to 5 seconds for example, this will trigger many more requests.
Of course, when you send commands through OH, requests are triggered.
Yes, I agree. The number of requests does not depend on the number of things, it used to depend but I had to change it two years ago when the throttling and “too many requests” error first appeared.
There are three types of calls:
refresh calls - the most frequent ones, 30s by default
reconciliation/status calls - the whole tahoma setup is retrieved, they are the largest ones, I have 300s right now
discovey calls - the same as the status calls, but with different cycle and purpose
Please do not set the refresh and especially the status calls too frequent. @Lolodomo maybe we can cache the status/discovery calls as well or get rid of the discovery calls because we can retrieve the new devices from the more frequent status calls…
With Cozytouch, I have not yet seen the event RefreshAllDevicesStatesCompletedEvent (which triggers in the binding a refresh of devices at least every 5 minutes). What triggers this event in Tahoma ?
For the discovery, your idea would be to rely on refreshTahomaStates called every 5 minutes ? What I noticed in case of Cozytouch is that it does not trigger events describing all device states. So I don’t think we can rely on that for discovery.
To be honest with you, that is not fully clear for me what is doing URL “setup/devices/states/refresh”.
But maybe they are specific events produced for new devices or removed devices that are not yet supported by the binding ?
By the way, the discovery service is also retrieving the list of action groups.
For the discovery, I think this is not necessary to trigger an automatic scan every hour. If the user wants to scan, he can use the search button in UI. So I would suggest to simply remove the scheduled search every hour and only keep the manual scan. That’s being said, that is only 2 requests run once per hour, I don’t think the discovery is what will trigger the “too many requests” blocking.
Great hint. When I go to Tahomalink.com it tells me my user name or password is incorrect. Requested a password reset, was able to reset the password, and logged in. After logging out and logging in again, I got the same error message though. I can only get to the member area with the password reset option. And most importantly, the binding is not able to connect again.
I am wondering why the binding uses tahomalink. (And yes, my account has been locked, too.)
Official SOMFY API describes some other way using OAuth: Somfy Open API Developer Portal | APIs & Docs
Is it planned to update the binding to use this API?
I presume whether you use OAuth2 or not, the account will be locked anyway.
What I don’t know if it’s enough to reset the password and disable the Gateway thing for a while (1 day ?) to reactivate the account, or if someone from somfy must unlock the account manually (via phone or the somfy forum)
UPDATE: I reset my password this morning, and disabled the “Somfy Tahoma Bridge” thing until tonight. Just enabled it now, and the bridge is back online.
So i guess the account unlock itself after a while if you don’t hammer the server.