Any idea where MQTT settings on hass.io are?

I keep getting error starting NR on Home Assistant Operating System:

6 Dec 19:36:14 - [info] [mqtt-broker:Home Assistant] Connection failed to broker: mqtt://192.168.0.227:1883
6 Dec 19:36:29 - [info] [mqtt-broker:Home Assistant] Connection failed to broker: mqtt://192.168.0.227:1883
Etc.
That is my IP. Have not changed port
Zigbee2MQTT and HA MQTT works, It is just NR. Thinking I need to find mqtt node settings file but can't find it

1 Like

Does home assistant "give you" an MQTT broker?

Did you install an MQTT broker?

Is your computers IP 192.168.0.227 (it might have changed if you are using DHCP)?

Are the HA containers typically allowed to access your local network?

NOTE:
As Home Assistant and Node-RED are containers (containers are typically isolated from each other and your OS), you might need to ask on the Home Assistant forum?

PS: I dont use HA nor do I typically use docker/containers as it just adds an annoying layer of pain.

1 Like

no, it is just mosquito. It does however give username/password for users of HA.
Mosquito logs are just it refusing NR:

2023-12-06 20:13:15: New connection from 192.168.0.227:40556 on port 1883.
error: received null username or password for unpwd check
2023-12-06 20:13:15: Client nodered_37c7982920a6df2a disconnected, not authorised.

On repeat I tried to instal tailscale (decentralised VPN, now gone) and it broke NR.

That suggests that you are not providing user/pwd.

yes, but Home Assistant provides them for logged in users and is doing so for zigbee2mqtt and itself etc. I can create one anyway but where in node red do I put mqtt user/password?

Press the pencil next to the broker config,

markup_17019019191238829939319549177058.jpg

Then select the security tab.

Node Red doesn't start so I can't get there. I need to edit a file to allow it to start.

Those server settings persist restarts. Must be a file somewhere.

"file": "/opt/node_modules/@node-red/nodes/core/network/10-mqtt.js"

I suspect that location is it, but that folder is empty.

Ok. It's becoming a little clearer (I think)

You need to start node-red in safe mode and search the flows (ctrl+f) for that IP then fix it up.

I have no idea how, from HA, you do that but I'm certain it is possible.

Edit: a quick Google search, tada: Node-red Safe mode start - Node-RED - Home Assistant Community

The error you showed will not stop node red from running. What does the node red log show?

The question is what does this mean:
“ Under Node-red configuration”
The config.nodes.json
The config.nodes..json
Or the settings.json
The setting file makes most sense but it doesn’t include the word he used: configuration…
Maybe I just try until it works.

This is a HA thing (the post that said that was on the HA forum) - so go check your HA settings or ask on the HA forum?

If I were to guess, somewhere in HA are "Node-RED configuration settings", my guess is there is a settings page for Node-RED.

Let me search for you:
Here - this looks promising: https://youtu.be/AhjXv8XziRQ?t=142

It did used to show lots of the error I posted above but I uninstalled node Red, renamed the remaining Node aired folder and then reinstalled it. Now I end at this line with no error:
“7 Dec 09:33:52 - [info] [server:Home Assistant] Connected to http://supervisor/core“
The log just stops there.

The node red log starts with "Welcome to node red". If you can't find that log then you need to google for how to find it on HA, or ask on an HA forum. If you can find that log then post it here.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.