2023-02-22 15:43:48 +01:00
|
|
|
#!/bin/sh
|
2023-09-16 17:05:44 +02:00
|
|
|
|
2023-02-22 16:45:44 +01:00
|
|
|
echo Publishing random values to topic '/iot-platform/energy-monitor/test-device/watt'
|
2023-09-16 17:05:44 +02:00
|
|
|
|
|
|
|
while true
|
2023-02-22 15:43:48 +01:00
|
|
|
do
|
|
|
|
mosquitto_pub -h localhost -p 1883 -t '/iot-platform/energy-monitor/test-device/watt' -m $((1 + $RANDOM % 10 * 500))
|
|
|
|
printf '%s' "."
|
2023-09-16 17:05:44 +02:00
|
|
|
sleep 1
|
|
|
|
done
|