Tahoma Binding compatible with OH2

Hi Ondrej,

that didn’t do the trick - it’s producing endless errors in the logfiles. If you think the getStatus disabling would work out - then I would kindly ask you to to help and I’ll give it a try.

2018-11-18 22:07:36.623 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Cannot send listDevices command!
java.io.IOException: Server returned HTTP response code: 400 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/getSetup
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendDataToTahomaWithCookie(SomfyTahomaBridgeHandler.java:551) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.listDevicesInternal(SomfyTahomaBridgeHandler.java:259) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.listDevices(SomfyTahomaBridgeHandler.java:245) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.startDiscovery(SomfyTahomaBridgeHandler.java:177) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.lambda$0(SomfyTahomaBridgeHandler.java:85) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-18 22:07:36.791 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Cannot send getActionGroups command!
java.io.IOException: Server returned HTTP response code: 400 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/getActionGroups
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendDataToTahomaWithCookie(SomfyTahomaBridgeHandler.java:551) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.getGroups(SomfyTahomaBridgeHandler.java:225) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.listActionGroups(SomfyTahomaBridgeHandler.java:199) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.startDiscovery(SomfyTahomaBridgeHandler.java:178) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.lambda$0(SomfyTahomaBridgeHandler.java:85) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

2018-11-18 22:07:45.150 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Cannot get login cookie!
java.io.IOException: Server returned HTTP response code: 403 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/login
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944) [?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939) [?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938) [?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508) [?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) [?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) [?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.login(SomfyTahomaBridgeHandler.java:140) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.updateTahomaStates(SomfyTahomaBridgeHandler.java:414) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.access$0(SomfyTahomaBridgeHandler.java:411) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler$1.run(SomfyTahomaBridgeHandler.java:98) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/login
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnection.java:3053) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFieldKey(HttpsURLConnectionImpl.java:316) ~[?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.login(SomfyTahomaBridgeHandler.java:133) ~[?:?]
	... 10 more
2018-11-18 22:07:45.289 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Cannot send getStates command!
java.io.IOException: Server returned HTTP response code: 400 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/getStates
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894) [?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) [?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) [?:?]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendDataToTahomaWithCookie(SomfyTahomaBridgeHandler.java:551) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.getAllStates(SomfyTahomaBridgeHandler.java:299) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.updateThingState(SomfyTahomaBridgeHandler.java:432) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.updateTahomaStates(SomfyTahomaBridgeHandler.java:424) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.access$0(SomfyTahomaBridgeHandler.java:411) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler$1.run(SomfyTahomaBridgeHandler.java:98) [220:org.openhab.binding.somfytahoma:2.2.0.201712031935]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Thanks!
Kurt

I am having the same problem with my new Connexoon. I’ve tried various password combinations, but none of them are accepted by the Tahoma site.

Very frustrating.

I only used letters and numbers, small and caps. No special characters etc.

Thanks. I have tried that but I still don’t have access. However, access works on the mobile app. Any idea as to who I should contact at Somfy?

I have sent emails to several Somfy technical support staff. So far, the answer I have been give is that this isn’t technically possible!

Can’t tell you what I did but I kept trying and all of a sudden it worked

I’ll keep trying different passwords and hope that it eventually works.

Hi Ondrej,

Please ignore this one - your initial suggestion works out fine for me (5000 timeout is my value).

Kurt

I gave up on this as it doesn’t work in Australia. Somfy said the device registers onto a server in Singapore that doesn’t have the Tahoma API enabled.

I ended up using the RS485 Somfy device and wrote the code to control it using the HTTP binding.

A different issue here, I started getting many many “Too many requests, try again later” in the last three weeks. Unfortunately, I cannot react on this information (the bridge is in OFFLINE - COMMUNICATION ERROR, but the gateway state is still OK).

Ondrej, could you perhaps have a look?

Hi All,

I’m new with OH and I just get a fresh install on Linux. I installed last version of the SomfyTahoma Binding (2.4.0) form GUI, which I have to say that’s a great job there. I’m also using a Connexoon Box with Velux io devices connected to it.

I can pilot every devices with a slider, it just works fine, thanks to Ondrej. But I’m also experimenting refresh issues when I use remote control, items in OH are not updated. When I refresh the mobile app (Connexoon Window), then the values are refreshed in OH.

I was wondering if I was using the latest version of this binding. So, I try to put the org.openhab.binding.somfytahoma-2.4.0-SNAPSHOT.jar (form this topic) into my /usr/share/openhab2/addons folder… restart OH, but I don’t see nothing in the UI, no new binding… If someone could give me a hint, advices or step to do. It will be appreciated.

