Help Please MQTT

Hi, this must be the most easiest ask, i have a mosquitto mqtt broker running in a docker container link to node red, i want to set up a user name and password on the mosquitto broker, I have made the password file, i can open the docker shell to edit the mosquitto.conf file so i can add route to password file, i can i can add the line i need (pressing insert + paste), but i cant save it, I'v tried everything i know, plus search after search and the help files, with no joy. any help much appreciated

You don't have permission to write to the folder where mosquitto.conf is stored. Which editor are you using?

Hi, thank for the reply, by opening about it says LXTerminal, which i think is part of the. Mark docker shell, i did try sudo but its not recognised, i use this command to open file vi mosquitto.conf

I have no experience of using Docker. Is this your home computer or are you in your company network?

raspberry pi4 at home network

Then "sudo vi mosquitto.conf" should work if you are in the folder containing mosquitto.conf.

Is there a reason you are using Docker? From posts here it seems that unless you have a good reason to use Docker then it causes more problems than it solves. Both node-red and mosquitto are very easy to install on a pi without using Docker.

3 Likes

Hi thanks for your reply, it was basically trial and error, maybe it time to try without docker, i do want to use the mqtt bridge so i can connect to smartthings.

To install mosquitto on the Pi you just need
sudo apt install mosquitto mosquitto-clients
and it will leap into life automatically when installed. Take the other one out first of course. I am not sure if you are also running node-red in docker, if so then you can use the usual script to install it without docker.

yes i think i will give it a go, flashing a fresh raspbian now lost count how many times I've done this.

Ah, the joys of Linux! All works wonderfully when it works - but when it doesn't, oh boy!

:mage:

2 Likes

Just removing the Docker stuff should be enough.

It started playing up anyway, started getting errors on boot. you got that right Totally, my chromebook is such a joy to use, but this is doing my head in.

ok colin, you were right, installed and working, have node red on my RPi3, and the mqtt node is connected, so need to add password, then install node red on RPi4, hopefully import my nodes from RPi3, and install mqtt bridge for smartthings, thanks for you help Colin, hopefully you maybe be able to help some more. Mark

1 Like