From f27e0eae38502d40a187dedc3710ff4a291b05ed Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 07 十一月 2025 13:49:56 +0800
Subject: [PATCH] 111
---
server/自行车mqtt协议.md | 40 +++++++++++++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 3 deletions(-)
diff --git "a/server/\350\207\252\350\241\214\350\275\246mqtt\345\215\217\350\256\256.md" "b/server/\350\207\252\350\241\214\350\275\246mqtt\345\215\217\350\256\256.md"
index 7bfe95f..b23adad 100644
--- "a/server/\350\207\252\350\241\214\350\275\246mqtt\345\215\217\350\256\256.md"
+++ "b/server/\350\207\252\350\241\214\350\275\246mqtt\345\215\217\350\256\256.md"
@@ -3,11 +3,10 @@
## sub: device/lock/{siteId}/{lockId}/info {"bikeCode":"1234567890","lockId":"kjflksjlkfsjdlk","siteId": 456,"status":0,"code":"789"}
## sub: device/lock/{siteId}/{lockId}/bike {"bikeCode":"1234567890","lockId":789,"siteId": 456,"time":"2023-10-13 10:12:90"}
-
# 鑷杞� mqtt 鍗忚鏂囨。
## 閫氫俊瑙勮寖
-- 姣忎釜绔欑偣涓�涓� mqtt 杩炴帴锛宑lientId 涓� SITE_绔欑偣缂栧彿
+- 姣忎釜绔欑偣涓�涓� mqtt 杩炴帴锛宑lientId 涓� SITE_绔欑偣缂栧彿_鏃堕棿鎴�
- 涓�涓珯鐐圭敱閮ㄧ讲鍦ㄤ笂浣嶆満涓婄殑杞欢閫氳繃can鎬荤嚎涓庡涓攣閫氫俊锛屽苟涓庢湇鍔″櫒閫氳繃mqtt鍋氭秷鎭浆鍙�
- siteId + lockId 涓洪攣鐨勫敮涓�绱㈠紩锛屽湪鍚屼竴绔欑偣涓嬶紝lockId涓嶉噸澶�
@@ -48,4 +47,39 @@
"bikeCode": "12345678", // 鑷杞c鍗″彿锛�8浣嶆暟瀛�,濡傦細10000012锛屾棤杞︿负绌�
"timestamp": 1234567823423 // 鏃堕棿鎴筹紝 ms鍊硷紝绔欑偣涓婁綅鏈烘敹鍒拌繕杞︽寚浠ょ殑鏃堕棿锛屼粎鍋氬弬鑰冿紝璇蜂互鏈嶅姟鍣ㄦ椂闂翠负鍑�
}
-```
\ No newline at end of file
+```
+
+## sub: device/lock/{siteId}/health qos=0
+> ## 绔欑偣蹇冭烦涓婚, 闂撮殧30s
+- 鏁版嵁
+```json
+{
+ "timestamp": 1234567823423 // 鏃堕棿鎴筹紝 ms鍊�
+}
+```
+
+## sub: device/lock/{siteId}/siteInfo qos=1
+> 鏂板 - 绔欑偣淇℃伅锛岀珯鐐瑰湪杩炴帴鏈嶅姟鍣ㄥ悗鍗虫帹閫�
+- 鏁版嵁
+```json
+{
+ "siteId": "1015", // 绔欑偣缂栧彿,鍚屼富棰榹siteId}
+ "locks": 1234, // 閿佹暟閲�
+ "version": "1.0.7", // 绔欑偣杞欢鐗堟湰鍙�
+ "timestamp": 1234567823423 // 鏃堕棿鎴筹紝 ms鍊�
+}
+```
+
+## sub: device/lock/{siteId}/{lockId}/adminCard qos=1
+> 鏂板 - 绠$悊鍛樺埛鍗¤褰曚笂鎶�
+- 鏁版嵁
+```json
+{
+ "siteId": "1015", // 绔欑偣缂栧彿,鍚屼富棰榹siteId}
+ "lockId": 2, // 閿佺紪鍙�,鍚屼富棰榹lockId}
+ "cardNo": "1001", // 绠$悊鍛樺崱鍙凤紝鍥涗綅鏁板瓧
+ "bikeCode": "12345678", // 鑷杞c鍗″彿锛�8浣嶆暟瀛�,濡傦細10000012锛屾棤杞︿负绌�
+ "timestamp": 1234567823423 // 鏃堕棿鎴筹紝 ms鍊�
+}
+```
+
--
Gitblit v1.9.3