+4

NetAtmo weather station and Welcome integration

Rait Lotamõis 4 years ago in Devices / Http updated by Andrzej Szymkowicz 5 months ago 22

I'm so happy about getting my NetAtmo integration working, that I wanted to share it with the rest of you people.


This is the device itself


All you need to do is enter the values for strings in the "Settings" section of the device, and you will immediately get the values from one indoor and one outdoor module (which is the typical starter package setup.)  If you have more stations and/or modules then you can easily access them by just duplicating the existing values under the "Weather Station" query and changing the instance number in their "Token name." 


For example: default indoor temperature value = body.devices[0].dashboard_data.Temperature

indoor temperature value for next weather station = body.devices[1].dashboard_data.Temperature


and for modules:


temperature of first module of first station = body.devices[0].modules[0].dashboard_data.Temperature

secondary module of first station = body.devices[0].modules[1].dashboard_data.Temperature


I've also included a WIP section for the NetAtmo Welcome camera. I have yet to figure out how to track persons per name, since their position in the table is always changing.


Thanks for your contribution!


I'm not able to test it with a real Netatmo station yet, but thank you for sharing your implementation, I'm sure it will be useful to other users.


That's what we need, people who grab other devices API's and squeeze them to Comfortclick.


Thanks for sharing

Hello Rait,

Sorry to dig this old post with 2 years, but I own a Netatmo, and even though I read Netatmo API guidelines, I can't get anywhere. I can't even get the acess_token.

I was looking to integrate my Netatmo on bOS, but your example is not available for download anymore. Can you share it again? Or does someone else has any tips?

Currently Netatmo is using Oauth 2.0, and we need to create an "app" on the Netatmo account, to be able to get a client_id and a client_secret. So far so good, but then I can't get anywhere, as any attempt to post the provided example to the https://api.netatmo.com/oauth2/token url, leads me nowhere, and I keep getting an "Error connecting to device" everytime I try to send the Http Post command.


Thanks in advance

Boom! I think I got it!


Will share any details soon...


Best regards

Hi Ricardo,


I had no idea the upload.ee service expired like that. I've uploaded it again here: https://indome.zendesk.com/hc/et/article_attachments/360036974032/NetAtmo_Template.bos should you still find it useful.

Best regards

Thanks Rait!

Before your reply, I got it working.

But I'll check your example to see if I can improve mine also. Will share any details.

Best regards

What a nice job!!! Well done Rait!


Just deleted the Presence items, which I don't use. And now I'll cross your version with mine, and add some design touches and some minor information, like last values check etc.

But overall, great job.

Thanks for sharing!

Best regards

Thanks for posting Rait and Richard

I have tryed to set it up, but getting som errors.

1. In the "Host URL" shall it be "https://api.netatmo.com" ore "https://api.netatmo.com/oauth2/token" ?

2. in the Netatmo app: what should i put into the "Redirect URI" and "Webhook URL" fields ?

Ricardo: Do you have an updated template ?

YS Bård-Ove

+1

The Host URL needs to be "https://api.netatmo.com"

In the NetAtmo app, the Redirect URI and Webhook URL fields used should be optional. So just leave them blank. All you need is the client Id and Client secret.

Hi Guys,

I'm currently having problems with the Netatmo Template that has been working pretty much flawless on my system for a while. Some weeks ago it stopped working after an update of bOS. I have double checked the client id, secret, username and password. I even tried to use the fresh template without success. I updated to the latest beta 4.6.26 tonight and it seems it's getting a different message than I got on the previous releases.

If i disable and enable the device it states "connected"

If I then use the send function on "weather stations" I get this message:

Devices : 10.12.2019 21:07:04 : Error : Devices\Netatmo : Forbidden (403) GET: /api/getstationsdata?access_token=%0

I guess the 403 is some access denied message or similar...

If I press the send function on "oAuth" I get this message:

Devices : 10.12.2019 21:11:13 : Error : Devices\Netatmo : Error connecting to device.

On previous releases I got this message:

Devices : 07.11.2019 12:35:50 : Error : Devices\Netatmo : Error connecting to device. Content-type   at System.Net.Http.Headers.HttpHeaders.CheckName (System.String name) <0x707728a0 + 0x000fc> in :0 
at System.Net.Http.Headers.HttpHeaders.Add (System.String name, IEnumerable`1 values) <0x707727d0 + 0x0002f> in :0
at System.Net.Http.Headers.HttpHeaders.Add (System.String name, System.String value) <0x70772740 + 0x00053> in :0
at ComfortClick.Http.Driver.HttpDriver+d__10.MoveNext () <0x7073aef0 + 0x00297> in :0

Is it working for you?

Hi 
I dont get the errors, the device is connected, but i dont recieve anny data from the netatmo. 
Would annybody post i sample of the settings, so i could doubblecheck it? 

Br Håvard

Which server version are you running, Håvard?

I also have a problem with Netatmo integration. I get error: "Devices : 15.12.2019 23:28:31 : Error : Devices\NetAtmo : Error connecting to device. Misused header name. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects. at System.Net.Http.Headers.HttpHeaders.CheckHeaderName(String name)
at System.Net.Http.Headers.HttpHeaders.Add(String name, String value)
at ComfortClick.Http.Driver.HttpDriver.d__10.MoveNext()"

It stoped to work after some CC upgrade - current verison: 4.6.24

+1

Hello,

we're investigating and trying to resolve the http connections and stability. Provided logs will help us regarding the current connection issue.

Best regards.

Hello,

In some other post I found that path shuldn't start with "/" so I changed the configuration but the problem still exists. In debug log there is only:

Is there any progress in resolving this issue? I have 5 customers who complain about that excluding me.

Hello,

there were improvements in our latest Alpha version of bOS, so you can try and download the alpha yourself and test it out. We'd recommend to test the alpha for yourself first, before you install the alpha on your client's devices.

To install alpha version, open your Update setting and press Control+Shift+A.

Also, please note that this is an alpha release, so there might be some other issues that may occur.

Best regards,

OK. When do you expect an official release with this update?

I have tried now with the alpha version. No change in the behaviour. Netatmo, tibber, yr.no is not working.

Hello,

is it possible to provide the logs after the update with these connection errors?

Best regards.

Netatmo log message:

Monitor : 03.03.2020 12:17:36 : General\Users\User : LastServerMessage : Devices : 03/03/2020 12:17:35 : Error : Devices\Netatmo : NotFound (404) GET: /api/getstationsdata?access_token=%0

I tried to download the example again and configure it. For some reason this gives me a "403" error. Not the 404 as above.

When trying to connect to yr.no's API I get a "error connecting to device" message.

Is there any update on this issue?