I am designing an IoT solution's Disaster Recovery approach on Azure. I am following IoT Hub High Availability and DR in MSDN. The solution need to keep keep geo-replicated backups of device identities from primary, and upload them to the secondary IoT hub before switching the active endpoint for the devices.
I am not able to find out any documentation on how to take backup of Identity Registry from primary and upload it in secondary.
Just found out that I should be using IoT Hub Device Identities in bulk - https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-bulk-identity-mgmt.
The topic came up today regarding IoT Hubs and DR. It sounds like you are doing the same work. Is there any other information you can share. We have an IoT Hub centric app only in one Regional DataCenter. What happens if an earthquake etc hits the data center. I have to come up with the architecture. Anything that you can share would be greatly appreciated. Thanks! MIke
Related
I want to make a webhook that can be triggered by either get/post and triggers connected IoT devices to a WebSocket.
So, I thought Azure might help to automize this process, instead of writing everything from scratch and run it on a webserver.
I am very new in the Azure world, I found it very complicated to make it working on Azure.
Can you point me to any simple to make it work?
The first thing to do is to decide where you want to connect your devices to. Generally, you'll either use Azure IoT Hub or IoT Central (which uses an IoT Hub anyway). Your question doesn't include any details about your devices, or whether you're developing them yourself, but I'll assume you can connect to either.
If you go for Azure IoT Central, the easiest way to get a webhook going is to create a Logic App and link nodes together to trigger a Command to your device. You can use an HTTP request as the trigger, and use the built-in IoT Central node to trigger your command, example:
If you end up connecting your devices to IoT Hub, you can use Direct Methods, Cloud to Device messages or even Device Twins to communicate with your devices. You can leverage these by creating an Azure Function with an HTTP trigger, and you program the logic to call IoT Hub, which will communicate with your devices. There are a lot of samples on the web that show how to create Functions, or control your device remotely.
There are a lot of ways to go about your scenario, if you need some help from the Microsoft community, you can get a lot of help on Microsoft Q&A.
Update based on the comments:
In this case, the devices are connected to IoT Hub. You can use the Service SDK to run a job that fires a Direct Method to all currently connected devices. This doc describes the process.
As far as I understand, every instance of Azure Digital Twins Preview brings its own IoT-Hub. A normal Azure IoT-Hub I could query like this (https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-query-language):
SELECT * FROM devices
How do I query the built in IoT-Hub of Azure Digital Twins?
Or isn't it possible to access this IoT-Hub and I always have to use the Digital Twins REST-API?
The current preview of Azure Digital Twins does not allow you to query the IoT Hub. However, at Microsoft Build, a new version of the preview was announced. This will change the structure of the Digital Twins itself and also allow you to bring your own Azure IoT Hub to integrate with. In the Build Book Of News, it is stated that this preview should come this summer.
As Matthijs van der Veer mentioned, Currently, there is no direct access to the IoT Hub created along with Digital Twins. However, in GA we will have the ability for you to bring your own/directly create & associate your own hub. Yes, you need to use Management API to connect the IotHub.
The new capabilities, which will be available in the summer of 2020, include OPEN Modeling Language, live execution environment, easy integration with Azure IoT Hub and other Azure services, and rich query APIs.
For more updates regarding Azure Digital Twins, please check Azure Updates page.
Hopefully a simple question, but with all the reading I have done about IOT Edge Devices, I still cannot find an answer.
For my application, I would like to have a local offline view of all the data going into the edge device and an online view from a website. Is it possible to subscribe to all the events in the Edge Device, just like how I am able to subscribe to all the events in the IOT Hub?
Hopefully something like this
Device->IOTEdge->IOTHub->Website
_______________->Local View (offline)
From what I have seen I can use the components to create a website and do this.
If you need a local Azure IoT Edge webpage dashboard then look at Sander van de Velde blog for details and ideas. Sander has also a lot of other very good examples.
https://sandervandevelde.wordpress.com/2018/12/07/create-your-own-local-azure-iot-edge-dashboard/
https://sandervandevelde.wordpress.com/2018/04/20/visualizing-azure-iot-edge-using-local-dashboard/
You just need one nodejs module listening messages from edgeHub and sending messages using websocket connection. Then you can use same or another module to serve static webpage aka your dashboard. You can access this local dashboard from the same local network without any connection to internet. And you can also send your messages to upstream (IoTHub in cloud) and do the same there. I have used nodejs websocket locally in the edge and SignalR to stream data to cloud dashboards.
I am building an IoT solution based on devices that are not programmable (3rd party devices).
I can just configure the server they must connect to and I have the messaging (sending messages and receiving commands).
What is the best way to integrate them in an Azure IoT Solution (IoT Hub) ?
It looks like we can use Azure IoT Edge as Gateway (https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/iot-edge/iot-edge-as-gateway.md) in a "Identity translation" pattern, but I still not figure out how to do it.
I also find Azure IoT Protocol Gateway (https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-protocol-gateway) that seems to do the job but it is not sufficiently clear for me what to do.
Thanks in advance for your help.
The question is which protocols your devices support and how configurable your devices are. For instance you might be able to talk MQTT directly to the IoT Hub without using the SDK: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support#using-the-mqtt-protocol-directly-as-a-device
Same is possible for HTTP using the REST API directly: https://learn.microsoft.com/en-us/rest/api/iothub/device
If neither is an option then yes, you need some kind of gateway - like in the examples which you linked.
I intend to use the IoT Hub to update firmware of my Edison device utilising its bi-directional capability although I am not sure of where to look for detailed instructions on how to do it. The only information I have found on the subject is HERE but doesn't go into detail on how exactly to do it, more a high level overview. Does anyone have any knowledge on how this is to be done or know any links that will help?
Thanks
The link you provided returns 404 for me right now; maybe that's temporary...
I work for Microsoft, on the Device Management SDK team for IoT Hub. The new Device Management capabilities we announced at Build last week should give you exactly what you need, but there isn't much info because the features aren't available to the public just yet.
For a preview, take a look at this video from Build where we demo'd firmware update on the Intel Edison. The device management segment starts at about 35 min, demo at 40 min.
To do firmware update using only what's available publicly today in IoT Hub, you'd probably start by sending a cloud-to-device message to your Edison. Of course, exactly how you go about downloading and updating the firmware after that is specific to your device and scenario.
Here is the link to the repo which allows you to update firmware remotely using the IoT Hub. Thanks MS!
https://github.com/Azure/azure-iot-sdks/tree/dmpreview