Module stopped working
I'm pretty sure that Netatmo has finally depricated "Client credentials grant type" in favour of "Authorization code grant type". Go to https://dev.netatmo.com/apidocumentation/oauth and look for 'Client credentials grant type'
Is someone in the community skilled enough to upgrade the existing code?
I join the request! ((( I also stopped working the module, after about June 29.... (((
Will try to setup MM again to fix this. Any more hints for me? Are you willing to test the changes?
Will try to setup MM again to fix this. Any more hints for me? Are you willing to test the changes?
I'll be glad to test the changes as well. I believe the oauth2 auth code changes are described here: https://dev.netatmo.com/apidocumentation/oauth#authorization-code. I'd suspecting the changes will need to be in "node_helper.js". Standing by.
I am also ready to help if I understand how to get a new authorization (token probably).
Maybe this will help the developer fix the authorization?.....
https://forum.netatmo.com/viewtopic.php?t=21383
https://forum.magicmirror.builders/topic/12315/mmm-netatmo-updated/42?page=5
Could help the developer.... How you can get tokens. The module from RaymondMolenaar works after retrieving the authorization data again on the Netatmo website.
Authorization also stopped working in the RainMachine application. This solution appeared on the user forum. Perhaps this will help a respected developer. I cite links....
"Change: https://github.com/zagy/rainmachine-developer-resources/commit/df1d75b84cf9fb12b3334029c48e5cbf6b8625d0
File: https://raw.githubusercontent.com/zagy/rainmachine-developer-resources/df1d75b84cf9fb12b3334029c48e5cbf6b8625d0/sdk-parsers/RMParserFramework/parsers/personalnetatmo-parser.py (can be uploaded via the rainmachine UI)
It's not very tested, but seems to work for now. "
Many examples are available on how to implement OAuth2.0 auth code / access token flows. Hopefully someone can implement it here: https://developer.goto.com/guides/Authentication/04_HOW_accessTokenNodeJS/
The token can be obtained from the Netatmo app. Where are the keys.
@Laz2516 @skyhawk180 @ihadx Can you check if this works for you?
https://github.com/CFenner/MMM-Netatmo/pull/182
Of course. I will check now.))
Unfortunately, it doesn't work. Module icons do not appear on the screen. The inscription "Loading..." is shown.
I deleted only my login and password. He left the keys. And added a refresh token. Right?
Raspberry overloaded.
Perhaps in the Personal Account-Settings-Partner Applications you need to remove the permission for the old MagicMirror?
" { module: 'netatmo', position: 'top_left', // the location where the module should be displayed header: 'ДОМАШНЯЯ МЕТЕОСТАНЦИЯ', // a header if you like one config: { clientId: '63319aa6d7d9ebХХХХХХХХХ', // your app id clientSecret: 'ХХХХХBeNDqyerfjkZaХХХХХХХХХХХ', // your app secret refresh_token: 'ХХХХХХХХ75368c04c4188c8b52cf|0e864b8ХХХХХХХХХХХХХХ', // username: 'ХХХХХХХХ', // your netatmo username // password: 'ХХХХХХХХХ', // your netatmo password // moduleOrder: ["NAMain", "NAModule4", "NAModule1", "NAModule3", "NAModule2" ], } },
Maybe the syntax of the name refresh token is not correct? Could you add another access token? Do you want to change only the lines in the configuration? Do you need any changes in the module itself?
https://forum.magicmirror.builders/topic/12315/mmm-netatmo-updated/42?page=5
refresh_token: 'ХХХХХХХХХХХХХХХХХХХХ88c8b52cf|0e864b8f9ХХХХХХХХХХХХХХ', access_token: 'ХХХХХХХХХХХХХХХХХХХХХХcf|d8d36de50b9c7ХХХХХХХХХХХХХХ',
Alas, adding an access token to the configuration did not help. The weather station does not show the data....
I deleted only my login and password. He left the keys. And added a refresh token. Right?
Did you update the module code from the auth branch?
No.... (( Can I completely download the module again in the zip file and expand the archive on top of the old module?)
Or tell me how to update your module from SSH?
I downloaded the archive, uploaded it to raspberries. And replaced all the files that were fresh. But there are no files in the archive helper.js helper.test.js module.js
Please use this archive https://github.com/CFenner/MMM-Netatmo/archive/refs/heads/auth.zip
Downloaded your archive from the link. Replaced only new files. After rebooting the raspberry, the MM program itself does not start. I see only a raspberry desktop. Then I wrote completely all the files from your archive on top of the installed module. The same thing, I see only the desktop, MM does not start....
Returned the old module completely from the copy, MM starts.
Ok, then I'm need to run the module myself. Sorry for the inconvenience.
Good. Then I am waiting for your decision. A separate archive with only modified files would be good. To avoid spoiling module settings.
And I would very much like, since you have taken up the module, to be able to display the pressure value in mm Hg.
I would very much like, since you have taken up the module, to be able to display the pressure value in mm Hg.
Let's fix this first and then I will have a look.
It actually works for me, I just missed to run npm clean-install --production --ignore-scripts as stated in the instructions.
Good. Then I am waiting for your decision. A separate archive with only modified files would be good. To avoid spoiling module settings.
And I would very much like, since you have taken up the module, to be able to display the pressure value in mm Hg.
As a temporary fix for Pressure in 'in Hg', you can update netatmo.js follows. For mmHg, look for the formula and replace the numbers:
case this.measurement.PRESSURE: return (value.toFixed(0)*0.02953).toFixed(2)// pressure conv to inHg.
-I have tried to merge both my original code and 'auth' branch and while the error goes away, nothing gets loaded on the screen. -I have tried to only copy node helper files to my original main code, and it fails with dependency errors.
- I tried to overwrite auth.zip on top of my netatmo original code, same issue as above. -I did a clean install of MM and only installed netatmo from latest main branch and its same error as above.
Not sure the code is correctly loaded/committed into git. I see differences in netatmo files between branches and also helper files. I am sure I'm missing something that you have a local copy of. Can you just zip your working copy of netatmo folder (under MM/modules) and provide me and I can see if that runs. If so, we can compare code base with git. I have the latest MM 2.4 and node/npm and all other modules are working if I remove this folder.
So changes are merged to main branch. You need to
- load the latest code via file (https://github.com/CFenner/MMM-Netatmo/archive/refs/heads/main.zip) or git clone
- run
npm ci --production --ignore-scriptsinside the module folder - remove username/password and add refresh_token to config
Good afternoon! Performed your actions. Deleted the module, wrote the contents of the archive to the module folder. Executed a command inside the module folder. MM starts (I have a previous version, not 2.4), but only the clock is loaded from the modules. All other modules in the "Download" state
Which version could that be?
Last before 2.4 If you tell me how to find out the version number, I will look more accurately. Unfortunately, I am not a strong specialist in raspberries. I can only repeat according to the written... ((
If I temporarily rename the netatmo folder, for example, to netatmo1 and restart the raspberry, then MM starts and all modules start.