Just had a thought… after you reinstalled HA did you restart the ESP devices?
yes, only then I start to see the data… and I see the data all the time on my monitor.
YES!.. and yes I did restart the esp node so many times today, because I had to change configurations all the time, plus whenever I restart the broker the esp reacts, so it reconnects again.
You have yet to tell us what Arduino board you’re using. The first line of your sketch tells me that it might be the NodeMCU board. What is it?
oh sorry, it’s a wemos d1 mini clone.
Personally, I would be running Tasmota on the Wemos. I used to write all my own code for my IOT devices, and that was a lot of work to keep them current. Tasmota just works and devices running Tasmota interface with Home Assistant easily. I have a couple of Wemos boards on my desk, but I haven’t done anything with them yet. But here’s a discussion of flashing Tasmota on the Wemos:
(https://github.com/arendst/Sonoff-Tasmota/wiki/Wemos-D1-Mini)
So, to your current situation. Let’s synchronize.
- You see temps on the Wemos terminal?
- You see the temps on MQTT.FX when you subscribe to #?
- You see your test publishes from MQTT.FX on Home Assistant as described by cyn, above?
1 and 3 are correct.
2 isn’t. and I can’t figure why…
And this hasn’t changed?
haven’t put that… didn’t know I need to…
I’ll put it now and check.
MQTT defaults to QOS 0, but I just copied your sensors.yaml post from above.
Just to be sure, post your whole sansors.yaml file. And follow the posting instructions at the top of the thread to keep the formatting correct.
- platform: yr
- platform: mqtt
state_topic: ‘sensor/fats_temperature_small’
name: ‘CFStorage’
qos: 0
unit_of_measurement: “°C” - platform: mqtt
state_topic: ‘sensor/fats_temperature_big’
name: ‘FFStorage’
qos: 0
unit_of_measurement: “°C”
and it still doesn’t work.
it’s like something in the sketch isn’t working right… the publish or the payload or something… no?
I concur I also use to write all my own ESP code in LUA then I found ESPEASY… I couldn’t believe it was so much easier.
Yes I agree it’s a problem in the ESP sketch. Do you have a log that we can see?
a log of what? the serial monitor?
it just spit out more temperatures…
nothing else.
Your formatting Is still not right. I don’t know if it’s just the website- but your quotes look wrong. Home Assistant should complain when you do a “Check Config” if your quotes are what I am seeing.
So, it looks like the Wemos is not publishing. You are seeing the print lines for Temperature and Temperature , so the code is running.
Try commenting out your two publish lines and insert this:
client.publish("sensor/fats_temperature_big", "88");
Recompile and run the sketch. You should see the dummy data in MQTT.FX if you subscribed to #
When using the code block outlined below to post your code, it works best if there is a blank line before and after the code.
I have not tried EspEasy because Tasmota does almost everything I would want from an MQTT node.
damn. ok I can’t upload the new sketch cause I’m remote controlling the pc the esp is connected to. and the place is close now.
I can try tomorrow morning…
Don’t you get a log showing all those serial.print commands? Like connecting, trying again in 5 seconds…etc?
yeah I only get the temperatures. every minute…
Like I said, this means the loop is running and the temperatures are being read. Let’s focus on the client.publish next.
ok I’ll do my best to get to that tomorrow, but if I manage to recompile and I do see the messages, what does that mean?
I’m trying to think. maybe the call for the publish isn’t following the mosquitto mqtt?
is there any difference between the mosquitto and the old hassbian internal mqtt broker?
cause that’s what I used to have, the internal one… so maybe the call isn’t right?