home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.09k stars 31.1k forks source link

Some Somfy/Overkiz entities unavailable or replaced after update to 2023.6.1 #94492

Closed mvdwetering closed 1 year ago

mvdwetering commented 1 year ago

The problem

After updating HA from 2023.5.4 to 2023.6.1 I noticed that some of the entities provided by the Overkiz integration became unavailable. Some of the unavailable entities now have a new entities of that same "type". See for example the "My position" slider in the screenshot

image

This happend for all 5 roller shutters I have connected to the Tahome Switch hub.

What version of Home Assistant Core has the issue?

2023.6.1

What was the last working version of Home Assistant Core?

2023.5.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Overkiz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/overkiz

Diagnostics information

overkiz-2910f402e809161e4e71c45ac5509c66-Badkamer rolluik-19fe4684d5cfba99f9de9a64390e181a.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

This is the only thing I see in the logs for Overkiz.

Logger: homeassistant.components.overkiz
Source: helpers/update_coordinator.py:229
Integration: Overkiz (documentation, issues)
First occurred: 10 June 2023 at 15:26:20 (1 occurrences)
Last logged: 10 June 2023 at 15:26:20

Error requesting device events data: Cannot connect to host ha101-1.overkiz.com:443 ssl:default [Try again]

Additional information

Not sure if relevant, but I also have the Tahoma Switch configured in Homekit Controller.

home-assistant[bot] commented 1 year ago

