Categories
Uncategorized

mosquitto_pub.exe windows stopped working

I’ve been using mqtt testing for IOT with a small Linux machine on my local network. I vary using mosquitto_pub and mosquitto_sub line commands from WSL and from cmd prompt. To run from the windows command prompt, I installed from https://mosquitto.org/download/

All of a sudden, the command seemed to stop being able to send over my local network. After searching for solutions, trying windows firewall settings, and reinstalling, I did find the solution.

In windows, I have to use ” (double quote) for the values on the command line. Linux/WSL is more forgiving.

One of the clues was the fact that the windows line command for mosquitto_sub was not letting me use the #

mosquitto_sub -h localhost -t ‘XY/#’
Error: Invalid subscription topic ''HA/#'', are all '+' and '#' wildcards correct?

moquitto_sub -h localhost -t “XY/#”
HAPPY!

moquitto_pub -h remote_machine -t “XY/Start/U” -m “LED1=On”

TLDR: use double-quotes (“) on windows line commands!

Categories
Docker

Docker Fix Permission Denied on Ubuntu

I tried a few different things. The one that finally solved it:

sudo chmod 666 /var/run/docker.sock