I have installed Plantgateway on a Raspberry Pi Zero W to use with Mi Flora sensors.
I have configured the plantgw.yaml with mqtt config, this is how it’s configured:
mqtt:
#url of your mqtt server, madatory
server: x.x.x.x
#prefix of the topic where the sensor data will be published, mandatory
prefix: pgw01/plants
#terminate topic with a trailing slash, optional as defaults to True
#trailing_slash: False
#port of the mqtt server, optional if using 8883
port: 1883
#client_id to use with the mqtt server, optional as defaults to unique numeric identifier
client_id: homeassistant
#credentials for the mqtt server, optional if you do not use authentication
user: xxxx
password: yyyy
#format for timestamp string using strftime(), optional as defaults to ISO8601 format
timestamp_format: "%y-/%m-%d %H:%M:%S"
and this is how the MQTT config I configuration.yaml looks like:
But I can’t get anything in my HA, I wonder do I need to do some more configuration for the device to receive mqtt correctly or will it auto discover without needing to do anything more than the config I did above?
Hi, I got it working. Here are the steps to reproduce it:
You don’t need the component Plant Monitor. That is totally optional to change the look of your sensor in the UI.
1.You need a MQTT Server (Broker). I installed one in Docker from toke/mosquitto because the Home Assistant Broker did not work for me.
2.After that configure Home Assistant to connect to your broker:
mqtt:
broker: your-mqtt-broker-ip
3.Configure a Home Assistant sensor for each value of your MiFlora sensor
sensor:
The sensor values should show up on your Home Assistant Home tab.
You can use a mqtt client on your computer and connect to your broker to check if new messages are correctly published.
When everything works, you should secure your mqtt broker.
Now you can group your sensors in Home Assistant or use the Plant Monitor Component.
Example for grouping without Plant Monitor Component:
Hi Did you need to write a cron job to start plantgateway? And if you did, where in hassio? I think that’s what i’m missing as my sensor goes offline after an hour or so