This node.js app consumes the Netatmo API and gathers data for weather devices and publishes them to a MQTT broker.
I'm consuming the netatmo API using the new OAuth 2.0 flow. Therfore you need to create an app with client_id and client_secret. Once this is setup you need to create an access_token with refresh_token with "read_station" scope. When the app is running the refresh_token will be refreshed automatically in order to be able to gather the api data as log as the app runs.
Create a token.json file an make sure to pass it correctly as volume of your choice e.g.:
volumes:
- ./token.json:/usr/src/app/token.json
The file should have this content:
{
"access_token": "<ACCESS TOKEN FROM NETATMO>",
"refresh_token": "<REFRESH TOKEN FROM NETATMO>"
}
Make the file writable for the container:
chmod 666 token.json
You can run the bridge using docker. See docker-compose.yml