Somfy TaHoma Developer Mode in OpenHab

Hi,

I try to share with you here my get to know to the new API for my Somfy Tahoma Switch Box enabled with the developers mode.

Alex

(I was not able to put more than two links in, so I need to split this…

As it does not support the existing API (Web-Page) used in the existing Bindung, I need to get to knwo to it to first integrate it manual. The aim is to share with you here the manual way to allow the bdinung-developers to write another bidnung for the new API. I think it is worth, as also the other tahoma boxes witll support this new binding. And it is local. So no need to talk between your openhab server and tahoma over the internet. It can be in the local wi-fi network at home.

So lets start the journey.

As some reference to external existing documentation, here some relevant links:

I try to use postman to generate the Rest-API calls. But thw second step already I stubble as it gives me back the error:

{“errorCode”:“RESOURCE_ACCESS_DENIED”,“error”:“Not authenticated”}

If anybody is succuessfull in getting the API work, I would like to get a hint.

Alexander

Seems to be related to that my login-credentials from accounts . somfy . com or www . somfy . de are not accepted at

http://www.tahomalink.com/enduser-mobile-web/steer-html5-client/tahoma/

So It seesm the solution is to define at least one scenario in the somfy app on the mobile phone to let the login beeing accepted. Lets wait now 24h to see if login ins then accepted.

Alex

1 Like

Hello,

I was able to retrieve the token for local API usage and retrieve all the available equipement locally with this command:

curl -X 'GET' \
  'https://gateway-2001-0001-1891.local:8443/enduser-mobile-web/1/enduserAPI/setup/devices' \
  -H 'accept: application/json'

However, when I try to close some rollers previously identified, it doesn’t work, I think I don’t really understand the correct syntax to pass orders. For instance I try:

curl -X 'POST' \
  'https://gateway-1203-6195-XXXX.local:8443/enduser-mobile-web/1/enduserAPI/exec/apply' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer 62c16a668c7eXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
  "label": "string",
  "action": [
    {
    "deviceURL":"io:\/\/1203-6195-4820\/10923957",
    "commands":[
         {
            "commandName":"down",
            "nparams":0
         },
      ],
    }
  ]
}'

I get some Json parser error. Can you please help me how to correct it?

1 Like

My Skills are too bad, but maybe @Ondrej_Pecta can help, he made “the old” binding

Hi,

not sure but at the first sight I would remove the trailing commas in the action part:

{
   "label":"string",
   "action":[
      {
         "deviceURL":"io:\/\/1203-6195-4820\/10923957",
         "commands":[
            {
               "commandName":"down",
               "nparams":0
            }
         ]
      }
   ]
}

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.