From https://synocommunity.com add http://packages.synocommunity.com to your NAS package sources. | |
For that, go to NAS->Package Cnter->Click Settings->Package Sources tab. | |
Then from the community, you can see Mosquitto. Install it. | |
After installing, please stop the Mosquitto service before updating configuration. You can start service after changes. | |
Enable Admin login for Synology | |
Enable SSH in NAS | |
Download putty and connect to NAS Server | |
Login using admin | |
Change to root user [sudo -i, {use admin password}] | |
Find mosquitto.conf file [find / -name mosquitto.conf] | |
Go to that path using cd [in my case cd /volume1/@appstore/mosquitto/var] | |
Edit mosquitto.conf [vi mosquitto.conf] | |
Might say it's used by another process. Force edit. | |
Scroll down and find # allow_anonymous [around line 513] | |
Remove # and make [allow_anonymous false] [Use insert on keyboard to edit] | |
Scroll and find #password_file [around line 555] | |
Remove # and make password_file /volume1/@appstore/mosquitto/var/password_file [where 2nd password_file is the actual filename] | |
Save the file [Esc-> :wq to save] | |
Now create a file password_file in /volume1/@appstore/mosquitto/var/ | |
Ensure your are still in same directory, type vi password_file | |
This will create new file, press insert and type your username and password in below format | |
username:password [Username should not contain :]. You can add multiple users line by line | |
Save file and clseo [Esc->:wq] | |
Find mosquitto_passwd [find / -name mosquitto_passwd] | |
Stay in the mosquitto.conf folder itself. Because we have password_file file here. | |
From mosquitto.conf folder, type mosquitto_passwd [along with path] -U password_file to encrypt password. | |
In my case /volume1/@appstore/mosquitto/bin/mosquitto_passwd -U password_file | |
Start/restart Mosquitto Server | |
All done. Thank You. |
This comment has been minimized.
This comment has been minimized.
Hi do you know if this broker retains mqtt messages somewhere? The mosquitto base documentation points to a mosquitto.db file that would need to be deleted but this doesn't seem to exist on the synology package. |
This comment has been minimized.
This comment has been minimized.
It doesn't retain anything. Once the messages are delivered they are gone.
send from mobile...
On Sat, Aug 31, 2019 at 11:27 AM +0200, "ceraz68" <notifications@github.com> wrote:
Hi do you know if this broker retains mqtt messages somewhere? The mosquitto base documentation points to a mosquitto.db file that would need to be deleted but this doesn't seem to exist on the synology package.
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This comment has been minimized.
This comment has been minimized.
if the retain flag is set mqtt keeps the last message received, if there are subscribers to topic. see here mosquito.db is used only if you enabled persistence to preserve in-memory db state after restart |
This comment has been minimized.
This comment has been minimized.
thank you so much! |
This comment has been minimized.
This comment has been minimized.
hello. i have installed the eclipse-mosquitto image from within synology docker. image runs ok with no errors and i see the port in the details says 1883. however, when I went over to my NAS IP:1883, it does not show up the MQTT page. Any help? |
This comment has been minimized.
This comment has been minimized.
Hi, In general mosquitto 1.4.14-9 is working on my DS218+, but I couldn't find a way to enable the logging. I added in mosquitto.conf:
I tried it with different locations for log_dest, but the result in moquitto.log is always
I assume mosquitto has no write permissions but I don't know how to solve it. |
This comment has been minimized.
This comment has been minimized.
It worked perfectly :-) thank you for this very detailed & clear tutorial |
This comment has been minimized.
This comment has been minimized.
I'm a noob, never used putty before and managed to get to step 24... but now i'm stuck. I can't find the file and not sure what to do with te command on 26/27 |
This comment has been minimized.
This comment has been minimized.
thanks for the clear guide. |
This comment has been minimized.
This comment has been minimized.
thanks for the guide! |
This comment has been minimized.
This comment has been minimized.
Thanks! |
This comment has been minimized.
This comment has been minimized.
thanks |
This comment has been minimized.
This comment has been minimized.
Hi all,
Thank You I've published a code to Automate Home and Office here Smart HomeGet the source code here A web based complete source code for Home Automation including ESP8266 firmware.
|
This comment has been minimized.
This comment has been minimized.
This instruction was very helpful for me, thanks @ajumalp! |
This comment has been minimized.
This comment has been minimized.
Many thanks for these instructions. The find functionality didnt work for me but I didn't needit. More importantly I cound encrypt my password as I got errors that my password file was corrupt. The workaround I found was to let the mosquitto_paswd tool add the username and password (immediately encrypted) into the password file. This is the command: |
This comment has been minimized.
This comment has been minimized.
Thanks for the sharing @ajumalp ! |
This comment has been minimized.
Thank you,
very good description.