diff --git a/MQTT.py b/MQTT.py index b28ea7a..b232d8d 100644 --- a/MQTT.py +++ b/MQTT.py @@ -33,10 +33,6 @@ class MQTTClient: self.client.subscribe(self.topic) client.publish(info_topic, payload=publish_payload(code=200, msg='成功订阅' + self.topic), qos=0) - # 关闭摄像机电 - subprocess.Popen(['sudo /usr/bin/python close_led.py'], shell=True) - # 关闭LED灯 - subprocess.Popen(['sudo /usr/bin/python close_blue_led.py'], shell=True) def on_message(self, client, userdata, msg): if not valid(msg, client): diff --git a/conf/device/device.conf b/conf/device/device.conf index 858b487..371260d 100644 --- a/conf/device/device.conf +++ b/conf/device/device.conf @@ -1,10 +1,7 @@ -# 设备1-32G # 编号 -[xumu_a001] +[xumu_d001] # 订阅的控制主题,必须和系统设置的相同 -subscribe_topic=xumu_a001 -# 发布消息的主题 -publish_topic=a001 -info_topic=info_xumu_a001 +subscribe_topic=xumu_d001 +info_topic=info_xumu_d001 username=lihai_lot_land1 password=lihai_lot_land1 \ No newline at end of file diff --git a/conf/main/common.conf b/conf/main/common.conf index 9eb7cee..ec167e6 100644 --- a/conf/main/common.conf +++ b/conf/main/common.conf @@ -2,6 +2,3 @@ [broker] host=mqtt.lihaink.cn port=1883 -[record] -post_record_list_url=https://iot.lihaink.cn/api/index/file_list -post_record_url=https://iot.lihaink.cn/api/index/upload \ No newline at end of file diff --git a/tool.py b/tool.py index 5bbefb6..d138ac8 100755 --- a/tool.py +++ b/tool.py @@ -23,7 +23,7 @@ def exception_handler(func): def push_stream(client): - p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/bash/start_push_stream.sh'], + p = subprocess.Popen(['/bin/bash /home/pi/agri_xumu/bash/start_push_stream.sh'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -33,7 +33,7 @@ def push_stream(client): def close_stream(client): - p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/bash/stop_push_stream.sh'], + p = subprocess.Popen(['/bin/bash /home/pi/agri_xumu/bash/stop_push_stream.sh'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -73,7 +73,7 @@ def get_status(client): def update(client): - p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/git_update.sh'], + p = subprocess.Popen(['/bin/bash /home/pi/agri_xumu/git_update.sh'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)