|
楼主 |
发表于 2020-6-28 17:46
|
显示全部楼层
1、在COM口里查看设备运行信息,时间显示Sun Jun 28 09:35:09 2020,(正确时间是17:35),不知是否正确,一下是设备的log
17:35:10.245 -> [21887] Current time: Sun Jun 28 09:35:09 2020
17:35:10.245 ->
17:35:10.245 -> [21888] NTP time: 1593308109
17:35:10.245 -> [21888] time (millis() - ntpFreshTime): 21888
17:35:10.245 -> [21888] ntpGetTime: 0
17:35:10.245 -> [21889] 1
17:35:10.245 -> [21890] ==== needInit ====
17:35:10.245 -> [21893] message: /share/device?deviceName=B49AA3DEWF0QNPE3RIHUPE94&key=ac06381e4172
17:35:10.245 -> [21900] blinker server begin
17:35:10.245 -> [21903] Freeheap: 29896
17:35:11.439 -> [23066] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/share/device?deviceName=B49AA3DEWF0QNPE3RIHUPE94&key=ac06381e4172
17:35:11.439 -> [23067] HTTPS payload: /share/device?deviceName=B49AA3DEWF0QNPE3RIHUPE94&key=ac06381e4172
17:35:11.439 -> [23074] [HTTP] status... code: 200
17:35:11.439 -> [23079] {"detail": {"users": []}, "message": 1000}
17:35:11.439 -> [23083] payload: {"users":[]}
17:35:11.439 -> [23087] sharers data: {"users":[]}
17:35:11.439 -> [23088] load timing
17:35:11.439 -> [23091] load timing taskCount: 0
17:35:11.439 -> [23093] freshTiming wDay: 0, nowMins: 575, nowSeconds: 34511
17:35:11.439 -> [23098] nextTask: 10 apartSeconds: 51889 wDay: 0
17:35:11.439 -> [23102] cbackData: 10
17:35:11.439 -> [23104] change apartSeconds: 3600
17:35:11.541 -> [23208] Connecting to MQTT...
17:35:12.701 -> [24337] MQTT Connected!
17:35:12.701 -> [24337] Freeheap: 9064
17:35:12.701 -> [24337] millis: 24337, connect_time: 21890
17:35:12.701 -> [24337] MQTT conn init success
17:35:12.701 -> [24337] =======================================================
17:35:12.701 -> [24342] =========== Blinker Auto Control mode init! ===========
17:35:12.701 -> [24348] Warning!EEPROM address 0-1279 is used for Auto Control!
17:35:12.701 -> [24353] =========== DON'T USE THESE EEPROM ADDRESS! ===========
17:35:12.701 -> [24359] =======================================================
17:35:12.701 -> [24365] _______autoStart_______
17:35:12.771 -> [24422] print: {"btn-abc":{"swi":"off","clr":"#C0C0C0","tex":"开灯","tex1":"关着呢"}}
17:35:12.771 -> [24422] Proto print...
17:35:12.771 -> [24423] Freeheap: 9064
17:35:12.771 -> [24424] isJson: {"data":{"btn-abc":{"swi":"off","clr":"#C0C0C0","tex":"开灯","tex1":"关着呢"}},"fromDevice":"B49AA3DEWF0QNPE3RIHUPE94","toDevice":"99a391f9204262a13caf9672f4c60b23","deviceType":"OwnApp"}
17:35:12.771 -> [24442] MQTT Publish...
17:35:12.771 -> [24444] Freeheap: 9064
17:35:12.771 -> [24446] _print_times: 1
17:35:12.873 -> [24524] {"data":{"btn-abc":{"swi":"off","clr":"#C0C0C0","tex":"开灯","tex1":"关着呢"}},"fromDevice":"B49AA3DEWF0QNPE3RIHUPE94","toDevice":"99a391f9204262a13caf9672f4c60b23","deviceType":"OwnApp"}
17:35:12.873 -> [24531] ...OK!
17:35:12.873 -> [24532] Freeheap: 9064
17:35:12.873 -> [24534] Freeheap: 10096
17:35:12.873 -> [24559] 设备时间为:9:35
17:35:15.924 -> [27595] 设备时间为:9:35
17:35:18.959 -> [30632] 设备时间为:9:35
17:35:22.002 -> [33658] 设备时间为:9:35
17:35:25.009 -> [36687] 设备时间为:9:35
17:35:28.047 -> [39717] 设备时间为:9:35
17:35:31.076 -> [42740] 设备时间为:9:35
17:35:34.112 -> [45770] 设备时间为:9:35
17:35:37.121 -> [48800] 设备时间为:9:35
17:35:40.169 -> [51832] 设备时间为:9:35
17:35:42.876 -> [54535] MQTT Ping!
17:35:42.876 -> [54535] Freeheap: 10096
17:35:43.425 -> [55114] 设备时间为:9:35
17:35:46.474 -> [58140] 设备时间为:9:35
17:35:49.507 -> [61172] 设备时间为:9:35
2、程序中添加如下代码,检查定时任务是否设置成功,结果放回为:0,log如下:17:44:42.625 -> [51978] 设备上定时设置0
17:44:42.625 -> [51978] 设备上定时设置0
,
BLINKER_LOG("设备上定时设置",Blinker.timingState());
BLINKER_LOG("设备上定时设置",Blinker.loopState());
BLINKER_LOG("设备时间为:",Blinker.hour(),":",Blinker.minute()); |
|