MMM-Netatmo icon indicating copy to clipboard operation
MMM-Netatmo copied to clipboard

Authenticate problem

Open thierry7100 opened this issue 1 year ago • 2 comments

Hi,

I have installed the current version of your module to cope with the new Netatmo access policy. The old module was still working but was unable to run after a restart. The new module was unable to load data. I got the following message from the log file

[15.07.2024 10:11.46.661] [LOG] Netatmo: using refresh_token from config [15.07.2024 10:11.46.661] [ERROR] Netatmo: refresh_token not set in config.

And after looking at the code, I think that the authenticate function in Helper.js is never called ! In the start function in netatmo.js there are the following lines // best way is using initialize at start and if auth OK --> fetch data this.sendSocketNotification('INIT', this.config)

But there are no INIT Notification entry in helper.js switch (notification) { case this.notifications.AUTH: this.authenticate(payload) break case this.notifications.DATA: this.loadData(payload) break }

There is a AUTH entry, but the corresponding line is commented out in netatmo.js ?

I am not skilled enough to correct this, so please help me.

I am using magic mirror on Ubuntu 22.04 but I don't think this is an issue. As said before, the old version was running quite well.

Best regards

thierry7100 avatar Jul 15 '24 08:07 thierry7100

I had to generate a new refresh token at Netatmo after the upgrade, after which the current version worked perfectly

Lusbueb69 avatar Jul 15 '24 11:07 Lusbueb69

I had this issue two comming from the old version. I had to change the name refreshtoken to refresh_token in the config.js. May be this keyword did change.

aop-ch avatar Aug 09 '24 06:08 aop-ch