4

I am aware that there is Azure IoT Hub palette in Node-red, which is specifically designed to interact with Azure IoT Hub. I tried that and it worked fine most of the time. However, due to an instability issue I am curious to compare that palette with out-of-the box MQTT node provided by node-red.

I followed the instruction here, but I always got connection failed to broker. This happened both for the publish and subscribe node. I tried the same setting using MQTT.js following this post, and it worked, indicating that the credentials I am using is correct.

Here is my setting for the subscribe node:

Node properties:
Topic: devices/{device_id}/messages/devicebound/#
QOS: 1

Server properties:
Connection tab:
Server: <myhubname>.azure-devices.net
port: 8883
enable SSL: (checked)

TLS config:
certificate: (none)
private key: (none)
passphrase: (none)
CA cert: (the one from Baltimore cert)
verify server certificate: (checked) (I tried with unchecked but no difference)
Server name: none

Security tab:
username: <myhubname>.azure-devices.net/<devicename>/api-version=2018-06-30
password: (the SAS)

I also tried the node-red MQTT node to connect to AWS IoT, and it worked fine.

I understand that Azure IoT Hub is not a fully featured MQTT broker, but from my understanding it should be possible to connect to it using plain node-red MQTT node.

Am I missing something? Thank you!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.