blinker自动化功能公测-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4428|回复: 6

[官方公告] blinker自动化功能公测

[复制链接]
发表于 2020-1-19 21:01 | 显示全部楼层 |阅读模式

blinker自动化功能开放测试了,通过app即可设置设备间的联动,使用方法如下:

1.在blinker群共享中下载最新版的app ( blinker-2.3.0-beta2或以上版本 ) ,并使用blinker lib dev3.0分支;参考例程:https://github.com/blinker-iot/b ... amples/Blinker_AUTO

2.设置触发器。DIY设备可在设备设置中编辑触发器,专属设备需要通过管理台添加;设置方法见:https://diandeng.tech/doc/actions-and-triggers


3.在 app菜单>智动化 中添加自动化规则。


相关问题,可通过回复本帖提问。


另祝大家,新年快乐



发表于 2020-2-29 12:52 | 显示全部楼层
既然两个板子不能联动,就先来点简单的,用一个板子做实验:app上就用现成的例程,一个开关按钮btn-abc,一个计数按钮btn-123,一个数据显示器num-abc,想实现功能:点击开关按钮,除了板载led动作外,计数按钮btn-123跟着动作,从而实现技术显示器上数字的变化,谁知又失败了,而且这次连一次成功的都没有。代码还是从AUTO_WIFI,这是把里面的button1_callback函数略作修改,从而实现btn-abc按钮的乒乓切换,如下所示:
void button1_callback(const String & state)
{
    BLINKER_LOG("get button state: ", state);
    digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
    if(digitalRead(LED_BUILTIN))
        Button1.print("on");
    else Button1.print("off");
}
修改switch触发器为btn-abc ,如下:
触发器.jpg
添加两个智能化规则:
x1.jpg
x2.jpg
结果发现,把btn-abc点烂,btn-123也不动作,我知道肯定是我理解的不到位,要不不会一次也不成功,望各位过路的大侠不吝赐教,谢谢了。
发表于 2020-1-19 21:02 | 显示全部楼层
支持Blinker 打卡+1
发表于 2020-2-28 19:43 | 显示全部楼层
本帖最后由 415412868 于 2020-2-28 19:51 编辑

blinker尽然有智动化功能,主要用于设备间的数据交互和控制,看着好兴奋,于是马上从网上定了两块标号D1的ESP8266实验板,对这个功能做一下尝试,结果实验效果不太理想,现在我把实验过程写出来,希望老大们给予帮助:
代码没什么好说的,就是照抄的blinker lib dev3.0中的AUTO_WIFI例程,就不贴出来了,一式两份,分别下载至两个D1实验板,两个D1中的代码除了Auth参数不同外(手机APP中添加了两个设备),其余全部相同,简便测试,没有添加任何触发器,添加两个设备后的主界面
主.jpg
配置了两个规则
1.jpg
2.jpg

想让一个板子上的led随着另外一个上面的,实现同步,结果发现只能偶尔起作用一次,大部分时间不能实现联动,但是两个分别控制没有问题,串口的调试信息如下: T.png
主控制板调试信息:
[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


我是什么地方操作错了吗?还是怎么回事啊?
为了让老大们看清楚一点,调试信息有点冗长,望见谅。
发表于 2020-5-3 18:12 | 显示全部楼层
智动化是否智能支持内置的switch,如果是自行增加的button能够作为触发条件呢?我在开发文档有看到,但是更改autoinput和触发器配置的source后,不可行
发表于 2020-5-6 19:59 来自手机 | 显示全部楼层
能否让APP执行自动发送数据的操作
发表于 2020-5-6 20:00 来自手机 | 显示全部楼层
比如每隔一段时间 自动发送手机某目录下的Text文件里内容,
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 07:49 , Processed in 0.081447 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表