This commit is contained in:
xyj 2024-01-25 16:30:44 +08:00
parent 5a834671f4
commit b578b825b6
4 changed files with 6 additions and 16 deletions

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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)