It doesn’t matter which MQTT broker you use as long as all devices on your net use the same one.
Besides, you already demonstrated that your broker is working:
I am really suspecting your client.publish.
Try adding this to your loop after the test client.publish I described before:
Ok so I managed to update the sketch but it still work, I see nothing coming on the bus, and of course I don’t see it on the HASS page.
The interesting thing is that I’ve put the serial print after the publish and I can see the print on the monitor. so it passed the publish line with no visible problem.
what should I do now?
I even restarted the broker and I saw that the node disconnected and after a minute it connected again.
I won’t be able to upload any sketches until after the weekend since I won’t be near the esp.
they are the same one, both the broker and the hassio sit on the same raspberry pi.
and for now since it’s the only one yeah this is the ID I gave it, I’ll change it once everything will work again.
I have few more changes I need to do in the code there but I wanted to make it to work again before finalizing the sketch.
at the start when the esp boots up yeah.
when I restart the broker I can see it as well.
I agree that knowing what he is using for the broker IP is important to diagnose, but the OP verified “yes” earlier to this question and he also said he was seeing test data in Home Assistant that was published from an MQTT tool. So I am not worried that his MQTT broker is connecting and working.
OP- your local IP addresses are meaningless to a hacker; there’s no reason to hide them. (If a hacker got this far past your router, NAT and firewall, your entire local network is already compromised.) The only reason that passwords should remain secret is because people tend to use the same password or a variant of it- making it easier to hack other parts of your system.
Thanks for jumping in to help. This is a real head-scratcher.
Earlier, I had him do this:
So this verified that Client.publish() is connecting to the broker and working in the sketch. I then asked to show what was being given to client.publish():
And this is the result:
Which is what I would expect (the println has no delimiter between the parameters- no problem)
One more test,
please verify that when you send discrete data like this, you do see it in Home Assistant? client.publish("sensor/fats_temperature_big", "99");
Let’s break down the client.publish line. client.publish("sensor/fats_temperature_big", String(temp1).c_str());
Compile and test this as before.
Then change it around: client.publish(temperature_topic_big, "99");
What this does is test each parameter separately.
If this also works, then I am really puzzled.
Is there a reason that you can’t just flash Tasmota and stop worrying how the gears inside the machine work?
to:
const char *temperature_topic_big = “sensor/fats_temperature_big”;
But, shouldn’t he be getting compile errors (like I was in that year old post) from the former if this were his problem?
(BTW- Because I am not a seasoned C programmer is precisely the reason that I switched my ESP-based nodes to Tasmota. Life with Home Assistant has been so much easier.)
no I haven’t.
I’m not so sure it’s the code anymore…
I uploaded a simple sketch from the examples and it looks like that doesn’t work either… so I looked over the broker side…
does anyone have something they can post on the setting on the hassio broker side? just to understand that I’m working on the right settings?