Tahoma Binding compatible with OH2

Hi Ondrej,

As a Somfy Connexxoon user, you are not give a tahoma link account for the portal.

I am perplexed as to how some Connexoon users can set this up and others cant.

Any advce would be welcome?

Regards
Anthony

In case it helps anyone else, I gave up on using the Connexoon and built an Arduino MQTT/RTS bridge instead: https://github.com/richardbounds/Arduino_SomfyRTS

1 Like

If you own somfy rts devices you can use a RFXCOM connected to your openHAB installation to control them. Somfy IO however needs at least a connexxoon to be controlled.

I can confirm that this binding works for me, and that, as a conexxoon user I cannot log into the portal at tahaomalink with my credentials.

When looking at the traffic from my local network that conexxoon does login at the api from tahaomacloud. Login in as an end user at the web interface seems to be preserved for tahoma owners.

So for conexxoon owners, not being able to log in at the web portal is not a valid pre test to get the binding working.

If the somfy app works, the binding should be able to connect using the same valid credentials?

Hi all,

I’ve been following this thread for some time and can see people having issues so thought I may be able to help in some way. I’ve got a Conexxoon device from the UK (I’m in AU), I have been using it successfully for over a year with only a few issues when first migrating to 2.5, I’m now on 2.5.9 and still do not have issues however my Conexxon box is asking for an update which I’ve ignored to date.

I needed to register my box at https://www.somfy-connect.com/en/, I’m sure part of this registration process was creating an account. I cannot login to http://tahomalink.com but I can login to https://www.somfy.co.uk/login. I’d assume this is also possible from https://www.somfy.com.au/login if it’s an AU box.

I have been eyeing of an RFXCOM box for some time as I do have concerns around the longevity of the Somfy cloud and credentials I am using and would like to go cloud free. Until it stops working and really starts causing me issues I’ll stick with the Somfy Binding.

Hi all,

I can confirm I registered at https://www.somfy-connect.com/en/ and also can log into https://www.somfy.com.au/login, even though there is very little information on that portal.

My Connexoon box is only a few months old so it may have the latest firmware installed however I do not see why this would be causing the authorisation issue.

My preference is to use the native OH binding but it does not seem to work as documented.

Is there any other way to troubleshoot this binding?

Regards
Anthony

My firmware is version: 2020.4.4 if that helps.The only thing that comes to mind is somehow the UK somfy site shares details with other Somfy US / Tahoma sites but the AU one does not.

Are you able to connect via the Somfy Connexoon RTS app and via Google Home?

Hi all,

I was able to link Somfy to Google Home without a problem. The Somfy connection I needed to use in Google Home was the “Asia & Oceania” integration. I was unable to link it via the “Somfy TaHoma & Connexoon” integation as the linking failed.

Regards
Anthony

Hi Anthony,

I’ve run out of ideas, the only thing left to try, unless you have already done this is to ensure your binding configuration is correct. I strongly advise going with a text based config if not already done so.

Here is mine, hope it helps

