Hi,
I created a Node.js app that I use to toggle the monitoring of my Presence cameras. I implemented the auth-flow and everything works fine (authorizing, retrieving tokens, using refresh token). To be more failsafe, I store my access and refresh token and the expire time in the file system so they are persisted even if I restart my service and I do not need to authorize again using the browser.
But this does not seem to work. When restarting the app and using the stored tokens (generated like a minute earlier) I am able to retrieve /homesdata and it displays my cameras correctly. However, if I want to use /setstate to toggle the monitoring I receive "{ code: 21, message: 'Invalid device_id, 70:ee:50:XX:XX:XX' }" - the ID that should be correct and that is correctly listed in /homesdata. When I use the browser to authorize again it works. But from my understanding the existing and still valid token should work even if the app has been restarted.
Any help appreciated as having to manually authorize again when I do code changes and thus need to restart the app is quite annoying and a potential error source during productive usage.
Refresh token not working properly
The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Jump to
- Forum Terms of Use
- Weather
- ↳ Smart Home Weather Station and its accessories (ENGLISH)
- ↳ General questions
- ↳ Setting up my Weather Station
- ↳ My Weather Station data
- ↳ Weather Station iOS Application
- ↳ Weather Station Android Application
- ↳ Weather Station Web Application
- ↳ Feature requests
- ↳ Station Météo Intelligente et ses accessoires (FRANCAIS)
- ↳ Questions générales
- ↳ Mes données météo
- ↳ Les applications iOS/Android/Web de la Station Météo
- ↳ Requêtes d'amélioration
- Security
- ↳ Security Cameras and accessories (ENGLISH)
- ↳ Smart Indoor Camera (Welcome)
- ↳ General questions
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Feature requests
- ↳ Smart Door and Window Sensors
- ↳ General questions
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Feature requests
- ↳ Smart Indoor Siren
- ↳ General Questions
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Feature requests
- ↳ Smart Smoke Alarm
- ↳ General questions
- ↳ Smart Outdoor Cameras (Presence) with or without Siren
- ↳ General questions
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Feature requests
- ↳ Smart Video Doorbell
- ↳ General questions
- ↳ Applications
- ↳ Feature request
- ↳ Electrical Wiring
- ↳ Caméras et accessoires de Sécurité (FRANCAIS)
- ↳ Caméra Intérieure Intelligente (Welcome)
- ↳ Questions générales
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Suggestions, idées d'améliorations
- ↳ Détecteurs d'Ouverture Intelligents pour Portes et Fenêtres
- ↳ Questions générales
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Suggestions, idées d'améliorations
- ↳ Sirène Intérieure Intelligente
- ↳ Questions générales
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Suggestions, idées d'améliorations
- ↳ Détecteur de Fumée Intelligent
- ↳ Questions générales
- ↳ Caméras Extérieures Intelligentes (Presence) avec ou sans Sirène
- ↳ Questions générales
- ↳ Applications
- ↳ Android
- ↳ iOS
- ↳ Web App (my.netatmo.com)
- ↳ Suggestions, idées d'améliorations
- ↳ Sonnette Vidéo Intelligente
- ↳ Questions générales
- ↳ Applications
- ↳ Suggestions, idées d'améliorations
- ↳ Installation électrique
- Energy
- ↳ Smart Thermostats and Smart Radiator Valves (ENGLISH)
- ↳ Smart Thermostat
- ↳ General questions
- ↳ Attaching the Thermostat to the boiler
- ↳ Thermostat Network Set-up
- ↳ Thermostat iOS/Android/Web Application
- ↳ Smart Modulating Thermostat (OpenTherm)
- ↳ General Questions
- ↳ Attaching the Thermostat to the boiler
- ↳ Thermostat Network Set-up
- ↳ Home+Control iOS/Android Application
- ↳ Smart Radiator Valves
- ↳ General questions
- ↳ Thermostats Intelligents et Têtes Thermostatiques Intelligentes (FRANCAIS)
- ↳ Thermostat Intelligent
- ↳ Questions générales
- ↳ Raccordement du Thermostat à la chaudière
- ↳ Mise en réseau du Thermostat
- ↳ Les applications iOS/Android/Web du Thermostat
- ↳ Thermostat Modulant Intelligent (OpenTherm)
- ↳ Questions générales
- ↳ Raccordement du Thermostat Modulant à la chaudière
- ↳ Mise en réseau du Thermostat Modulant
- ↳ L'application Home+Control iOS/Android du Thermostat Modulant
- ↳ Têtes Thermostatiques Intelligentes
- ↳ Questions générales
- Air Care
- ↳ Smart Indoor Air Quality Monitor (ENGLISH)
- ↳ Frequently Asked Questions
- ↳ Capteur de Qualité de l'Air Intérieur Intelligent (FRANCAIS)
- ↳ Questions Fréquentes
- Automation and more...
- ↳ Automation and external services (ENGLISH)
- ↳ "With Netatmo" products
- ↳ Voice assistants
- ↳ IFTTT
- ↳ Home automation
- ↳ Domotique et services externes (FRANCAIS)
- ↳ Produits "with Netatmo"
- ↳ Assistants vocaux
- ↳ IFTTT
- ↳ Domotique
- Netatmo Developers Forums
- ↳ Netatmo API
- ↳ Translations & Localization