Overkiz API and Somfy API

Hi,

From Somfy recommandation, we map open to deploy and close to undeploy for Awning devices. It’s the case for your Absenkmarkise and Hauptmarkise. But your Seitenmarkise is not reported as an Awning, it’s why you see a reverse state. FYI the same kind of motor can be used for a classic cover where this state is logic.

To solve your issue, you can create a Cover Template

cover:
  - platform: template
    covers:
      seitenmarkise:
        friendly_name: "Seiten Markise
        value_template: "{{ states('cover.seitenmarkise') }}"
        open_cover:
          service: cover.open_cover
        close_cover:
          service: cover.close_cover
        ...

thank you for the explanation and I understand the logic of the non awning is coming from core then.

Template Covers are also problematic as the issue here is that value_template and position_template cannot been set concurrently in a template cover, so HA assumed the cover is open, when position is 100 and cover is closed when position is 0.

So I would need to use the orignal and template entity both to have a full working solution.

Edit: btw … I understand and support the Somfy logic. I think also for “other” covers many people would like to have 0 = closed = undeployed and 100 = open = deployed …
unfortunately core has no option to actually invert this.

demand is popular:

and

Both values can be set into the templates. There is only one warning:

If both a value_template and a position_template are specified, only opening and closing are set from the value_template .

If fact, even only position template should be enough in your case:

position_template: '{{ 100 - state_attr("cover.front", "current_position") }}'

Can you post your diagnostics information here? (or on GitHub gist and link it here). It would be interesting to see the device types, since we are revamping the cover entity.

sure I can.
also for other covers?
I have a different types for zwave covers on rollershutter and venetian blinds or just the somfy ones?

hey and when revamping the cover entity … maybe also consider that many actuators actually report 1-3 % off … means when they fully open or close the motor itself might stop the motor a moment earlier than the actuator was calibrated which result in something like this:

those are fully open - yet the actuator reports back 98 or 99% …
also here people create workarounds as it seems a more common issue - like here:

Just the Somfy ones, there is a download diagnostics button in Home Assistant.

Do you have this issue with the Somfy covers? We will only rewrite the Somfy cover implementation. And even there, I am not in favor of this change. If this is an issue with a certain vendor / platform, they either need to fix this or the Home Assistant integration needs to handle this margin / offset.

Hi,

Since (i think) the last home assistant core update i have setting up entry error :

  • Logger: homeassistant.config_entries
    *Source: components/overkiz/init.py:61 *
    *First occurred: 13:46:36 (1 occurrences) *
    Last logged: 13:46:36

