Not for the restless, using Http to access IoT Hub

MVP

The Azure IoT Hub is accessible using multiple protocols. You can use MQTT, AAMQP and HTTP. It’s even possible to run MQTT and AMQP over HTTP using web sockets (in case your firewall is closed).

This week, I had to connect a device to the IoT Hub running its own propriety runtime environment. The only way to communicate was HTTP.

 

Luckily, still HTTP is supported but communication works a bit different compared to using the IoT Hub SDK’s which Microsoft is offering.

 

Yes, at first it seems easy to just make a POST or GET to a REST endpoint. But looking at the security, just providing the Device connection string is not enough. You have to extract an SAS (Shared Access Signature) token first.

 

Let’s see how you can use REST.

 

Read the full story here

 

 

rest05.png

 How to complete, reject or abandon C2D messages

 

rest03.png

 Retrieving a D2C event

 

rest04.png

 Sending a D2C event

 rest07.png

 Completing a C2D message with a Post action

 

 

 

 

0 Replies