Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netatmo-token.js does not present on Mac OS HB #70

Closed
mrmaximas opened this issue Nov 15, 2022 · 4 comments
Closed

netatmo-token.js does not present on Mac OS HB #70

mrmaximas opened this issue Nov 15, 2022 · 4 comments
Assignees
Labels

Comments

@mrmaximas
Copy link

After plugin upgrade i generate refresh token on netatmo but netatmo-token.js not present in hb config dir or any dir
[11/15/2022, 4:23:10 PM] [Netatmo] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
[11/15/2022, 4:23:10 PM] [Netatmo] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant
[11/15/2022, 4:23:10 PM] [Netatmo] WARN - Netatmo: Error: getHealthyHomeCoachData error: Invalid access token

@skrollme
Copy link
Owner

skrollme commented Nov 18, 2022

So you have generated a new refresh_token and entered it, together with the matching client_id and client_secret like in this (https://github.com/skrollme/homebridge-eveatmo#configuration) example and then started homebridge with the updated homebridge-eveatmo, @mrmaximas ?

Which platform do you use homebridge on? To be honest I'm only familiar with the setup I use on my raspberryPi.

@mrmaximas
Copy link
Author

mrmaximas commented Dec 2, 2022

sorry for delayed answer.
[12/2/2022, 3:27:34 PM] [Netatmo] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
[12/2/2022, 3:27:34 PM] [Netatmo] WARN - Netatmo: Error: getHealthyHomeCoachData error: Invalid access token
[12/2/2022, 3:27:34 PM] [Netatmo] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant
mac os catalina on mac mini, hb, node js and npm latest versions.
i have weather station with max qty (3) of internal co2 sensors, it work fine before update wirh refresh_token option
i have generated a refresh_token with the read_station scope and put them.
{
"name": "Netatmo",
"ttl": 540,
"extra_co2_sensor": true,
"weatherstation": true,
"airquality": true,
"co2_alert_threshold": 1000,
"module_suffix": "-",
"log_info_msg": true,
"auth": {
"client_id": "6373919b4de2c7XXXXXXXXX",
"client_secret": "SIVXgq0VCtmf0BbeR3mxnRd6L4Uq06QXXXXXXXXX",
"refresh_token": "56b3281067eXXXXXXXXXX|3ef0132XXXXXXXXXXXXXX"
},
"_bridge": {
"username": "0E:34:C8:32:B3:17",
"port": 44273
},
"platform": "eveatmo"
},
Screenshot 2022-12-02 at 15 06 58
"

@skrollme
Copy link
Owner

skrollme commented Dec 3, 2022

To me this looks ok, but you could try to run the following steps:

  • Shut down home bridge
  • Remove netatmo-token.json (should be located in home bridge's persist directory, where the config.json is located)
  • Create a new App at dev.netatmo.com which all permissions and copy the client_id and client_secret to your config.json
  • Also create a new refresh_token and copy it to the config.json as well
  • Boot homebridge

You maybe also find some tips in the feature-ticket of this release, #62

@mrmaximas
Copy link
Author

It's works! Thanks and have a good weekend!

@skrollme skrollme closed this as completed Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants