Struggling with OH 2.5.4 and zigbee2mqtt tutorial: mosquitto_sub gives 'Connection refused'


I have a RPi 3B+ with a CC2531 USB sniffer and followed the tutorial and get stuck when I use:

mosquitto_sub -d -t zigbee2mqtt/#
Client mosqsub|1375-openhab sending CONNECT
Client mosqsub|1375-openhab received CONNACK (5)
Connection Refused: not authorised.
Client mosqsub|1375-openhab sending DISCONNECT

Can anyone please guide me in the right direction?

Thank you,


Hi Fred,

Welcome to the community!

I think you’d be best to ask your question in the thread you linked to, so that the people who were involved see that you need help. It’s tricky knowing when to post anew versus adding on, but in this case you’re adding to an ongoing discussion in a way that may be helpful for others in the future. That’s different from resurrecting an old thread or posting something that isn’t related/relevant to the thread.


Hi Russ,

Thanks for responding. I see your point.

Anyway, I solved the issue. Problem was that I forgot to specify -u and -P for username and password.

Can I somehow link this post to the original?


Good stuff. If you think this is something that others might easily miss, you could post in the other thread to mention and clarify it. If it feels more like something you just missed, I don’t think you need to do that. However, the original author might appreciate a note of thanks if the tutorial helped you, and then you’d get notifications if anyone else comes along and needs help. :slight_smile:

1 Like