AxisCommunications / acap-integration-examples-azure

Integration between Axis devices and Microsoft Azure
https://developer.axis.com/
Apache License 2.0
10 stars 3 forks source link

Enable DPS for device connection to IoT Hub #30

Open Y07yoyo opened 2 years ago

Y07yoyo commented 2 years ago

Describe the feature

The current solution to connect an axis camera to IoT Hub means if there is an issue with the specific IoT Hub we will have some down time. Most devices nowadays connect to Azure using DPS (Device Provisioning Service) system. This allows us to use IoT Central which connects to an IoT Hub but can switch to another hub if it goes down without any disruption to the data.

Added value

Nowadays, most devices have options to connect via DPS to help mitigate any system downtime due to IoT Hub failures. Please let me know if this is a way we can connect the axis cameras to IoT Hub.

mattias-kindborg-at-work commented 2 years ago

Hi @Y07yoyo!

The Telemetry to Azure IoT Hub example is only using built in functionality in the camera, in this case the MQTT client, when connecting to the Azure IoT Hub. The flow of connecting to a DPS and then being redirected to the correct IoT Hub is not something we can do over MQTT, nor is the flow standardised among the cloud vendors.

There's definitely a value in connecting the camera to the DPS instead of the IoT Hub, not only the redirect part but also the ability to automatically register devices in the IoT Hub, but I think it would require you to build your own ACAP using the Native SDK. You would most probably have to write the application in C or C++ and listen for events using the Event API and then use the Azure IoT C SDK to connect to the DPS and publish messages.