From 732d1963ed83abf4e5f1b06ec451a6943421d716 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Thu, 22 Sep 2022 00:36:11 +0800
Subject: [PATCH] update ds18b20.c to snprintf

---
 mqttd/tools/pub_test.sh |   25 ++++++++++---------------
 1 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/mqttd/tools/pub_test.sh b/mqttd/tools/pub_test.sh
index 4276594..1165783 100755
--- a/mqttd/tools/pub_test.sh
+++ b/mqttd/tools/pub_test.sh
@@ -2,10 +2,12 @@
 
 progname=mosquitto_pub
 
-hostname="master.iot-yun.com"
+hostname="master.iot-yun.club"
 port=10883
 uid="lingyun"
 pwd="lingyun-emb"
+
+devid="RPi.3B-GP-0001"
 dltopic="\$Sys/Studio/Downlink"
 uptopic="\$Sys/Studio/Uplink"
 
@@ -14,23 +16,16 @@
 
 set -x
 
-$pub_uplink_cmd '{"id":"rpi3b001", "temp":"25.6" }'
-sleep 1
+echo $devid
 
-$pub_downlink_cmd '{"id":"rpi3b001", "light":"on" }' 
-sleep 1
+#$pub_uplink_cmd   '{"id":"RPi.3B-GP-0001", "temp":"25.6" }'
+#$pub_downlink_cmd '{"id":"RPi.3B-GP-0001", "light":"off" }' 
+$pub_downlink_cmd '{"id":"RPi.3B-GP-0002", "led":[ {"red":"off", "green": "off", "blue":"off"} ] }'
+#$pub_downlink_cmd '{"id":"RPi.3B-GP-0001", "buzzer" : "on" }'
 
-$pub_downlink_cmd '{"id":"rpi3b001", "led":[ {"red":"on", "green": "off", "blue":"off"} ] }'
-sleep 1
 
-$pub_downlink_cmd '{"id":"rpi3b001", "buzzer" : "on" }'
-sleep 1
+#$pub_downlink_cmd '{"id":"RPi.3B-GP-0001", "light":"off", "buzzer":"on", "led":[ {"red":"on", "green":"off", "blue":"off"} ] }'  
 
-#$pub_downlink_cmd '{"id":"rpi3b001", "buzzer" : "music" }'
-#sleep 1
+#$pub_downlink_cmd '{"id":"x86host02","camera" :  "on" }'
 
-$pub_downlink_cmd '{"id":"x86host02","camera" :  "on" }'
-sleep 1
-
-$pub_downlink_cmd '{"id":"rpi3b001", "light":"on", "buzzer":"on", "led":[ {"red":"on", "green":"off", "blue":"off"} ] }'  
 sleep 1

--
Gitblit v1.9.1