Connection Refused in Azure IOT HUB

[
    {
        "id": "1c0fb3c4214105c2",
        "type": "tab",
        "label": "Flow 3",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "191eb7ca.b71a8",
        "type": "azureiothub",
        "z": "1c0fb3c4214105c2",
        "name": "Azure IoT Hub",
        "protocol": "mqtt",
        "x": 440,
        "y": 160,
        "wires": [
            [
                "39c7854c.56d18a"
            ]
        ]
    },
    {
        "id": "aa561f4a.a44358",
        "type": "function",
        "z": "1c0fb3c4214105c2",
        "name": "Function",
        "func": "msg1 = '{\"deviceID\": \"Arduino001\", '\nmsg1 = msg1 + '\"SAK\": \"Yub6LJ9vjuPaJ4zWXCPEYr8+eRByyCUwB3h8VefIlEE=\", '  \nmsg1 = msg1 + '\"Protocol\": \"mqtt\", '\nmsg1 = msg1 + '\"Data\": { \"' + msg.topic + '\": \"' + msg.payload + '\"}}'\n\nnewMsg = { payload: msg1 };\nreturn newMsg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 304,
        "y": 322,
        "wires": [
            [
                "191eb7ca.b71a8",
                "39c7854c.56d18a"
            ]
        ]
    },
    {
        "id": "48115883.03fae8",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Speed",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "speed",
        "payload": "345",
        "payloadType": "num",
        "x": 121,
        "y": 287,
        "wires": [
            [
                "aa561f4a.a44358"
            ]
        ]
    },
    {
        "id": "39c7854c.56d18a",
        "type": "debug",
        "z": "1c0fb3c4214105c2",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "payload",
        "x": 608.3400268554688,
        "y": 250.47998046875,
        "wires": []
    },
    {
        "id": "31ae88af.f84fa",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Temperature",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "temperature",
        "payload": "87",
        "payloadType": "num",
        "x": 139,
        "y": 323,
        "wires": [
            [
                "aa561f4a.a44358"
            ]
        ]
    },
    {
        "id": "fc5e350.8f97e48",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Pressure",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "pressure",
        "payload": "2342",
        "payloadType": "num",
        "x": 129,
        "y": 359,
        "wires": [
            [
                "aa561f4a.a44358"
            ]
        ]
    },
    {
        "id": "f3fce0b1.76ed6",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Send Multiple Values",
        "repeat": "",
        "crontab": "",
        "once": false,
        "topic": "",
        "payload": "{\"deviceID\": \"Arduino001\", \"SAK\": \"Yub6LJ9vjuPaJ4zWXCPEYr8+eRByyCUwB3h8VefIlEE=\", \"Protocol\": \"mqtt\", \"Data\": { \"AvgFlowRate\" : 500, \"FlowRate\" : 700, \"AvgStaticPressure\" : 525, \"StaticPressure\" : 518, \"AvgCasingPressure\" : 776, \"CasingPressure\" : 805, \"AvgTubingPressure\" : 609, \"TubingPressure\" : 588}}",
        "payloadType": "json",
        "x": 150,
        "y": 180,
        "wires": [
            [
                "191eb7ca.b71a8"
            ]
        ]
    },
    {
        "id": "15aa66ba.d05be9",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Send one value",
        "repeat": "",
        "crontab": "",
        "once": false,
        "topic": "",
        "payload": "{\"deviceID\": \"Arduino001\", \"SAK\": \"Yub6LJ9vjuPaJ4zWXCPEYr8+eRByyCUwB3h8VefIlEE=\", \"Protocol\": \"mqtt\", \"Data\": { \"Speed\" : \"25\"}}",
        "payloadType": "json",
        "x": 137.90994262695312,
        "y": 110.09001922607422,
        "wires": [
            [
                "191eb7ca.b71a8"
            ]
        ]
    },
    {
        "id": "24956e6.952af12",
        "type": "inject",
        "z": "1c0fb3c4214105c2",
        "name": "Send one value",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "",
        "payload": "{\"deviceID\": \"myiotdevice\", \"SAK\": \"dzerQ4wJGYG0DV/SetL49r3H+rFAhfdXOcFNeZWITc8=\", \"Protocol\": \"mqtt\", \"Data\": { \"Speed\" : \"25\"}}",
        "payloadType": "json",
        "x": 143,
        "y": 42,
        "wires": [
            [
                "191eb7ca.b71a8"
            ]
        ]
    }
]

Dear Node Red Support Team,
I am trying to send some payload to azure IOT HUB but I am facing connection not established related problem.Are there any Permissions which need to be changed in Azure portal.Please Kindly support on this issue as soon as possible.


You are not passing the required data - see the parts that have "undefined" against them.


HostName=iotstream.azure-devices.net;DeviceId=myiotdevice;SharedAccessKey=dzerQ4wJGYG0DV/SetL49r3H+rFAhfdXOcFNeZWITc8=
Even After above settings done correctly.Still Not getting Connected.

What errors are you getting now?

First while Injecting a payload from inject node it shows Azure Iot Hub node disconnected.
And Secondly my node red suddenly stops after injecting a payload to Azure IOt HUb.If same is happening your side also kindly check to see.
v

While the node certainly should not error like it does, you are told quite clearly what the issue is:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.