xperimental / netatmo-exporter

Prometheus exporter for Netatmo sensor data.
MIT License
45 stars 18 forks source link

Export Battery life, Wifi and RF signal strength #4

Closed herver closed 6 years ago

herver commented 6 years ago

This data is already downloaded by the API call and available in the Device struct.

The following metrics have been added to the exporter

# HELP netatmo_sensor_battery_percent Battery remaining life (10: low)
# TYPE netatmo_sensor_battery_percent gauge
netatmo_sensor_battery_percent{module="Balcony",station="Home"} 100
netatmo_sensor_battery_percent{module="Bedroom",station="Home"} 100
[...]
# HELP netatmo_sensor_wifi_signal_strength Wifi signal strength (86: bad, 71: avg, 56: good)
# TYPE netatmo_sensor_wifi_signal_strength gauge
netatmo_sensor_wifi_signal_strength_percent{module="Living",station="Home"} 56
[...]
# HELP netatmo_sensor_rf_signal_strength RF signal strength (90: lowest, 60: highest)
# TYPE netatmo_sensor_rf_signal_strength gauge
netatmo_sensor_rf_signal_strength_percent{module="Balcony",station="Home"} 65
netatmo_sensor_rf_signal_strength_percent{module="Bedroom",station="Home"} 81

More informations about the returned values: https://dev.netatmo.com/resources/technical/reference/weather/getstationsdata

xperimental commented 6 years ago

Thanks for the contribution. Funny, I did almost the same myself yesterday (only battery and RF), but did not push yet. I will use your version then 😃

I'll probably try it out in the evening.

herver commented 6 years ago

All good !

I have it running at home for some days already and it works just fine:

image

herver commented 6 years ago

Hi,

I've amended the commit with correct user information, as far as I can tell everything is good from my side !

Thanks :