For others to save some time. After MQTT 2.0 they forced LOCAL only mode that means you can only use localhost as an IP address or it wont work. That means if you use sonoff with Tasmota with different IP addresses MQTT wont allow to join. As a quick workaround use MQTT 1.6.9 that works without issue for me.
I've pinned your comment! As I have switched to hassio add-on, my version is still older one. But this is really a big change - on one side greatly improving security, but unfortunately on the other side it brings a lot of trouble for current users.
@@BeardedTinker Yes it is a really great step towards security, but the config file on github should give us a hint how to add exactly the lines and where to let 192.168.0.* addresses join mqtt. :) Or by default allow "same network" devices for noobs like me. :) I was really confused first when every mqtt dives just became unavaiable in homeassistant. :D
Thank you for posting this ... Frustrated with breaking changes... This is not the first time Portainer auto-updates have brought me some "fun". Specifically I added the following lines to the mosquitto.conf file in order to get it to work again: "listener 1883 192.168.1.188" under the "Listener" conf part ... Where 192.168.1.188 is the IP of my Synology server. and "allow_anonymous true" under Security.
There are now only few remaining Dockers on the to-do list for Home Assistant on Synology: Zigbee2MQTT and ESPHome. After that I'll do testing of Hassio in Docker and Hassio in native Synology package. If I've missed some Dockers or applications you want to try and install in Docker, leave me a comment please and I'll look into it.
@@pjorourke0514 Well, yes I have, but I cheated :) I used package/spk for that and I did manage to get it up and running. I will be posting video about that soon, but installation was really straightforward. On the other hand - I'm not happy about how it handles USB ports. Installing third party drivers and kernel modules on Synology is potential vulnerability. Also What when Synology releases 7.0 version of DSM?
Hi, Thank you for your very helpful videos. I am just starting in my journey on Home Assistant and find your content very useful. I am currently trying to install MQTT on my Synology docker and have followed your steps (including the fix for version 2 in your subsequent video). My log file for MQTT shows that it is starting in local only mode. Thanks for all the great content!
Once again I referred back to your videos. This time to reinstall the docker MQTT, and implement the fix from your latest mqtt video, Yesterday. I strongly suppose membership of this Channel in order to support Bearded Tinker, and Secure that the videos keep coming.
I installed HA according to your videos, but I don't see same tabs under Developper Tools menu section. I see only STATES, SERVICES, TEMPLATES and EVENTS. I don't see LOGS, MQTT and INFO tabs. Probably it is because in your video you have old version and in my version 0.117.5 logs and server info have been moved under Configuration menu section. But MQTT tab I cannot find anywhere. What is inside that tab?
Yes, they have been moved to other locations. MQTT tab is now available in MQTT integrations page - when you press on configure. There you can subscribe to a topic or send a MQTT payload.
I get an error. I have dowloaded the config file by typing wget {link}. The file is downloaded, but in the portainer i get following error: ,2020-08-02T08:40:17.554493710Z 1596357617: Error found at /mosquitto/config/mosquitto.conf:6. ,2020-08-02T08:40:17.553898853Z 1596357617: Error: Unknown configuration variable "
@@BeardedTinker I think its the HTML file, now i should find a solution to get the file by another way, not by wget... And the file in de link github.com/eclipse/mosquitto/blob/master/mosquitto.conf only has # in front of each line, so it looks empty?
That's the one you can use. And everything is commented out since that way you can't just place it with going through the configuration and selecting what you need. That's one way to ensure security.
@@BeardedTinker how do i get the file? --> ok found it out by myself. For others: Copy the with desktop PC to a location. Then go to Synology NAS and upload the file to the correct location
New video on installing MQTT for Synology/Home Assistant will be out on Thursday. Although it has some negative sides, it should be much easier to install and configure then this version. There is now also Discord server where you can contact me discord.gg/HkxDRN6
Hi, I've followed your clear steps for installation (and fix). However, I keep on getting this error in the log: chown: /mosquitto/config/mosquitto.conf: Read-only file system chown: /mosquitto/config: Read-only file system chown: /mosquitto/config: Read-only file system I've noticed this is set in the terminal string you've provided, but I don't suppose this error should occur?
Hi Guido! This is error in MQTT log? Explanation is simple - container can't write to disk. The problem is usually permissions, and this is something that has been constantly changing since version 2.x. I would suggest to look here: shantanoo-desai.github.io/posts/technology/nugget_mosquitto_docker_persistence_without_sudo/ It will guide you once again how to check your user group and id (by using id command in terminal) and then, you'll need to make sure that this id is added to docker command: --user 100:100 (match with whatever you got.
@@BeardedTinker thanks for your reply. With my limited understanding of this, I've found another way (maybe less secure). I edited the container (in docker app) and unchecked the box read only for the config folder....issue solved.
Thanks for this tutorial. When I restarted HA, i got the following error in log "ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect to MQTT server due to exception: [Errno 111] Connection refused What would be the reason and solution?
Hi Tam! This is very old video. In the description of the video you will find FIX for MQTT issue if you used this to install previously, but I recommend that you follow this new video on installing itth-cam.com/video/ABb-63y0Em4/w-d-xo.html .
Please update in your description to say the following : sudo docker run --name="mqtt" --restart=always --net=host -tid -p 1883:1883 -p 9001:9001 -v /volume1/docker/mqtt/config:/mqtt/config:ro -v /volume1/docker/mqtt/log:/mqtt/log -v /volume1/docker/mqtt/data:/mqtt/data/ eclipse-mosquitto
Hi Percy! Thank you for your answer. Internal path should point to /mosquitto, not to /mqtt. You can check this yourself if you install mqtt and use portainer to connect with terminal to docker container. Running ls command will list you available folders, and this is what you should get: / # ls -la total 4 drwxr-xr-x 1 root root 186 Feb 5 06:34 . drwxr-xr-x 1 root root 186 Feb 5 06:34 .. -rwxr-xr-x 1 root root 0 Feb 5 06:34 .dockerenv drwxr-xr-x 1 root root 850 Jan 23 16:14 bin drwxr-xr-x 5 root root 360 Feb 5 06:35 dev -rwxrwxr-x 1 root root 29 Jan 23 17:23 docker-entrypoint.sh drwxr-xr-x 1 root root 622 Feb 5 06:34 etc drwxr-xr-x 1 root root 0 Jan 23 16:14 home drwxr-xr-x 1 root root 336 Jan 23 17:24 lib drwxr-xr-x 1 root root 28 Jan 23 16:14 media drwxr-xr-x 1 root root 0 Jan 23 16:14 mnt drwxr-xr-x 1 mosquitt mosquitt 26 Jan 23 17:24 mosquitto dr-xr-xr-x 239 root root 0 Feb 5 06:35 proc drwx------ 1 root root 24 Feb 5 06:42 root drwxr-xr-x 1 root root 0 Jan 23 16:14 run drwxr-xr-x 1 root root 792 Jan 23 16:14 sbin drwxr-xr-x 1 root root 0 Jan 23 16:14 srv dr-xr-xr-x 12 root root 0 Feb 1 18:48 sys drwxrwxrwt 1 root root 0 Jan 23 17:24 tmp drwxr-xr-x 1 root root 40 Jan 23 17:24 usr drwxr-xr-x 1 root root 78 Jan 23 16:14 var / # And inside mosquitto folder, you will have additional files and folders: /mosquitto # ls -la total 0 drwxr-xr-x 1 mosquitt mosquitt 26 Jan 23 17:24 . drwxr-xr-x 1 root root 186 Feb 5 06:34 .. drwxr-xr-x 1 1026 users 28 Feb 5 06:35 config drwxr-xr-x 1 1026 users 0 Feb 5 06:34 data drwxr-xr-x 1 1026 users 0 Feb 5 06:34 log /mosquitto #
Hello BeardedTinker, is there any chance to publish updated version of this video with working mqtt username/password configuration options? I'm aware of you video about community version, but it's very old/insecure/outdated version without possibilities of new mqtt security features.
HI Ivan! I'll try but it will take at least 2 weeks since I already have 2 videos ready to go before that. Getting username and password in MQTT can be a pain. That's why I decided to skip that part in original video, although I'm using it myself.
in your previous video (#002), there is no "check config" button in Server Control page, how do you enable this ? (as your HA is HA core and not hass.io)
Thank you for asking Tan. You have to click on the lower left part of the screen - circle with your initials - your name. It will take you to your profile. There is one option called "Advanced mode" - and this has to be enabled.
Dear BeardedTinker; there are some differences between what you type and what is on the description. When you do the folder mapping you should type mqtt/config, mqtt/log and mqtt/data instead of /mosquitto/config, /mosquitto/log and /mosquitto/data like in the video. Thank's for your hard work. You helped me a lot!
Thank you for your comment! There is difference between video and description. In description, I've update paths to match internal docker paths for eclipse-mosquitto docker image. This was pointed out to me by viewer (can't find post now) - but you can check it here: hub.docker.com/_/eclipse-mosquitto /mosquitto/config /mosquitto/data /mosquitto/log
Thanks for the tutorials. When I map the config folders in docker I keep getting the error "unable to open config file" and there are no files appearing in data and log. Tried serveral 'solutions' like sudo chown -R 100:101 /volume1/docker/mqtt to change permissions but cannot get it to work. Any thoughts?
When you created MQTT, was there any mapping error? Also, if you go to terminal and type sudo ls /volume1/docker/mqtt do you see anything there? Remember that you will not have mosquitto.conf file there (in /volume1/docker/mqtt/config) - you need to create it.
Can you check in Portainer at the bottom of MQTT info page, what your Volumes look like. It should be something like this: /volume1/docker/mqtt/config /mosquitto/config
@@mindracing Yes, you have to create one. You can tweak original one: github.com/eclipse/mosquitto/blob/master/mosquitto.conf Just download this one - and make changes where and if needed.
@@BeardedTinker Where does that file go when it is downloaded? Presumably inside of the folder running in docker but I can't seem to access that. Thanks in advance!
Can't help you on that one - I'm sorry. My developer knowledge on scale of 0-10 is -1 :) And java even less then that. I can allocate memory to Miinecraft from command line and this is it. But there should be a great deal of resources on the net in regard to java and MQTT.
hey, thanks for the tutorial. I have sent accidently some retained flagged messages which I want to delete now. So how can I use things like sudo systemctl stop mosquitto.service ? I want to delete unwanted retained mqtt messages like in this example: community.openhab.org/t/clearing-mqtt-retained-messages/58221 I don't know how to do that inside docker :(
Have you mapped mosquitto.db? Is it visible from your host in mapped folder? If yes, then you can delete it there. If not, I would suggest using Portainer to connect to docker container, and there you have ssh access to your container and can do it from there (same as in link you posted).
We need a new video which allows us to install MQTT using docker (This is one is not working anymore) I did manage to install and have it run, with lots of problems first. Also hoping to expose config and password for MQTT too. I hope you will create a new one soon. Again your video is still one of the easiest to follow...
Thank you for your comment King! I will try to make new one for MQTT Docker. It changed a lot from where I installed it at my setup and also from last video. I'll try to make video to include password protection too. Unfortunately, I'll not be recording new video for at least a week or two, except for few I had pre-recorded. We had an earthquake in midst of this "stay-at-home" problems and it' just tough to get free time with everyone at home.
Thanks for asking about config and password. Unfortunately I have experienced this also on one other configuration. There is a workaround. I will presume that you also installed Portainer since it will be much easier to add password and change config if you did. In Portainer, select MQTT container and go to console . There in dropdown select /BIN/ASH and connect. You are now inside container terminal. cd mosquitto to go into mosquitto folder and there you will have 3 subfolders - config logs and data. Go to config folder (cd config). If you want to add password you have to use command prompt command: mosquitto_passwd -c passwd_file $NAME YOU WANT TO ADD$ Don't forget to edit mosquitto.conf file and add at least following: password_file /mosquitto/config/passwd_file # Following line is optional and you can enable it if everything is ok with password # allow_anonymous false user $name you want to add$ vi is installed, so you can use vi to edit config file. And in regard to why are does files/folders hidden inside Synology, I'll have to check something and get back to you. It could be "privileged" mode of container that is missing, user rights,... Have to test it.
@@BeardedTinker Thanks, I won't add password and username, it is only working on local network, and changed some port just in case. New synology system, I have a tons of stuff left to setup, I might get back to it later. :)
@@Merwenus There is another option for MQTT on Synology, but I didn't go that way in my home setup - if you add community package repository, there is pre-built MQTT package there. Haven't installed it and played with it but it should be more "user friendly" in terms of setup. BUT it probably isn't up-to-date version. It should still work OK. Good luck with Synology, I really love it and use it a lot and I hope you'll have fun with it too 😀 If you will be adding username/password, AFAIK only way to do is from inside docker container and steps I've written above should help you with it. And in regard to empty folder, it is probably as I wrote privilege issue - that can be resolved with --privileged added in docker run command when you create container - but you should google this parameter as it solves issues but reduces security also.
@@BeardedTinker i am trying to add a password to my mosquitto but i always get: Error: Unable to open file /mosquitto/config/pwfile for writing. Read-only file system.
i new to home assistant and for some reason after following i don't see the same option under the server controls [Configuration Validation, Configuration reloading] , any thoughts?
+Ahmed Mohamed , you need to click on your profile (your name initials). In your account setting, you have to enable Advanced Mode, and those settings will be visible.
You didn't paste the error, but I presume that you are receiving bunch of errors with different names. Same thing is happening with me. And although I reverted to some older version, I kept receiving errors. Even with version that were working normally.
@@BeardedTinker Not sure what happened there (it's not posting): chown: /mosquitto/config/mosquitto.conf: Read-only file system chown: /mosquito/config: Read-only file system
@@CommittotheIndian I get the exact same error, waiting for my son to get home to start my backup server at his place in order to load yesterdays release.
First of all, thanks for the great tutorials. I was able to setup MQTT with home assistant and it works fine. However, the MQTT entities don't update their current state after home assistant restart, they always show up as off after restart.
Thank you for your comment! It really means a lot! What type of the device are you using with mqtt? Last 2-3 days I have strange behaviour with devices that are on mqtt. They worked great, but now they don't update their state anymore (for ex. light does turn off, but state in home assistant stays on). So, control is working and messages do work, but state change doesn't update.
@@BeardedTinker I have some sonoff switches that were displaying the wrong state after HASS restarts. I restarted both HASS and the MQTT containers and now it seems that they are displaying the correct states. not sure what the problem was though.
Restart is always good option. You can try and restart Synology NAS to see how it will perform and boot. There are possible issues with start order of containers. That's good test for your setup EDIT: Sorry I typed answer at wrong thread at first :D
I'm in the process of moving my hass.io on Pi4 installation over to my new DS1019+ and your videos are so useful. Thank you for taking the time. I have also been having problems with the persistence of logs/config/data so I went back to the mosquitto documentation in hub.docker.com/_/eclipse-mosquitto. It says that the three directories that have been created in the image are called /mosquitto/logs, /mosquitto/config and /mosquitto/data whereas you are mapping the external directories to /mqtt/logs, /mqtt/config and /mqtt/data. If you successfully use /mosquitto/config, you'll notice that the container won't start unless /volume1/docker/mqtt/config/mosquitto.conf already exists so it must be created first. They also provide some configuration that they recomment you include into mosquitto.conf. In addition, you need to give user and group ownership recursively of /volume1/docker/mqtt to 1883:1883, much like you had to with grafana and nodered. Hope this helps.
I think the mappings should be eg. "/volume1/docker/config:/mosquitto/config" ... instead of "/volume1/docker/config:/mqtt/config"... This goes for all the configurations.... I couldent get my manually defined configuration to be read by the docker image before i changed that.
Thanks for the comment Jess. If you check description of the video, you will see that this has been addressed already. There is also a note at the top of the description to warn about change.
@@BeardedTinker Bugger, I missed this is I followed you along in the instruction on the video. This took forever to debug. I also missed this comment which would have made my life easier. Either way, thanks for posting this video - very useful
Hello - So I have spent the last who knows how long trying to get this to work. I have installed and deleted and reinstalled a few times as well. When I try starting the mqtt container on my synology I get the following issues: It constantly restarts every 2 seconds or so. In Portainer I get the following errors (when it is running) - Error: Unknown configuration variable "{ tf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf610" AND Error found at /mosquitto/config/mosquitto.conf:1. To be honest I am not a confident programer and so I am not sure what to do in the mosquitto.conf file. I think that is my main issue. I can't figure out what to put in that file to make it work. I also can't figure out how to do the username and password stuff. I love your videos (they have helped me a lot with setting up HA), but I can't get this setup at all.
Slight update if I comment out my password file then it works. How do I create a password file? I have tried things found on the internet, but I can't seem to find the mosquitto_passwd program to build my password file. I created a password txt file, but I think I need to convert it using that program, but I can't find it in my synology NAS.
I know your pain... It took me few nights to get password for MQTT working. First, make sure you have Portainer installed. It will not just make everything easier but will reduce some very funky docker steps. When you have installed Portainer, select mqtt container, and one of the options you have there will be "console". This allows you to open terminal directly inside mosquitto container. For username, if I remember correctly, you need to type root. After you connect inside container, you can use following guide: You can setup the mosquitto.passwd using the docker container and/or an installation of mosquitto, so that you can use the mosquitto_passwd tool. mosquitto_passwd -c /mosquitto/config/mosquitto.passwd It will ask you twice for the password for the username. If you want to setup additional users, you should omit the -c parameter, so that the existing file won’t be overwritten.
@@BeardedTinker Thanks for the quick reply. When I go into Portainer and can choose the mqtt container. I can then choose "Exec Console" which takes me to a screen where I can enter a command and the user name (root). I entered your line of code (substituting with what I want) and hit enter. A terminal screen comes up and asks for a password. I enter it, and it asks for it again just like you said it would. Then the terminal area shows a response quickly and the screen reverts to previous screen. I don't have time to read it. But when I go to "Events" in Portainer it says that an "Unsupported event" occurred. And if I go into the docker container on my Synology there is no new file created. I have questions/comments: 1. I don't have a mosquitto/config folder in my mqtt folder in docker. Should I? I created the three folders (config, log and data) directly in the mqtt folder like you layed out in your video. Was I supposed to create a mosquitto folder inside the mqtt folder? 2. I tried changing mosquitto/config to mqtt/config but the same thing happens.
Addition - I think I am missing the step - "You can setup the mosquitto.passwd using the docker container and/or an installation of mosquitto, so that you can use the mosquitto_passwd tool." - How do I do that? I think that is the key here that I am missing.
@@michaelcanham2091 it is a bit hard to debug without seeing the screen, but I think everything is ok. If you reached part where you specified password, then you have that part covered (install mosquitto). There are two things you should check - one is configuration file, that you have correctly named file where password is stored. Or BTW, you can enable anonymous access, and you don't need password at all. Remember that there is a difference in folder structure between what you see in Synology and folder structure that is inside container itself.
@@walberg61 You can also try to ad following: birth_message: topic: 'hass/status' payload: 'online' will_message: topic: 'hass/status' payload: 'offline' Just below this line: discovery_prefix: homeassistant
@@BeardedTinker Hmm, looking in portainer for mqtt log: 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594548797: New connection from 192.168.1.10 on port 1883. 1594548797: Client disconnected due to protocol error. 1594549487: Saving in-memory database to mosquitto.db. 1594549487: Error saving in-memory database, unable to open mosquitto.db.new for writing. 1594549487: Error: Permission denied. 1594551288: Saving in-memory database to mosquitto.db. 1594551288: Error saving in-memory database, unable to open mosquitto.db.new for writing. 1594551288: Error: Permission denied.
Thanks for some very nice guides :) I have a device that require MQTT, I have now installed by following your guideline. How do I create a username and password in MQTT?
+Peter Svendsen - thanks for your comment. There are couple of ways, but most simple one is to login into mqtt container and run there command. I think I did it through Portainer container console, but can't remember what was the command in terminal to create user.
@@petersvendsen7667 you can check this link for two methods: www.steves-internet-guide.com/mqtt-username-password-example/ Unfortunately, mqtt doesn't map folder with configuration with Synology/outside of Docker, sou you have to use terminal for this. If I remember correctly I used second method.
Hey, I follow your videos with great interest, I find very complete with codes, very nice especially for people like me who write without knowledge of codes. I only have a problem with the 4th video, I tried to install it in both ways but I always get the same error 1580740301: Error: Unable to open config file /mosquitto/config/mosquitto.conf. I have no idea what to do now thanks
My guess is that it has to do something with user permissions. This video is bothering me a lot. I'll try to see what could be the issue and will get back to you on this error.
Hmm - just tried it at my new test setup and I followed steps from description: sudo docker run --name="mqtt" --restart=always --net=host -tid -p 1883:1883 -p 9001:9001 -v /volume1/docker/mqtt/config:/mosquitto/config:ro -v /volume1/docker/mqtt/log:/mosquitto/log -v /volume1/docker/mqtt/data:/mosquitto/data/ eclipse-mosquitto And after that, I've run this: sudo chown 1883:1883 /volume1/docker/mqtt -R Just be sure that you create all required folders before running above commands. /volume1/docker/mqtt/ /volume1/docker/mqtt/config /volume1/docker/mqtt/data And everything worked from the first time.
@@BeardedTinker Thank you for the explanation, I started working on it again and copied the code from the video (other than in the description) sudo docker run --name = "mqtt" --restart = always --net = host -p 1883: 1883 -p 9001: 9001 -v / volume1 / docker / mqtt / config: / mqtt / config: ro -v / volume1 / docker / mqtt / log: / mqtt / log -v / volume1 / docker / mqtt / data: / mqtt / data -tid eclipse-mosquitto and now it turns only its the sub. folders still empty, is that right?
@@peternooij2298 No, as per documentation, internal folders inside Docker need to be /mosquitto/ - /mqtt/ is not for this MQTT image, and that's why I have corrected it in description.
@@glennvolckaert7315 Sorry, don't understand - overview screen doesn't update? If you are connected inside your house, router/modem should make no difference.
For others to save some time. After MQTT 2.0 they forced LOCAL only mode that means you can only use localhost as an IP address or it wont work. That means if you use sonoff with Tasmota with different IP addresses MQTT wont allow to join. As a quick workaround use MQTT 1.6.9 that works without issue for me.
I've pinned your comment! As I have switched to hassio add-on, my version is still older one.
But this is really a big change - on one side greatly improving security, but unfortunately on the other side it brings a lot of trouble for current users.
@@BeardedTinker Yes it is a really great step towards security, but the config file on github should give us a hint how to add exactly the lines and where to let 192.168.0.* addresses join mqtt. :)
Or by default allow "same network" devices for noobs like me. :) I was really confused first when every mqtt dives just became unavaiable in homeassistant. :D
Thank you for posting this ... Frustrated with breaking changes... This is not the first time Portainer auto-updates have brought me some "fun".
Specifically I added the following lines to the mosquitto.conf file in order to get it to work again:
"listener 1883 192.168.1.188" under the "Listener" conf part ... Where 192.168.1.188 is the IP of my Synology server.
and
"allow_anonymous true" under Security.
There are now only few remaining Dockers on the to-do list for Home Assistant on Synology: Zigbee2MQTT and ESPHome. After that I'll do testing of Hassio in Docker and Hassio in native Synology package.
If I've missed some Dockers or applications you want to try and install in Docker, leave me a comment please and I'll look into it.
Were you able to get Hass,io running in docker on DSM. I have had not luck getting this to work.
@@pjorourke0514 Well, yes I have, but I cheated :) I used package/spk for that and I did manage to get it up and running. I will be posting video about that soon, but installation was really straightforward. On the other hand - I'm not happy about how it handles USB ports. Installing third party drivers and kernel modules on Synology is potential vulnerability. Also What when Synology releases 7.0 version of DSM?
Hi, Thank you for your very helpful videos. I am just starting in my journey on Home Assistant and find your content very useful.
I am currently trying to install MQTT on my Synology docker and have followed your steps (including the fix for version 2 in your subsequent video). My log file for MQTT shows that it is starting in local only mode. Thanks for all the great content!
Fix I posted should have fixed it. Currently not on the PC, but you can try searching for MQTT 2 binding to see how to bind it to IP address.
Once again I referred back to your videos. This time to reinstall the docker MQTT, and implement the fix from your latest mqtt video, Yesterday.
I strongly suppose membership of this Channel in order to support Bearded Tinker, and Secure that the videos keep coming.
Thank you very much Per!!!!
I installed HA according to your videos, but I don't see same tabs under Developper Tools menu section. I see only STATES, SERVICES, TEMPLATES and EVENTS. I don't see LOGS, MQTT and INFO tabs. Probably it is because in your video you have old version and in my version 0.117.5 logs and server info have been moved under Configuration menu section. But MQTT tab I cannot find anywhere. What is inside that tab?
Yes, they have been moved to other locations. MQTT tab is now available in MQTT integrations page - when you press on configure.
There you can subscribe to a topic or send a MQTT payload.
I get an error. I have dowloaded the config file by typing wget {link}. The file is downloaded, but in the portainer i get following error:
,2020-08-02T08:40:17.554493710Z 1596357617: Error found at /mosquitto/config/mosquitto.conf:6.
,2020-08-02T08:40:17.553898853Z 1596357617: Error: Unknown configuration variable "
+Andre Ploer it probably didn't download mosquito.conf but instead html document. try to open and look at the.conf file. (this is my guess)
Did you manage to check if downloaded file is html or configuration file.
@@BeardedTinker I think its the HTML file, now i should find a solution to get the file by another way, not by wget... And the file in de link github.com/eclipse/mosquitto/blob/master/mosquitto.conf only has # in front of each line, so it looks empty?
That's the one you can use. And everything is commented out since that way you can't just place it with going through the configuration and selecting what you need.
That's one way to ensure security.
@@BeardedTinker how do i get the file? --> ok found it out by myself. For others: Copy the with desktop PC to a location. Then go to Synology NAS and upload the file to the correct location
New video on installing MQTT for Synology/Home Assistant will be out on Thursday. Although it has some negative sides, it should be much easier to install and configure then this version.
There is now also Discord server where you can contact me discord.gg/HkxDRN6
Hi, I've followed your clear steps for installation (and fix). However, I keep on getting this error in the log:
chown: /mosquitto/config/mosquitto.conf: Read-only file system
chown: /mosquitto/config: Read-only file system
chown: /mosquitto/config: Read-only file system
I've noticed this is set in the terminal string you've provided, but I don't suppose this error should occur?
Hi Guido! This is error in MQTT log? Explanation is simple - container can't write to disk.
The problem is usually permissions, and this is something that has been constantly changing since version 2.x.
I would suggest to look here: shantanoo-desai.github.io/posts/technology/nugget_mosquitto_docker_persistence_without_sudo/
It will guide you once again how to check your user group and id (by using id command in terminal) and then, you'll need to make sure that this id is added to docker command: --user 100:100 (match with whatever you got.
@@BeardedTinker thanks for your reply. With my limited understanding of this, I've found another way (maybe less secure). I edited the container (in docker app) and unchecked the box read only for the config folder....issue solved.
@@guidovandenende9074 whatever works! It should be OK too.
Thanks for this tutorial.
When I restarted HA, i got the following error in log
"ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect to MQTT server due to exception: [Errno 111] Connection refused
What would be the reason and solution?
Hi Tam! This is very old video. In the description of the video you will find FIX for MQTT issue if you used this to install previously, but I recommend that you follow this new video on installing itth-cam.com/video/ABb-63y0Em4/w-d-xo.html .
Please update in your description to say the following :
sudo docker run --name="mqtt" --restart=always --net=host -tid -p 1883:1883 -p 9001:9001 -v /volume1/docker/mqtt/config:/mqtt/config:ro -v /volume1/docker/mqtt/log:/mqtt/log -v /volume1/docker/mqtt/data:/mqtt/data/ eclipse-mosquitto
Hi Percy! Thank you for your answer. Internal path should point to /mosquitto, not to /mqtt. You can check this yourself if you install mqtt and use portainer to connect with terminal to docker container.
Running ls command will list you available folders, and this is what you should get:
/ # ls -la
total 4
drwxr-xr-x 1 root root 186 Feb 5 06:34 .
drwxr-xr-x 1 root root 186 Feb 5 06:34 ..
-rwxr-xr-x 1 root root 0 Feb 5 06:34 .dockerenv
drwxr-xr-x 1 root root 850 Jan 23 16:14 bin
drwxr-xr-x 5 root root 360 Feb 5 06:35 dev
-rwxrwxr-x 1 root root 29 Jan 23 17:23 docker-entrypoint.sh
drwxr-xr-x 1 root root 622 Feb 5 06:34 etc
drwxr-xr-x 1 root root 0 Jan 23 16:14 home
drwxr-xr-x 1 root root 336 Jan 23 17:24 lib
drwxr-xr-x 1 root root 28 Jan 23 16:14 media
drwxr-xr-x 1 root root 0 Jan 23 16:14 mnt
drwxr-xr-x 1 mosquitt mosquitt 26 Jan 23 17:24 mosquitto
dr-xr-xr-x 239 root root 0 Feb 5 06:35 proc
drwx------ 1 root root 24 Feb 5 06:42 root
drwxr-xr-x 1 root root 0 Jan 23 16:14 run
drwxr-xr-x 1 root root 792 Jan 23 16:14 sbin
drwxr-xr-x 1 root root 0 Jan 23 16:14 srv
dr-xr-xr-x 12 root root 0 Feb 1 18:48 sys
drwxrwxrwt 1 root root 0 Jan 23 17:24 tmp
drwxr-xr-x 1 root root 40 Jan 23 17:24 usr
drwxr-xr-x 1 root root 78 Jan 23 16:14 var
/ #
And inside mosquitto folder, you will have additional files and folders:
/mosquitto # ls -la
total 0
drwxr-xr-x 1 mosquitt mosquitt 26 Jan 23 17:24 .
drwxr-xr-x 1 root root 186 Feb 5 06:34 ..
drwxr-xr-x 1 1026 users 28 Feb 5 06:35 config
drwxr-xr-x 1 1026 users 0 Feb 5 06:34 data
drwxr-xr-x 1 1026 users 0 Feb 5 06:34 log
/mosquitto #
Hello BeardedTinker, is there any chance to publish updated version of this video with working mqtt username/password configuration options? I'm aware of you video about community version, but it's very old/insecure/outdated version without possibilities of new mqtt security features.
HI Ivan! I'll try but it will take at least 2 weeks since I already have 2 videos ready to go before that. Getting username and password in MQTT can be a pain. That's why I decided to skip that part in original video, although I'm using it myself.
in your previous video (#002), there is no "check config" button in Server Control page, how do you enable this ? (as your HA is HA core and not hass.io)
Thank you for asking Tan.
You have to click on the lower left part of the screen - circle with your initials - your name. It will take you to your profile. There is one option called "Advanced mode" - and this has to be enabled.
@@BeardedTinker Thanks a lot, this really help. I had been missing this feature after upgrading the version from 0.88 to 0.1095 last week.
Dear BeardedTinker; there are some differences between what you type and what is on the description. When you do the folder mapping you should type mqtt/config, mqtt/log and mqtt/data instead of /mosquitto/config, /mosquitto/log and /mosquitto/data like in the video. Thank's for your hard work. You helped me a lot!
Thank you for your comment! There is difference between video and description. In description, I've update paths to match internal docker paths for eclipse-mosquitto docker image.
This was pointed out to me by viewer (can't find post now) - but you can check it here:
hub.docker.com/_/eclipse-mosquitto
/mosquitto/config
/mosquitto/data
/mosquitto/log
Thanks for the tutorials. When I map the config folders in docker I keep getting the error "unable to open config file" and there are no files appearing in data and log. Tried serveral 'solutions' like sudo chown -R 100:101 /volume1/docker/mqtt to change permissions but cannot get it to work. Any thoughts?
When you created MQTT, was there any mapping error? Also, if you go to terminal and type sudo ls /volume1/docker/mqtt do you see anything there?
Remember that you will not have mosquitto.conf file there (in /volume1/docker/mqtt/config) - you need to create it.
I am getting this error in Portainer Error: Unable to open config file /mosquitto/config/mosquitto.conf. Any ideas, thanks for your work!
Can you check in Portainer at the bottom of MQTT info page, what your Volumes look like. It should be something like this:
/volume1/docker/mqtt/config /mosquitto/config
@@BeardedTinker I have the exact same issue. There's no config file in /mosquitto/config. Volumes are just as above.
@@mindracing Yes, you have to create one. You can tweak original one: github.com/eclipse/mosquitto/blob/master/mosquitto.conf Just download this one - and make changes where and if needed.
@@BeardedTinker Where does that file go when it is downloaded? Presumably inside of the folder running in docker but I can't seem to access that. Thanks in advance!
Default/sample mosquitto.yaml file? Using Synology file explorer, you can copy it inside /docker/mqtt/config folder.
@ BeardedTinker I was about to use eclipse-mosquitto with my java project any help related to this is appreciated please!
Can't help you on that one - I'm sorry. My developer knowledge on scale of 0-10 is -1 :) And java even less then that. I can allocate memory to Miinecraft from command line and this is it. But there should be a great deal of resources on the net in regard to java and MQTT.
hey, thanks for the tutorial. I have sent accidently some retained flagged messages which I want to delete now. So how can I use things like
sudo systemctl stop mosquitto.service
?
I want to delete unwanted retained mqtt messages like in this example:
community.openhab.org/t/clearing-mqtt-retained-messages/58221
I don't know how to do that inside docker :(
Have you mapped mosquitto.db? Is it visible from your host in mapped folder?
If yes, then you can delete it there.
If not, I would suggest using Portainer to connect to docker container, and there you have ssh access to your container and can do it from there (same as in link you posted).
@@BeardedTinker thanks a lot. I did it by using mqtt-explorer (Freeware). There you can see every retained messages and just delete them by click
Oh, that's great, I thought you could not access server and that's why you linked option to delete whole database.
But this is better option! 😂
you saved my life. Kinda. THANK YOU bearded russian dude :)
:) Thank you for the comment and glad it helped you :)
We need a new video which allows us to install MQTT using docker (This is one is not working anymore) I did manage to install and have it run, with lots of problems first. Also hoping to expose config and password for MQTT too. I hope you will create a new one soon. Again your video is still one of the easiest to follow...
Thank you for your comment King! I will try to make new one for MQTT Docker. It changed a lot from where I installed it at my setup and also from last video.
I'll try to make video to include password protection too.
Unfortunately, I'll not be recording new video for at least a week or two, except for few I had pre-recorded.
We had an earthquake in midst of this "stay-at-home" problems and it' just tough to get free time with everyone at home.
Config/data/log folder is empty, and I cant edit the config to add a password.
Thanks for asking about config and password. Unfortunately I have experienced this also on one other configuration. There is a workaround.
I will presume that you also installed Portainer since it will be much easier to add password and change config if you did.
In Portainer, select MQTT container and go to console . There in dropdown select /BIN/ASH and connect.
You are now inside container terminal.
cd mosquitto to go into mosquitto folder and there you will have 3 subfolders - config logs and data. Go to config folder (cd config).
If you want to add password you have to use command prompt command:
mosquitto_passwd -c passwd_file $NAME YOU WANT TO ADD$
Don't forget to edit mosquitto.conf file and add at least following:
password_file /mosquitto/config/passwd_file
# Following line is optional and you can enable it if everything is ok with password
# allow_anonymous false
user $name you want to add$
vi is installed, so you can use vi to edit config file.
And in regard to why are does files/folders hidden inside Synology, I'll have to check something and get back to you. It could be "privileged" mode of container that is missing, user rights,... Have to test it.
@@BeardedTinker Thanks, I won't add password and username, it is only working on local network, and changed some port just in case. New synology system, I have a tons of stuff left to setup, I might get back to it later. :)
@@Merwenus There is another option for MQTT on Synology, but I didn't go that way in my home setup - if you add community package repository, there is pre-built MQTT package there. Haven't installed it and played with it but it should be more "user friendly" in terms of setup. BUT it probably isn't up-to-date version. It should still work OK.
Good luck with Synology, I really love it and use it a lot and I hope you'll have fun with it too 😀
If you will be adding username/password, AFAIK only way to do is from inside docker container and steps I've written above should help you with it.
And in regard to empty folder, it is probably as I wrote privilege issue - that can be resolved with --privileged added in docker run command when you create container - but you should google this parameter as it solves issues but reduces security also.
@@BeardedTinker i am trying to add a password to my mosquitto but i always get: Error: Unable to open file /mosquitto/config/pwfile for writing. Read-only file system.
I've just released new video today. Check it out if it helps you.
i new to home assistant and for some reason after following i don't see the same option under the server controls [Configuration Validation, Configuration reloading] , any thoughts?
+Ahmed Mohamed , you need to click on your profile (your name initials). In your account setting, you have to enable Advanced Mode, and those settings will be visible.
@@BeardedTinker bingo!!
I've been running this broker since June but sometime today I started getting this error:
You didn't paste the error, but I presume that you are receiving bunch of errors with different names.
Same thing is happening with me. And although I reverted to some older version, I kept receiving errors.
Even with version that were working normally.
There should now be new docker image that has fixed this issue:
github.com/eclipse/mosquitto/issues/1783 and github.com/eclipse/mosquitto/issues/1784
@@BeardedTinker Not sure what happened there (it's not posting): chown: /mosquitto/config/mosquitto.conf: Read-only file system chown: /mosquito/config: Read-only file system
@@CommittotheIndian I get the exact same error, waiting for my son to get home to start my backup server at his place in order to load yesterdays release.
Did you try updating to newer release? There was a fix for this during the night.
First of all, thanks for the great tutorials. I was able to setup MQTT with home assistant and it works fine. However, the MQTT entities don't update their current state after home assistant restart, they always show up as off after restart.
Thank you for your comment! It really means a lot!
What type of the device are you using with mqtt? Last 2-3 days I have strange behaviour with devices that are on mqtt. They worked great, but now they don't update their state anymore (for ex. light does turn off, but state in home assistant stays on). So, control is working and messages do work, but state change doesn't update.
@@BeardedTinker I have some sonoff switches that were displaying the wrong state after HASS restarts. I restarted both HASS and the MQTT containers and now it seems that they are displaying the correct states. not sure what the problem was though.
Restart is always good option. You can try and restart Synology NAS to see how it will perform and boot. There are possible issues with start order of containers.
That's good test for your setup
EDIT: Sorry I typed answer at wrong thread at first :D
I'm in the process of moving my hass.io on Pi4 installation over to my new DS1019+ and your videos are so useful. Thank you for taking the time.
I have also been having problems with the persistence of logs/config/data so I went back to the mosquitto documentation in hub.docker.com/_/eclipse-mosquitto. It says that the three directories that have been created in the image are called /mosquitto/logs, /mosquitto/config and /mosquitto/data whereas you are mapping the external directories to /mqtt/logs, /mqtt/config and /mqtt/data. If you successfully use /mosquitto/config, you'll notice that the container won't start unless /volume1/docker/mqtt/config/mosquitto.conf already exists so it must be created first. They also provide some configuration that they recomment you include into mosquitto.conf.
In addition, you need to give user and group ownership recursively of /volume1/docker/mqtt to 1883:1883, much like you had to with grafana and nodered.
Hope this helps.
Thank you Tim for this! I'll also upadate video description with new paths and permissions.
I think the mappings should be eg. "/volume1/docker/config:/mosquitto/config" ... instead of "/volume1/docker/config:/mqtt/config"... This goes for all the configurations.... I couldent get my manually defined configuration to be read by the docker image before i changed that.
Thanks for the comment Jess. If you check description of the video, you will see that this has been addressed already. There is also a note at the top of the description to warn about change.
@@BeardedTinker Ups ... Sorry diden't see that (and the other comments related to that) :-) ... Feel free to delete my comment.
+Jess Gade no problem. Im sorry for the mix-up! Thanks for your comment 👍
@@BeardedTinker Bugger, I missed this is I followed you along in the instruction on the video. This took forever to debug. I also missed this comment which would have made my life easier. Either way, thanks for posting this video - very useful
@@healingbench3198 made also newer version of this video - I think there I fixed this/showed how to di it.
Hello - So I have spent the last who knows how long trying to get this to work. I have installed and deleted and reinstalled a few times as well. When I try starting the mqtt container on my synology I get the following issues:
It constantly restarts every 2 seconds or so.
In Portainer I get the following errors (when it is running) -
Error: Unknown configuration variable "{
tf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf610"
AND
Error found at /mosquitto/config/mosquitto.conf:1.
To be honest I am not a confident programer and so I am not sure what to do in the mosquitto.conf file. I think that is my main issue. I can't figure out what to put in that file to make it work.
I also can't figure out how to do the username and password stuff. I love your videos (they have helped me a lot with setting up HA), but I can't get this setup at all.
Slight update if I comment out my password file then it works. How do I create a password file? I have tried things found on the internet, but I can't seem to find the mosquitto_passwd program to build my password file. I created a password txt file, but I think I need to convert it using that program, but I can't find it in my synology NAS.
I know your pain... It took me few nights to get password for MQTT working.
First, make sure you have Portainer installed. It will not just make everything easier but will reduce some very funky docker steps.
When you have installed Portainer, select mqtt container, and one of the options you have there will be "console".
This allows you to open terminal directly inside mosquitto container. For username, if I remember correctly, you need to type root.
After you connect inside container, you can use following guide:
You can setup the mosquitto.passwd using the docker container and/or an installation of mosquitto, so that you can use the mosquitto_passwd tool.
mosquitto_passwd -c /mosquitto/config/mosquitto.passwd
It will ask you twice for the password for the username. If you want to setup additional users, you should omit the -c parameter, so that the existing file won’t be overwritten.
@@BeardedTinker Thanks for the quick reply. When I go into Portainer and can choose the mqtt container. I can then choose "Exec Console" which takes me to a screen where I can enter a command and the user name (root). I entered your line of code (substituting with what I want) and hit enter. A terminal screen comes up and asks for a password. I enter it, and it asks for it again just like you said it would.
Then the terminal area shows a response quickly and the screen reverts to previous screen. I don't have time to read it. But when I go to "Events" in Portainer it says that an "Unsupported event" occurred. And if I go into the docker container on my Synology there is no new file created.
I have questions/comments:
1. I don't have a mosquitto/config folder in my mqtt folder in docker. Should I? I created the three folders (config, log and data) directly in the mqtt folder like you layed out in your video. Was I supposed to create a mosquitto folder inside the mqtt folder?
2. I tried changing mosquitto/config to mqtt/config but the same thing happens.
Addition - I think I am missing the step - "You can setup the mosquitto.passwd using the docker container and/or an installation of mosquitto, so that you can use the mosquitto_passwd tool." - How do I do that? I think that is the key here that I am missing.
@@michaelcanham2091 it is a bit hard to debug without seeing the screen, but I think everything is ok.
If you reached part where you specified password, then you have that part covered (install mosquitto).
There are two things you should check - one is configuration file, that you have correctly named file where password is stored. Or BTW, you can enable anonymous access, and you don't need password at all.
Remember that there is a difference in folder structure between what you see in Synology and folder structure that is inside container itself.
1594319057: New connection from 192.168.1.10 on port 1883.
1594319057: Client disconnected due to protocol error.
What are you using to connect to MQTT? Home Assistant? Can you copy configuration from yaml file to see if everything is setup correctly.
@@BeardedTinker
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
#lovelace:
# mode: yaml
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
base_url: vyna41cp6jgbcos1m95lx3rqc9ncvu4p.ui.nabu.casa
cors_allowed_origins:
- cast.home-assistant.io
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
zwave:
usb_path: /dev/serial/by-id/usb-0658_USBDevice_ffffffd1ffffffb2ffffffdbffffffad-if00
sensor:
- platform: mitemp_bt
- platform: buienalarm
timeframe: 15
name: buienalarm
monitored_conditions:
- temperature
- precipitation
- precipitation_forecast_average
- precipitation_forecast_total
- next_rain_forecast
- platform: netatmo
#netatmo:
# api_key: 5ec0274aee8f853bc33aba71
# secret_key: 178Z1ex2m56NPwewUcu9qiEK0Qxt2Q3HmN4
# username: user
# password: password
influxdb:
host: 192.168.1.199
ffmpeg:
spotify:
client_id: ablablablablabla
client_secret: blablablalbla
discovery:
mqtt:
broker: !secret mqtt_url
port: !secret mqtt_port
client_id: home-assistant
discovery: true
discovery_prefix: homeassistant
remote:
- platform: harmony
name: Huiskamer
host: 192.168.1.231
activity: Watch TV
cast:
media_player:
- host: 192.168.1.92
# motioneye
- Platform: mjpeg
name: ingang
still_image_url: 192.168.1.199:8765/picture/1/current/
mjpeg_url: 192.168.1.199:8081
username: admin
password: blablabla
group:
Residence_Radio:
name: Residentie Radio
entities:
- input_select.radio_station
- input_select.chromecast_radio
- script.radio538
input_select:
radio_station:
name: 'Select Radio Station:'
options:
- Radio 538
- Q-Music
- 3FM
- 100% NL
- Veronica
- Sky Radio
- Arrow Classic Rock
- Classic FM
- BNR Nieuwsradio
- SLAM! Hardstyle
- Sleep Radio
- Ambient Sleeping Pill
- Radio Art - Sleep
- Ambi Nature Radio
- Calm Radio - Sleep
- Dinamo.FM Sleep
chromecast_radio:
name: 'Select Speakers:'
options:
- Livingroom
- Everywhere
initial: Everywhere
icon: mdi:speaker-wireless
@@walberg61 You can also try to ad following:
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
payload: 'offline'
Just below this line:
discovery_prefix: homeassistant
@@BeardedTinker Hmm, looking in portainer for mqtt log: 1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594548797: New connection from 192.168.1.10 on port 1883.
1594548797: Client disconnected due to protocol error.
1594549487: Saving in-memory database to mosquitto.db.
1594549487: Error saving in-memory database, unable to open mosquitto.db.new for writing.
1594549487: Error: Permission denied.
1594551288: Saving in-memory database to mosquitto.db.
1594551288: Error saving in-memory database, unable to open mosquitto.db.new for writing.
1594551288: Error: Permission denied.
Thanks for some very nice guides :)
I have a device that require MQTT, I have now installed by following your guideline. How do I create a username and password in MQTT?
+Peter Svendsen - thanks for your comment. There are couple of ways, but most simple one is to login into mqtt container and run there command. I think I did it through Portainer container console, but can't remember what was the command in terminal to create user.
@@BeardedTinker thanks for the fast answer, I will try to look for it and test 👍
@@petersvendsen7667 you can check this link for two methods:
www.steves-internet-guide.com/mqtt-username-password-example/
Unfortunately, mqtt doesn't map folder with configuration with Synology/outside of Docker, sou you have to use terminal for this.
If I remember correctly I used second method.
Hey,
I follow your videos with great interest, I find very complete with codes, very nice especially for people like me who write without knowledge of codes.
I only have a problem with the 4th video, I tried to install it in both ways but I always get the same error
1580740301: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
I have no idea what to do now
thanks
My guess is that it has to do something with user permissions.
This video is bothering me a lot. I'll try to see what could be the issue and will get back to you on this error.
Hmm - just tried it at my new test setup and I followed steps from description:
sudo docker run --name="mqtt" --restart=always --net=host -tid -p 1883:1883 -p 9001:9001 -v /volume1/docker/mqtt/config:/mosquitto/config:ro -v /volume1/docker/mqtt/log:/mosquitto/log -v /volume1/docker/mqtt/data:/mosquitto/data/ eclipse-mosquitto
And after that, I've run this:
sudo chown 1883:1883 /volume1/docker/mqtt -R
Just be sure that you create all required folders before running above commands.
/volume1/docker/mqtt/
/volume1/docker/mqtt/config
/volume1/docker/mqtt/data
And everything worked from the first time.
@@BeardedTinker Thank you for the explanation, I started working on it again and copied the code from the video (other than in the description)
sudo docker run --name = "mqtt" --restart = always --net = host -p 1883: 1883 -p 9001: 9001 -v / volume1 / docker / mqtt / config: / mqtt / config: ro -v / volume1 / docker / mqtt / log: / mqtt / log -v / volume1 / docker / mqtt / data: / mqtt / data -tid eclipse-mosquitto
and now it turns only its the sub. folders still empty, is that right?
@@peternooij2298 No, as per documentation, internal folders inside Docker need to be /mosquitto/ - /mqtt/ is not for this MQTT image, and that's why I have corrected it in description.
You just could add synocomunity and Istall package then) and that’s all without docker
Yes, that's true, you can also check new video where that's recorded too. But it's also on Docker 😉
Thank you for making these video's!
Thank you for your comment Glenn!!! 😄
@@BeardedTinker How is it possible my home assistant is not set on updating at the overview screen? Because of ports being blocked by my router/modem?
@@glennvolckaert7315 Sorry, don't understand - overview screen doesn't update? If you are connected inside your house, router/modem should make no difference.
Figured out my mistake.