Instead of using the default Netatmo integration in Home Assistant, I switch to using an MQTT bridge. I found a nice project and extended it so data entries now automatically get discovered via Home Assistant’s MQTT Auto Discovery.
In the new Home Assistant setup, I then started to add all current integration, like Netatmo. However, it seemed to be missing Netatmo data like wifi_status
, rf_status
etc and also the integration did not seem to be very stable. Complaining about webhooks etc.
Since I was already planning to get more integration via MQTT, so the latest data values can be retained there so HA does not have to contact the external service every time it (re)starts, I decided to do the same for the Netatmo integration..
I quickly found this great mqtt-netatmo-bridge project from Terafin (many thanks!) which I extended to:
wifi_status
(for the weather station) and rf_status
(for weather modules).Now, when enabling the HOME_ASSISTANT_AUTO_DISCOVERY
feature, the bridge will publish configuration settings to a homeassistant/netatmo/...
topic which get automatically picked up by Home Assistant MQTT Discovery.
All data entries are grouped by Netatmo Module which is represented in HA as a device.
Check out the sources on github.
A docker image diversit/mqtt-netatmo-bridge is also available to quickly get started.
I use this setup in docker-compose:
mqtt-netatmo-bridge:
image: diversit/mqtt-netatmo-bridge:latest
environment:
- NETATMO_USER=<netatmo-account-user>
- NETATMO_PASS=<netatmo-account-password>
- NETATMO_CLIENT_ID=<netatmo-app-id>
- NETATMO_CLIENT_SECRET=<netatmo-app-secret>
- TOPIC_PREFIX=/netatmo
- POLL_INTERVAL_SECONDS=300
- RETAIN_VALUES=true
- HOMEASSISTANT_AUTO_DISCOVERY=true
- MQTT_HOST=mqtt://mqtt
- MQTT_USER=<mqtt-user>
- MQTT_PASS=<mqtt-pass>
- MQTT_NAME=netatmo-bridge
- MQTT_STATUS_TOPIC_PREFIX=/status/
- LOG_LEVEL=info
- LOGGING_NAME=mqtt-netatmo-bridge
- TZ=Europe/Amsterdam
Note: