|
本帖最后由 415412868 于 2020-2-28 19:51 编辑
blinker尽然有智动化功能,主要用于设备间的数据交互和控制,看着好兴奋,于是马上从网上定了两块标号D1的ESP8266实验板,对这个功能做一下尝试,结果实验效果不太理想,现在我把实验过程写出来,希望老大们给予帮助:
代码没什么好说的,就是照抄的blinker lib dev3.0中的AUTO_WIFI例程,就不贴出来了,一式两份,分别下载至两个D1实验板,两个D1中的代码除了Auth参数不同外(手机APP中添加了两个设备),其余全部相同,简便测试,没有添加任何触发器,添加两个设备后的主界面
配置了两个规则
想让一个板子上的led随着另外一个上面的,实现同步,结果发现只能偶尔起作用一次,大部分时间不能实现联动,但是两个分别控制没有问题,串口的调试信息如下:
,
主控制板调试信息:
[3213134] Got: {"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3213139] data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}
[3213144] fromDevice: senderClient1
[3213168] parse data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}{"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3213177] defined BLINKER_ARDUINOJSON
[3213181] autoManager begin: 1 1
[3213183] get auto setting
[3213185] _auto trigged action: {"btn-abc":"off"}
[3213190] checkNum count: 1
[3213192] strWidgetsParse isParsed
[3213195] strWidgetsParse: btn-abc
[3213199] get button state: off
[3213202] autoFormatData key: btn-abc, json: "btn-abc":{"swi":"ON"}
[3213207] new.
[3213209] isParsed
[3213211] checkNum count: 1
[3213213] isParsed
[3213319] print: {"btn-abc":{"swi":"ON"}}
[3213319] Proto print...
[3213319] Freeheap: 9960
[3213320] isJson: {"data":{"btn-abc":{"swi":"ON"}},"fromDevice":"FD468DAEOTS7FOQ8GJ6IEIVV","toDevice":"cd303ce73177ea88daf55d35fb20b4a8","deviceType":"OwnApp"}
[3213330] MQTT Publish...
[3213332] Freeheap: 9960
[3213336] ERROR: MQTT NOT ALIVE OR MSG LIMIT
[3213339] Freeheap: 10992
[3224092] Got: {"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3224096] data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}
[3224101] fromDevice: senderClient1
[3224126] parse data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}{"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3224134] defined BLINKER_ARDUINOJSON
[3224139] autoManager begin: 1 1
[3224141] get auto setting
[3224143] _auto trigged action: {"btn-abc":"off"}
[3224147] checkNum count: 1
[3224150] strWidgetsParse isParsed
[3224153] strWidgetsParse: btn-abc
[3224156] get button state: off
[3224159] autoFormatData key: btn-abc, json: "btn-abc":{"swi":"ON"}
[3224165] new.
[3224166] isParsed
[3224169] checkNum count: 1
[3224171] isParsed
[3224276] print: {"btn-abc":{"swi":"ON"}}
[3224276] Proto print...
[3224276] Freeheap: 9960
[3224277] isJson: {"data":{"btn-abc":{"swi":"ON"}},"fromDevice":"FD468DAEOTS7FOQ8GJ6IEIVV","toDevice":"cd303ce73177ea88daf55d35fb20b4a8","deviceType":"OwnApp"}
[3224288] MQTT Publish...
[3224290] Freeheap: 9960
[3224293] ERROR: MQTT NOT ALIVE OR MSG LIMIT
[3224296] Freeheap: 10992
[3254124] MQTT Ping!
[3254124] Freeheap: 10992
被动板调试信息:
[3213134] Got: {"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3213139] data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}
[3213144] fromDevice: senderClient1
[3213168] parse data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}{"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3213177] defined BLINKER_ARDUINOJSON
[3213181] autoManager begin: 1 1
[3213183] get auto setting
[3213185] _auto trigged action: {"btn-abc":"off"}
[3213190] checkNum count: 1
[3213192] strWidgetsParse isParsed
[3213195] strWidgetsParse: btn-abc
[3213199] get button state: off
[3213202] autoFormatData key: btn-abc, json: "btn-abc":{"swi":"ON"}
[3213207] new.
[3213209] isParsed
[3213211] checkNum count: 1
[3213213] isParsed
[3213319] print: {"btn-abc":{"swi":"ON"}}
[3213319] Proto print...
[3213319] Freeheap: 9960
[3213320] isJson: {"data":{"btn-abc":{"swi":"ON"}},"fromDevice":"FD468DAEOTS7FOQ8GJ6IEIVV","toDevice":"cd303ce73177ea88daf55d35fb20b4a8","deviceType":"OwnApp"}
[3213330] MQTT Publish...
[3213332] Freeheap: 9960
[3213336] ERROR: MQTT NOT ALIVE OR MSG LIMIT
[3213339] Freeheap: 10992
[3224092] Got: {"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3224096] data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}
[3224101] fromDevice: senderClient1
[3224126] parse data: {"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}}{"deviceType":"DiyArduino","data":{"set":{"auto":{"act":["{\"btn-abc\":\"off\"}"]}}},"fromDevice":"senderClient1","toDevice":"FD468DAEOTS7FOQ8GJ6IEIVV"}
[3224134] defined BLINKER_ARDUINOJSON
[3224139] autoManager begin: 1 1
[3224141] get auto setting
[3224143] _auto trigged action: {"btn-abc":"off"}
[3224147] checkNum count: 1
[3224150] strWidgetsParse isParsed
[3224153] strWidgetsParse: btn-abc
[3224156] get button state: off
[3224159] autoFormatData key: btn-abc, json: "btn-abc":{"swi":"ON"}
[3224165] new.
[3224166] isParsed
[3224169] checkNum count: 1
[3224171] isParsed
[3224276] print: {"btn-abc":{"swi":"ON"}}
[3224276] Proto print...
[3224276] Freeheap: 9960
[3224277] isJson: {"data":{"btn-abc":{"swi":"ON"}},"fromDevice":"FD468DAEOTS7FOQ8GJ6IEIVV","toDevice":"cd303ce73177ea88daf55d35fb20b4a8","deviceType":"OwnApp"}
[3224288] MQTT Publish...
[3224290] Freeheap: 9960
[3224293] ERROR: MQTT NOT ALIVE OR MSG LIMIT
[3224296] Freeheap: 10992
[3254124] MQTT Ping!
[3254124] Freeheap: 10992
[3284688] MQTT Ping!
[3284688] Freeheap: 10992
[3315254] MQTT Ping!
[3315254] Freeheap: 10992
[3345826] MQTT Ping!
[3345826] Freeheap: 10992
[3376391] MQTT Ping!
[3376391] Freeheap: 10992
我是什么地方操作错了吗?还是怎么回事啊?
为了让老大们看清楚一点,调试信息有点冗长,望见谅。
|
|