Tahoma Binding compatible with OH2

Hi all
My system went down around 1 week ago, and seems impossible to bring it back up.

Getting:

12:50:12.139 [DEBUG] [ma.internal.SomfyTahomaHandlerFactory] - Creating handler for gateway
12:50:12.141 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Initialize done...
12:50:12.158 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'somfytahoma:gateway:237dbae7:0404-6544-4828' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
12:50:12.178 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'somfytahoma:gateway:237dbae7:0404-6544-4828' changed from INITIALIZING to ONLINE
12:50:12.950 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'things.things'
12:50:21.902 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Starting scanning for things...
12:50:21.904 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Cannot start discovery since the bridge is not online!
12:50:22.141 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Getting Tahoma Updates...
12:50:22.142 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Doing relogin
12:50:22.143 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Skipping login due to too many requests
12:50:52.144 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Getting Tahoma Updates...
12:50:52.146 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Doing relogin
12:50:52.146 [DEBUG] [rnal.handler.SomfyTahomaBridgeHandler] - Skipping login due to too many requests

Password is very simple, no special caracters, able to login to https://tahomalink.com/enduser-mobile-web/enduserAPI/doc/test/ and https://www.somfy.co.uk/login

binding version:

246 │ Active │  80 │ 3.0.0                   │ org.openhab.binding.somfytahoma

Mobile app working fine.
Any suggestion on what else to look at?
I have set the log to trace but seems that I only get DEBUG.

Thanks
Giacomo

My problem came from the Amazon echo binding.After uninstalling this, the Tahoma binding works again without any problems.

Hi @Ondrej_Pecta,

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

Here is the content of my somfy.things-file:

Bridge somfytahoma:bridge:e87b2d69 "EG Tahoma" [ email="someMailaddress", password="somePassword", refresh=30, statusTimeout=90] {
  Thing gateway 1218-1469-6425 "EG Tahoma gateway" [ id="1218-1469-6425" ]
  Thing rollershutter 2312923f-fb99-418f-acc4-fb9e71367cc6 "Rollladen Wohnzimmer Links" [ url="io://1218-1469-6425/1380068" ]
  Thing rollershutter dee6431c-3931-4475-9a98-ad7a7a5259cd "Rollladen Wohnzimmer Rechts" [ url="io://1218-1469-6425/391374" ]
  Thing rollershutter 3fb1ffbf-7af6-4974-883b-a74a1618700a "Rollladen Küche" [ url="io://1218-1469-6425/9521199" ]
  Thing awning 29aa705d-6aed-4cdc-a4bb-3c9eaa03585d "Markise" [ url="io://1218-1469-6425/12811918" ]
  Thing actiongroup 08e2a786-c004-4dbd-8027-4c452ca7f4f3 "Markisenlicht Aus Action" [ url="08e2a786-c004-4dbd-8027-4c452ca7f4f3" ]
  Thing actiongroup 34615b47-ad95-4ddc-833b-1a82046f28a8 "Markisenlicht An Action" [ url="34615b47-ad95-4ddc-833b-1a82046f28a8" ]
  Thing actiongroup 7abdc68c-dada-48ca-ba1d-9f4aab30583d "Heizstrahler Aus Action" [ url="7abdc68c-dada-48ca-ba1d-9f4aab30583d" ]
  Thing actiongroup ccea1aa9-6d71-4b42-acc4-ec76dc8b4609 "Heizstrahler My Action" [ url="ccea1aa9-6d71-4b42-acc4-ec76dc8b4609" ]
  Thing actiongroup 508eec8d-8b25-47e7-87ba-e25ef63cec79 "Heizstrahler Max Action" [ url="508eec8d-8b25-47e7-87ba-e25ef63cec79" ]
  Thing rollershutter 802c3d33-89b9-4613-8a1d-c5a9d0293f1f "K HR Fenster" [ url="io://1218-1469-6425/11519518" ]
  Thing rollershutter 7fd35219-46ea-440c-88e5-792a6b7929b7 "K LR Fenster" [ url="io://1218-1469-6425/2888028" ]
  Thing contactsensor 887da141-a834-4c56-8b87-37a9438d8bfd "EG WC Fenstersensor" [ url="io://1218-1469-6425/9686144" ]
  Thing contactsensor 8af185e9-ce64-4baa-b515-7a96867aba6d "EG WZ Fenstersensor" [ url="io://1218-1469-6425/6824594" ]
  Thing contactsensor 1aa36142-d219-4c55-97f6-4099f65fb1c1 "EG KU Fenstersensor" [ url="io://1218-1469-6425/10585561" ]
  Thing contactsensor 66c1275a-800c-456a-b633-a5b99737789b "OG EZ Fenstersensor" [ url="io://1218-1469-6425/15662542" ]
  Thing contactsensor 925282b7-4526-4c47-93f3-ce388e4c1ad5 "OG PZ Fenstersensor" [ url="io://1218-1469-6425/11237194" ]
  Thing contactsensor beef4dd7-5ddc-47c5-8c20-e8e11924d187 "K LR Fenstersensor" [ url="io://1218-1469-6425/12683967" ]
}

