You thought about it, do IT !

MQTT – Collect your own sensor data on Home Assistant

MQTT – Collect your own sensor data on Home Assistant

To collect your sensor data on home assistant you must have a MQTT broker on it. If it’s not the case, add MQTT integration and configure the MQTT username and password.

Configure your sensor with your broker ip, username and password in its parameters.

Now launch Home Assistant –> Parameters –> Integrations –> MQTT –> Configure

Choose listen to a subject and type your sensor subject (For example TEST/Your_Sensor). Start listening and see if it works.

If it’s ok you just have to declare mqtt sensors in global configuration (/homeassistant/configuration.yaml) :

  - sensor:
      name: "Your_Sensor"
      state_topic: "Test/Your_Sensor"
      icon: "mdi:Your_Icon"
      unit_of_measurement: "Your_Sensor_unit_of_measurement"

Apply settings in home assistant. You can now make an automation based on your sensor data. Avatar

[wpedon id=198]

Leave a Reply

Your email address will not be published. Required fields are marked *

Aurélien Bordinat

I am a french computer engineer, adept of DIY, home automation and new technologies. When i’m not busy trail running, i spend some time prototyping.