Trying to get an esp8266 MQTT message into ha. Running ha on a raspberrypi (raspian), using Mosquitto as my broker (on the raspberrypi). Also, mosquitto is set up with “allow_anonymous true.”
I’m pretty sure the ESP8266 side is working. When I run: mosquitto_sub -h 127.0.0.1 -v -t "sensor/#"
I get the output from my esp8266 project: sensor/humidity 56.67 sensor/temperature 19.72
The problem is I’m not reading any values for temperature. The Overview page has the icon for my Attic Temperature sensor but no data is coming in. Any thoughts?
You have to enter the ip address of the system mosquitto is running on in the broker section. In my case it is running on my rasberry pi so I enter it’s ip address.
Actually it will be. The IP address of the broker on my NUC is happy being configured like that.The broker on the same pi running home assistant means you can use localhost/127.0.0.1
You are not sending a payload continaing json, so the value_template is not necessary. Remove the value_template line and it should be fine.
That is assuming you are not getting any MQTT component could not be set up messages when you restart, which would indicate some error connecting to the broker, but it looks correct to me.