Hi everyone,

System info:
Raspberry pi3 running Buster with OHS2

i been having problem to connect my mosquitto to my 433Mhz sensor, basically this problem when i check my logs mosquitto.log (11.5 KB)

somthing about connection and socket i think…

I have done everything from scratch over and over with different options of setup and no luck.
This happend after i upgraded to the latest OH and Buster… even though i tried to do the same setup on Stretch but its still the same problem!

Do you have another mqtt broker running? Maybe the openHAB embedded one?

Hi @opus,

its fresh install and i only installed mosquitto once by apt-get install mosquitto, with openhab i have installed these : MQTT Broker Moquette, MQTT Binding, MQTT Persistence.

i just uninstalled the above and only left the main mosquitto for buster and its the same problem!
here is my logs:mosquitto.2.log (12.7 KB)

That is an mqtt broker, and it is the culprit!
Deinstall Moquette and mosquito will work!

if i understod you right, i reinstalled MQTT Broker Moquette from OH, i just did but nothing has changed!
by the way, my mosquitto seems to be running ok even when i check it with MQTT.fx in Windows.
here is my status which is showing all good:

pi@raspberrypi:/var/log/mosquitto $ sudo systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-04-23 13:10:34 EDT; 17min ago
Docs: man:mosquitto.conf(5)
Main PID: 411 (mosquitto)
Tasks: 1 (limit: 2077)
Memory: 2.2M
CGroup: /system.slice/mosquitto.service
└─411 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Apr 23 13:10:33 raspberrypi systemd[1]: Starting Mosquitto MQTT v3.1/v3.1.1 Broker…
Apr 23 13:10:34 raspberrypi systemd[1]: Started Mosquitto MQTT v3.1/v3.1.1 Broker.

Deinstall as in remove, NOT reinstall!


as i mentioned i have already tried this matter.

searching throw the internet i have found this
somthing about adding 1sec delay between these processes starting!
i dont know whats this?

I would shutdown openHAB

Then restart mosquito an make sure mqttfx can send and receive to the broker first then to the 433mhz system.

Once these work start openHAB. Make sure you can still connect with mqttfx. If so move to setting up openHAB.
If mosquito breaks when you start openHAB then you have some conflicting mqtt setup there hence the message from mosquito saying address in use.

Unfortunately i have tried this before, i tried so many possibilities but it seems to be mosquitto issue or maybe the new Buster version for rpi

From reviewing the log I can see that it is attempting to use the standard port 1883.

Run the following command to see what service is running / listening on that port:

sudo netstat -tulpn | grep 1883

tcp        0      0  *               LISTEN      420/mosquitto       
tcp6       0      0 :::1883                 :::*                    LISTEN      420/mosquitto  

This might give you a clue if another service is also running. (i.e. Error: Address already in use)

However, later in the log, it looks like it is starting and getting access to the port, and clients are connecting… (that looks promising)…

You might want to connect and see what traffic is going on pub/sub:

mosquitto_sub -u admin -P adminpassword -v -h -p 1883 -t '#'

mosquitto_sub -u admin -P adminpassword -v -h localhost -p 1883 -t '#'
tele/sonoff1/LWT Online
sonoff/tele/sonoff1/LWT Online
sonoff/cmnd/sonoff1/POWER OFF
sonoff/cmnd/sonoff1/power ON
sonoff/cmnd/sonoff1/power 1
sonoff/stat/sonoff1/RESULT {"POWER":"ON"}
sonoff/stat/sonoff1/POWER ON
sonoff/cmnd/sonoff1/power 0
sonoff/stat/sonoff1/RESULT {"POWER":"OFF"}
sonoff/stat/sonoff1/POWER OFF

(be sure to update the admin and password (-u and -P parameters) … and make sure to use capitalized P!

I was playing with mqtt today and finally upgraded from the legacy 1x binding and ported over my SONOFF switch.


when i hit this line
mosquitto_sub -u admin -P adminpassword -v -h -p 1883 -t '#'
i do receive signal from my 433mhz door sensor
also my logs now seems to be changed for better, i can see it receiving the signal here : mymosquitto.log (182.1 KB)

using MQTT.fx i do get signal between both no problem

when i run ./RFmqtt which is inside my 433Utils/RPi
i receive nothing, i do think its the mosquitto problem still for some reason
the rfmqtt its the communication to Openhab

Sorry, I can’t help for problems with RFmqtt.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.