diff --git a/software/firmware/energy-monitor/00-simulator/simulate.sh b/software/firmware/energy-monitor/00-simulator/simulate.sh new file mode 100755 index 0000000..e545d47 --- /dev/null +++ b/software/firmware/energy-monitor/00-simulator/simulate.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo Publishing random values to topic '/iot-platform/energy-monitor/test-device‘ +while true +do + mosquitto_pub -h localhost -p 1883 -t '/iot-platform/energy-monitor/test-device/watt' -m $((1 + $RANDOM % 10 * 500)) + printf '%s' "." + sleep 1 +done \ No newline at end of file