[RELEASE] Netatmo

Getting: " expecting ')', found 'displayed' @ line 107, column 109." when trying to install the Smoke Alarm driver.

I created an app on dev.netatmo.com but the problem is that when I paste the client Id and the client secret from it the Hubitat app tries to connect to my Netatmo Wheater station.

Anybody who knows what I do wrong?

The app uses Netatmo scopes to call the api. Are you referring to the page that appears when you first authorise the app against the Netatmo site? I believe (I may be wrong) that if you scroll down, on the Netatmo page, you can see the security scopes are part of the authorisation.

1 Like

Thats the site I’m reffering to yes.

Ok, I’ll give it another try then and we’ll se if I get it to work... Thanks!

Still experience this problem with the smoke sensor driver. Any Ideas how to fix it? :slight_smile:

I am fixing it right now

1 Like

@monsterdykaren, Just pushed the fix

2 Likes

I have the app Netatmo Connect installed aswell for my weather station. I'm thinking if this can cause a conflict. :thinking:

Nice, I actually never tested running them both at the same time, thanks for the info

1 Like

I tried to use this driver but had trouble getting a access token and didn't know what to do with it. I appreciate any tips if you have any time please

I'll be updating the drive in 2 or 3 weeks.

Please don't post the debug log in the forum, they contain you credential and are mainly for debugging purposes

2 Likes

Nice! Thanks a lot! :grinning:

(I removed my meassage containing debugging log. Let me know if you need any info from it)

@syepes are we impacted by this announcement?

Dear Netatmo developer,

As of today, when you refresh an Access Token using the associated endpoint https://api.netatmo.com/oauth2/token, Netatmo servers respond with a couple of tokens : an Access Token and a Refresh Token.

If the previous Access Token is still valid, the newly returned access token is identical but its expiration time is extended for 3 hours.

In any case, the refresh token is not renewed.
Starting from the 17/04/2023, this behavior will change to to be compliant with the recommendations of the RFC of the OAuth2 Authorization Framework (section 10.4) and improving the security of the data of our users.

When refreshing tokens, Access Token and Refresh Token will be automatically renewed and former tokens invalidated.
What does it means for me ?

If you were already updating the tokens provided when refreshing your tokens, this change will not impact you.

If you do not update the refresh token when refreshing your Access Token, your users will be disconnected after 3 hours as the former tokens will become invalidated.

To fix it, you need to update the tokens as soon as you get the newly generated ones.

I asked this same question, and I thought it was in this thread, but I guess not. The answer was no, as the app already uses the oauth correctly.

1 Like

Hello All,

We should not be affected by this, in the simple case we just need to re-auth with your account (ReLaunch the app) so that it can create new tokens.

In any ways, no worries if it breaks i'll fix it ASAP

5 Likes

Does this cover all of their devices? Been given some of the weather station to play with so wondered how it could be used.

Hi, my Netatmo app seems to lose the ability to refresh the token every 1 - 3 days. It seems pretty random. Everything is fine for a bit, refreshing correctly and then i get an error and it starts flooding my logs with warnings every 2 mins.

It seems my devices continue working until I go into the Netatmo App on Hubitat and then it will delete my devices. So it's mostly just an annoyance because my logs are flooded and i'm guessing it's probably not good for hubitat performance overall to have this app keep logging errors every 2 mins.

I have uninstalled the hubitat app, created new client ID/Secrets on the dev.netatmo site and i have even created new connectors on the dev.netatmo site and this continues happening.

I am on Sebanstian YEPES netatmo app v1.2.7
I have installed this directly from github copying in the app code and have installed it using Hubitat Package Manager.
I am on a Hubitat C8 running 2.3.9.201

This has probably been happening since netatmo announced the access/refresh token change in 2023...so I assume it's somewhat related to that. Any ideas why things would suddenly fail? The client ID/Secret isn't being used anywhere else except on this hubitat hub.

Not sure if anyone follows this thread anymore, but I think I fixed my issue, I changed the code so that it thinks the token expires sooner than 3hrs and will refresh it more often (every 2hrs).