Overkiz API and Somfy API

I just upgraded to 0.102.3, and i’ve still got the same issues

17!? You live in a castle? :sweat_smile: So I’ve tried with my 7 (hum hum) covers. No error when I close them all using groups.cover. But I got some 50x errors when I switch quickly their position.
Can you try to close 10 or 15 covers in one shot? Their is probably a threshold. We can then contact somfy support with this information.

You got the same error when you remove somfy: from your configuration file?

That’s right, when activating the somfy integration i get:

Aborted

The Somfy component is not configured. Please follow the documentation.

I’ve solved the issue by adding “default_config:” to the configuration.yaml file.

Oh so it was linked to the missing cloud component. Glad to see you solved your issue!

It’s a 2 story house, nothing fancy :slight_smile:, all I wanted from renovation was those covers to save time and nerves of doing the same each day.

OK so I started 15 (2 are not in the main scene), and got this in the log:

Updating somfy cover took longer than the scheduled update interval 0:00:15
12:20 PM helpers/entity_platform.py (WARNING) - message first occurred at 12:20 PM and shows up 3 times
Update of cover.spavaca is taking over 10 seconds
12:20 PM __main__.py (WARNING)
Connection pool is full, discarding connection: api.somfy.com
12:19 PM components/somfy/cover.py (WARNING) - message first occurred at 12:19 PM and shows up 6 times
500 Server Error: Internal Server Error for url: https://api.somfy.com/api/v1/device/{EDIT}/exec
12:19 PM components/somfy/cover.py (ERROR)

You can see it logged on to Tahoma, it has a status while it’s doing its part, and more lingering unfinished commands, the higher probability of hitting the limit.

Commanding 7 for ground floor, waiting for them to finish, then the remaining 8 on the upper floor, had no errors.

So I recommend to either send a scene command like the Tahoma app does (and has no issue with 17 items at once), or automate rate limiter in the HASS component itself as it’s sending each cover as a separate command, if more than 8 or so, introduce delay for each consecutive command - calculate how long the first cover would need to do full motion.

In the meantime I’ll split it into ground and floor, and add a 20second delay inbetween those to give it time to process previous all commands.

Keep us updated.

Thanks.

Hi, I would like to know when the Rolling Shutters will be implemented inside the Hassio integration, thanks

I recently switched components from tahoma to somfy, and i’ve noticed that since the switch not all calls to open and close the cover are successful.
Sometimes they fail with an error similar to this:

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140404317911248] 500 Server Error: Internal Server Error for url: https://api.somfy.com/api/v1/device/0258e034-82edbdeb-adc70221-3dded23a/exec

I also see a lot of this:

WARNING (MainThread) [homeassistant.components.somfy] Cannot update devices: 401

This error appears 1105 times in less than 24 hours of logging.

I can confirm those too, not sure if it’s for a cover with already such a position as in the command, or polling cannot get data as API is saturated.

Gave up from the ground/floor splitting, even 8 devices at once were problematic.
Made a custom sequence in Node-red with 5 second interval between each cover command, using GetEntities to get covers with position different than desired, to reduce API calls as much as possible.

I used this before but got an error - something with deprecated use instead: entitiy_id: all. Would you mind to share your code?
So next for me will be to update to the latest HA version (I am still on 101.2) and removing the somfy entry in the configuration.yaml.

they change Api? it Don’t work yet ! :piangere:

I suggest you use the latest version and remove the somfy entry in the configuration.yaml. Indeed, Somfy tweak the application used by Home Assistant Cloud, so this one is probably more robust.

@nuhi Are you using the cloud version?

I don’t understand what you mean? Somfy component already support the rolling shutters.

Because after succesfully install the somfy integration on my hassio 0.102.3 installation I don’t see any of my somfy device ( 2 rolling shutters ) automatically discovered and added

That’s weird the API doesn’t return your covers.

Can you please go on this page: https://developer.somfy.com/somfy-open-api/apis/get/site-0
On the left of the Try out button click on the Set buton.
Enter your Somfy credentials, the same you use for the Tahoma/Conexoon website
Click on Try out
In the Response tab, copy your site id
Go on this page: https://developer.somfy.com/somfy-open-api/apis/get/site/{siteId}/device
Below _ Resource URL_ replace site_id by the one you got previously
Click on Try out
Do you see your devices?

1 Like

Hi,
I would like to ask if Somfy gate opener type Ixengo will be supported soon?

After hass.io restart, i get this error:

Error during setup of component tahoma
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 44, in login
    result = request.json()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tahoma/__init__.py", line 73, in setup
    api = TahomaApi(username, password)
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 30, in __init__
    self.login()
  File "/usr/local/lib/python3.7/site-packages/tahoma_api/tahoma_api.py", line 49, in login
    request.reason + "(" + error + ")")
TypeError: can only concatenate str (not "int") to str

any suggestion?

The API use by the Tahoma component is now depreciated, and Somfy stop it. You have to use the Somfy component instead.

wow, but this way I’ve lost some devices that I can’t manage in hass… the somfy integration doesn’t see them