Azure/azure-iot-pcs-remote-monitoring-dotnet

Adding a new simulated device resets the reported properties of all existing devices to default values

newlogics opened this issue · 3 comments

Type of issue

  • Bug
  • New feature
  • Improvement

Description

Adding a new simulated device resets the reported properties of all existing devices to default values.

Steps to reproduce

1. First step
Update latitude and longitude properties of a chiller.
Devices tab -> select a chiller (chiller-01.0)-> jobs -> reconfigure -> change latitude and longitude -> apply.
Once done confirm the same in IoT hub device twin.

2. Second step
Create a new simulated device.
Devices tab -> New device -> Simulated, 1 , Chiller -> apply

3. Third step
Once the new simulated device is created & started sending telemetry, go to IoT hub and check latitude and longitude reported properties of the old device (chiller-01.0) which is wrongly reset back to default after creation of the new device.

Expected behavior

Adding a new simulated device should not reset the reported properties of all existing devices to default values.

Current behavior

Adding a new simulated device resets the reported properties of all existing devices to default values.

@hathind-ms Can you please look into this issue and assign it as needed.

@avanikp - I assigned this to you.

This is a known issue - adding a simulated device will result in updating simulation record in the db and will restart simulation, hence all devices will be reset.
This issue is addressed with the Add/Delete API for adding/deleting specific simulated devices. With this change the service will not cause restart of simulation and should preserve existing device properties. The issue should be resolved once remote monitoring starts consuming these APIs.