Mqtt server help

Trying to add my MQTT broker to a bluetooth tracker thingy for ESPHome

my code looks like this:
broker: 192.168.xx.xx:1883
username: “mqtt-user”
password: “asdasdasdasdasdasdas”

But i keep getting the error
[mqtt:204]
Couldn’t resolve IP address for ‘192.168.xx.xx:1883’!

How can i fix this? What am i doing wrong? The IP address i’m using is the IP address of my raspberrypi on my internal network

Try the IP Address without the port. If I remember correctly, I tried your way first also and it didn’t work either.

EDIT: I am not sure what you would do if your MQTT Broker used a different port.

2 Likes

Hi,
Agree about just add the IPv4 without the IP port.

Use a MQTT tool like https://mqtt-explorer.com/ to check what IPv4 and credentials connect to Mosquitto. Notice the IPv4 is separate from the port:
image

#include <usual advice>
Here’s a wakthrough with a direct link to the HASS MQTT settings to define a local user:

Any more insight will need logs…

If this helps, :heart: this post!

1 Like

thanks guys, is my syntax correct?

it wasnt, it is now.

its working! thanks

For anyone who reads this I needed the IP address on its own, without the port but in inverted commas.

I used the tool to check the ip address so both posts were incredibly helpful.