Integrating Legrand Netatmo Gateway with ELAN : Request for Local API Access
Hi,
As part of a current project, I’m exploring the integration of the Legrand Netatmo smart home system (bTicino Gateway) with an ELAN G2 controller to achieve seamless two-way communication between the two platforms.
The primary goal is to enable direct IP communication with the Netatmo gateway, bypassing cloud polling to ensure low latency and robust operation on a local network.
Does the current Netatmo gateway firmware support local API access?
If so:
Are there any prerequisites (API keys, enabling developer mode, or firmware versions)?
Is the API documentation publicly available, or provided under NDA?
Thank you,
Rafael Abbas
Comments
13 comments
Hello,
Do you have look to https://dev.netatmo.com/apidocumentation/ ?
I collect many data from Netatmo (weather station, camera) but nothing can be local, I must obtain a token then collect data (ex: weather station, camera) or do an action (ex: camera)
I shared code to manage tokens here: https://github.com/Phil353556/netatmo-manage-tokens
Phil [ only a user ]
Hi Phil,
Thank you for sharing these resources! I’ve already checked the official Netatmo API documentation, and I understand it relies on cloud-based communication with OAuth2 token authentication.
For this specific integration with the ELAN G2 controller, the goal is to explore whether local API access (direct LAN communication with the gateway) is possible to avoid dependency on the cloud for latency and reliability reasons.
Your GitHub project for token management looks very helpful for cloud API implementations. I’ll definitely take a closer look at it.
If you (or anyone else) comes across any information about local access to the gateway, even via undocumented endpoints or developer/debug modes, it would be great to know.
Thanks again for your input!
Rafael Abbas
Hello Rafael,
Thank you
I don't think local access is possible.
" to avoid dependency on the cloud for latency and reliability reasons."
I understand these reasons. Overall the reliability is good, even if some "down" can happen
URLs to know:
https://health.netatmo.com/posts/dashboard
https://helpcenter.netatmo.com/hc/en-us/sections/10390237686930-Service-notifications
@Leslie: community manager for these API pages can help you and give you the right answer.
Phil
Hi Phil,
Thank you again for the valuable information and for sharing these URLs. The token management repository you shared is proving to be very useful for testing and understanding how to interact with the Netatmo API.
I fully agree with your point about the general reliability of the cloud API, but for this project we’re still exploring every possibility of a local integration for scenarios where cloud independence is critical.
You mentioned @Leslie as the community manager for the API pages—do you know the best way to contact Leslie directly about this question? Should I use the Netatmo developer forum, or is there a preferred email or contact channel?
Any guidance or introduction you could share would be highly appreciated.
Thanks again for your support!
Rafael Abbas
Hello,
If you explore posts from: https://helpcenter.netatmo.com/hc/fr/community/topics/5892346495378--EN-API-automation-and-external-services
you will find this URL
https://dev.netatmo.com/contact-us-form
use the second item about API
Phil
Hi Phil,
Thank you very much for the information and the link you provided – it’s been extremely helpful so far.
I’ve managed to register the application, generate the tokens, and authenticate successfully. However, I’m currently struggling with the webhook part at the end of the tutorial.
I can’t seem to find the
plantIdinformation, which is required to proceed. Other than that, I understand that each Elan controller will make a request to our API subscription on Legrand, and we’ll need to handle token refresh every hour while also polling device data.At this stage, I haven’t yet managed to make a direct request to the gateway. I’ll try using the link you shared to contact @Leslie as well, to see if they can assist with these final steps.
Thanks again for all your support – every piece of guidance is greatly appreciated!
Best regards,
Rafael
Hi Rafael,
Happy to help.
I'm sorry as I cannot help you more, as I don't have this product "Elan controller".
So Leslie / Netatmo is definitely the person who can answer to you.
The access_token is valid for three hours, the refresh_token doesn't expired, may be the values are differents for an Elan controller.
I use my script (already shared) to manage tokens which are then used to manage flood light of netatmo external camera, using a simple button connected via zigbee to a domoticz platform. [ https://github.com/Phil353556/netatmo-floodlight ]
I asked the question to a LLM, the anwser is awesome.
question: "how to use plantid with netatmo api to exchange data with an Elan controller?"
You should give a try :-)
Phil [ only a user ]
Hi Phil,
I could use a bit of help troubleshooting an authentication issue.
I’ve been testing the Netatmo API using the API Explorer on the developer site, and everything works fine when I use the “Try it out” button. The token generated there allows me to send requests and receive valid responses.
However, when I try to use a token that I generate myself via the standard OAuth2 flow (using the following credentials):
Client ID: 68xxxxxxxxxxxxxxxxxxxxxxb85
Client Secret: Nrxxxxxxxxxxxxxxxxxxxxxxxxxxxtl
…the API responds with “denied”, even though the token is accepted during the OAuth flow and appears valid.
I’ve triple-checked the scopes (
read_plant,read_device, etc.) and the grant type (authorization_code). Everything seems correct.What might I be missing here? Is there something different about how the test site token is generated versus manual authentication?
Appreciate any insights or suggestions.
Thanks again,
Rafael
Hello Rafael,
Please modify your post .. DO NO share full Client ID and Client Secret
for example use:
Client ID:
68xxxxxxxxxxxxxxxxxxxxxxb85
Client Secret:Nrxxxxxxxxxxxxxxxxxxxxxxxxxxxtl
May be it can help you: Have a look here with the answer from @Leslie
https://helpcenter.netatmo.com/hc/fr/community/posts/23896792864658-API-homesdata-and-homestatus
Phil [ just a user ]
Hi Phil,
Thanks a lot for the quick reply — I really appreciate it. I’ll check it out right away and let you know how it goes.
Best,
Rafael
Hello Rafael,
Sorry for delay .. personal event.
Just a reminder ... email address / client id / refresh_token and so one should not be in clear text ... these are your personal data
I'm sorry for you.
Question: do you success to use the refresh_token to get another new couple of refresh_token and access_token?
My remark .. reading your post:
-I don't know is http://localhost:3000 is ok for your configuration and for magellan.
May you try without :3000?
Fyi: I use: redirect_uri=http://localhost/
-the steps describe soon good, and are similar to the process I followed but I'm just a user
Phil
Hi Phil,
Thank you so much — seriously, without your help I’d still be stuck!
I spent some time reading other posts with similar issues, and noticed that a few users were able to fix the problem by recreating the application. I tried the same approach — deleted the old one, created a new app from scratch — and it finally worked! I can now generate tokens and make API calls without getting “denied”.
About the screenshots — you're totally right, I shouldn’t have posted client_id and refresh_token in clear text. I only did it because it was getting really hard to explain the issue otherwise. But now that things are working, I’ll go ahead and delete those images.
Thanks again for your support — it made a huge difference.
Cheers,
Rafael
Hello Rafael,
I'm really happy for you, and I'm happy to help.
Yes, the configuration can be sometimes ... stricky.
I shared two scripts in github to share my experience, and share something that works :-)
Since the beginning of this year, it works like a charm.
Have a nice day
Phil
Please sign in to leave a comment.