Simulator
Tools/sim_device.py simulates several Sentinel nodes with the same topics and payloads as the firmware. It is useful for testing the gateway, bridge, and Celestian before hardware is available. Each simulated node has two temperature slots (t1, t2) and two door inputs (d1, d2, type door).
python3 Tools/sim_device.py --host localhost --racks 4| Option | Default | Meaning |
|---|---|---|
--host, --port |
localhost, 1883 |
the gateway’s local broker (on a MacBook: --port 11883) |
--racks |
4 | number of simulated nodes |
--interval |
5 | seconds between telemetry sends |
--format |
flat |
flat (SenFlat v1) or senml |
--workspace, --channel, --user, --password |
direct mode: one connection to Celestian with ID and device key (also CELESTIAN_DEVICE_KEY), publishing to m/<workspace>/c/<channel>/<mac>/… for all simulated nodes |
Example alarm test
Section titled “Example alarm test”python3 Tools/sim_device.py --host localhost --racks 2python3 Tools/celestianctl.py config 02005e000001 cfg_ver=2 temp_alarm_c=25python3 Tools/celestianctl.py watchWhat you will see: config/reported with cfg_ver 2, then an alarm_t1_high event with _value when the simulated temperature passes 25 °C, and alarm_t1_high in telemetry.