//Blind Things (Somfy)
Bridge somfytahoma:bridge:7db47d42 "System Blind Bridge" @ "System" [email="email", password="password", refresh=30] {
  Thing gateway 0403-2807-3627 "System Blind Gateway" @ "System" [id="0403-2807-3627"]
  Thing pod a30888ef-5b75-48c6-a0c4-f70e8c08358c "System Blind Pod" @ "System" [url="internal://0403-2807-3627/pod/0"]
  Thing screen 30dc413d-fecf-405b-aec4-96c5098bc085 "Blind Kitchen 1" @ "Blinds" [url="rts://0403-2807-3627/16756798"]
  Thing screen 2b5dc68e-9228-4c44-983f-8bcee701a216 "Blind Kitchen 2" @ "Blinds" [url="rts://0403-2807-3627/16725004"]
  Thing screen cc3eaecc-23ec-4d82-952b-af46c8dc5465 "Blind Kitchen 3" @ "Blinds" [url="rts://0403-2807-3627/16759542"]		
  Thing screen 8610352d-87f8-4556-a409-e91da56ee0cc "Blind Living Room 1" @ "Blinds" [url="rts://0403-2807-3627/16766527"]
  Thing screen f1b4d2d3-8ab2-4bf5-bca0-e949357434f9 "Blind Living Room 2" @ "Blinds" [url="rts://0403-2807-3627/16722916"]
  Thing screen f93c6b5a-87f0-4559-acae-4be6bb0dab96 "Blind Living Room 3" @ "Blinds" [url="rts://0403-2807-3627/16771703"]
  Thing screen a2aca824-2bb0-43db-a9ae-624fbf976b11 "Blind Laundry" @ "Blinds" [url="rts://0403-2807-3627/16737423"]
  Thing screen 8812f3ec-9f09-4e40-8435-35b8f29c2cf4 "Blind Master Bedroom 1" @ "Blinds" [url="rts://0403-2807-3627/16761419"]
  Thing screen b8dbc621-3150-4863-82a5-f824467bd174 "Blind Master Bedroom 2" @ "Blinds" [url="rts://0403-2807-3627/16736293"]
  Thing screen eb357753-62ef-4eb7-92a5-b89beca3de87 "Blind Master Bedroom Ensuite" @ "Blinds" [url="rts://0403-2807-3627/16735583"]
  Thing screen a00f65d7-e066-43c7-8fce-0296540b050f "Blind 1st Bedroom 1" @ "Blinds" [url="rts://0403-2807-3627/16772278"]
  Thing screen edc96afc-9cb6-4d05-83d3-7d1898500627 "Blind 1st Bedroom 2" @ "Blinds" [url="rts://0403-2807-3627/16746481"]
  Thing screen 7e8f2c84-e220-4408-9ad4-b31b1409a804 "Blind 2nd Bedroom" @ "Blinds" [url="rts://0403-2807-3627/16723599"]
  Thing screen d875eac4-0568-4feb-abf9-70adbc3b3941 "Blind Guest Room 1" @ "Blinds" [url="rts://0403-2807-3627/16750091"]
  Thing screen 35b5736a-36f2-4a77-a5e0-87c4522379cd "Blind Guest Room 2" @ "Blinds" [url="rts://0403-2807-3627/16775487"]
}

Thanks again Nathan,

I will give this a go. Can you please advise how you obtain the reference codes for each Thing/blind. In your example you had:

Thing screen 30dc413d-fecf-405b-aec4-96c5098bc085 “Blind Kitchen 1” @ “Blinds” [url=“rts://0403-2807-3627/16756798”]

How do I determine the code: 30dc413d-fecf-405b-aec4-96c5098bc085
and the code: 16756798

Regards
Anthony

@asteve,

With a kind of chicken and egg approach. Without any configuration via text or paper UI let the binding discover your bridge. When this happens do not add it but note down any names/codes provided. Then configure your bridge only via text based thing file with the information obtained.
When the bridge comes online and you have been authenticated then all things will be discovered. Again note down the names/codes provided and use this to configure the text based thing file.
This all depends on being authenticated in the first place so focus on just getting the bridge online.

I have a Connexoon, but I can’t get this binding to find it. The Somfy app works fine, I can log in to somfy.no/login, but I can’t log into Tahomalink, so that’s probably where the problem is. I know the binding is not guaranteed to work with Connexoon, but has anyone else here had the same problem, and were able to solve it?

@Ondrej_Pecta have you considered moving to the Somfy Open API instead? It should work with both Tahoma, Connexoon and more. From Somfy’s Open API FAQ:

The Open API program will give access to third players to Somfy solutions through a new unified platform, starting with Somfy motorized rolling shutters associated with Somfy Smart Home solutions (TaHoma or Connexoon). The Somfy Connected Thermostat and Somfy motorizations for interior blinds will follow during summer 2018.

I have this binding working with a conexxoon!

  • I can login to the somfy login page
  • I can not! Login to the tahoma link website

If you check network traffic however the connexoon does login to the api at tahamolink. Conexxoon owners are simply not allowed to use the platform using a browser.

Set your binding logging level to debug and check the errors!

Monitoring the traffic from the Connexoon using tcpdump on my router, I can only see it talking to ha101-2.overkiz.com.802.

This is what the log says (it repeats several times over):

openhab> log:set DEBUG org.openhab.binding.somfytahoma
openhab> log:tail org.openhab.binding.somfytahoma
10:38:33.020 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Getting Tahoma Updates...
10:38:33.074 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Doing relogin
10:38:33.547 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Received invalid data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.login(SomfyTahomaBridgeHandler.java:135) ~[?:?]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.getTahomaUpdates(SomfyTahomaBridgeHandler.java:360) ~[?:?]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.lambda$1(SomfyTahomaBridgeHandler.java:103) ~[?:?]
        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.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[?:?]
        ... 14 more

Hi @kvolden, please set the severity to TRACE and paste here the log, so we can see what the login returns. Definitely it is some error instead of the expected JSON.
Thanks.
Ondrej

Hi @Ondrej_Pecta, thanks for looking into this! The following log excerpt captures everything that happens after I try to create the Somfy Tahoma Bridge thing, but is cut off at the point where it starts repeating itself.

08:31:03.625 [DEBUG] [ma.internal.SomfyTahomaHandlerFactory] - Creating handler for bridge
08:31:03.665 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Creating discovery service
08:31:03.681 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Starting SomfyTahoma background discovery
08:31:03.738 [DEBUG] [org.openhab.binding.somfytahoma      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=439, service.bundleid=226, service.scope=singleton} - org.openhab.binding.somfytahoma
08:31:03.769 [DEBUG] [org.openhab.binding.somfytahoma      ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=440, service.bundleid=226, service.scope=singleton} - org.openhab.binding.somfytahoma
08:31:04.328 [TRACE] [homa.handler.SomfyTahomaBridgeHandler] - Login response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Overkiz - Error</title>
</head>
<body>
        <h2>Bad request</h2>
<i>Sun Nov 22 08:31:04 CET 2020</i><br/>

</body>
</html>

08:31:04.350 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Received invalid data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.login(SomfyTahomaBridgeHandler.java:135) ~[?:?]
        at org.openhab.binding.somfytahoma.handler.SomfyTahomaBridgeHandler.lambda$0(SomfyTahomaBridgeHandler.java:91) ~[?:?]
        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) [?:?]
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[?:?]
        ... 13 more
08:31:04.428 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Initialize done...
08:31:13.693 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Starting scanning for things...
08:31:13.704 [DEBUG] [overy.SomfyTahomaItemDiscoveryService] - Cannot start discovery since the bridge is not online!
08:31:14.428 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Getting Tahoma Updates...
08:31:14.436 [DEBUG] [homa.handler.SomfyTahomaBridgeHandler] - Doing relogin
08:31:14.964 [TRACE] [homa.handler.SomfyTahomaBridgeHandler] - Login response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

thanks. I have a feeling that multiple authentication servers exist…

Are you familiar with curl? Can you try to run these commands, one by (replace %user and %pass by your valid credentials)

curl -X POST -d "userId=%user&userPassword=%pass" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" https://www.tahomalink.com/enduser-mobile-web/enduserAPI/login
curl -X POST -d "userId=%user&userPassword=%pass" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/login

curl -X POST -d "userId=%user&userPassword=%pass" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" https://ha201-1.overkiz.com/enduser-mobile-web/enduserAPI/login

Please let me know the results of all attempts.
Ondrej

They all return the same thing:

{"errorCode":"AUTHENTICATION_ERROR","error":"Missing parameter or invalid parameters combination : please provide one of [userId+userPassword, userId+ssoToken, accessToken, jwt]"}

The error message didn’t make much sense, and I realized it’s probably my autogenerated password containing some symbols which probably need to be encoded. So I tried with this instead:

curl -X POST --data-urlencode "userId=%user" --data-urlencode "userPassword=%pass" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" https://www.tahomalink.com/enduser-mobile-web/enduserAPI/login

Replaced with my actual credentials, the response was:

{"success":true,"roles":[{"name":"ENDUSER"}]}

This was pretty promising, and suspected a lack of escaping in the binding as well. I tried to change my password to one without the offending symbols, and now the creation of the Somfy Tahoma Bridge was successful, and I can see my Somfy devices in the PaperUI inbox. :slight_smile:

Thanks a lot for your help! I want to suggest adding proper escaping to the credentials in the binding though. :slight_smile:

Great!
Could you please share with me which symbol was wrongly escaped? I will change my password to contain this char and try to debug it.
I use standard java url escaping, so I am a bit curious…
Thanks.
Ondrej

It was either # or %.

really weird, I can log in without any issue, tried #, %, both