Bridge somfytahoma:bridge:e65f3139 "DG Connexoon" [email="someOtherMailaddress", password="someOtherPassword", refresh=30, statusTimeout=90] {
  Thing gateway 0824-1519-4573 "DG Connexoon gateway" [ id="0824-1519-4573" ]
  Thing window 443cb6da-0799-4ae4-bfff-eb7e1571417b "DG F Dachfenster" [ url="io://0824-1519-4573/586382" ]
  Thing contactsensor 57f23a74-8005-4d09-98ab-650833c4a461 "OG WZ Fenstersensor" [ url="io://0824-1519-4573/2480090" ]
  Thing contactsensor 2c1331f0-538c-4e98-8c3e-a69d5cdf3c36 "OG B Fenstersensor" [ url="io://0824-1519-4573/1206517" ]
  Thing contactsensor 3f36caa6-b670-4916-96a6-febe9d685154 "DG SZ L Fenstersensor" [ url="io://0824-1519-4573/5674541" ]
  Thing contactsensor 4a39f6c9-eadd-4c5c-894a-eaec1c6984ad "DG SZ R Fenstersensor" [ url="io://0824-1519-4573/6936778" ]
  Thing contactsensor 34080df9-f7dc-4b26-a87b-e1011d04bfb5 "DG NZ Fenstersensor" [ url="io://0824-1519-4573/15332817" ]
  Thing contactsensor b39c6630-69f4-4ee5-81c0-74bb5146e460 "DG B Fenstersensor" [ url="io://0824-1519-4573/11121801" ]
}

Bridge somfytahoma:bridge:3d3efd46 "Somfy Connexoon Bridge K" [email="yetAnotherMailaddress", password="yetAnotherPassword", refresh=30, statusTimeout=90] {
  Thing gateway 0820-3612-7607 "K Connexoon gateway" [ id="0820-3612-7607" ]
  Thing contactsensor 547deafc-928b-4c2b-b949-e11464e9d57a "K HR Fenstersensor" [ url="io://0820-3612-7607/910845" ]
}

Thank you so much in advance. This is making me crazy. And happy Easter.

Cheers,
Gregory

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.

Thanks.
Ondrej

Hey @Ondrej_Pecta,

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.

Thanks,
Florian

Hey @Ltty and @Ondrej_Pecta,

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.

Cheers,
Gregory

@Ondrej_Pecta : I am not sure it could have any interest for you but the authentication is the main difference I found when integrating Cozytouch in the binding. I have to retrieve and then use a cookie. You can have a look at my current code here: openhab-addons/CozytouchBridgeHandler.java at tahoma_cozytouch · lolodomo/openhab-addons · GitHub

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

Stáhnout Outlook pro iOS

Hello, same issue for me with my CONNEXOON … “authentification challenge” error

I can connect to

https://accounts.somfy.com/dashboard

but not to
https://www.tahomalink.com

Don’t know if this website ever worked before …
I’ll try on somfy forum

Same here. Trying directly to login to https://www.tahomalink.com says “wrong username or password”.
Via https://www.somfy-connect.com/ it works.

Found this on their forum (Login impossible sur tahomalink.com? - Avec Réponse(s))
Same issue

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 ?

Yes i have an insane amount of queries going to tahomalink, mayby the binding is quiering too often?

Polling was set to 60 seconds

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

1 Like

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:

  1. refresh calls - the most frequent ones, 30s by default
  2. reconciliation/status calls - the whole tahoma setup is retrieved, they are the largest ones, I have 300s right now
  3. 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…

Ondrej

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.

Did the password reset solve your issue?

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)

Aymeric

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.

1 Like