smart-energy-monitor/software/energy-monitor/00-simulator/simulate.sh
2023-09-16 17:05:44 +02:00

11 lines
272 B
Bash
Executable file

#!/bin/sh
echo Publishing random values to topic '/iot-platform/energy-monitor/test-device/watt'
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