kpetremann / mqtt-exporter

Simple generic MQTT Prometheus exporter for IoT working out of the box
https://hub.docker.com/r/kpetrem/mqtt-exporter
MIT License
103 stars 29 forks source link

HomeAssistant #61

Closed michalzxc closed 10 months ago

michalzxc commented 10 months ago

Hi, (Me again 😄 )

HomeAssistant can export all sensors to MQTT by using below (home assistant) configuration:

mqtt_statestream:
  base_topic: homeassistant
  publish_attributes: true
  publish_timestamps: true

The result seems quite universal: image

image

It lives under: homeassistant/sensor/NAME, for example homeassistant/sensor/fridge_plug_voltage

image

kpetremann commented 10 months ago

hello @michalzxc :)

Home Assistant have its own Prometheus Exporter via this plugin: https://www.home-assistant.io/integrations/prometheus/ Did you have a look? WDYT?

michalzxc commented 10 months ago

I will try! Thank you. I got used to push everything to MQTT I didn't think to look for a direct integration 😁

michalzxc commented 10 months ago

That worked 🎉 Set it according to this - https://josh-v.com/home-assistant-prometheus-exporting-setup/