Overkiz API and Somfy API

I’d say the later. The servers were down for maintenance for several hours… Hope everything is back to normal now.

Hello everyone,

I did a new HA installation 3 days ago, the Somfy integration only worked perfectly for 1 hour and I think I am facing the same problem mentioned by etique57 earlier.
I restarted my HA several times but nothing came back. I tried to relaunch the Somfy integration but no luck either.

Am I alone in this case?

Here are my logs:

Détails du journal ( WARNING )
Logger: homeassistant.components.somfy
Source: components/somfy/__init__.py:179
Integration: Somfy (documentation, issues)
First occurred: 12:24:43 (1 occurrences)
Last logged: 12:24:43

Cannot update devices: 404
Détails du journal ( ERROR )
Logger: homeassistant.config_entries
Source: components/somfy/__init__.py:95
First occurred: 12:24:43 (1 occurrences)
Last logged: 12:24:43

Error setting up entry Home Assistant Cloud for somfy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 220, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/somfy/__init__.py", line 95, in async_setup_entry
    devices = hass.data[DOMAIN][DEVICES]
KeyError: 'devices'

A general question: is the official API now more reliable and more stable since the upgrade on Somfy side? I moved back to the unofficial TaHoma integration because the Somfy integration was very unstable because of the bad Somfy API.

Hi, can you please try the steps I listed in the first message of this topic? We will see if the issue is due to the component or from the Somfy servers.

I tried to follow the steps and i don’t see any device. I have the message below :

HTTP/1.1 401 Unauthorized
Connection:
keep-alive
Content-Length:
101
Content-Type:
application/json
Date:
Thu, 02 Jul 2020 15:12:05 GMT
WWW-Authenticate:
Bearer realm="null"
{
  "fault": {
    "faultstring": "Invalid access token",
    "detail": {
      "errorcode": "oauth.v2.InvalidAccessToken"
    }
  }
}

What do you think doc ? Is that bad ? :confused:

It seems bad indeed! Can you please retry. I just do it right now, and I’ve no issue. My devices are well listed.

Nope, same error for me.
After Set OAuth2.0 and Try out on first URL, the response tab shows me 2 id site :face_with_raised_eyebrow:
PBSomfy
I tried with the both id but nothing change…
Is that normal to have 2 id at this step ???

Maybe i can reset my Tahoma installation on Somfy website ?

Edit :
Finally I saw that in the 2nd URL, OAuth2.0 was not set. When i put my 2nd id, i see my devices but not with the 1st one…
Thats weird because i see only one installation in Somfy website :weary:

Edit 2 :
I tried to integrate my Somfy installation with the old way (I had the same problem as Essevee21 with my Internal URL) but I get the same error : my devices won’t showed up.
Seems like HA only check my first site (who doesn’t have device)… Maybe this first site id match with my Somfy Home Alarm installation ? Before I try to reset all of this, is there a way to force Somfy integration on particular site ?

Hi,

Yesterday, I hit an issue when I configured the Somfy integration.
The authorization with Somfy was always failing, resulting in a redirect_uri_mismatch.

{"error":"redirect_uri_mismatch","error_description":"The redirect URI provided does not match registered URI(s)."} 

However, my External URL (configured in Settings -> General) was matching the one configured as Callback URL on the Somfy dev website (https://developer.somfy.com).
I then noticed in my address bar that my Internal URL instead of the External URL was passed as parameter for the callback during the authorization with Somfy.

So it looks like when an Internal URL is configured in Home Assistant, this URL is used for setting up the callback from the Somfy API. This is probably a bug?

When I modified my Internal URL to match my External URL, the authorization was successful. Since I’m not really using the Internal URL, that’s a working workaround for me.

Unfortunately after the Tahoma update my home assistant won’t connect to somfy server anymore using the Tahoma component. Home assistant gives an error after reboot.
The Tahoma app works on Android.

Anyone any clue? I haven’t changed a thing…

Home assistant gives me this message: “The following integrations and platforms could not be set up: Tahoma”

I had same problem. I resolved my problem by changing from standard Tahoma Integration to custom component https://github.com/iMicknl/ha-tahoma.

1 Like

Thanks, will try it later on.
I still use a quite old custom one.

Hi !
Like I said before, there was a problem between my 2 sites. I’ve delete my Home Alarm installation, re-launch the Somfy integration and 2 seconds later, my devices showed up in my HA.
After the re-installation of my Home Alarm, everything seems OK :crossed_fingers:

Thanks for your help @tetienne (and your job by the way)

Edit :
Well well well… like the last time, it worked only few time (1 hour maybe) and here we go again :sob:
Error 404, unable to find devices, blablabla.
Can we have 2 site id (Home Alarm and Tahoma) ?
Is someone have the same configuration ?

It works using the link provided by mjhansen.

Hello !
I tried the @Mjhansen solution and it works since 2 days without problem. I will stay with this and maybe there will be a solution for my problem in Official Somfy integration some day ?! :crossed_fingers:
Thanks for your help

Just as an information: my Somfy integration works now fine for some days! No error messages regarding the Somfy API anymore. I don’t know if the update to HA 0.112.4 did the change or the update of the Somfy API … I hope it will stay that way :grinning:

2 Likes

Just upgraded to 0.1124
Reinstalled the Somfy integration and commented out the Tahoma entry from configuration.yaml.
I am seeing all my blinds (7) but none of my 3 awnings which would appear under the Tahoma integration.

Hi, this is normal. The somfy open api does not support them. I suggest you to migrate to this custom component: https://github.com/imicknl/ha-tahoma

1 Like

That did the trick. Thanks a lot
Merci
Erik

Still no awning support! Man, Im never buying another somfy product. ( selling house ). Anyways, i thought the tahoma API was shut down?

They depreciated an old endpoint. I help @imick and @vlebourl to enhance a lot the previous Tahamo component. We rewrite it entirely. You can have a try. It works fine and all your Somfy devices will be discovered. If not, you can open us an issue.

1 Like