Integrate Netatmo Weather Station into your Smart Home
Weather Station
Netatmo weather stations are popular because they have a great design, are easily accessible via app and web browser and are easy to expand. But trying to integrate them into the smart home, e.g. to integrate the sprinkler and lawn robot in case of rain or to close the blinds in case of wind, they quickly reach their limits. Although Netatmo offers an interface to third-party programs, this does not include popular smart homes.
MQTT
A popular standard for the smart homes is MQTT. MQTT Clients send data to a MQTT Broker, which provides them for other MQTT Clients. Often smart home systems support access to MQTT for visualization of data and to send commands to the devices.
Connection
send the Netatmo weather data to MQTT a connection is needed. For this purpose there is a project on GitHub mqtt-netatmo-bridge. I installed this as a Docker Image on my Synology NAS. The installation is shown in the pictures and the required values are described below.
ENV Variables
Variable | Example Value |
---|---|
MQTT_HOST | mqtt://192.168.1.21 |
MQTT_USER | (optional) |
MQTT_PASS | (optional) |
TOPIC_PREFIX | netatmo |
NETATMO_CLIENT_ID | www |
NETATMO_CLIENT_SECRET | xxx |
NETATMO_ACCESS_TOKEN | yyy |
NETATMO_REFRESH_TOKEN | zzz |
LOGGING_NAME | mqtt-netatmo-bridge |
Docker Updates
When Docker updates are released, you can't just update them
at the touch of a button. To avoid having to reinstall and especially reconfigure everything,
proceed as follows:
- Open Docker application on Synology
- Stop the container affected (Container ▸ Action ▸ Stop)
- Export settings (Container ▸ Settings ▸ Export)
- Update image (Registry ▸ Search mqtt-netatmo-bridge ▸ Download)
- Reset Settings (Container ▸ Action ▸ Reset)
- Import settings (Container ▸ Settings ▸ Import)
- Restart container
Netatmo Connect
Prerequisite for the external access to the weather station is a configured Netatmo Connect, by creating an app. This gives you get all needed values to access the MQTT connection.
Available Data
The by MQTT accessible data may be shown e.g. with MQTT Explorer.
MQTT Broker
This page describes how to use a Netatmo weather station via bridge as MQTT client. Required for this is a running MQTT broker. This is a server, that receives the data from MQTT clients and stores the status until it changes. Via the MQTT broker one can also send data to MQTT clients. Of course, this does not work with a weather station, as you (unfortunately) can't set the outside temperature. As MQTT broker for the Synology, Mosquitto is the obvious choice. This is available in the Synology Package Center and can be easily installed.