From 59e6f59d36ae92a2bfb74247839f9499397c998b Mon Sep 17 00:00:00 2001
From: xyj <10908227994@qq.com>
Date: Wed, 24 Jan 2024 17:49:33 +0800
Subject: [PATCH] update
---
.idea/workspace.xml | 58 +++++------------------------------
conf/common/mqtt.conf | 2 +-
conf/device/device.conf | 8 ++---
conf/example/supervisord.conf | 2 +-
conf/main/common.conf | 7 +++++
config.py | 9 ------
tool.py | 6 +---
7 files changed, 22 insertions(+), 70 deletions(-)
create mode 100644 conf/main/common.conf
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 257c4a7..b902db5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,55 +5,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -90,17 +48,17 @@
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "master",
- "last_opened_file_path": "/home/lihai/pythonProjects/xumu_iot/bash",
+ "last_opened_file_path": "/home/lihai/pythonProjects/xumu_iot/conf",
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
}
}]]>
+
-
diff --git a/conf/common/mqtt.conf b/conf/common/mqtt.conf
index 29c3fb0..d285214 100644
--- a/conf/common/mqtt.conf
+++ b/conf/common/mqtt.conf
@@ -1,5 +1,5 @@
[program:__mqtt__]
-directory=/home/pi/lot_manager
+directory=/home/pi/xumu_iot
command=/usr/bin/python MQTT.py
user=pi
autostart=true
diff --git a/conf/device/device.conf b/conf/device/device.conf
index ba4a17a..858b487 100644
--- a/conf/device/device.conf
+++ b/conf/device/device.conf
@@ -1,10 +1,10 @@
# 设备1-32G
# 编号
-[xumu_camera_1]
+[xumu_a001]
# 订阅的控制主题,必须和系统设置的相同
-subscribe_topic=xumu_camera_1
+subscribe_topic=xumu_a001
# 发布消息的主题
-publish_topic=camera_1
-info_topic=info_xumu_camera_1
+publish_topic=a001
+info_topic=info_xumu_a001
username=lihai_lot_land1
password=lihai_lot_land1
\ No newline at end of file
diff --git a/conf/example/supervisord.conf b/conf/example/supervisord.conf
index 71e1528..a11adcd 100644
--- a/conf/example/supervisord.conf
+++ b/conf/example/supervisord.conf
@@ -27,7 +27,7 @@ user=pi
host = 127.0.0.1
port = 9001
[program:__mqtt__]
-directory=/home/pi/lot_manager
+directory=/home/pi/xumu_iot
command=/usr/bin/python MQTT.py
user=pi
autostart=true
diff --git a/conf/main/common.conf b/conf/main/common.conf
new file mode 100644
index 0000000..9eb7cee
--- /dev/null
+++ b/conf/main/common.conf
@@ -0,0 +1,7 @@
+# 域名地址
+[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/config.py b/config.py
index bc77ef9..a20b5e4 100644
--- a/config.py
+++ b/config.py
@@ -16,9 +16,6 @@ try:
broker = config.get("broker", "host")
# 端口,这里必须是int类型
port = config.getint("broker", "port")
- # 录像地址
- post_record_list_url = config.get("record", "post_record_list_url")
- post_record_url = config.get("record", "post_record_url")
# 读取设备配置
config.read('conf/device/device.conf')
@@ -33,12 +30,6 @@ try:
# 密码
password = config.get(device_name, "password")
- # 特殊配置
- config.read('conf/zhanguan/topic.conf')
- zhanguan_device_name = config.get("device", "name")
-
- # tool配置
- mp4_path = '/home/pi/mp4'
except Exception as e:
# print(e)
pass
diff --git a/tool.py b/tool.py
index 85a9476..5bbefb6 100755
--- a/tool.py
+++ b/tool.py
@@ -1,11 +1,7 @@
import json
-import os
import subprocess
-import threading
-import requests
-
-from config import mp4_path, post_record_list_url, post_record_url, info_topic
+from config import info_topic
# 统一返回