Cannot ping HA on Rpi, cannot connect to MQTT broker

I have home assistant working and configured on a raspberry pi hardwired to my router. I can login to the web gui using http://homeassistant.local:8123 from my laptop via wifi. Home assistant is linked to my Homekit controller, and most things work well. However, I just tried setting up MQTT using this guide from David McKone Home Assistant MQTT Broker Install - YouTube , and some MQTT plugs (athom / Tasmota), and cannot for the life of me get the plugs to function or talk to the MQTT broker. I have home assistant set to a static IP, 192.168.0.2, and ipv6 is disabled. I’ve set up the MQTT broker and tested it using the publish/listen window the HA add-on, but cannot connect to it using the Tasmota plugs or MQTT explorer.

While debugging, I tried pinging homeassistant.local and 192.168.0.2 from my laptop, and I only get icmp_seq timeouts, which is super weird to me (since I can login via the web gui - but only at homeassistant.local, NOT at 192.168.0.2). From the tasmota console, I get 21:10:35.404 MQT: Connect failed to homeassistant.local:1883, rc -5. Retry in 30 sec . After spending my entire morning banging my head against this problem, I have made no progress.

It seems like I should be able to ping my HA server, right? So maybe that’s the root of the problem?

What is the exact output of

ping homeassistant.local

jim@Jims-Macbook ~ % ping homeassistant.local
PING homeassistant.local (192.168.0.2): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4

With a monitor plugged in, what is the ip address shown?

Unless mistaken, mDNS (the “.local” adresses) is disabled from tasmota by default.
Try with the actual IP (192.168.0.2, assuming your mosquitto is an HA addon) in tasmota.

That being said, the fact that you cannot ping 192.168.0.2 from your laptop is strange. What IP does it have? Maybe some wifi gateway snafu happening…

The ip address matches, 192.168.0.2. I also changed it to *.10 just to ensure there was no IP collision and to see if it changed in traceroute - it changes.

Tasmota gives me an rc -5 error if I use the mDNS IP, but a -2 error if I use the IP address. I’ve double and triple checked the passwords - will quadruple check right now.

I agree that this is super weird. I can trace route and nmap, just not ping.

But doesn’t the ex -5 error indicate a login issue?

I just tested Tasmota with the wrong password and error 5 is login failure. But your error is -5 , so maybe a different error code.
Does the logs tell you the tasmota ip or the mqtt ip?

00:00:03.010 HTP: Web server active on tasmota-A73685-5765 with IP address 192.168.1.132
20:53:42.012 MQT: Attempting connection...
20:53:42.037 MQT: Connect failed to 192.168.1.182:1883, rc 5. Retry in 10 sec

Someone has a similar problem, they upgraded Tasmota to the latest version firmware.

The logs tell me the mqtt ip. I don’t think this is a Tasmota issue, because I can’t connect with MQTT explorer either. But I can log in to HA just fine.

A post was split to a new topic: Problems with MQTT and Tasmota

Hey everyone! So, my ios devices also would not connect to my HAA at all… so on a whim I tried changing my HAA network settings back to DHCP and voila! Everything now works as it should. The issue seemed to be something with setting the static IP address - but I did that just like I’ve been setting static IP addresses manually for 20 years (DHCP range was 192.168.0.100 - 244, and I set the HAA to 192.168.0.10). Not sure what the problem was but now everything works. Thanks for the help!