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

Cp0204 发表于 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),没正确返回亮度引起的,哭

zjdaty 发表于 2021-8-26 22:44

本帖最后由 zjdaty 于 2021-8-26 22:46 编辑

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




1996xjm 发表于 2021-8-29 14:56

有添加设备但是同步不到天猫精灵

coloz 发表于 2021-8-29 17:38

1996xjm 发表于 2021-8-29 14:56
有添加设备但是同步不到天猫精灵

请阅读文档,先给设备写入对应语音助手的支持程序。

284003505 发表于 2021-9-1 08:02

开发版app的bug算吗?

coloz 发表于 2021-9-1 22:37

284003505 发表于 2021-9-1 08:02
开发版app的bug算吗?

请直接描述bug并提供复现方法

gzm001 发表于 2021-9-5 08:28

手机系统安卓 2.5.7
bug1:配置好定时任务后,到时间了毫无反应. 但是倒计时功能是正常的. 看设置好定时功能后, 手机调试数据有 定时数据段返回, 说明定时已经设置到官方服务器了 , 但服务器到时间后没有发指令给设备

coloz 发表于 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

carlbeven 发表于 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

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

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

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

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

Button1.attach(button1_callback);
}
void dataRead(const String & data)
{
BLINKER_LOG("Blinker readString: ", data);
counter++;
Number1.print(counter);
}
void fadeall() {
for (int i = 0; i < NUM_LEDS; i++) {
    leds.nscale8(250);
}
}

void loop() {
Blinker.run();
static uint8_t hue = 0;
Serial.print("x");
// First slide the led in one direction
for (int i = 0; i < NUM_LEDS; i++) {
    // Set the i'th led to red
    leds = CHSV(hue++, 255, 255);
    // Show the leds
    FastLED.show();
    // now that we've shown the leds, reset the i'th led to black
    // leds = CRGB::Black;
    fadeall();
    // Wait a little bit before we loop around and do it again
    delay(10);
}
Serial.print("x");

// Now go in the other direction.
for (int i = (NUM_LEDS) - 1; i >= 0; i--) {
    // Set the i'th led to red
    leds = CHSV(hue++, 255, 255);
    // Show the leds
    FastLED.show();
    // now that we've shown the leds, reset the i'th led to black
    // leds = CRGB::Black;
    fadeall();
    // Wait a little bit before we loop around and do it again
    delay(10);
}
}


gzm001 发表于 2021-9-11 16:15

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

老大,我打开了DEBUG,然后吐出这些信息,你帮分析下问题在哪里。
说明一下: 我在1609设置了定时时间是1611时执行动作 btn-abc: tap这样子,日志如下
16:09:54.083 -> _isTimingLoop: true
16:09:54.083 -> _time: 971
16:09:54.083 -> _action: [{"btn-abc":"tap"}]
16:09:54.083 -> addTimingTask taskSet: 0
16:09:54.083 -> addTimingTask timerData: 2156071883
16:09:54.083 -> new BlinkerTimingTimer
16:09:54.083 -> taskCount: 1
16:09:54.083 -> freshTiming wDay: 6, nowMins: 489, nowSeconds: 29390
16:09:54.117 -> isTimingDay: 1
16:09:54.117 -> state: 1
16:09:54.117 -> getTime: 971
16:09:54.117 -> for nextTask: 0apartSeconds: 28870 wDay: 6
16:09:54.117 -> nextTask: 0apartSeconds: 28870 wDay: 6
16:09:54.117 -> cbackData: 0
16:09:54.117 -> change apartSeconds: 3600
16:09:54.117 -> getTimerData: 2156071883
16:09:54.117 -> _tmAction_: [{"btn-abc":"tap"}]
16:09:54.151 -> timingDayStr: 1000011
16:09:54.185 -> timingTaskStr: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> print: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> print: {"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]}
16:09:54.185 -> Proto print...
16:09:54.185 -> Freeheap: 7904
16:09:54.219 -> 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 -> MQTT Publish...
16:09:54.219 -> Freeheap: 7904
16:09:54.524 -> {"data":{"timing":[{"task":0,"ena":1,"day":"1000011","tim":971,"act":[{"btn-abc":"tap"}]}]},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:09:54.524 -> ...OK!
16:09:54.558 -> Freeheap: 7232
16:09:54.558 -> Freeheap: 8264
16:09:54.558 -> Freeheap: 8264
16:09:54.558 -> autoManager begin: 0 1
16:10:26.958 -> Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"cd79d68e0b7511ec88c95254","toDevice":"3E9ADF08RXH01ZOG7QN6Y7P7"}
16:10:26.992 -> data: {"get":"state"}
16:10:26.992 -> fromDevice: cd79d68e0b7511ec88c95254
16:10:26.992 -> Authority uuid
16:10:26.992 -> parse data: {"get":"state"}
16:10:26.992 -> defined BLINKER_ARDUINOJSON
16:10:26.992 -> autoManager begin: 0 0
16:10:27.026 -> autoFormatData key: state, json: "state":"online"
16:10:27.026 -> new.
16:10:27.026 -> timer codes: 100
16:10:27.026 -> autoFormatData key: timer, json: "timer":"100"
16:10:27.026 -> add.
16:10:27.026 -> autoFormatData key: version, json: "version":"0.1.0"
16:10:27.026 -> add.
16:10:27.026 -> print: {"state":"online","timer":"100","version":"0.1.0"}
16:10:27.026 -> Proto print...
16:10:27.026 -> Freeheap: 8208
16:10:27.026 -> isJson: {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:10:27.060 -> MQTT Publish...
16:10:27.060 -> Freeheap: 8208
16:10:27.365 -> {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:10:27.365 -> ...OK!
16:10:27.365 -> Freeheap: 7536
16:10:27.365 -> Freeheap: 8568
16:10:27.365 -> heartBeat isParsed
16:10:27.365 -> checkNum count: 1
16:10:27.405 -> isParsed
16:10:57.378 -> MQTT Ping!
16:10:57.378 -> Freeheap: 10488
16:10:58.813 -> Connecting to MQTT...
16:11:00.446 -> MQTT Connected!
16:11:00.446 -> Freeheap: 10488
16:11:30.477 -> MQTT Ping!
16:11:30.477 -> Freeheap: 10680
16:11:31.914 -> Connecting to MQTT...
16:11:30.477 -> MQTT Ping!
16:11:30.477 -> Freeheap: 10680
16:11:31.914 -> Connecting to MQTT...
16:11:35.457 -> MQTT Connected!
16:11:35.457 -> Freeheap: 10376
16:11:56.186 -> Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"cd79d68e0b7511ec88c95254","toDevice":"3E9ADF08RXH01ZOG7QN6Y7P7"}
16:11:56.220 -> data: {"get":"state"}
16:11:56.220 -> fromDevice: cd79d68e0b7511ec88c95254
16:11:56.220 -> Authority uuid
16:11:56.220 -> parse data: {"get":"state"}
16:11:56.220 -> defined BLINKER_ARDUINOJSON
16:11:56.220 -> autoManager begin: 0 0
16:11:56.220 -> autoFormatData key: state, json: "state":"online"
16:11:56.254 -> new.
16:11:56.254 -> timer codes: 100
16:11:56.254 -> autoFormatData key: timer, json: "timer":"100"
16:11:56.254 -> add.
16:11:56.254 -> autoFormatData key: version, json: "version":"0.1.0"
16:11:56.254 -> add.
16:11:56.254 -> print: {"state":"online","timer":"100","version":"0.1.0"}
16:11:56.254 -> Proto print...
16:11:56.254 -> Freeheap: 8400
16:11:56.254 -> isJson: {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:11:56.287 -> MQTT Publish...
16:11:56.287 -> Freeheap: 8400
16:11:56.607 -> {"data":{"state":"online","timer":"100","version":"0.1.0"},"fromDevice":"3E9ADF08RXH01ZOG7QN6Y7P7","toDevice":"cd79d68e0b7511ec88c95254","deviceType":"OwnApp"}
16:11:56.607 -> ...OK!
16:11:56.607 -> Freeheap: 7728
16:11:56.607 -> Freeheap: 8760
16:11:56.607 -> heartBeat isParsed
16:11:56.607 -> checkNum count: 1
16:11:56.607 -> isParsed
页: 16 17 18 19 20 21 22 23 24 25 [26] 27 28
查看完整版本: blinker bug报告