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 glowmqtt.energyhive.com -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 glowmqtt.energyhive.com -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
You need to use TLS as mentioned.
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 https://glowmqtt.energyhive.com/ -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 glowmqtt.energyhive.com
Am I missing something?
mosquitto_sub -p 8883 --capath /etc/ssl/certs -h glowmqtt.energyhive.com -u "firstname.lastname@example.org" -P somethingsecret -t "SMART/HILD/CAFEDEADBEEF"
No protocol needed on the host name.
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.
There was a '+' symbol in the email address used for my bright credentials which was somehow causing my issues. Jane updated my email address to one without a '+' symbol and all is working as expected.