energy-device-simulator

Tool v0.4.0 TypeScript MIT

Friendly local simulator for trying energy-monitoring flows before you have a real meter on the desk.

energy-device-simulator

energy-device-simulator

energy-device-simulator is a protocol-focused local simulator for the two device families used in this stack:

  • IAMMETER WEM3080T over Modbus TCP
  • Shelly Pro 3EM over Shelly local RPC HTTP

Instead of exposing a large lab interface, the project is built around the protocol output itself. The browser UI stays intentionally small, while the terminal keeps the low-level request logs for debugging and verification.

What It Is Good For

  • Reproducing IAMMETER Modbus TCP payloads without physical hardware
  • Reproducing Shelly Pro 3EM RPC responses for power and energy data
  • Switching quickly between supported devices during integration testing
  • Verifying how edge services and dashboards behave when the source device changes

Included In The Project

  • Built-in device profiles
  • A small local web console
  • A lightweight HTTP control API
  • Deterministic tests for protocol behavior
  • Runtime persistence for the last selected device

Getting Started

energy-device-simulator is a Node.js project and can be started locally in a few commands:

npm install
npm run typecheck
npm test
npm start

The default startup uses a non-privileged IAMMETER development config on port 1502, so it can run on a normal workstation without elevated privileges.

Useful alternate modes:

  • npm run start:iammeter for the realistic IAMMETER profile on port 502
  • npm run start:shelly for the Shelly Pro 3EM profile on port 18080

After startup, open http://127.0.0.1:5092/ to switch devices and inspect the live protocol output.