New Netatmo binding (starting OH 3.3 M5)

Yes this has to be monitored and investigated

the binding is working perfectly here. No specific issues.

For your information, I’ve just receive a log never seen before …

2022-05-10 16:04:44.202 [WARN ] [handler.capability.AirCareCapability] - Error retrieving home-coach data '70:xx:xx:xx:xx:xx' : Rest call failed: statusCode=null, message=Internal Server Error

Most likely an issue on Netatmo server side.

Andrea

Yes, clearly Netatmo server side. Did the binding behave correctly ?

1 Like

quite nicely, till now no issues with the binding, at all :slight_smile:

1 Like

@alaub81 ; are you able to reproduce? If you are, please enable TRACE logs for the binding and show us your logs when your request to refresh access token will fail. It will be interesting to see what HTTP code is returned and what contains the response.

Everything is working fine since that error. I restarted openHAB a few times yesterday. But now it is running about 24h without any problems. I have a implemented a Grafana monitor, to get informed when no data is received. I will post an update if I got that error again. How can I enable TRACE logs?

log:set TRACE org.openhab.binding.netatmo

No issues so far! Nice new Binding :slight_smile: Thanks!

1 Like

Anyone tried this new binding in 3.2? I cannot make it work on my installation…

It won’t work with anything older than 3.3 M5.

Ok. Just updated to 3.3 M5… Thanks a lot.

I have a strange behaviour with the new binding. Every time the binding refresh data the room things (I have two) goes offline and then online again. Datas are refreshed correctly and only these two things shows this error.

2022-05-17 19:38:33.047 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:xxxxxxx:xxxxxx:xxxxxxx’ changed from ONLINE to OFFLINE: Thing is not reachable
2022-05-17 19:38:33.051 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:yyyyyyy:yyyyyy:yyyyyyy’ changed from ONLINE to OFFLINE: Thing is not reachable
2022-05-17 19:38:33.381 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:xxxxxxx:xxxxxx:xxxxxxx’ changed from OFFLINE: Thing is not reachable to ONLINE
2022-05-17 19:38:33.410 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:yyyyyyy:yyyyyy:yyyyyyy’ changed from OFFLINE: Thing is not reachable to ONLINE

This is certainly a bug.
I have no room in my setup to reproduce the bug.
I assume @glhopital will have a look and provide a fix when he has free time.

I cannot add a bridge (Netatmo Account). I created an app and entered the credentials (ClientID, Client Secret, UserID and pwd), but I get the following in the log:

2022-05-18 19:43:16.766 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Initializing Netatmo API bridge handler.
2022-05-18 19:43:16.767 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Connecting to Netatmo API.
2022-05-18 19:43:16.768 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri POST  https://api.netatmo.com/oauth2/token 
2022-05-18 19:43:17.328 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri returned : code [400 Bad Request] body {"error":"invalid_grant"}

I guess without the webhook, a direct connection from the netatmo server to the OpenHAB server is not required.
Therefore my next question:
Which URL is used for the webhook, because I can add a config to the nginx proxy and allow unauthenticated access on a specific URL to allow the webhook connect to my instance.
https://my.public.url:9443/ ???

Yes, this may not have been tested completely. Can you file a bug report ?

Yes, sure. Can you tell me where to file the bug report and what do you need?

Were you able to authenticate with the old version of the binding with the same settings ?
Are you sure of your id/secret/username/password ?

I have not used the old binding.

And yes, I’m sure about the id/secret/username/password.

But I have already one app defined in the “My Apps” section, which I use for the webhook (Netatmo Doorbell) over the “httpListener” Binding:

Then I defined a second app for the Netatmo binding (same username/pwd, different id/secret).
Then I created a new Thing in OH from the Netatmo binding (Netatmo Account) where I use these credentials.