Receiving alerts/commands from Azure IoT Hub to device using NodeJS

180 Views Asked by At

Can any one suggest me how to receive Message/payload on RPI as device sent to Azure IoT Hub.

I am using SimulatedDevice.js and sending data with interval of every 5 seconds to Azure IoT Hub that data is going to store in Azure table storage from windows machine using NodeJS. Everything working Ok.

Now I want to receive complete message/payload from IoT Hub to RPI as device.

I have used sendcloudtodevicemessage.js as given example on Azure. I am able to recieve message only only once as below

[{"originalMessageId":"My Message ID","description":"Success","deviceGenerationId":"636341763976720081","deviceId":"testDevice","enqueuedTimeUtc":"2017-07-18T09:50:27.991313Z","statusCode":"Success"}]

But I want to recieve message on device each time.

Can any one help me for this?

0

There are 0 best solutions below