mpleeds wrote:Any suggestions as to:
1. Where to look for the Mosquitto configuration file?
2. How to change the "listener" port/address?
3. The command for restarting Mosquitto?
Is all of the above done through terminal? I don't have any prior experience in this area, but not afraid to open the hood and get my hands dirty.
Many thanks!
1. The default location for that config file should be /usr/local/etc/mosquitto/mosquitto.conf - In the Menu bar of a Finder window, you can select "Go" and the "Go to folder" and enter "/usr/local/etc/mosquitto" and hopefully that takes you to a directory with Mosquitto.conf located there. You can open that file with TextEdit. You might need to right-click and select "Show original" on the config file. In Text Edit, you want to make sure you are in plain-text mode. After opening the file the file should look like a mono-spaced font similar to the font your terminal uses. If it doesn't, then go to Format > Make Plain Text. If there is an option for Make Rich Text, then you are already in plain text mode and should be good to make changes.
2. In the "Extra listeners" section about 40% of the way into the file, there is a line that starts with the word "listeners". It probably starts with a '#', so remove the '#' such that the word "listeners" is at the very start of its own line. You can add a space then "1883" and then another space and then "0.0.0.0". That single line should go from
- Code: Select all
#listener
to
- Code: Select all
listener 1883 0.0.0.0
In the section "Security" section about 70% of the way through, there is a line that might look like:
- Code: Select all
#allow_anonymous true/false
and I think it should be set as:
- Code: Select all
allow_anonymous true
3. If you installed Mosquitto through Brew (the common way), then I'm guessing you probably ran a command that looked like "brew services start mosquitto". You can try running "brew services stop mosquitto", make the config changes, and then run "brew services start mosquitto"