Temperature monitoring, and then importing to HA

Hoping someone can point me in the right direction

Having recently got myself a greenhouse, I want to monitor the temperature and humidity in there with a Pi device I have lying around
Im going to be creating a Pi device which will do this, and then log the temperature/humidity values. (Pi zeroW + BMP180 sensor)

The greenhouse sensor Pi will be connected wirelessly to the same network

My question is, how can I get this information into Home Assistant?
I want to import data basically… but what platform? how? I literally have no idea what to script in the yaml to get the sensor into HA, as a sensor with data

Thank you!

This should give you an idea as it is basically just what you want to do.

Excellent, must have missed that in my original search.

Basically, create mqtt client on each of the devices and get them reporting to my mqtt broker, which is already in HA
Then should appear as a ‘known_device’ I assume?
Sweet, I’ll have a play with it

Thanks for the link mate, appreciated :slight_smile:

You’re welcome. Have fun.

You will have to create a mqtt sensor in your configuration.yaml file, which will cause HA to subscribe to that topic and receive updates from the broker.

There is MQTT discovery that is supposed to set things up automatically, but I haven’t tried that yet.

As an alternative, you could create a sensor and update it with http post commands.

No, it will appear as whatever you have named it during configuration of the mqtt sensor in HA configuration- https://home-assistant.io/components/sensor.mqtt/

So if you set up one with name ‘temp’ and one with ‘humidity’ you will get sensor.temp and sensor.humidity

Ah, got ya.

Thanks chaps. will be giving this a go later :slight_smile: