Compare commits

..

No commits in common. "b578b825b6fd111204731bc4f2a1f069388ef851" and "133b409d6cee68bce696236f04cc2660a025ddc4" have entirely different histories.

5 changed files with 39 additions and 23 deletions

View File

@ -60,7 +60,7 @@
<recent name="$PROJECT_DIR$/conf" />
</key>
</component>
<component name="RunManager" selected="Shell Script.git_push.sh (1)">
<component name="RunManager" selected="Shell Script.git_push.sh">
<configuration name="t" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="agri_xumu" />
<option name="INTERPRETER_OPTIONS" value="" />
@ -82,6 +82,27 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="tes" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="agri_xumu" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tes.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="agri_xumu" />
<option name="INTERPRETER_OPTIONS" value="" />
@ -124,21 +145,6 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="git_push.sh (1)" type="ShConfigurationType" temporary="true">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/../agri_xumu/git_push.sh" />
<option name="SCRIPT_OPTIONS" value="" />
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$/../agri_xumu" />
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
<option name="INTERPRETER_PATH" value="/bin/bash" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="EXECUTE_IN_TERMINAL" value="true" />
<option name="EXECUTE_SCRIPT_FILE" value="true" />
<envs />
<method v="2" />
</configuration>
<configuration name="git_push.sh" type="ShConfigurationType" temporary="true">
<option name="SCRIPT_TEXT" value="" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
@ -156,11 +162,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Shell Script.git_push.sh (1)" />
<item itemvalue="Shell Script.git_push.sh" />
<item itemvalue="Python.test" />
<item itemvalue="Python.video_task" />
<item itemvalue="Python.t" />
<item itemvalue="Python.tes" />
</list>
</recent_temporary>
</component>

View File

@ -33,6 +33,10 @@ 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,7 +1,10 @@
# 设备1-32G
# 编号
[xumu_d001]
[xumu_a001]
# 订阅的控制主题,必须和系统设置的相同
subscribe_topic=xumu_d001
info_topic=info_xumu_d001
subscribe_topic=xumu_a001
# 发布消息的主题
publish_topic=a001
info_topic=info_xumu_a001
username=lihai_lot_land1
password=lihai_lot_land1

View File

@ -2,3 +2,6 @@
[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/agri_xumu/bash/start_push_stream.sh'],
p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/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/agri_xumu/bash/stop_push_stream.sh'],
p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/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/agri_xumu/git_update.sh'],
p = subprocess.Popen(['/bin/bash /home/pi/lot_manager/git_update.sh'],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)