MQTT seems to not be connecting

I have MQTT enabled on my account and my IHD set up at home. When I run this command there is not data coming through. Am I missing something?

mosquitto_sub -h -u <username> -P <password> -t SMART/HILD/<mac> -p 1883 -d -v -V mqttv31

Client mosq-bXW32pHKNk5tfis0pE sending CONNEC

Client mosq-bXW32pHKNk5tfis0pE received CONNACK (0)

Client mosq-bXW32pHKNk5tfis0pE sending SUBSCRIBE (Mid: 1, Topic: SMART/HILD/A8032AD6241C, QoS: 0, Options: 0x00)

Client mosq-bXW32pHKNk5tfis0pE received SUBACK

Subscribed (mid: 1): 0


  • You're missing the TLS support and the port number is wrong.

     --capath /etc/ssl/certs -p 8883

  • Hi Dougie, tried that but it still is not working:

    mosquitto_sub -h -u <USERNAME> -P <PW> -t "SMART/HILD/<mac>" --capath /etc/ssl/certs -p 8883 -d -v -V mqttv31

    Client mosq-0ngzEGHcz3yfttIMMC sending CONNECT

    Client mosq-0ngzEGHcz3yfttIMMC received CONNACK (0)

    Client mosq-0ngzEGHcz3yfttIMMC sending SUBSCRIBE (Mid: 1, Topic: SMART/HILD/A8032AD6241C, QoS: 0, Options: 0x00)

    Client mosq-0ngzEGHcz3yfttIMMC received SUBACK

    Subscribed (mid: 1): 0

    Client mosq-0ngzEGHcz3yfttIMMC sending PINGREQ

    Client mosq-0ngzEGHcz3yfttIMMC received PINGRESP

  • Are you using the latest versions of the Mosquitto client programs?

    ii libmosquitto-dev:armhf        2.0.12-0mosquitto1~buster1    armhf    MQTT version 3.1/3.1.1/5.0 client library, development files

    ii libmosquitto1:armhf          2.0.12-0mosquitto1~buster1    armhf    MQTT version 3.1/3.1.1/5.0 client library

    ii libmosquittopp-dev:armhf       2.0.12-0mosquitto1~buster1    armhf    MQTT version 3.1 client C++ library, development files

    ii libmosquittopp1:armhf         2.0.12-0mosquitto1~buster1    armhf    MQTT version 3.1/3.1.1 client C++ library

    ii mosquitto-clients           2.0.12-0mosquitto1~buster1    armhf    Mosquitto command line MQTT clients

    The stuff in plain old Raspbian/RaspiOS is ancient crap.

  • Hi, I definitely have v2.0.12 installed and I'm hitting https:// but I'm getting a new lookup error:

    pop-os:~$ sudo snap install mosquitto

    mosquitto 2.0.12 from Mosquitto Team (mosquitto✓) installed

    pop-os:~$ mosquitto_sub -h -u <UN> -P <PW> -t "SMART/HILD/<MAC>" --capath /etc/ssl/certs -p 8883 -d -v -V mqttv31

    Unable to connect (Lookup error.).

    The error would seem to indicate a DNS issue but I can nslookup with no problem:

    pop-os:~$ nslookup



    Non-authoritative answer:



    Am I missing something?

  • Try this

     mosquitto_sub -p 8883 --capath /etc/ssl/certs -h -u "" -P somethingsecret -t "SMART/HILD/CAFEDEADBEEF" 

    No protocol needed on the host name.

  • Hi Dougie,

    That seems to be the same as the command I tried on October 17 above and it didn't work. I've tried it again with no dice, the result is the same as on October 17.

Sign In or Register to comment.