Skip to content

Device Emulator Requirements

  1. Emulate all the devices on a Iot Hub instance

    1. Fetch the list of all devices, periodically
    2. For each device, start an infinite emulation that lasts until a "stop event" is fired
      1. A stop event can be a keyboard interrupt or a C# method call
      2. The emulation consists of:
        1. Load device data
        2. Decide which property should be changed, why and how
          1. If the device is locked, do nothing
          2. If it's unlocked, randomly select an action:
            1. Do nothing
            2. Change position based on velocity (only if velocity is not 0)
            3. Change position and change velocity
          3. If it's moving, consume some battery
            1. If the battery is below the standby threshold go in standby mode
        3. Change the property values
        4. Submit the update to IoT Hub

    Note

    Emulating a device means firing a sequence of realistic updates on its reported properties on IoT Hub. We consider every device to be an E-Scooter.

  2. Can be executed both as script and as a library


Last update: January 16, 2022 08:25:44
Created: September 14, 2021 12:58:16
Authors: ldeluigi (95.0%), SimoneMagnani (5.0%)