Closed bvalat closed 10 months ago
Hey there @cgtobi, mind taking a look at this issue as it has been labeled with an integration (netatmo
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
netatmo documentation netatmo source (message by IssueLinks)
Hi! Same problem here :)
same here ;)
Are you using the external or internal HA instance URL/IP address when configuring the integration?
Internal. It’s a new installation of HA for me.
same here i use http://homeassistant.local:8123/
Same here
Please try again with your public URL.
What public URL? As i said i'm brand new to home assistant. Is it necessary to have a plublic URL? All other cloud based integration didn't neeed that and i do not see that on netatmo integration's documentation
With my public URL, le problem is the same...
I have exactly the same problem - start netatmo integration, the website is called up and after clicking yes it is only updated. url auth.netatmo.com. Third party appz set up in the dev account. When integrating into HA, I'm missing the dialog with which to enter the client ID and client secret.
I had exactly the same issue on a newly installed HA. As of today it doesn't send me to the Netatmo page anymore, I just get this:
Hope it helps.
I had exactly the same issue on a newly installed HA. As of today it doesn't send me to the Netatmo page anymore, I just get this:
Hope it helps.
I get that picture too. Restarting home assistant helps me. Then I get the query again for the website auth.netatmo.com, which then doesn't work properly
That's good to know. Thanks.
If I take a closer look at the URL, I can find the home assistant cloud nabu casa:
account-link.nabucasa.com
Does this mean that the netatmo integration only works with the paid home assistant cloud nabu casa? Maybe someone with an active cloud (nabu casa) can test whether it works!?
Then I also notice that the client_id doesn't match mine under the netatmo dev account. If I then replace the ID with mine in the URL, that doesn't help either.
I hope this helps a little
Moi c'est pareil et j'ai un cloud actif (75 EURO) alors j'aimerai que cela marche. c'est pas la peine de payer un service si il ne marche pas!!!!!!
For non french speaking people, the post above complains about Netatmo integration not working even with the paid cloud of home assistant.
I seem to have the same issue
It might be related to this log message:
Logger: pyoverkiz.enums.protocol
Source: runner.py:188
First occurred: 23:34:58 (9 occurrences)
Last logged: 23:34:58
Unsupported protocol netatmo has been returned for <enum 'Protocol'>
for information it works well on a newly installed Home Assistant 2023.6.3 on CasaOS
maybe he can help us https://github.com/jbouwh but I don't know how to contact him since I don't have twitter (x).
@jbouwh
Pinging you in the behalf of @leule7
same issue here, any solution right now?
I'm not sure what is causing this but setting up a custom application using the instructions at https://next.home-assistant.io/integrations/netatmo#development--testing-with-your-own-client-id seems to have worked for me. I've not checked this very thoroughly though. Obviously this isn't a good solution, but it might help find the problem.
@deosrc that is a very helpful information and hints at the extend scope to support certain BTicino devices.
@cgtobi Looks like that's the problem. It succeeds when the new scopes added to the pyatmo library are removed. I expect it would be better to list only the required scopes within the HA code rather than filtering out specific scopes.
As an easier workaround than creating the application credentials, when the netatmo authorization page opens, change the URL by removing read_mhs1%2B
and write_mhs1%2B
.
@leule7 Interesting. Maybe I did something different before. When I remove those parts of the URL and click accept, it loops back around to the page. When I click accept again it succeeds. I'm on a modified version of Home Assistant at the moment though while I'm trying some things so that might be affecting it.
I'm not sure what is causing this but setting up a custom application using the instructions at https://next.home-assistant.io/integrations/netatmo#development--testing-with-your-own-client-id seems to have worked for me. I've not checked this very thoroughly though. Obviously this isn't a good solution, but it might help find the problem.
year, very good, that works...
In Home Assistant navigate to Settings -> Devices & Services Click on the three dots (menu) at the top right and then login information for the application.
Add application credentials
then from https://dev.netatmo.com/ ... my apps add the client_id and client_secret information in application credentials in home assistant.
If the netatmo integration is now added, another dialog will appear. Use the new application credentials there and not those from Home Assistant Cloud.
Thank you
The redirect_uri is mapped to account-link.nabucasa.com.
Is an nabucasa account needed ? I don´t have one, neither do I want it. My HA is already available publicly, and the redirect_uri should be map to my instance.
I tried to changed it manually, but I get an uri mismatch error
for me it said : ok the account is just relink. But i didnt see netatmo in my integration
Good point, why the redirect url is account-link.nabucasa.com? In fact the integration doesn't need to be publicly available. I crested an app on my netatmo account and add credentials as deosrc suggested. It works and my HA is not publicly available.
@cgtobi Looks like that's the problem. It succeeds when the new scopes added to the pyatmo library are removed. I expect it would be better to list only the required scopes within the HA code rather than filtering out specific scopes. https://github.com/home-assistant/core/blob/2d39eaf0a21e9a4cb148aa7f1791bcc34e94aea9/homeassistant/components/netatmo/__init__.py#L155-L162
As an easier workaround than creating the application credentials, when the netatmo authorization page opens, change the URL by removing
read_mhs1%2B
andwrite_mhs1%2B
.Unfortunately, removing read_mhs1%2B and write_mhs1%2B in the url didn't work for me e
Removing from the URL didn't work for me either, somehow I don't have read_mhs1%2B and write_mhs1%2B in my URL. Should I go on with creating app credentials as a solution?
I don't believe a nabu casa account is required. The reason for Nabu Casa in the redirect url is for ease of use to avoid each user having to register for a developer account.
The built-in OAuth2 support works out of the box with locally configured client ID / secret using the Application Credentials platform and with the Home Assistant Cloud Account Linking service. This service allows users to link their account with a centrally managed client ID/secret.
@cgtobi Looks like that's the problem. It succeeds when the new scopes added to the pyatmo library are removed. I expect it would be better to list only the required scopes within the HA code rather than filtering out specific scopes. https://github.com/home-assistant/core/blob/2d39eaf0a21e9a4cb148aa7f1791bcc34e94aea9/homeassistant/components/netatmo/__init__.py#L155-L162
As an easier workaround than creating the application credentials, when the netatmo authorization page opens, change the URL by removing
read_mhs1%2B
andwrite_mhs1%2B
.Unfortunately, removing read_mhs1%2B and write_mhs1%2B in the url didn't work for me e
Removing from the URL didn't work for me either, somehow I don't have read_mhs1%2B and write_mhs1%2B in my URL. Should I go on with creating app credentials as a solution?
creating app credentials works in my case
@jbouwh
Pinging you in the behalf of @leule7
Not sure how I can help?
I have a fix for this working locally. Should have a PR shortly.
@jbouwh Pinging you in the behalf of @leule7
Not sure how I can help?
It's settled, but thank you very much for the quick response. :-)
Please people, do refrain from tagging random devs out of the blue just to get attention. This is what code owners are for and they are tagged automatically.
@deosrc let me know if you need support or a review. Feel free to ping me on discord.
@deosrc let me know if you need support or a review. Feel free to ping me on discord.
Thanks @cgtobi. I've had to leave this for today. The changes are at https://github.com/deosrc/homeassistant-core/tree/fix/netatmo-auth if you want to pick it up? I modified it in a way that means new scopes added to the library won't break it again. Hopefully that makes sense. I tested locally and all seems to be working with both cloud and application credentials. I added unit tests for the new method but not sure if they're working.
If you want to leave it for me I'll try pick it up tomorrow.
Bonjour, Aujourd'hui j'ai restauré une version antérieure de home assistant et l'intégration de netatmo a fonctionné Je ne sais pas si ça vient de ça mais ça marche !
@deosrc I made a few changes that I'd suggest you'd incorporate. https://github.com/deosrc/homeassistant-core/pull/1 Thanks for your work. Greatly appreciated.
I pulled the dev version of Home Assistant and I can confirm it's working again. I could link a new Netatmo account to a new instance without using a Nabu Casa url. Great work!
This has been included in the 2023.11.3 version just released.
https://www.home-assistant.io/blog/2023/11/01/release-202311/#release-2023113---november-22
This has been included in the 2023.11.3 version just released.
https://www.home-assistant.io/blog/2023/11/01/release-202311/#release-2023113---november-22
And it works well, thanks
Anyone having the same issue again with 2023.12.1? I'm trying to add Netatmo, but even when the NabuCasa website appears, the integration still does not show up. Logfile does not show any hint so far.
...but even when the NabuCasa website appears...
@jaal2001 I'm not sure what you mean by this. Do you mean the My Home Assistant page?
After you login at Netatmo, it will redirect you to My Home Assistant which then needs to redirect you to your Home Assistant instance I believe. If you don't have my home assistant configured, it doesn't know where to send you so can't complete authentication.
...but even when the NabuCasa website appears...
@jaal2001 I'm not sure what you mean by this. Do you mean the My Home Assistant page?
After you login at Netatmo, it will redirect you to My Home Assistant which then needs to redirect you to your Home Assistant instance I believe. If you don't have my home assistant configured, it doesn't know where to send you so can't complete authentication.
That is configured. I've tried both methods: The native integration and also providing own credentials. Both do not lead to the integration showing up.
Does your browser block popups? Have you tried a different browser/device?
Yeah, I tried that. Each time the plugin redirects me to the Netatmo website and in the end Home Assistant tells me "Successfully reauthenticated". But under "Integrations" Netatmo never shows up.
The problem
When i click on Add integration and validate, it opens the netatmo website to grant permission on my devices. If i click on Yes I agree, the webite loops on itself (I see activity on the browser tab) so i can't finish the process of adding it... It seems that the callback URI is never called if i agree. Only if i cancel it redirects me on https://account-link.nabucasa.com/ I see someone having the same problem on the forum : https://community.home-assistant.io/t/netatmo-integration-not-working-on-2023-11/639754
What version of Home Assistant Core has the issue?
core-2023.11.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Netatmo
Link to integration documentation on our website
https://www.home-assistant.io/integrations/netatmo
Diagnostics information
No log since the problem seems to be beteewn https://auth.netatmo.com/ and nabucasa.com
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Brand new HAOS installation on RPI3 I only own a netatmo weather station with temp modules and rain meter. Tried with Chrome, Edg,firefox and Opera web browser. When i authenticate, the netatmo website opens https://home.netatmo.com/security intead of previously https://my.netatmo.com/app/station. Maybe legrand/netatmo broke something?