blinker bug报告-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

楼主: coloz

[官方公告] blinker bug报告

  [复制链接]
发表于 2021-8-22 14:03 | 显示全部楼层
本帖最后由 Cp0204 于 2021-8-22 14:35 编辑

问题现象:小爱同学氛围灯,亮度控制bug
开发板:8266
其他说明:

小爱步长亮度时,调用miotBright,传参  暗一点="1",暗一点="21",虽然可以自己fix,但不是完美的办法,目前只能这样写,当喊亮度1和亮度21就会有bug

问题已解决,由于MIOT Query All中 BlinkerMIOT.brightness(0),没正确返回亮度引起的,哭
发表于 2021-8-26 22:44 | 显示全部楼层
本帖最后由 zjdaty 于 2021-8-26 22:46 编辑

我在界面上加了实时图像显示,返回主页后,后台图像数据依旧再传输,没有断开。下回再进去,感觉又连了一遍。重复退出进去,带宽越占越大,这个逻辑应该是返回主页就断开图像流,避免出现进去一次重连一次图像的情况。

Inked276165846_LI.jpg Inked2104429819_LI.jpg Inked493265683_LI.jpg


发表于 2021-8-29 14:56 来自手机 | 显示全部楼层
有添加设备但是同步不到天猫精灵
 楼主| 发表于 2021-8-29 17:38 | 显示全部楼层
1996xjm 发表于 2021-8-29 14:56
有添加设备但是同步不到天猫精灵

请阅读文档,先给设备写入对应语音助手的支持程序。
发表于 2021-9-1 08:02 | 显示全部楼层
开发版app的bug算吗?
 楼主| 发表于 2021-9-1 22:37 | 显示全部楼层
284003505 发表于 2021-9-1 08:02
开发版app的bug算吗?

请直接描述bug并提供复现方法
发表于 2021-9-5 08:28 | 显示全部楼层
手机系统安卓 2.5.7
bug1:配置好定时任务后,到时间了毫无反应. 但是倒计时功能是正常的. 看设置好定时功能后, 手机调试数据有 定时数据段返回, 说明定时已经设置到官方服务器了 , 但服务器到时间后没有发指令给设备
 楼主| 发表于 2021-9-6 10:46 | 显示全部楼层
gzm001 发表于 2021-9-5 08:28
手机系统安卓 2.5.7
bug1:配置好定时任务后,到时间了毫无反应. 但是倒计时功能是正常的. 看设置好定时功能 ...

定时是存储在设备上的,和点灯服务器无关,建议设置个较短的时间,通过debugall,查看调试信息,看看定时是否触发。
https://www.arduino.cn/thread-84332-1-1.html
发表于 2021-9-8 15:09 | 显示全部楼层
本帖最后由 carlbeven 于 2021-9-8 15:14 编辑

问题现象:新版esp8266SDK环境下Blinker采用Fastled库第一个灯珠闪烁Arduino IDE版本:1.8.16
SDK esp8266 3.0.1
FastLED版本3.4.0
开发板:ESP8266 NODEMCU

  1. #include <FastLED.h>
  2. #include <Adafruit_NeoPixel.h>
  3. // How many leds in your strip?
  4. #define NUM_LEDS 30
  5. #define BLINKER_WIFI

  6. #include <Blinker.h>
  7. // For led chips like Neopixels, which have a data line, ground, and power, you just
  8. // need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
  9. // ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN
  10. #define DATA_PIN 5
  11. //#define CLOCK_PIN 13
  12. char auth[] = "2680sssfc";                       //修改blinker设备的授权码
  13. char ssid[] = "dsssss)"; //修改WIFI
  14. char pswd[] = "#4sssss"; //密码
  15. BlinkerButton Button1("btn-abc");
  16. BlinkerNumber Number1("num-abc");
  17. int counter = 0;
  18. // Define the array of leds
  19. CRGB leds[NUM_LEDS];
  20. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);
  21. void button1_callback(const String & state)
  22. {
  23.     BLINKER_LOG("get button state: ", state);
  24.     digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  25. }
  26. void setup() {

  27.   Serial.println("resetting");
  28.   LEDS.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
  29.   LEDS.setBrightness(84);
  30.   pixels.begin();
  31.   // 初始化串口
  32.   Serial.begin(115200);
  33.   BLINKER_DEBUG.stream(Serial);
  34.   BLINKER_DEBUG.debugAll();

  35.   // 初始化有LED的IO
  36.   pinMode(LED_BUILTIN, OUTPUT);
  37.   digitalWrite(LED_BUILTIN, HIGH);
  38.   // 初始化blinker
  39.   Blinker.begin(auth, ssid, pswd);
  40.   Blinker.attachData(dataRead);

  41.   Button1.attach(button1_callback);
  42. }
  43. void dataRead(const String & data)
  44. {
  45.   BLINKER_LOG("Blinker readString: ", data);
  46.   counter++;
  47.   Number1.print(counter);
  48. }
  49. void fadeall() {
  50.   for (int i = 0; i < NUM_LEDS; i++) {
  51.     leds[i].nscale8(250);
  52.   }
  53. }

  54. void loop() {
  55.   Blinker.run();
  56.   static uint8_t hue = 0;
  57.   Serial.print("x");
  58.   // First slide the led in one direction
  59.   for (int i = 0; i < NUM_LEDS; i++) {
  60.     // Set the i'th led to red
  61.     leds[i] = CHSV(hue++, 255, 255);
  62.     // Show the leds
  63.     FastLED.show();
  64.     // now that we've shown the leds, reset the i'th led to black
  65.     // leds[i] = CRGB::Black;
  66.     fadeall();
  67.     // Wait a little bit before we loop around and do it again
  68.     delay(10);
  69.   }
  70.   Serial.print("x");

  71.   // Now go in the other direction.
  72.   for (int i = (NUM_LEDS) - 1; i >= 0; i--) {
  73.     // Set the i'th led to red
  74.     leds[i] = CHSV(hue++, 255, 255);
  75.     // Show the leds
  76.     FastLED.show();
  77.     // now that we've shown the leds, reset the i'th led to black
  78.     // leds[i] = CRGB::Black;
  79.     fadeall();
  80.     // Wait a little bit before we loop around and do it again
  81.     delay(10);
  82.   }
  83. }
复制代码



发表于 2021-9-11 16:15 | 显示全部楼层
coloz 发表于 2021-9-6 10:46
定时是存储在设备上的,和点灯服务器无关,建议设置个较短的时间,通过debugall,查看调试信息,看看定时 ...

老大,我打开了DEBUG,然后吐出这些信息,你帮分析下问题在哪里。
说明一下: 我在1609设置了定时时间是1611时执行动作 btn-abc: tap这样子,日志如下
16:09:54.083 -> [654170] _isTimingLoop: true
16:09:54.083 -> [654173] _time: 971
16:09:54.083 -> [654175] _action: [{"btn-abc":"tap"}]
16:09:54.083 -> [654178] addTimingTask taskSet: 0
16:09:54.083 -> [654181] addTimingTask timerData: 2156071883
16:09:54.083 -> [654185] new BlinkerTimingTimer
16:09:54.083 -> [654188] taskCount: 1
16:09:54.083 -> [654190] freshTiming wDay: 6, nowMins: 489, nowSeconds: 29390
16:09:54.117 -> [654196] isTimingDay: 1
16:09:54.117 -> [654198] state: 1
16:09:54.117 -> [654199] getTime: 971
16:09:54.117 -> [654201] for nextTask: 0  apartSeconds: 28870 wDay: 6
16:09:54.117 -> [654206] nextTask: 0  apartSeconds: 28870 wDay: 6
16:09:54.117 -> [654211] cbackData: 0
16:09:54.117 -> [654213] change apartSeconds: 3600
16:09:54.117 -> [654217] getTimerData: 2156071883
16:09:54.117 -> [654219] _tmAction_: [{"btn-abc":"tap"}]
16:09:54.151 -> [654271] timingDayStr: 1000011
16:09:54.185 -> [654272] timingTaskStr: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> [654272] print: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> [654281] print: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> [654290] Proto print...
16:09:54.185 -> [654292] Freeheap: 7904
16:09:54.219 -> [654294] isJson: {"data":{"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:09:54.219 -> [654313] MQTT Publish...
16:09:54.219 -> [654315] Freeheap: 7904
16:09:54.524 -> [654625] {"data":{"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:09:54.524 -> [654631] ...OK!
16:09:54.558 -> [654633] Freeheap: 7232
16:09:54.558 -> [654635] Freeheap: 8264
16:09:54.558 -> [654637] Freeheap: 8264
16:09:54.558 -> [654640] autoManager begin: 0 1
16:10:26.958 -> [687072] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"cd79d68e0b7511ec88c95254","toDevice":"3E9ADF08RXH01ZOG7QN6Y7P7"}
16:10:26.992 -> [687074] data: {"get":"state"}
16:10:26.992 -> [687076] fromDevice: cd79d68e0b7511ec88c95254
16:10:26.992 -> [687080] Authority uuid
16:10:26.992 -> [687103] parse data: {"get":"state"}
16:10:26.992 -> [687103] defined BLINKER_ARDUINOJSON
16:10:26.992 -> [687104] autoManager begin: 0 0
16:10:27.026 -> [687104] autoFormatData key: state, json: "state":"online"
16:10:27.026 -> [687107] new.
16:10:27.026 -> [687108] timer codes: 100
16:10:27.026 -> [687110] autoFormatData key: timer, json: "timer":"100"
16:10:27.026 -> [687115] add.
16:10:27.026 -> [687116] autoFormatData key: version, json: "version":"0.1.0"
16:10:27.026 -> [687122] add.
16:10:27.026 -> [687123] print: {"state":"online","timer":"100","version":"0.1.0"}
16:10:27.026 -> [687129] Proto print...
16:10:27.026 -> [687131] Freeheap: 8208
16:10:27.026 -> [687133] isJson: {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:10:27.060 -> [687149] MQTT Publish...
16:10:27.060 -> [687151] Freeheap: 8208
16:10:27.365 -> [687460] {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:10:27.365 -> [687463] ...OK!
16:10:27.365 -> [687465] Freeheap: 7536
16:10:27.365 -> [687467] Freeheap: 8568
16:10:27.365 -> [687469] heartBeat isParsed
16:10:27.365 -> [687472] checkNum count: 1
16:10:27.405 -> [687474] isParsed
16:10:57.378 -> [717482] MQTT Ping!
16:10:57.378 -> [717482] Freeheap: 10488
16:10:58.813 -> [718909] Connecting to MQTT...
16:11:00.446 -> [720562] MQTT Connected!
16:11:00.446 -> [720563] Freeheap: 10488
16:11:30.477 -> [750574] MQTT Ping!
16:11:30.477 -> [750574] Freeheap: 10680
16:11:31.914 -> [752005] Connecting to MQTT...
16:11:30.477 -> [750574] MQTT Ping!
16:11:30.477 -> [750574] Freeheap: 10680
16:11:31.914 -> [752005] Connecting to MQTT...
16:11:35.457 -> [755569] MQTT Connected!
16:11:35.457 -> [755569] Freeheap: 10376
16:11:56.186 -> [776296] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"cd79d68e0b7511ec88c95254","toDevice":"3E9ADF08RXH01ZOG7QN6Y7P7"}
16:11:56.220 -> [776298] data: {"get":"state"}
16:11:56.220 -> [776301] fromDevice: cd79d68e0b7511ec88c95254
16:11:56.220 -> [776305] Authority uuid
16:11:56.220 -> [776327] parse data: {"get":"state"}
16:11:56.220 -> [776327] defined BLINKER_ARDUINOJSON
16:11:56.220 -> [776328] autoManager begin: 0 0
16:11:56.220 -> [776328] autoFormatData key: state, json: "state":"online"
16:11:56.254 -> [776331] new.
16:11:56.254 -> [776332] timer codes: 100
16:11:56.254 -> [776335] autoFormatData key: timer, json: "timer":"100"
16:11:56.254 -> [776339] add.
16:11:56.254 -> [776341] autoFormatData key: version, json: "version":"0.1.0"
16:11:56.254 -> [776346] add.
16:11:56.254 -> [776348] print: {"state":"online","timer":"100","version":"0.1.0"}
16:11:56.254 -> [776353] Proto print...
16:11:56.254 -> [776356] Freeheap: 8400
16:11:56.254 -> [776358] isJson: {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:11:56.287 -> [776373] MQTT Publish...
16:11:56.287 -> [776375] Freeheap: 8400
16:11:56.607 -> [776684] {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:11:56.607 -> [776687] ...OK!
16:11:56.607 -> [776689] Freeheap: 7728
16:11:56.607 -> [776691] Freeheap: 8760
16:11:56.607 -> [776693] heartBeat isParsed
16:11:56.607 -> [776696] checkNum count: 1
16:11:56.607 -> [776698] isParsed
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-11-28 03:39 , Processed in 0.087072 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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