Ivan

Hi Ivan,

the latest version of this binding is bundled with the OH2.4 installation. There’s no need to disable this bundled version and replace it with a development version.

Regarding the refreshing of items - the default refresh timeout is 5minutes (300s), if you find it too seldom, just lower the value. Please keep in mind it creates a lot of requests to the Tahoma cloud so I do not recommend to set it lower than 60s. If you do so, you are risking temporary banning from Tahoma cloud or freezing of your box.

Thanks
Ondrej

Hi Ondrej,

Thanks a lot for your fast reply, indeed I set it to 60s. But it seems that sometimes the refresh is not done. Maybe I’m playing so much with up, down & stp with those devices and refreshing my browser to see the update :wink:
I’ll give a couple of weeks of experiment and come back to you in case of question.

It’s a nice binding, I was using a .py script (https://github.com/philklei/tahoma-api) with Domoticz before but without finding how to set a value… only up/down/stop fonction, and overall no refresh from the box at all.

Thanks Ondrej for your good advices, have a nice weekend.
Ivan

Hi Ondrej,

So I set the refresh value to 30s and timeout to 300s as they were by default. Yesterday evening it seemed to work (the refresh) at least once (after some minutes). But this morning, no refresh at all, I wait 30 minutes. Then I opened the connexoon window apps, as usual it takes some seconds before also refreshing, but once done on the app, OH was also refreshed. Am I missing something?

Is it a way to request this refresh via a command?

Thanks a lot
Ivan

Hi Ivan,

it seems Tahoma has changed something on Tahoma API server side and the refresh is not working properly.
Could you please test this version? (everybody is welcomed, especially with connexoon, which I can’t test)
https://www.dropbox.com/s/milfiftoww77p1e/org.openhab.binding.somfytahoma-2.5.0-SNAPSHOT.jar?dl=1

changes

  • new way of forced refreshing of states
  • states are got via the setup command (one call), instead of getting states for each device by several calls

Thanks.
Ondrej

Hi Ondrej,

You’re great! I did several trials and the refresh was done almost in real time. The new way you implemented is working really good. As I’m actually playing with theses devices (shutters and windows motors) almost everyday (yeah… I’m coding a script to pilot them with timers and a lot of weather parameters), I will let you know if I notice some problems.

If you were near my location, I’d like to offer you some beers!

Ondrej, thank you so much for your finding and excellent binding.

Cheers,

Ivan

Hi,

I just installed the binding for the first time. Seems to work great with my io shutters, thanks!
I noticed a “pod” thing that has three channels linked to it (cyclic_button_state, battery_status_state,
lighting_led_pod_mod_state). What are these?

Thanks!

With the latest jar file, I get rejected with “Too many requests, try again later” 40 to 100 times per day. Before, it was multiple thousand times per day. The big increase started with 6. January, and with the newest code, all is well again :smile:

1 Like

Hello,

i am using the latest binding (2.5 snapshot) and i have some troubles.
first, i got many errors in the log concerning login credetials > bridge is offline.
Further i have installed the enocean stick at the tahoma box for a windowhandle from HOPPE.
Unfortunately the state of the handle isn’t up to date > no update at operation

Thing windowhandle WohnzimmerTerrassentuer "Terrassentür" @ "windows" [ url="enocean://xxx-xxx-xxx/1104619" ]
String Wohnzimmer_Terrassentuer "Terrassentür %s" (EG_Wohnzimmer) {channel="somfytahoma:windowhandle:10c48439:WohnzimmerTerrassentuer:handle_state"}

Is the binding ready for the enocean window handle?

best regards
Christoph

Hi Christoph,
please PM me the debug log of your somfy tahoma binding initialization.
I guess your issues are relating one to another. There’s no extra support for enocean handles, but generic ones and I have to add support for your specific handle (most probably it has other states and it generates exceptions turning your bridge to offline)

Thanks.
Ondrej

Hey Ondrej,

thanks for your reply.

Some updates:
I installed the latest build from https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.somfytahoma/2.5.0-SNAPSHOT/

After some cache cleans and restarts of OH the bridge is online > sometimes there are some ERROR logs with offline issues and then i can’t log in with my credentials at www.tahomalink.com too (too many requests) > then i have to wait several minutes to try again.

I am not at home the next 2 days > i will provide you the log files for the tahoma binding.

According the enocean windowhandle:
After a restart of the OH i see the actual state of the handle, but there are no change-actions if i operate the handle during OH is running.

thanks for your work

regards
Christoph