matapan Posted January 20, 2023 Share Posted January 20, 2023 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! Link to comment
shbatm Posted January 21, 2023 Share Posted January 21, 2023 (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. Edited January 21, 2023 by shbatm Link to comment
matapan Posted January 24, 2023 Author Share Posted January 24, 2023 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. 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? Link to comment
shbatm Posted January 24, 2023 Share Posted January 24, 2023 I don't think the login matters mutch I test with MQTT-Explorer for Windows Link to comment
matapan Posted January 31, 2023 Author Share Posted January 31, 2023 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. Link to comment
Recommended Posts