Initial commit: 上传完整代码

This commit is contained in:
2026-06-19 20:47:06 +08:00
commit 78b5898da2
71 changed files with 8767 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import json
# MQTT配置
BROKER = "127.0.0.1"
MQTT_PORT = 1883
USER = "test"
PWD = "test"
# Modbus配置
TIMEOUT = 0.1
BYTESIZE = 8
PARITY = 'N'
STOPBITS = 1
# MQTT主题
DEVICE_STATUS_TOPIC = "device/status"
DEVICE_CONTROL_TOPIC = "device/control"
SERVICE_STATUS_TOPIC = "service/status"
CONFIG_FILE = "/home/admin/.config/cpy/sensor.json"
try:
with open(CONFIG_FILE, "r") as f:
config = json.load(f)
except FileNotFoundError:
config = {}