locked
Get list of devices disconnected devices RRS feed

  • Question

  • Hi Team,

    Is there any tool or feature in azure portal using which we can get list of devices disconnected from IOT Hub.

    I checked azure Iot hub explorer it just show device is connected or not for a given ID, but we do not have an option to get a list disconnected devices by passing IOThub connection string

    Wednesday, October 12, 2016 12:47 AM

Answers

  • Hi Anil,

    Currently, the Device Twins features are in the preview, where:

    - Devices must be connected to IoT Hub using the MQTT protocol

    - Enable Device Management - PREVIEW must be checked

    - Location only in East US, North Europe, and East Asia are supported

    Did you follow the above restrictions for your testing?

    Thanks

    Roman



    Wednesday, October 19, 2016 4:39 AM
  • - Have a look at the Tutorial: Get started with device twins (preview) for more details such as Create a device management enabled IoT Hub.

    Note, that the preview IoT Hub will cost you a minimum $50 per month if you already have a free IoT Hub. Otherwise, you have to delete your free IoT Hub and create new one with a preview features.

    In my case, I have created a new IoT Hub ($50/month) with a preview checkbox. It will be nice to have no charge (or some discount) for using the preview features for that created IoT Hub. It is a preview, temporary (no production) and also you cannot migrate devices into and out of device management enabled hubs.

    Thanks

    Roman



    Thursday, October 20, 2016 6:09 PM

All replies

  • Hi Anil,

    - have a look at the List device identities

    The Response is the Json-serialized array with device identities, which included also a connectionStatus such as Disconnected and Connected.

    The other option (now in the preview) is to use query on the device twins

    Thanks

    Roman



    • Edited by Roman Kiss Wednesday, October 12, 2016 8:30 PM
    Wednesday, October 12, 2016 8:30 PM
  • Hi Team,

    Thanks for your help. I did use the blog and while executing query I am getting this error

    {"{\"Message\":\"ErrorCode:InvalidProtocolVersion;BadRequest\",\"ExceptionMessage\":\"Tracking ID:479f0933cc2c493db6fb495693212645-G:10-TimeStamp:10/17/2016 21:27:34\"}"}

    at

     registryManager = RegistryManager.CreateFromConnectionString(connectionString);
     var query = registryManager.CreateQuery("SELECT * FROM devices", 1);           
     while (query.HasMoreResults)
     {
                   var tmp =  query.GetNextAsJsonAsync().GetAwaiter().GetResult(); at this line

    Monday, October 17, 2016 9:30 PM
  • Hi Anil,

    Currently, the Device Twins features are in the preview, where:

    - Devices must be connected to IoT Hub using the MQTT protocol

    - Enable Device Management - PREVIEW must be checked

    - Location only in East US, North Europe, and East Asia are supported

    Did you follow the above restrictions for your testing?

    Thanks

    Roman



    Wednesday, October 19, 2016 4:39 AM
  • Hi Thanks for your valuable inputs

    Devices must be connected to IoT Hub using the MQTT protocol

    >> Yes

    - Enable Device Management - PREVIEW must be checked

    >> from when can I check this setting is this something available on new azure portal if so can u please share the steps to navigate

    - Location only in East US, North Europe, and East Asia are supported

    >> Yes

    Thursday, October 20, 2016 1:14 PM
  • - Have a look at the Tutorial: Get started with device twins (preview) for more details such as Create a device management enabled IoT Hub.

    Note, that the preview IoT Hub will cost you a minimum $50 per month if you already have a free IoT Hub. Otherwise, you have to delete your free IoT Hub and create new one with a preview features.

    In my case, I have created a new IoT Hub ($50/month) with a preview checkbox. It will be nice to have no charge (or some discount) for using the preview features for that created IoT Hub. It is a preview, temporary (no production) and also you cannot migrate devices into and out of device management enabled hubs.

    Thanks

    Roman



    Thursday, October 20, 2016 6:09 PM
  • You could try the cross-platform Azure IoT Toolkit extension for Visual Studio Code. It could list all the devices with connection status. When device is disconnected, the icon is blue. When device is connected, the icon is green. 

    Wednesday, September 6, 2017 11:48 AM