A couple questions though, the latest beta version doesn’t contain the Overkiz local solution, when I look for it on the integration page, is that correct?
After this can I remove my account on the Somfy website?
Does everything work (completely) locally or does some data still go to the cloud?
What are the real benefits? Not dependent on the cloud, so I think more reliable, but does it also work faster? for instance the request to close a shutter.
It is the same integration! When you set up the integration you can choose for Local API or Cloud API.
You could, but I would keep it, just in case… When you set up the local API, you will need to login with your Somfy cloud credentials to generate an API token.
Afterwards, the integration works fully local and doesn’t connect to any cloud service. It should be more reliable (depending on your home network ) and slightly faster, but not sure if this is really noticeable.
The speed and the Cloud API limits were the main reasons for me why I didn’t use the Cloud implementation before and used Homebridge which already supports local API for more than a year.
The delays were really 1-3secs with Cloud API and are now instant with the Local API.
Still busy trying to make my RTS shades ‘stateful’ with logical use. The sample given on the integration page is too ‘optimistic’ as it changes directly to Open or Closed when a button is pressed.
I’ve tested the config flow with the latest beta and it works like a charm. After the setup it takes some seconds until the integration shows devices but they appear.
Control of the devices works instantly.
One general question:
I’ve am using Overkiz Cloud in my prod system. Can i reconfigure the integration to local api after the official release or is it required to delete the integration and re-add it?
A cosmetic question:
Overkiz Cloud shows a device and model name for my Tahoma Switch
Is that a tiny bug or is it not possible to identify the device name and model with local api?
Thanks again for all your time and effort to make a local API possible!!! I will create a Youtube video about it. Thats my way to contribute to your development and say thank you and hopefully you will get some donations. I hope thats ok for you?
In the first release you will need to remove and add a new config entry. My plan is to allow to set up the local API, which will replace your current config entry. However, adding this local API took over a year due to the limited time I have at the moment, so I just wanted to have an initial version released now .
The Local API doesn’t provided this information indeed , hope they will add this (and other missing elements) in the future.
I have done it a bit different from your example, thanks to get me in the right direction.
cover.keuken_gordijn_rts is the ID I have given the entity provided by Overkiz
cover.keuken_gordijn is the new cover and sensor.keuken_gordijn is the status helper for the state changes.
template:
- trigger:
- platform: state
entity_id: cover.keuken_gordijn_rts
id: opening
to: opening
- platform: state
entity_id: cover.keuken_gordijn_rts
id: open
from: opening
to: unknown
- platform: state
entity_id: cover.keuken_gordijn_rts
id: closing
to: closing
- platform: state
entity_id: cover.keuken_gordijn_rts
id: closed
from: closing
to: unknown
sensor:
- name: Keuken Gordijn
state: "{{ trigger.id }}"
unique_id: keuken_gordijn
cover:
- platform: template
covers:
keuken_gordijn:
device_class: shade
friendly_name: "Keuken Gordijn"
unique_id: keuken_gordijn
close_cover:
service: cover.close_cover
target:
entity_id: cover.keuken_gordijn_rts
open_cover:
service: cover.open_cover
target:
entity_id: cover.keuken_gordijn_rts
stop_cover:
service: cover.stop_cover
target:
entity_id: cover.keuken_gordijn_rts
value_template: "{{states('sensor.keuken_gordijn')}}"
Now for my next challenge. I want to add ‘percentage’ state so 0% = closed, 50% = my button, 100% is open and that only these three steps can be chosen when dragging the slider.
I have tried, but with RTS the somfy hub does not know the %, I am not even sure you could hack it, but with my button in my example it does show as ‘open’ as somfy seems to fully close the shade then re-open it to the my_position when activated.
To all devs and coders. The ESPSomfyRTS project offers a handy method to caculate a state in %. https://github.com/rstrouse/ESPSomfy-RTS
Once ESPSomfyRTS setup is finished there is an option for each cover to set start and end time a cover needs for open and close. Then based on the time the percentage state is calculated.
I would be really cool to get such an option for Overkiz motors. Would that be possible?
This is not allowed in the integration itself. As the policy within the HA development is that the state needs to be real which is not possible with RTS.
With a Template Cover it should be possible to recreate this.
The HomeBridge Tahoma plugin has this implemented by the way, where you can set the time of opening/closing and it gives an estimated percentage. It was never accurate enough for me though, so only used 0% (close) - 50% (my) - 100% (open) which I want to recreate in HA now.
Unfortunately, this won’t be implemented for the Overkiz integration in core. The HA policies don’t accept this, as mentioned by @danieldeni. The core focus of the Overkiz integration is the control of your Overkiz devices.
It would be possible to use a custom component (or advanced template) to have a ‘stateful’ RTS cover, controlled by the Overkiz integration. But I don’t have time to build this and/or support this.