Overkiz API and Somfy API

Ah nice, thanks. I will try it, i missed controlling my awning. :smiley:

edit: gave me this:

juli 27 14:52:53 overwatch hass[19730]: 2020-07-27 14:52:53 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package git+https://github.com/iMicknl/python-tahoma-api.git#tahoma_api==0.1.0: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-req-build-fvln4e4t/
juli 27 14:52:54 overwatch hass[19730]: 2020-07-27 14:52:53 ERROR (MainThread) [aiohttp.server] Error handling request

Are you using the latest master? For now, I would advise to use the latest stable release: https://github.com/iMicknl/ha-tahoma/releases/tag/v1.6.4.

We just switched to a new async Python wrapper, which possibly still has some small issues. In your case it looks like it can not resolve the new package from git. It will be published to PyPi soon and made as a stable release.

AH, thanks. That worked much better :smiley:

1 Like

I installed my Tahoma 2 days ago, but now I am getting “Token expired” messages. However, I’m not sure how to fix that. Can someone point me in the right direction?

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pymfy/api/somfy_api.py", line 123, in _request
    return getattr(self._oauth, method)(url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
    url, headers, data = self._client.add_token(
  File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
    raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
    await self.async_update()  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/somfy/cover.py", line 50, in async_update
    await super().async_update()
  File "/usr/src/homeassistant/homeassistant/components/somfy/__init__.py", line 162, in async_update
    await update_all_devices(self.hass)
  File "/usr/src/homeassistant/homeassistant/components/somfy/__init__.py", line 177, in update_all_devices
    data[DEVICES] = await hass.async_add_executor_job(data[API].get_devices)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/pymfy/api/somfy_api.py", line 61, in get_devices
    site_ids = [s.id for s in self.get_sites()] if site_id is None else [site_id]
  File "/usr/local/lib/python3.8/site-packages/pymfy/api/somfy_api.py", line 42, in get_sites
    response = self.get("/site")
  File "/usr/local/lib/python3.8/site-packages/pymfy/api/somfy_api.py", line 80, in get
    return self._request("get", path)
  File "/usr/local/lib/python3.8/site-packages/pymfy/api/somfy_api.py", line 127, in _request
    return getattr(self._oauth, method)(url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
    url, headers, data = self._client.add_token(
  File "/usr/local/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
    raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired) 

Reinstall the integration should solve the issue.

You can also try the new custom component tahoma that should be much more stable and that support much more device.

Seems Somfy is having issues again. I got the ‘Token expired’ error as well. Reinstalling the Somfy integration leads to the following error ‘{“error”:“redirect_uri_mismatch”,“error_description”:“The redirect URI provided does not match registered URI(s).”}’.

Unfortunately I can’t use the Tahoma component either, as I have never been able to login to the Tahoma website.

Edit: It’s a miracle, the website doesn’t work, but the integration still works. So the integration is working better as the website. Thanks a lot for all your efforts Tetienne!

1 Like

Hi,

@llevering you may actually be able to use the custom Tahamo integration even though you can’t login to native tahomalink.com web frontend. Your Somfy.com login should work with the tahomalink.com API.

1 Like

Hi guys,

As you have probably read on this topic, I worked with @Mjhansen and @vlebourl on a huge refactor of the Tahoma component, which use the unofficial API that the Tahoma website rely on.

Today, I’m proud to announce our release 2.0 :partying_face: . We centralize the entity updates, and the component is much more responsive! :rocket: This component now entirely relies on the asynchronous API pyhoma we developed too.

If you are unhappy with the official API because of state not updated or missing device support, give a try to our custom component. Look for Somfy Tahoma within HACS.

And if you still cannot see your device, open us an issue.

1 Like

Good question, did you ever get an answer or figure it out?

Which component do you guys recommend, official api or unofficcial one? Im a bit confused by which one to go with…

I have no new news about this. I still use the custom component for the unofficial API (https://github.com/iMicknl/ha-tahoma)

Hi, even if I maintain the Somfy component using the official API, I currently use the custom component I talked about in my previous comment: scene and sensors are supported and their is no lag in the state update.

Hi, does the new component allow to use command of slow speed to open and close the shutters ?
(io:RollerShutterWithLowSpeedManagementIOComponent).

from the beginning I use Tahoma component and everything is perfect it just lacks the slow speed control

This is not yet supported but it can be easily added as a service.

Indeed, good suggestion @clemalex. I have created an issue on GitHub to track your feature request. https://github.com/iMicknl/ha-tahoma/issues/219

Thank you because I couldn’t.

Hello,
I am new here, and I have an HA fully configured with many integrations. I already use the somfy integration module but I am have some requests with it

  • for the “Somfy One” and outdoor camera, I can juste open or close the private “door”. Ican’t see the alarm status or see image from the camera.
  • for the roller, is it possible to add the favorit position “My” ?
  • I have a zwave dongle on my tahoma but I don’t see the Zwave module in my HA, is it a normal behavior?
  • I don’t read the full API documentation but is it possible to import all the element from Somfy protect ? (presence detector, opened door detector…)
    Thanks.
    Regards

@PoVPoV are you using the Somfy integration? The official API doesn’t support many devices, thus many people are using the Somfy TaHoma integration (beta) which is currently in development.

Have a look at:
https://github.com/imicknl/ha-tahoma and Tahoma Integration Refactored

In case you have feedback / feature requests, feel free to create a GitHub issue.

Hello,
Thanks for the information. The HACS integration was a bit difficult.
I loss some functionnality with Tahoma integration : securty equipement are not present.
I activated debug :

 2020-08-12 15:14:24 DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device detected (myfox:SomfyOnePlusCameraController - Camera - MyFoxSecurityCamera)
2020-08-12 15:14:24 DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device detected (myfox:SomfyProtectSecurityCameraController - Camera - MyFoxSecurityCamera)
2020-08-12 15:14:24 DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device detected (myfox:SomfyProtectAlarmController - Alarm - MyFoxAlarmController)
2020-08-12 15:14:24 DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device detected (rtds:RTDSRemoteControllerComponent - RemoteController - AlarmRemoteController)
2020-08-12 15:14:24 DEBUG (MainThread) [custom_components.tahoma] Unsupported TaHoma device detected (zwave:NodeComponent - NetworkComponent - Node)

Do you know if those equipement will be or can be integrated ?

PS : sorry for my bad english.
Regards,

1 Like

You can run the official Somfy integration and the TaHoma integration next to each other if you like. Which of those devices were working using the official Somfy integration? I didn’t think that it would support your Camera and Alarm already.

Please create a GitHub issue for your unsupported devices, as mentioned above.

Thanks I created two GitHub issues.
I hope it will be enought (for the two cameras : Somfy one plus and outdoor camera)
The Somy One plus is hosting other home security component but I don’t know if you can retreive some informations about them.