Overkiz API and Somfy API

I have done the same mistake as you, deleting the integration! Bloody hell, this service is so unreliable… We will have to wait days for it to suddenly work again T-T

The weird thing is that I have a secondary setup (Hassio on Docker, beta channel) which does not seem to have any token expiration problem. Both apps are OK in Somfy developer web site.

My regular setup is a Raspberry Pi 3b+ with Hassio (stable channel).

I am using Hass.io with my own application (created @ developer.somfy.com)

using hass.io on pi3. using the HACloud and added it with integrations using the OAuth2 account linking service.

yesterday i deleted the integration. if i want to add it now i get an error after logging in that says (simply translated) “error. try again. if it doesn´t work contact support.”

OK Somfy has definitively an issue on their side… The only thing we can is to be patient :S

Same problem here, token expired, I deleted the integration and tried adding again. Somfy oauth website says “An error has occurred. Please try again. If the problem persists, please contact our technical support team.”

Can someone confirm which URI we are supposed to use on HA side?

I think it’s now “/auth/external/callback” where it was “/auth/somfy/callback”. I’m running HA 0.103 and the second URI returns 404.

Same issue here…

it´s back up!

I had the same problem as everyone since yesterday.
Today I don’t have the same Somfy error message as I can get to the autorisation page but I get the URLs mismatched error :

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

I have fixed the callback URL in the somfy app with https://myhomeassistant/auth/external/callback so I don’t know where it is coming from.

The weird thing is that when I set the integration with “Home Assistant Cloud” it is working ! But I would much prefer to make it work with the configuration.yaml as a standalone solution.

Any idea of why it is not working as expected ?

Same here, URI error now the API has been revived…

On my second instance (Docker), I’m now getting the following error and I cannot control the blind anymore:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 408, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 198, in state_attributes
    current = self.current_cover_position
  File "/usr/src/homeassistant/homeassistant/components/somfy/cover.py", line 69, in current_cover_position
    position = 100 - self.cover.get_position()
TypeError: unsupported operand type(s) for -: 'int' and 'str'

Back for me to, for those that could help, I had to make a change (open/close) to my cover before HA was being able to see them again correctly and I’m using a connexoon box.

It finally works now… :tada:

image

1 Like

What is working for you? I’m still seeing the issue:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 408, in _async_add_entity
    await entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
    self._async_write_ha_state()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 198, in state_attributes
    current = self.current_cover_position
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/somfy/cover.py", line 69, in current_cover_position
    position = 100 - self.cover.get_position()```

I see the same issue in my Hassio instance.

Ok for me also

I checked a few things about the URI errors (which I still have):

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

In the OAuth request URL, I can find the callback URL and it’s exactly the same as the one I declared in the app on Somfy Dev web site.

Does anyone know how to contact Somfy support? It looks like something is wrong here.
Has anyone managed to redo an integration successfully over the last days?

Cheers.

G.

PS : There is a bug opened on GitHub about the String issue => https://github.com/home-assistant/home-assistant/issues/30069

I tested a little patch in somfy/cover.py and it works for me:

old: cover.py vs. new cover.py  
70c70
<             position = 100 - self.cover.get_position()
---
>             position = 100 - int(self.cover.get_position())

The problem is: I don’t know, if this is the only position in the code, where this issue exists. I am sure @tetienne has a better overview and perhaps a more elegant way to fix it

As @gdesfeux mentionned you should follow the github issue here : https://github.com/home-assistant/home-assistant/issues/30069

@Rhadamantys a better patch has been proposed for now on the issue

Wait and see…

I suggest you to use the cloud solution, instead of the custom one. Somfy tweak the application used by HA to be more robust.

If you really want to use the custom application, you will have perhaps to wait. They have a sync process to propagate the application. So between the moment where you create the app and the moment where this one is enabled, there is a delay.

If after several hours, you still have the issue, you can contact them through the contact form on the somfy dev portal.