Jump to content

mqtt setup


matapan

Recommended Posts

Posted

There seems to be a lot of things which use mqtt as a means of communication with HA. I took the plunge and installed Mosquitto yesterday. There are basic questions I hope someone on this forum can answer:

1. How does one administer user accounts with the Mosquitto server? Presumably each device communicating with mqtt has to have their own account.

2. Does the Mosquitto server utilize multiple ports? 

Thanks!

Posted (edited)
9 hours ago, matapan said:

1. How does one administer user accounts with the Mosquitto server? Presumably each device communicating with mqtt has to have their own account.

2. Does the Mosquitto server utilize multiple ports? 

1. How did you install it? With the add-on or as a separate install?

For the add-on, you can use Home Assistant user credentials or add a list of logins in the addon config. I just use one or two dedicated mqtt users with a long alphanumeric password for my CLIENTS. MQTT has a client_ID field separate from the username and password that you can set for each client.

2. See below. 95% of the time on a local network you'll only need 1883.

2033293568_Screenshot_20230121_031110_HomeAssistant.thumb.jpg.7c3ef290f9eec187567898c5aba50303.jpg

Edited by shbatm
Posted
On 1/21/2023 at 1:13 AM, shbatm said:

1. How did you install it? With the add-on or as a separate install?

For the add-on, you can use Home Assistant user credentials or add a list of logins in the addon config. I just use one or two dedicated mqtt users with a long alphanumeric password for my CLIENTS. MQTT has a client_ID field separate from the username and password that you can set for each client.

2. See below. 95% of the time on a local network you'll only need 1883.

2033293568_Screenshot_20230121_031110_HomeAssistant.thumb.jpg.7c3ef290f9eec187567898c5aba50303.jpg

Thanks for the reply!

I installed the add-on. How does one smoke test the install? I don't think the add-on broker runs as an executable since I wasn't able any file with the name "mosquitto.*".

I'm also using OwnTracks. Is it best to for the phone device to publish the result logging in with the user account or with the MQTT account created during setup?

Posted
On 1/23/2023 at 5:45 PM, shbatm said:

I don't think the login matters mutch

I test with MQTT-Explorer for Windows

Thank you for the reference to MQTT Explorer. This was most helpful in determining if the setup was actually functioning properly.

 

Guest
This topic is now closed to further replies.

×
×
  • Create New...