IoTEdge Device shows offline in Service SDK
See original GitHub issueI am using the RegistryManager
from the Microsoft.Azure.Devices
Package to get informations about the running IoT Edge Devices.
This works very well except the device status. This one is always disconnected (even if the portal shows connected).
I am not sure if this is a SDK issue or an iotedge issue.
Expected Behavior
Device
instance requested by RegistryManager
shows actual Connection State.
Current Behavior
Shows always Disconnected
Steps to Reproduce
RegistryManager mgr = RegistryManager.CreateFromConnectionString("");
var dev = await mgr.GetDeviceAsync("IoTEdge-0002");
Console.WriteLine(dev.ConnectionState);
Context (Environment)
Device (Host) Operating System
Windows 10
Architecture
Container Operating System
Windows
Runtime Versions
iotedged
1.0
Edge Agent
1.0
Edge Hub
1.0
Docker
18.03.1-ce
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
How to monitor the status of IoT Edge Device Offline Mode
My idea of work is, I am running a DB module on my IoT Edge device, I want to re populate this DB...
Read more >Operate devices offline - Azure IoT Edge
IoT Edge devices automatically have offline capabilities enabled. To extend that capability to other devices, you need to configure the ...
Read more >Azure IoT Edge - How to diagnose locally while offline?
The UI must be viewable if/when the device has no connection to the internet (offline). We want to show a list of modules,...
Read more >IoT Hub service SDK get Edge runtime response
412 - The schema version in the deployment configuration is invalid. 406 - The IoT Edge device is offline or not sending status...
Read more >Create and manage IoT Edge devices
Device Update of IoT Hub is a service that enables you to deploy ... The following sample shows how an IoT Edge device...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pierreca Yes, I agree that we should fix this in the service side, and I don’t think the SDK should do it. Essentially the service needs to do something like this -
@WilliamBerryiii thanks for the tag! Bringing @nberdy and @simonporter into the fun 😃
my 2cts:
ConnectionState
property can be unreliable so it’s not recommended to use this in production. TBH, we have no perfect way to surface that information right now (Ops monitoring messages could come out of order, theConnectionState
property could be out of sync…( see the end of this comment as to why)why is the
ConnectionState
field unreliable?