MQTT isn't working.

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
mbishton
Posts: 4
Joined: Tue Mar 28, 2017 12:02 am

MQTT isn't working.

Post by mbishton »

Running V150 on Pi Zero W. Seems to boot properly. It shows [OK] Mosquitto. I opened up two terminal sessions.

In one side, I put:
root@DPNZ1:~# sudo /etc/init.d/mosquitto start
[ ok ] Starting mosquitto (via systemctl): mosquitto.service.
root@DPNZ1:~# mosquitto_pub -d -t hello/world -m "Hello from Terminal window 2!"

In the other side, I put the following, and got the subsequent error messages:
root@DPNZ1:~# mosquitto_sub -d -t hello/world
Client mosqsub/3320-DPNZ1 sending CONNECT
Client mosqsub/3320-DPNZ1 received CONNACK
Connection Refused: not authorised.

Any thoughts about how I get Mosquitto to work?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: MQTT isn't working.

Post by Fourdee »

Hi,

Thanks for the report.

I've not personally had any dealings with MQTT (minus the install we provide). I'll run some tests here and see if we can replicate/resolve:
https://github.com/Fourdee/DietPi/issues/982
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: MQTT isn't working.

Post by Fourdee »

Hi,

Take a look here regarding setting a password for MQTT:
https://community.openenergymonitor.org ... zed/1828/2
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply