Tahoma Binding compatible with OH2

Hi Ondrej,

Thanks for the reply, this confirms my suspicion on how the system communicates with the local connexoon box.
The system will not work if you setup a firewall for the local network that blocks all incoming traffic, hence the reason to open a (network) port to allow the somfy server access to the connexoon box.
I guess there is currently no workaround for this.
I have seen remarks in other threads that people tried to control the blinds locally but without success, which means this is the only solution for the moment.

–Simon

You do not have to open any ports since the connection initiator is your box (it is a standard TCP outbound connection and your router is out of the box configured for such communication)
So it might work this way:

  • your box opens a connection to Somfy server
  • your box listens for any events which occur on Somfy sever
  • your box does the action according to the cought event

So - Somfy server does not connect to your box and you need no extra configuration to make it working.
You are right, there is an extra delay (100~200milliseconds in my case) before your command is executed, but I can assure you it works pretty well anyway :slight_smile:

Hi guys,

I’m currently waiting for my Connexoon box to arrive as I understood the this box is also using the same API as the much more expensive Tahoma box.

Will this binding get also an offical binding at some point?
Can I use the latest version from this thread …2.3.0.snapshot.jar also in a openHAB 2.2 version?

Best regards
Timmi

Hi,

yes it will work (of course you need to connect your box to internet and register it).
The 2.3.0-SNAPSHOT will work in openHAB 2.2

This binding is currently waiting for revision and until this is finished it can’t be found in official bindings repository.

Hi Ondrej,

thank you for the fast reply and the good work.

Best regards
Timmi

Hi Ondrej,

I finally received my Connexoon box and I’m running into issues quite early.

2018-01-20 14:57:28.546 [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.GeneratedConstructorAccessor411.newInstance(Unknown Source) [?:?]
	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) [234:org.openhab.binding.somfytahoma:2.3.0.201801112201]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.updateTahomaStates(SomfyTahomaBridgeHandler.java:425) [234:org.openhab.binding.somfytahoma:2.3.0.201801112201]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.access$0(SomfyTahomaBridgeHandler.java:422) [234:org.openhab.binding.somfytahoma:2.3.0.201801112201]
	at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler$1.run(SomfyTahomaBridgeHandler.java:98) [234:org.openhab.binding.somfytahoma:2.3.0.201801112201]
	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) [?:?]

It looks like I can’t login with my credentials which I have created via https://www.somfy-connect.com.
Also if I try to login through the website https://www.tahomalink.com . I’m receiving wrong user or password.

The mobile app is working fine for me with user and password.

Do you have any recommendation what to check?

Best regards
Timmi

Sorry my fault!!!

I’ve got the binding set up with some Venetian blinds and it all seems to work great. Thanks to those who made the binding it’s awesome.

I there a way to send a small increment to the blinds??? I can do this with the RTS remote or the app.

I want to be able to tilt the blinds and at the moment, I can either open fully or close fully or use the ‘my’ setting. It’s not enough as I want to have different amounts of tilt that I set based on the weather.

Thanks,

Ian

have you tried the “orientation” channel?
this channel should control the slats orientation…

Ondrej

The Orientation channel seems to only work as a switch. So it can be either “open” or “closed”. I tried it as a dimmer type but got the error

“2018-02-18 16:25:06.499 [ERROR] [oma.handler.SomfyTahomaBridgeHandler] - Cannot send apply command setOrientation with params [19]!
java.io.IOException: Server returned HTTP response code: 400 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/apply
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) [?:?]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) [?:?]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) [?:?]
at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendDataToTahomaWithCookie(SomfyTahomaBridgeHandler.java:569) [239:org.openhab.binding.somfytahoma:2.3.0.2018011521
45]
at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendCommandInternal(SomfyTahomaBridgeHandler.java:610) [239:org.openhab.binding.somfytahoma:2.3.0.201801152145]
at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendCommand(SomfyTahomaBridgeHandler.java:593) [239:org.openhab.binding.somfytahoma:2.3.0.201801152145]
at org.openhab.binding.somfytahoma.handler.SomfyTahomaVenetianBlindHandler.handleCommand(SomfyTahomaVenetianBlindHandler.java:70) [239:org.openhab.binding.somfytahoma:2.3.0.2018011521
45]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]…”

Ian

OK, it seems that RTS venetian blinds use another command for the orientation setting. Can you please PM me your getSetup response (you can see it during binding initialization on DEBUG)
thanks
Ondrej

Hi Ondrej,
thanks for your nice Work. When starting Openhab 2.2.0 with your snapshot from mentioned here Tahoma Binding compatible with OH2. I get the following Exception a few times:

Cannot send apply command setClosure with params [0]!
java.io.IOException: Server returned HTTP response code: 400 for URL: https://www.tahomalink.com/enduser-mobile-web/externalAPI/json/apply
        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:569) [195:org.openhab.binding.somfytahoma:2.3.0.201801152145]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendCommandInternal(SomfyTahomaBridgeHandler.java:610) [195:org.openhab.binding.somfytahoma:2.3.0.201801152145]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.sendCommand(SomfyTahomaBridgeHandler.java:593) [195:org.openhab.binding.somfytahoma:2.3.0.201801152145]

I used OH 2.1 and an older Snapshot from you before, and I didn’t get this excpetion. Do you know if this exception is critical. As far as I can see my shutters work as expected…

Hi Benjamin,

sorry to hear you have problems with my binding.
Could you please tell me, what exact device are you using? It seems it sends a command which is not recognized. I guess you are using a dimmer item and you want to open the device (rollershutter, awning etc)
Does it work for up and down commands?

Thanks.
Ondrej

The error occurred directly when starting OH without any interaction.
I’ve set the log level to TRACE (which works, I can see your log messages) but the error no longer occurs. I’ll keep an eye on it.
Is there a place to get the most recent sources? I could do some remote debugging if the error turns up again.
Best regards
Benjamin

Hi,

the latest version is always downloadable from:

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.somfytahoma/2.3.0-SNAPSHOT/org.openhab.binding.somfytahoma-2.3.0-SNAPSHOT.jar

If you face some strange behavior just let me know…

Thanks.

Ondrej

Hi all,
I just read this exciting thread, because I’m planning to buy a Somfy shutter.
To buy the right stuff, I would like to know if it is sufficient to buy an io engine only, or do I need anything else e.g. a Tahoma gateway, to integrate the shutter into my openhab system?

Cheers, Jochen

Hi, you need a gateway for using this binding. Not sure if there’s some other option than Connexoon or Tahoma, but these both gateways are confirmed to be working.
Thanks.
Ondrej

Hi Ondrej,
thanks a lot for your quick response. I will buy the connexoon io box.
Is there some documentation available how to install your binding?
The bindings I installed so far were installed by using PaperUI.

Thanks,
Jochen

Hi,

if you want to manually add a new binding not included in the official distribution, just copy the binding .jar file to addons directory of your OpenHAB installation.

So to make this binding working:

  1. download the latest version from
    https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.somfytahoma/2.3.0-SNAPSHOT/org.openhab.binding.somfytahoma-2.3.0-SNAPSHOT.jar
  2. copy the jar to addons directory
  3. in OpenHAB Paper UI manually add a new thing Somfy Tahoma Bridge provided by this binding
  4. configure the bridge so it can log to Tahomalink cloud (email/password) and discover things
  5. you might find other useful info here:
    https://github.com/octa22/openhab2-addons/blob/jablotron-binding/addons/binding/org.openhab.binding.jablotron/README.md

Good luck!

Thanks.
Ondrej

Hi Ondrej,

Could you please add the “Danfoss LivingConnect 13” Thermostatic Radiator Valve (TRV) as a supported device?

[WARN ] [very.SomfyTahomaItemDiscoveryService] - Detected a new unsupported device: HeatingSystem
[WARN ] [very.SomfyTahomaItemDiscoveryService] - Supported commands: { refreshBatteryLevel (params: 0); refreshTargetTemperature (params: 0); setComfortTargetTemperature
(params: 1); setEcoTargetTemperature (params: 1); setFrostProtectionTargetTemperature (params: 1); setHolidaysTargetTemperature (params: 1); setTargetTemperature (params: 1); refreshManufactur
erSpecific (params: 0); refreshThermostatSetPoint (params: 1); refreshWakeUpInterval (params: 0); setSetPointTypeAndTargetTemperature (params: 2); setTargetWakeUpInterval (params: 1); setThermo
statSetpoint (params: 4); setTargetModeAlias (params: 1); setWakeUpInterval (params: 1); }
[WARN ] [very.SomfyTahomaItemDiscoveryService] - Device states:
{name=‘core:NeighboursAddressesState’, type=3, value=1}
{name=‘zwave:SetPointTypeState’, type=3, value=heating}
{name=‘core:TargetTemperatureState’, type=2, value=20.0}
{name=‘zwave:SetPointHeatingValueState’, type=2, value=20.0}
{name=‘zwave:ManufacturerSpecificManufacturerIdState’, type=1, value=2.0}
{name=‘zwave:ManufacturerSpecificProductTypeIdState’, type=1, value=5.0}
{name=‘zwave:ManufacturerSpecificProductIdState’, type=1, value=4.0}
{name=‘core:BatteryLevelState’, type=1, value=99.0}
{name=‘core:BatteryState’, type=3, value=full}
{name=‘zwave:WakeUpIntervalTimeState’, type=1, value=1800.0}
{name=‘zwave:WakeUpNotificationTimeState’, type=1, value=1.523097613591E12}
{name=‘zwave:ThermostatModeAliasState’, type=3, value=manu}

Best,
Roth