Hey there @imicknl, @vlebourl, @tetienne, @nyrodev, mind taking a look at this issue as it has been labeled with an integration (overkiz) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `overkiz` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign overkiz` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


overkiz documentation overkiz source (message by IssueLinks)

eekamouze commented 1 year ago

Same issue here since 2023.6.1 update with cozytouch heat pump and DHWP: many entities replaced by a new one (same name) and previous one become unavailable

iMicknl commented 1 year ago

I have seen this as well, haven't been able to pinpoint the issue yet. Thanks for reporting.

Mariusthvdb commented 1 year ago

add my +1 for all Somfy iOS devices,

bauerben commented 1 year ago

Same here with Somfy entities , preventing me to upgrade.

mario872 commented 1 year ago

Same here with somfy as well. I thought I'd try deleting the 'hub' and adding it again, this made it so the devices were available, but they had no entities in them. After updating to Home Assistant 6.02, they seem to have entities and work correctly again.

jeangroen commented 1 year ago

Simply upgrading from 2023.5.4 to 2023.6.2 did not solve the issue here. Seems like additional configuring needs to be done? I've got no time to troubleshoot this now, so for now I'm back to version 2023.5.4.

arduinopjotr commented 1 year ago

Als back to version 2023.5.4 any clue's for a solution ? Thanks in advance ! I use the Somfy Tahoma V2 (box)

pascalkrielen commented 1 year ago

Also missing some entries, to be specific, the "my position" sliders are unavailable, rest of the functionality is still there though.

pinkfloydFR commented 1 year ago

Like other, since update, my cover is always seen, but control does nothing :(

image

Activte debug, no error or suspicious info founded...

iMicknl commented 1 year ago

@pinkfloydFR this is another issue than the issue you are replying to. Please create a new issue, where you turn on debug mode, add your diagnostics information and add your logs.

astraliens commented 1 year ago

looks like I've got the same problem, but today I've found sensors / buttons, which were unavailable during last days were recreated automatically by integration with the same name with additional index "_2" Maybe it could helf someone

sddgit commented 1 year ago

Hi @iMicknl Sorry to hassle, but have you had time to figure out what might be wrong? I’m holding off updating HA for now…

iMicknl commented 1 year ago

@sddgit no not really, last weeks I finally had some time to focus on the local integration (which is the number one requested feature for Overkiz), when this issue popped up. I haven't had time yet to dive into this unfortunately.

sddgit commented 1 year ago

Ok, thank you for the feedback. Is the local integration considered to be pretty stable now? I’ve not really looked into it, how to install it etc.

iMicknl commented 1 year ago

Ok, thank you for the feedback. Is the local integration considered to be pretty stable now? I’ve not really looked into it, how to install it etc.

No, it is not available yet in core. But we are working hard to ship a first version in an upcoming release.

sddgit commented 1 year ago

So, for those of us putting off updating the core because of this problem, any idea what will happen first? The new integration with local support or a possible fix for the current integration? Thanks for all the hard work.

gerardsamara commented 1 year ago

After the installation of Core2023.7 , the Cozytouch bridge from Atlantic is not connected ( same as 2023.6 )

2023-07-07 14:05:38.078 INFO (MainThread) [backoff] Backing off fetch_events(...) for 0.1s (pyoverkiz.exceptions.NotAuthenticatedException: Not authenticated) 2023-07-07 14:06:11.430 ERROR (MainThread) [homeassistant.components.overkiz] Error fetching device events data: Server is down for maintenance. 2023-07-07 14:06:49.397 INFO (MainThread) [backoff] Backing off fetch_events(...) for 0.0s (pyoverkiz.exceptions.NotAuthenticatedException: Not authenticated) 2023-07-07 14:07:26.727 INFO (MainThread) [homeassistant.components.overkiz] Fetching device events data recovered 2023-07-07 14:08:58.649 INFO (MainThread) [backoff] Backing off fetch_events(...) for 0.2s (pyoverkiz.exceptions.NotAuthenticatedException: Not authenticated)

iMicknl commented 1 year ago

@gerardsamara this is not related at all to the issue you reply to 😉. Please create a new issue on the core repository.

gerardsamara commented 1 year ago

ok @iMicknl , sorry , will do thanks

Voileux78 commented 1 year ago

Hi, I have the same problem while migrating from HA 2023.4.6 to 2023.7.1. I lost all the names of the IO entities and the control of the IO Alarm. Obliged to rename all the entities and to update all the automations and dashboards. However impossible to recover the functionning of the AlarmIO (Protexial attached via TaHoma). I would welcome the bugfix. Many thanks in advance !

linuxstony commented 1 year ago

Hi, Just wanted to confirm, that after finally updating to the latest HA Version (2023.7.2) some devices were created anew. I have ZWAVE plugs which were renamed (e.g. zwave_35) and a new one was created with the correct name. And many other devices were created new with _2. So far all my devices work, but have to be integrated again where i had them in automations.

@iMicknl as always - feel free to test with my box if it helps.

Voileux78 commented 1 year ago

Bonjour, toujours le même problème sur la version 8.0, en particulier l'alarme IO qui ne fonctionne pas . Ci Dessous un log :

Logger: homeassistant.components.websocket_api.http.connection

Source: components/overkiz/executor.py:91
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17:54:13 (5 occurrences)
Last logged: 17:58:54

[140588734264896] {'errorCode': 'INCOMPATIBLE_VALUE', 'error': 'alarmZoneOn() : Invalid value for command parameter p1 : expected string value (A, B, C, A,B, B,C, A,C, A,B,C) but got OverkizCommandParam.A,OverkizCommandParam.B,OverkizCommandParam.C (String)'}
[140588734264896] {'errorCode': 'INCOMPATIBLE_VALUE', 'error': 'alarmZoneOn() : Invalid value for command parameter p1 : expected string value (A, B, C, A,B, B,C, A,C, A,B,C) but got OverkizCommandParam.A, OverkizCommandParam.B (String)'}
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/overkiz/alarm_control_panel.py", line 295, in async_alarm_arm_away
    await self.async_execute_command(
  File "/usr/src/homeassistant/homeassistant/components/overkiz/alarm_control_panel.py", line 311, in async_execute_command
    await self.executor.async_execute_command(command_name, args)
  File "/usr/src/homeassistant/homeassistant/components/overkiz/executor.py", line 91, in async_execute_command
    exec_id = await self.coordinator.client.execute_command(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 620, in execute_command
    response: str = await self.execute_commands(device_url, [command], label)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 648, in execute_commands
    response: dict = await self.__post("exec/apply", payload)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 789, in __post
    await self.check_response(response)
  File "/usr/local/lib/python3.11/site-packages/pyoverkiz/client.py", line 899, in check_response
    raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'INCOMPATIBLE_VALUE', 'error': 'alarmZoneOn() : Invalid value for command parameter p1 : expected string value (A, B, C, A,B, B,C, A,C, A,B,C) but got OverkizCommandParam.A,OverkizCommandParam.B,OverkizCommandParam.C (String)'}

Désolé de relancer, mais est-ce possible de nous dire quand on peut espérer une solution, car çà bloque la mise à jour de la version HA. Merci d'avance et merci pour ce travail !

iMicknl commented 1 year ago

@Voileux78 please create a new issue, in English. Your issue is not related to this issue.

Voileux78 commented 1 year ago

OK, mais le problème est apparu avec la mise à jour 23.6.1

arduinopjotr commented 1 year ago

Any idea in which release it will be available in the core ?

iMicknl commented 1 year ago

@arduinopjotr what do you mean? When a fix for this issue will be released? No ETA, but it might be solved by #97916 which will ship in 2023.9.

arduinopjotr commented 1 year ago

Sorry for my short question, but yes i ment the fix for this issue. Thanks for your awnser

arduinopjotr commented 1 year ago

Is the issue resolved in 2023.9.0, I can't find anything about the fix in the release notes.

iMicknl commented 1 year ago

@arduinopjotr no. If there is a fix, this issue will be closed. For now, the problem hasn’t been identified even, so don’t expect a fix anytime soon. The PR that I mentioned earlier caused another issue actually.

Mariusthvdb commented 1 year ago

well, they're all back in my config!

the slider was doubled, so had to delete the original and rename the _2 versions, and all Rssi and Rssi discrete entities are back

Scherm­afbeelding 2023-09-08 om 15 13 53

I only found out because I was looking for an answer why 1 of my covers doesnt follow the themed color on color-state, and then saw all of the entities had returned ;-)

do hope reverting the mentioned Pr in 2023.9.1 won’t break that again…

Well it did! All improvements are gone again. Slider and rsss entities like before. Really annoying these 2 prs break each other

image

pguich commented 1 year ago

I have the same issue; new sensors were added with "_2" in the end, and the original sensors were "unavailable". it happens several times (maybe not daily, but maybe weekly or so), and I have to delete one of them, and replace the new entities in my automations and cards.

iMicknl commented 1 year ago

@pguich are you sure? I don't think this happens daily or weekly. It actually did happen when Home Assistant moved to Python 3.11, where we did release a fix later on (2023.9), but this fix caused it to change again thus this has been reverted in 2023.9.1. See https://github.com/home-assistant/core/issues/99404.

It is a pity that it wasn't discovered during beta testing, and the release happened during my holidays, thus for unlucky users that update directly to a new version, there have been 2 breaking changes...

Mariusthvdb commented 1 year ago

Hi Mick

Are you saying we should see the Rssi sensors now? Because I don't see them after that latest pr.

iMicknl commented 1 year ago

@Mariusthvdb don't you see them at all? Could you create a new issue with our diagnostics information?

pguich commented 1 year ago

@pguich are you sure? I don't think this happens daily or weekly. It actually did happen when Home Assistant moved to Python 3.11, where we did release a fix later on (2023.9), but this fix caused it to change again thus this has been reverted in 2023.9.1. See #99404.

It is a pity that it wasn't discovered during beta testing, and the release happened during my holidays, thus for unlucky users that update directly to a new version, there have been 2 breaking changes...

I’m not going to swear on it. I know I had to change automations and cards twice this month, and delete the old unavailable sensors. It’s definitely not daily or weekly. It’s possible that it’s fixed now.

Mariusthvdb commented 1 year ago

@Mariusthvdb don't you see them at all? Could you create a new issue with our diagnostics information?

I believed to have gone back to https://github.com/home-assistant/core/issues/94492#issuecomment-1711654243 with all unavailable entities and _2 entities on those that were disabled.

I just now deleted the unvavailble ones, and renamed _2 to regular and enabled.

bingo!

I still have about 40 _2 entities but they are, like their originals, all hidden, so I didnt notice that before. Guess I need to enable the originals, see them being unavailable, so delete them (cant do so when not enabled)

edit

needs some more work so it seems, I can not even enable those even while they are unavailable, so I can also not rename the _2 ones, the correct ones now, to the correct object_id

edit2

figured rewriting all anew to the registry would be optimal, so deleted the integration, restarted, checked all was gone (yes) and re-installed. All entities are back now, except for the target_closure, which apparently isn't the same as my position stored on the Tahoma, or why would they all be unknown.

no big deal, just surprising for me. Anyways, back up and running, so hope this will stick! thanks for your work on the integration !

jeangroen commented 1 year ago

My problems are solved now.

Today I found the courage an time to finally face the issues and go update Home Assistant from core version 2023.5.4 to 2023.9.3, after having issues with Somfy/OverKizz devices, after update 2023.6.2.

My configuration: I have 4 screens with Somfy io motors and 2 Somfy Sunis Solar io with the Tahoma switch (firmware 2023.3.4-5).

Procedure: After the update the screens were working without any issues in HA, but the sensors of both Sunis Solar devices were missing and new sensors were created using the same sensor name on the device. So I deleted the missing sensor on both Sunis devices and linked the new sensor to the affected Automations and Dashboardcards.

Even after a reboot of my Home Assistant server all seems to be working A-OK.

Thanks for your work on this integration and for everyone that contributed in this issue.

iMicknl commented 1 year ago

Thanks @Mariusthvdb / @jeangroen! The update to 2023.6.1 changed the sensor / binary sensor entities due to the Python 3.11 update that Home Assistant OS / core included. During testing this hasn't been observed unfortunately.

I will close this issue for now, since we won't fix this anymore as most users have been migrated already. Hopefully we can keep the entity unique ids stable in the future. We still have to update our underlying package (that had a breaking change in 2023.9), thus will pay some extra attention to this issue.