Error setting up entry [email protected] for overkiz
Traceback (most recent call last):

  • File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 353, in async_setup*
  • result = await component.async_setup_entry(hass, self)*
  • File “/usr/src/homeassistant/homeassistant/components/overkiz/init.py”, line 61, in async_setup_entry*
  • setup, scenarios = await asyncio.gather(*
  • File “/usr/local/lib/python3.10/site-packages/backoff/_async.py”, line 133, in retry*
  • ret = await target(*args, *kwargs)
  • File “/usr/local/lib/python3.10/site-packages/pyoverkiz/client.py”, line 388, in get_setup*
  • setup = Setup(*humps.decamelize(response))
  • File “/usr/local/lib/python3.10/site-packages/pyoverkiz/models.py”, line 63, in init*
  • self.devices = [Device(*d) for d in devices]
  • File “/usr/local/lib/python3.10/site-packages/pyoverkiz/models.py”, line 63, in *
  • self.devices = [Device(*d) for d in devices]
    TypeError: Device.init() missing 1 required keyword-only argument: ‘device_url’

I have deleted/installed the overkiz integration and restarted ha but without success.

Thanks for your help.


## System Health

version | core-2022.7.3
-- | --
installation_type | Home Assistant OS
dev | false
hassio | true
docker | true
user | root
virtualenv | false
python_version | 3.10.5
os_name | Linux
os_version | 5.15.32-v8
arch | aarch64
timezone | Europe/Oslo
config_dir | /config

<details><summary>Home Assistant Community Store</summary>

GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
GitHub API Calls Remaining | 4867
Installed Version | 1.26.0
Stage | running
Available Repositories | 1074
Downloaded Repositories | 11

</details>

<details><summary>Home Assistant Cloud</summary>

logged_in | false
-- | --
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok

</details>

<details><summary>Home Assistant Supervisor</summary>

host_os | Home Assistant OS 8.2
-- | --
update_channel | stable
supervisor_version | supervisor-2022.07.0
agent_version | 1.2.1
docker_version | 20.10.14
disk_total | 57.8 GB
disk_used | 9.2 GB
healthy | true
supported | true
board | rpi3-64
supervisor_api | ok
version_api | ok
installed_addons | File editor (5.3.3), Samba share (10.0.0), Mosquitto broker (6.1.2), Duck DNS (1.15.0), Terminal & SSH (9.6.0), Network UPS Tools (0.11.0), SomfyProtect2MQTT-dev (0.2.1)

</details>

<details><summary>Dashboards</summary>

dashboards | 1
-- | --
resources | 5
views | 11
mode | storage

</details>

<details><summary>Recorder</summary>

oldest_recorder_run | 2 juillet 2022 à 18:40
-- | --
current_recorder_run | 12 juillet 2022 à 13:44
estimated_db_size | 124.30 MiB
database_engine | sqlite
database_version | 3.38.5

</details>

<details><summary>Sonoff</summary>

version | 3.1.0 (3871c0b)
-- | --
cloud_online | 1 / 4
local_online | 0 / 0

</details>

@mcik33 do you have (or had) the custom component installed?

Similar issue to this one: Cannot import name ‘TooManyAttemptsBannedException’ from ‘pyoverkiz.exceptions’ · Issue #74636 · home-assistant/core (github.com).

@imick Thanks for your reply.

Yes, in tue past, i had the custom componement installed.

The issue giving by Ducatel don’t work for me (not in doker).

Had the same issue. Got it working by patching the api.py file from PR Custom Component: on line 330, there’s a call to timeout(). I just removed the loop=asyncio.get_event_loop() parameter (and the comma of course), so that it reads:

async with async_timeout.timeout(TIMEOUT):

I don’t know if this is really a proper fix, but (after a restart of HA) I was able to install this native Somfy API component - and it has been working like dream (for now): response is like instantaneous!

Works great, thanks! Response is immediate, and perfect if there is no internet. Local is the way to go…

Have it working with 21 roller shutters (10 Velux, the rest Somfy), 2 windows, 1 bioclimatic (motorized) pergola and light. All fine.

Hello here !

I have an Atlantic Heat Pump which is connected to an Atlantic Cozytouch bridge :
COZYTOUCH - Atlantic

I can pretty much control my HeatPump using Android CozyTouch app (not so great).
More interesting for me, I can control it using Overkiz API :
https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/login
For instance I can login, get all parameters value, and set whatever I want.
Great, but I do this with NodeRed, I’ve got a lot of flows and that’s a mess !

I’ve just found this Overkiz Component. I’ve tried to install it, choosing “Atlantic Cozytouch” hub, I set my email and my password, exactly the same that work fine with Overki API but I keep getting a message “Unvalid Authentication”.
I’ve done the test several times. I’ve also stopped my overkiz API requests for 2 hours because I know it does not support too many requests, but still the same.
Any idea how I can investigate on this ? :slight_smile:
Did anybody succeeded with Atlantic hardware and overkiz component ?

Thanks,
David

@Shaad hi David, are you a new user of CozyTouch perhaps? Please see this issue on GitHub and add your thoughts there: [Overkiz, Somfy] Unable to authenticate against Atlantic Cozytouch · Issue #75394 · home-assistant/core (github.com).

We have seen this issue more often in the last days and I wonder if they did switch, again, their authentication methods…

I’ve been using it for 2 years now. But I did not use the CozyTouch app for a long time now, more than a year, using only overkiz http API to manage my HeatPump with curl commands.
I will have a look at this link, and I will also reinstall Coytouch Android app and check that everything still works fine from here.
What is strange is that using overkiz with curl commands, it works fine… but who knows… :slight_smile:
Thanks for your help, I’ll be back after a few checks.

I’m not 100% sure if this is the right place to post but I’m new to Home Assistant and trying to add the devices connected to my Thomas hub

It’s detected the hub and I added the Homekit ‘variant’, but I see the Overkiz ‘variant’ and my credentials won’t be accepted…
I’m certain they’re correct as I can log in to the app with them, so I’m a little confused

I’m also uncertain if this is necessary if I’ve added the hub using the Homekit option, tho I don’t seem to be able to find the related devices and scenes based on that

Thanks in advance for any help

@vaderag, which hub do you have exactly? The HomeKit controller in HA is a separate integration and device support is limited due to Somfy limitations. It should work with the same email address and password as you use for your TaHoma app.

Hi @imick I have the latest Somfy tahoma hub
This one: NEW Somfy TaHoma Switch Home Automation System | Connect Your Home | Somfy

I don’t need or want it to be a home kit controller so I think I’ve added the wrong thing, but as mentioned the other login doesn’t seem to work :frowning:

EDIT: Looks like they were having some issues yesterday as I’m in today

Hi all :wave: ,

I’m currently totally reworking the cover platform :building_construction: The goal is to ease the maintenance and be able to add new devices quickly :muscle:

Obviously, I don’t own all the Somfy devices, so I need some help. Can some of you update the file overkiz/cover.py by this one and report me what’s work and does not work anymore? It should be compatible with both ha-tahoma and overkiz integration.

:pray:

2 Likes