Home

Awesome

mock-devices v10 (Desktop Edition)

mock-devices is a simulation engine that manages and runs simulated devices that connect to an Azure Iot Hub and modules and leaf devices for Azure Iot Edge. When hosted in the Azure IoT Edge runtime, the engine will simulate Edge modules too. The simulated devices and modules implement D2C/C2D scenarios i.e telemetry, twin and commands as supported by the Azure IoT Device SDK

Each configured device/module acts independently of other devices/modules running within the engine. Each has its own model (capabilities), configuration and connection details. Devices/modules running on the same simulation engine can be a mix of connection strings, DPS, SaS, Edge modules. The engine has additional scenarios like cloning, bulk, templates and acknowledgements. See internal help

This desktop edition of mock-devices is an Electron app for Windows/Linux/OSX and provides a UX + engine single install application experience. It is part of a suite of mock-devices tools

Other editions

State file

The state file is the current state of the simulation engine including the list of devices/modules, their capabilities and value set ups. Its also used as the load/save file for the mock-devices desktop tool. Both editions of mock-devices can create and/or utilize a state file created in ether edition with matching version numbers. It is recommended to use the desktop edition to create/manage state files

Getting started

First time running the app - One Time Install and Build

From a command prompt navigate to the folder where the repo was sync'd. Perform the following command.

npm ci && npm run build

Do this every time the code is sync'd from the repo i.e. getting a new version of the app. If you are experiencing issues with this step see the Pre-Reqs and build issues step below

Launching app (everyday use)

From a command prompt navigate to the folder where the repo was sync'd and perform the following command

npm run app

Usage Instructions

Basic help is available inside the application


v10 Update

v9 Updates

Features

Macro support for value payloads

Use auto generated values to send as a device value when running in loops


Advanced, troubleshooting, Pre-Reqs and build issues

Ensure you have the following configured for your environment

Pre-reqs

If you are experiencing multiple build issues, try the following steps

Clear NPM cache

npm cache clean --force

Do the install step separately

npm ci

Rebuild node-sass

rebuild node-sass --force

Do the build step separately

npm run build