Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication error in Overkiz after Somfy North America account upgrade #132228

Open
smart opened this issue Dec 4, 2024 · 59 comments
Open

Authentication error in Overkiz after Somfy North America account upgrade #132228

smart opened this issue Dec 4, 2024 · 59 comments
Assignees

Comments

@smart
Copy link

smart commented Dec 4, 2024

The problem

I've been struggling to get the local api integration working for overkiz. I've enabled the developer apis, but I continued getting an error that it wasn't enabled. I tried pinging port 8443 on the two hubs, one responded the other didn't, I've been following some issues on the Somfy devloper github that could be related. In the meantime, I have tried to use the cloud integation. It worked but then all of a sudden I had been logged out. I tried to log back in and get "Unexpected Error". I'm also getting "Unexpected Error" on my local api attempts now. When I opened the app today, it asked me to transfer my account to a new service/app Moving from Somfy North America to just Somfy. I'm wondering if this transfer changed any of the api endpoints for authentication, breaking the integration. I have some logs below.

What version of Home Assistant Core has the issue?

core-2024.11.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

overkiz

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.overkiz
Source: components/overkiz/config_flow.py:217
integration: Overkiz ([documentation](https://www.home-assistant.io/integrations/overkiz), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+overkiz%22))
First occurred: 5:29:33 PM (10 occurrences)
Last logged: 5:37:03 PM

Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/overkiz/config_flow.py", line 217, in async_step_local
    user_input = await self.async_validate_input(user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/overkiz/config_flow.py", line 64, in async_validate_input
    await client.login(register_event_listener=False)
  File "/usr/local/lib/python3.12/site-packages/pyoverkiz/client.py", line 229, in login
    response = await self.__post("login", data=payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyoverkiz/client.py", line 924, in __post
    await self.check_response(response)
  File "/usr/local/lib/python3.12/site-packages/pyoverkiz/client.py", line 1041, in check_response
    raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'AUTHENTICATION_ERROR', 'error': 'An API key is required to access this setup'}

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Dec 4, 2024

Hey there @iMicknl, @vlebourl, @tetienne, @nyroDev, @Tronix117, @alexfp14, 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.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


overkiz documentation
overkiz source
(message by IssueLinks)

@PrzemyslawKlys
Copy link

After updating to newest HA (2024.12.0) => "Failed setuip, will retry: Failed to connect". Not sure what to do with that. Tahoma seems to be online and working.

@raffoul
Copy link

raffoul commented Dec 4, 2024

After updating to newest HA (2024.12.0) => "Failed setuip, will retry: Failed to connect". Not sure what to do with that. Tahoma seems to be online and working.

Same issue after upgrading.

Edit : after a rollback to 2024.11 , overkiz works

@ColinRobbins
Copy link
Contributor

ColinRobbins commented Dec 4, 2024

Same here with 2024.12.0
I get the following in the debug logs, but that is all…

2024-12-04 22:18:20.096 DEBUG (MainThread) [homeassistant.components.overkiz] ZeroConf discovery detected gateway ****-****-7195 on gateway-0403-5459-7195.local. (_kizbox._tcp.local.)

Resolved with a rollback to 2024.11.2

@iMicknl
Copy link
Contributor

iMicknl commented Dec 4, 2024

Is this only for local mode or also for cloud mode? Can someone turn on debug mode and share the log? There have been no (big) changes for the cloud API, thus I wonder what may cause this…

For Local API, the main change was around the SSL verification.

@ColinRobbins
Copy link
Contributor

This is for the local API.
The debug log has just one entry (repeated several times).

2024-12-04 22:18:20.096 DEBUG (MainThread) [homeassistant.components.overkiz] ZeroConf discovery detected gateway ****-****-7195 on gateway-0403-5459-7195.local. (_kizbox._tcp.local.)

@iMicknl
Copy link
Contributor

iMicknl commented Dec 4, 2024

@ColinRobbins if you turn on debug mode and try to configure the integration, you should see a warning. At least in the UI. Have you tried connecting with an without SSL verification? And can you access the ip/mens + port 8443 of your gateway in your browser?

By the way, I just realised that all replies are not related to @smart his original issue. Let's continue the conversation in a new issue.

@yamminek
Copy link

yamminek commented Dec 5, 2024

I am having a similar issue as @smart. App transfered my account from Somfy North America app to Somfy app. App works well but overkiz stopped working via cloud api and local api (I activated the dev mode). I also tried with and without the verify ssl certificate.
Same error in the log file as smart.
I have the beecon

@ColinRobbins
Copy link
Contributor

@ColinRobbins if you turn on debug mode and try to configure the integration, you should see a warning. At least in the UI. Have you tried connecting with an without SSL verification? And can you access the ip/mens + port 8443 of your gateway in your browser?

By the way, I just realised that all replies are not related to @smart his original issue. Let's continue the conversation in a new issue.

Good point. Continued under #132318

@iMicknl
Copy link
Contributor

iMicknl commented Dec 5, 2024

If someone with a Somfy North America account can connect with me on Discord (_imick), we can investigate. Most likely this will be early next week the earliest.

@lrixford
Copy link

lrixford commented Dec 5, 2024

@iMicknl It looks like an API issue on Somfy side.

Somfy-Developer/Somfy-TaHoma-Developer-Mode#151 (comment)

@lrixford
Copy link

lrixford commented Dec 7, 2024

Confirmed as a bug in the authentication flow.

Somfy-Developer/Somfy-TaHoma-Developer-Mode#151 (comment)

@alanbchristie
Copy link

I too can confirm that everything is fine with 2024.11.2 and my Somfy blind automations (and crucially the login) work in this release. But I get Somfy/Tahoma connection issues if I upgrade past this.

@iMicknl iMicknl changed the title Overkiz authentication issues both local and cloud Authentication error in Overkiz after Somfy North America account upgrade Dec 8, 2024
@iMicknl
Copy link
Contributor

iMicknl commented Dec 8, 2024

@alanbchristie this issue is to track issues with the new authentication system for Somfy North America, this is not related to any HA update. Your issue is most likely #132318.

@lbreggi
Copy link

lbreggi commented Dec 8, 2024

Just to confirm - are you all able to connect to local API after Somfy update with the new login app?

@lbreggi
Copy link

lbreggi commented Dec 9, 2024

Hi! I was able to get a new token from Somfy (due the issue related to the API), but now, I don't have the integration installed and when I try to install (local or cloud) I'm geeting the error. I tried to find local files to update the token but I wasn't able to find. anyone has an idea about what to do? many thanks!

@lbreggi
Copy link

lbreggi commented Dec 9, 2024

not sure if the reason for my issue is because I'm trying to connect to local API after Somfy made the migration; but I can confirm that I can access the API - but always getting an authorization error

@badnetmask
Copy link

badnetmask commented Dec 10, 2024

I was dumb and rushed into migrating to the new app before checking for the integration compatibility, now I cannot login to Somfy Nort America from Home Assistant. I'm 100% positive that my username and password are correct, because they work on my phone app.

pyoverkiz.exceptions.OverkizException: {'errorCode': 'AUTHENTICATION_ERROR', 'error': 'An API key is required to access this setup'}

PS.: Thanks for this awesome integration. It has been great so far. This is really not your fault. 😁

@lrixford
Copy link

lrixford commented Dec 11, 2024

I believe the situation would be solved in a better way versus a manual config file solution.

The integration setup wizard currently offers Cloud API and Local API setups.

The Cloud API setup wizard card asks for credentials and the stores uses them to interact with the Cloud APIs for accessing devices on an ongoing basis. This remains an online option.

The Local API wizard card asks for the local device hostname and port in addition to the Cloud credentials. The credentials are used to query the cloud and retrieve the developer key later stored and used as the Bearer token for integrating with the local device API. The credentials are only then used for refreshing the token upon expiration. As Somfy forces the migration later December 2024, this will eventually break as the corrected authentication API will not be fixed until sometime first half of 2025.

This brings me to a suggested third option.

Add a Local API w/ Developer Key option. This option would only ask for hostname:port and the developer key that you can manually obtain from Somfy through an email process. This method would bypass the authentication and retrieval of the token. However it would possibly not have a way to refresh the token upon expiration. It would allow people to setup the integration as Somfy transitions their auth servers.

Alternatively, Developer Key can be added to the Local API Wizard card and then used in an AND/OR manner.

I think this is the easiest path that can be supported by a documented remediation flow.

@iMicknl admittedly not a Python dev (other dinosaur languages, sure) so I made some assumptions based upon my review of code regarding the usage of creds post Local API setup. I will pull and see if I can provide a suggestion. However, you are closer for sure.

@lbreggi CC

@iMicknl
Copy link
Contributor

iMicknl commented Dec 11, 2024

@lrixford, the downside of adding a token based flow, is that we will need to add a migration for all users when Somfy provides more details on the new authentication method. I understand your views, but I won't invest in building this new token based Config Flow. It is a temporary solution for only a handful users, where the focus should be on implementing the new authentication method when Somfy is ready. There are 40 open issues for Overkiz so with my limited time, I can't prioritize this one.

@lbreggi
Copy link

lbreggi commented Dec 11, 2024

Hi all! I was able to fix the issue for my environment with the strong help of @iMicknl ! here are the steps:

1 - if you don't have your token, you can ask Somfy (if you need a token to access the developerMode, you can reach out to [email protected] providing your gateway_pin and mentioning this issue Somfy-Developer/Somfy-TaHoma-Developer-Mode#151
2 - you need to add the following line inside core.config_entries (be carefull and make a full backup before make any change)
{"created_at":"2024-10-24T15:04:11.563704+00:00","data":{"api_type":"local","host":"yourhubip:8443","hub":"somfy_north_america","password":"yourpassword","token":"your_token_from_somfy","username":"youremail","verify_ssl":false},"disabled_by":null,"discovery_keys":{"zeroconf":[{"domain":"zeroconf","key":["_kizbox._tcp.local.","gateway-nu-mb-er._kizbox._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizboxdev._tcp.local.","gateway-nu-mb-er._kizboxdev._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizbox._tcp.local.","gateway(replacexforyournumber)-xxxx-xxxx-xxxx._kizbox._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizboxdev._tcp.local.","gateway-(replacexforyournumber)-xxxx-xxxx-xxxx._kizboxdev._tcp.local."],"version":1}]},"domain":"overkiz","entry_id":"01JAZGX01BZXXXXXXQMFBGEJ5H","minor_version":1,"modified_at":"2024-12-11T22:28:44.574952+00:00","options":{},"pref_disable_new_entities":false,"pref_disable_polling":false,"source":"zeroconf","title":"10.3.152.76:8443","unique_id":"(replacexforyournumber)-xxxx-xxxx-xxxx","version":1},

Please let me know if you need any help!

@gshafer
Copy link

gshafer commented Dec 12, 2024

Where so I find core.config_entries (I have a HA Yellow).

Do I just need to change hub ip, email, password, username, gatewaypin. Where do you put the token?

@llavorel-somfy
Copy link

@lrixford, the downside of adding a token based flow, is that we will need to add a migration for all users when Somfy provides more details on the new authentication method. I understand your views, but I won't invest in building this new token based Config Flow. It is a temporary solution for only a handful users, where the focus should be on implementing the new authentication method when Somfy is ready. There are 40 open issues for Overkiz so with my limited time, I can't prioritize this one.

@iMicknl you might have misunderstood my comment here : Somfy-Developer/Somfy-TaHoma-Developer-Mode#151 (comment)

We don't intend to change the authentication method to generate a token. We want to provide a new process (which avoids any authentication with an API call). It is strictly related to the token generation function for using the TaHoma Developer Mode. I post this message to avoid any confusion.

@iMicknl
Copy link
Contributor

iMicknl commented Dec 12, 2024

Thanks @llavorel-somfy! If there will be a way to generate a token (without emailing support), then I will be happy to implement that flow into Overkiz. 👍🏻

@shash703
Copy link

shash703 commented Jan 5, 2025

Hey Folks - I'm facing a similar error when trying to setup this integration. I keep getting an "Unexpected Error" message. I have tried connecting it with the gateway pin and the host IP directly as well. Any help will be greatly appreciated.

Here is what shows up in the logs.

Logger: homeassistant.components.overkiz
Source: components/overkiz/config_flow.py:219
integration: Overkiz (documentation, issues)
First occurred: January 4, 2025 at 11:47:06 PM (6 occurrences)
Last logged: 12:06:25 AM

Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/overkiz/config_flow.py", line 219, in async_step_local
user_input = await self.async_validate_input(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/overkiz/config_flow.py", line 64, in async_validate_input
await client.login(register_event_listener=False)
File "/usr/local/lib/python3.13/site-packages/pyoverkiz/client.py", line 246, in login
response = await self.__post("login", data=payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyoverkiz/client.py", line 941, in __post
await self.check_response(response)
File "/usr/local/lib/python3.13/site-packages/pyoverkiz/client.py", line 1058, in check_response
raise OverkizException(result)
pyoverkiz.exceptions.OverkizException: {'errorCode': 'AUTHENTICATION_ERROR', 'error': 'An API key is required to access this setup'}

@NGrey5
Copy link

NGrey5 commented Jan 13, 2025

Hi all,

Going off of @lbreggi 's comment, here's a full guide on how to get this working with an API key provided by Somfy via email. I can confirm this works as of 3/1/2025 using the new app. Developer mode must be enabled on your hub/gateway in order to use the local API.

Important Note!

This only works for the local API and somfy north america. Make sure you are on the most up-to-date firmware for your hub/gateway. There was a firmware update on 01/28/2025 that broke the local API, but I've been told that a later update has fixed it.

1. Email [email protected] for API key

They will then respond with an api key.

2. Make a full backup of the core.config_entries file

This is found at config/.storage/core.config_entries
**You may need to show hidden files if this is not visible

3. Add the following line to core.config_entries and replace all placeholders with your own information

{"created_at":"2025-01-01T00:00:00+00:00","data":{"api_type":"local","host":"{GATEWAY_IP}:8443","hub":"somfy_north_america","password":"{PASSWORD}","token":"{API_KEY}","username":"{USERNAME}","verify_ssl":false},"disabled_by":null,"discovery_keys":{"zeroconf":[{"domain":"zeroconf","key":["_kizbox._tcp.local.","gateway-{GATEWAY_PIN}._kizbox._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizboxdev._tcp.local.","gateway-{GATEWAY_PIN}._kizboxdev._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizbox._tcp.local.","gateway-{GATEWAY_PIN}._kizbox._tcp.local."],"version":1},{"domain":"zeroconf","key":["_kizboxdev._tcp.local.","gateway-{GATEWAY_PIN}._kizboxdev._tcp.local."],"version":1}]},"domain":"overkiz","entry_id":"01JAZGX01BZXXXXXXQMFBGEJ5H","minor_version":1,"modified_at":"2025-01-01T00:00:00+00:00","options":{},"pref_disable_new_entities":false,"pref_disable_polling":false,"source":"zeroconf","title":"{GATEWAY_IP}:8443","unique_id":"{GATEWAY_PIN}","version":1}

Replace ALL instances of these with your own information

{GATEWAY_IP}   : Your Somfy gateway IP address or hostname

{PASSWORD}     : Your Somfy cloud password

{API_KEY}      : API key provided by Somfy Email ([email protected])

{USERNAME}     : Your Somfy cloud username/email address

{GATEWAY_PIN}  : Your hub/gateway's pin in the format: xxxx-xxxx-xxxx (replace x's with your gateway pin)

3. Restart HomeAssistant

Open the overkiz integration and you should see all of your devices loaded.

@shash703
Copy link

shash703 commented Jan 13, 2025

@NGrey5 - Thank you so much. I can confirm that adding the above entry fixes the interation.

I tried the syntax that @lbreggi previously had shared but must have made a mistake as it kept giving me syntax errors and wont load up HA.

And a big thanks @iMicknl for all the work you have done on this. Much appreciated.

@llavorel-somfy
Copy link

thanks @iMicknl! I'm hoping @llavorel-somfy will provide some guidance at some point.

It's coming soon I promise ! By the way, it will remain related and focus on using the developer mode !

@samsonusmc
Copy link

Team,
Seems I am both being effected by this bug AND the bug for local API in this thread: #136714 (comment)

the question is do we have a manual configuration that works for this combo?
This workaround worked well until the breaking local API update.

changing the working config from "local" to "cloud" generates the following error

2025-01-29 14:25:30.694 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry gateway-1610-5647-6544.local:8443 for overkiz Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/overkiz/__init__.py", line 80, in async_setup_entry server=SUPPORTED_SERVERS[entry.data[CONF_HUB]], ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'somfy_north_america'

@iMicknl
Copy link
Contributor

iMicknl commented Jan 30, 2025

@samsonusmc how did you get the value somfy_north_america? This should be somfy_america. As discussed earlier, we don't officially support changing your config entry by hand. If you face issues here, you should remove your config entry and create a new one.

As the Cloud API is not functional for North America due to authentication changes, and your local API is not functional, most likely your Overkiz integration won't be functional anyways.

@samsonusmc
Copy link

samsonusmc commented Jan 30, 2025

@iMicknl , i got somfy_north_america from this post above: #132228 (comment)

Ok. Understood and unfortunate. I guess I'll have to wait for one or the other to be fixed. I can't use the ui to add b/c I get the same errors from the OP.

@knwpsk
Copy link

knwpsk commented Feb 5, 2025

@NGrey5 @lbreggi I need help please. I followed @NGrey5 instructions above carefully, but on restart, HA says my config is corrupt. (And it creates a temp config file, and all of my stuff is a mess.)
I restored the backup config (thank you for that reminder!!).

I started fresh, and repeated my steps. Copied the config string above, replaced all of my own values as instructed. Eyeballing it side by side with my first attempt, they look identical. I.e. I don't think I made a typo.

So -- what's corrupt??
EDIT: I found it. Needed a comma after the last config entry, before the new one.

@knwpsk
Copy link

knwpsk commented Feb 5, 2025

Now that config_entries hack is right, and HA restarts ok, Overkiz is still saying "failed to set up" and "API key is required...".

I can't remember for sure, but I think I have this in cloud mode. Assume I need to verify that, and then convert it to local mode. How do I do that? Do I have to delete and reinstall the integration, or is there a smarter way?
Thanks again

@NGrey5
Copy link

NGrey5 commented Feb 5, 2025

@knwpsk It's hard to say what would be causing the issue as we can't see your config (DO NOT post it here as you likely have credentials stored in it.) My only suggestion is to make sure you don't have a comma at the end of your last line.

Only other thing is there appears to have been a firmware update to Somfy devices on 1/28/25 that will prevent this fix from even working. If you manually updated, or your device auto-updated then this will likely not work for you.

This fix does not apply to the Cloud API, it's for local only which is why you need to get the API key from the Somfy developer team.

@knwpsk
Copy link

knwpsk commented Feb 5, 2025

How would I switch from cloud to api setup? Would I need to remove the integration and reinstall it?
(Not going to do it right now, given that my Beecon is probably updated to their latest firmware and it still won't work...)

@NGrey5
Copy link

NGrey5 commented Feb 5, 2025

@knwpsk The core.config_entries workaround above will automatically switch you to use the local API instead of cloud.

@knwpsk
Copy link

knwpsk commented Feb 6, 2025

Want to give a quick shout out to Lou at Somfy. (He's at the address given above for their tech support.) He responds quickly, gives good answers, and gives a sh*t about the DIY community. So much better than some other hardware vendors we work with. We need to celebrate people like him when we find them!

FYI he told me they're going to reorganize the menus/pages in the (new) app, so that things like the Beecon firmware version are easier to find. He listened and responded positively to my feedback about it.

@knwpsk
Copy link

knwpsk commented Feb 10, 2025

@NGrey5 fyi:
Lou at Somfy says that they pushed out a firmware change on Feb 3 that should fix the problem we had connecting to the local api (using the manual config workaround).
He guided me to find the Beecon firmware version in the app (the location of the info is not at all intuitive!):

  • "..." menu
  • Help & Advanced settings
  • Advanced settings
  • Under the PIN number

Mine says Hub Version 2024.6.5-13, which Lou says is current.

I haven't tried the workaround again yet, maybe I'll get to it tonight.

@knwpsk
Copy link

knwpsk commented Feb 11, 2025

@NGrey5 I just did the manual update as you described above. HA restarted ok, but the Overkiz integration is throwing a new error:

The config entries are named '(my email)', '192.168.86.100:8443'.

To fix this error, [configure the integration](https://myurl.ui.nabu.casa/config/integrations/integration/overkiz) and remove all except one of the duplicates.

Was I supposed to delete the integration first? Or something else?

@badnetmask
Copy link

@NGrey5 I just did the manual update as you described above. HA restarted ok, but the Overkiz integration is throwing a new error:

The config entries are named '(my email)', '192.168.86.100:8443'.

To fix this error, [configure the integration](https://myurl.ui.nabu.casa/config/integrations/integration/overkiz) and remove all except one of the duplicates.

Was I supposed to delete the integration first? Or something else?

You have to enable Developer Mode.

@badnetmask
Copy link

badnetmask commented Feb 11, 2025

I just wanted to add one bit of information: after migrating, then getting the API key, and successfully adding the integration back, I noticed that neither the Zigbee groups or the scenes are exported to Home Assistant. I don't know if that's an issue with the new API, or with the HA integration. All I know is that I need to re-write some of my automation.

EDIT: I jumped the gun here. I found the groups under "Entities", just not the scenes.

@knwpsk
Copy link

knwpsk commented Feb 11, 2025

@NGrey5 I just did the manual update as you described above. HA restarted ok, but the Overkiz integration is throwing a new error:

The config entries are named '(my email)', '192.168.86.100:8443'.

To fix this error, [configure the integration](https://myurl.ui.nabu.casa/config/integrations/integration/overkiz) and remove all except one of the duplicates.

Was I supposed to delete the integration first? Or something else?

You have to enable Developer Mode.

Enable Dev Mode in Somfy? I already did that, a couple of weeks ago. (Thanks)

@badnetmask
Copy link

Was I supposed to delete the integration first? Or something else?

You have to enable Developer Mode.

Enable Dev Mode in Somfy? I already did that, a couple of weeks ago. (Thanks)

Yeah, sorry, responded too fast.
In my case I removed the integration via the UI, then enabled Developer Mode, then re-added the integration using the example above.
I would try that.

@knwpsk
Copy link

knwpsk commented Feb 11, 2025

Was I supposed to delete the integration first? Or something else?

You have to enable Developer Mode.

Enable Dev Mode in Somfy? I already did that, a couple of weeks ago. (Thanks)

Yeah, sorry, responded too fast. In my case I removed the integration via the UI, then enabled Developer Mode, then re-added the integration using the example above. I would try that.

Still breaking, same error.

  • I restored HA to this morning's safe backup
  • I deleted the Overkiz integration and restarted HA
  • I added the config to config_entries manually and restarted again
    and I'm still getting the same "duplicate entries" warning.

@NGrey5
Copy link

NGrey5 commented Feb 11, 2025

@knwpsk I've done all I can think of to re-create your issue, but have not had success.

Are you sure you don't have any lingering entries in config_entries that reference an old overkiz setup? Or maybe you have the same entry_id on another entry?

Being that you're on a different firmware version than me, my ability to help is little to none unfortunately as it could just not work at all.

@knwpsk
Copy link

knwpsk commented Feb 12, 2025

@knwpsk I've done all I can think of to re-create your issue, but have not had success.

Are you sure you don't have any lingering entries in config_entries that reference an old overkiz setup? Or maybe you have the same entry_id on another entry?

Being that you're on a different firmware version than me, my ability to help is little to none unfortunately as it could just not work at all.

@NGrey5 I'm combing through core.config_entries to find anything else that could be "duplicate" but I don't see it. I have a Ping entity that pings the IP address of the Beecon hub, but I don't see how that could be an issue.
There are a handful of other configs that are not self-explanatory, but there's nothing to suggest that they would interfere with this -- i.e. they make no mention of Tahoma, Somfy, Beecon, or the Beecon's ip address.... etc.

Any suggestions on where else I should look?

@knwpsk
Copy link

knwpsk commented Feb 12, 2025

@NGrey5 also no, I don't have that same entry_id anywhere else in config_entries.
(I copied that entry_id directly from your instructions above without alteration.)

@knwpsk
Copy link

knwpsk commented Feb 12, 2025

@NGrey5 I figured it out (with your hint). I discovered that, when I follow all the steps, HA creates another entry in my config_entries file (in addition to the one we added manually per your instructions).
I deleted that second entry, and restarted HA, and it's working.
Thanks again for your help and patience.

(I re-verified in my backup of config_entries that there are no entries for it. It wasn't my mistake!)

@davekolm
Copy link

davekolm commented Feb 28, 2025

I'm fairly new to HA (about a month), and doing my best to make sense out of this Somfy (North America) integration issue. As you'd expect, I can't install the Overkiz integration because of the login problem. So, as suggested, I've enabled Developer Mode on my TaHome (see note below), and received a token from Somfy.

I found the very nice instructions (above) from @NGrey5 from Jan 13th, and perhaps all I have to do is follow those instructions. But from the discussion, this appears to be how to re-enable a now-broken Overkiz integration -- and I've never had it installed (and, of course, attempting to add it fails at authentication). Looking at the config change, I'm assuming I still somehow have to install the integration.

Note: In case anyone else hits this, or in case it's somehow relevant: I could not enable Developer Mode on my TaHoma via the somfy.com website. When I logged in, I can see old support tickets I filed, but my TaHoma does not show up at all. Somfy acknowledged that something is broken and they are investigating. In the meantime, they said they've enabled Developer Mode for me, and sent me the token.

--

Update: I just re-read @NGrey5's write-up and previously missed something critical. He said:

This only works for the local API and somfy north america. Also, if your device has the new firmware from 01/28/2025 then this likely won't work as that update broke the local API. You should follow this issue instead

My TaHoma does have the updated firmware. So now I'm even more confused: Is there ANY work-around to install (new install) and configure Home Assistant to work with the Somfy TaHoma local API at this time? If so, where can I find detailed instructions? I've searched, and this thread seems to be the best...

@NGrey5
Copy link

NGrey5 commented Feb 28, 2025

@davekolm I can't confidently say I'm up-to-date on the status of these issues, all I do know is mine is still working using the steps I outlined above, and I have not updated my device firmware to anything on or after 01/28/2025.

However, there have been some that said the firmware issue has been fixed in a subsequent update (I can't confirm this myself.) You may want to see if you have any new updates and aren't still on the broken version.

Also, you shouldn't need a previous installation for this to work. I've even gone to lengths of deleting the integration and all devices from Home Assistant. Following the steps puts it all right back where it was.

If you haven't already, you may find it beneficial to check out this entire thread and see if you find any common issues that others have had. You may find a solution as one other person was having issues after following the steps as well.

I'll try to help where I can, although it may be limited as I'm by no means an expert on this. I've been personally just waiting for everything to be fixed!!

@davekolm
Copy link

@NGrey5 It worked! I'm unclear on how integrations get added to HA, but adding the config entry you documented above was all that was necessary. My shades were immediately detected and added. Thank you!

Note: My TaHoma hub is running 2024.6.5-13

@woodartworx
Copy link

I have 3 Tahoma Beacons (Windows were too spread out to use only 1) and when I use the above configuration to add the 3, the first one gets accepted but the second 2 do not. It is a problem with

2025-03-03 10:33:33.016 ERROR (MainThread) [homeassistant.config_entries] An entry with the id 01JAZGX01BZXXXXXXQMFBGEJ5H already exists

Each of the config lines, when copied has the same id which occurs near the end of the config entry.

Is there some other ID I can put in place for the remaining 2 entries so I can have all 3 Tahoma Beacons be recognized?

@woodartworx
Copy link

I ended up just changing one letter in each of the ID's and it worked.. Tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests