查看: 596|回复: 5

[已解答] blinker 温度无法存储数据,附调试信息

[复制链接]
  • TA的每日心情
    奋斗
    2020-10-14 19:55
  • 签到天数: 3 天

    [LV.2]偶尔看看I

    发表于 2020-10-26 22:43 | 显示全部楼层 |阅读模式
    本帖最后由 lslcxlsl 于 2020-10-26 22:43 编辑

    600008] message: /heartbeat?deviceName=ACC2534CLMGA6R6OI7KJAC0U&key=a9135b780e41&heartbeat=600
    [600009] blinker server begin
    [600009] Freeheap: 29488
    [601055] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/heartbeat?deviceName=ACC2534CLMGA6R6OI7KJAC0U&key=a9135b780e41&heartbeat=600
    [601057] HTTPS payload: /heartbeat?deviceName=ACC2534CLMGA6R6OI7KJAC0U&key=a9135b780e41&heartbeat=600
    [601066] [HTTP] status... code: 200
    [601070] {"detail": "", "message": 1000}
    [601073] payload: null
    [601077] checkNum count: 2
    [601077] time (millis() - ntpFreshTime): 120852
    [601081] ntpGetTime: 1603720975
    [601084] 0
    [601085] time: 1603721096,second: 56
    [601088] now_time: 1603721040
    [601091] dataStorage num: 0 ,1603721040
    [601095] dataStorage count: 2
    [601097] saveData: 21.00
    [601100] saveData dataCount: 2
    [601102] temp save: 21.00 time: 1603721040
    [601106] data_dataCount: 2
    [601109] checkNum count: 2
    [601111] time: 1603721096,second: 56
    [601114] now_time: 1603721040
    [601117] dataStorage num: 1 ,1603721040
    [601121] dataStorage count: 2
    [601123] saveData: 42.00
    [601126] saveData dataCount: 2
    [601128] humi save: 42.00 time: 1603721040
    [601132] data_dataCount: 2
    [601135] Connecting to MQTT...
    [602253] MQTT Connected!
    [602253] Freeheap: 8864
    [602299] Humidity: 42.00 %
    [602299] Temperature: 21.00 *C
    [604350] Humidity: 42.00 %
    [604350] Temperature: 21.00 *C
    [604822] Freeheap: 8776
    [604823] getData _data_: [[1603720980,21.00],[1603721040,21.00]]
    [604823] num: 0 name: temp
    [604823] Freeheap: 8728
    [604824] getData _data_: [[1603720980,42.00],[1603721040,42.00]]
    [604829] num: 1 name: humi
    [604832] Freeheap: 8680
    [604834] dataUpdate: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603720980,21.00],[1603721040,21.00]],"humi":[[1603720980,42.00],[1603721040,42.00]]}}
    [604850] Freeheap: 8680
    [604852] message: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603720980,21.00],[1603721040,21.00]],"humi":[[1603720980,42.00],[1603721040,42.00]]}}
    [604871] blinker server begin
    [604871] Freeheap: 29008
    [605989] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/cloudStorage/
    [605989] HTTPS payload: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603720980,21.00],[1603721040,21.00]],"humi":[[1603720980,42.00],[1603721040,42.00]]}}
    [606002] [HTTP] status... code: 200
    [606007] {"detail": "max device data key size limit", "message": 1513}
    [606011] ERROR: max device data key size limit
    [606015] payload: {"detail": "max device data key size limit", "message": 1513}
    [606375] Humidity: 42.00 %

    [483754] getData _data_: [[1603723200,21],[1603723260,21]]
    [483754] num: 0 name: temp
    [483754] Freeheap: 8864
    [483755] getData _data_: [[1603723200,41],[1603723260,41]]
    [483759] num: 1 name: humi
    [483762] Freeheap: 8816
    [483764] dataUpdate: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603723200,21],[1603723260,21]],"humi":[[1603723200,41],[1603723260,41]]}}
    [483779] Freeheap: 8816
    [483781] message: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603723200,21],[1603723260,21]],"humi":[[1603723200,41],[1603723260,41]]}}
    [483799] blinker server begin
    [483799] Freeheap: 29144
    [484918] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/cloudStorage/
    [484918] HTTPS payload: {"deviceName":"ACC2534CLMGA6R6OI7KJAC0U","key":"a9135b780e41","data":{"temp":[[1603723200,21],[1603723260,21]],"humi":[[1603723200,41],[1603723260,41]]}}
    [484929] [HTTP] status... code: 200
    [484934] {"detail": "max device data key size limit", "message": 1513}
    [484939] ERROR: max device data key size limit
    [484943] payload: {"detail": "max device data key size limit", "message": 1513}


    QQ图片20201026221100.jpg QQ图片20201026221106.jpg


    我看调试信息,提示数据限制了,我应该怎么处理呢?
    1. #define BLINKER_WIFI
    2. #define BLINKER_MIOT_SENSOR

    3. #include <Blinker.h>
    4. #include <DHT.h>

    5. char auth[] = "a9135b780e41";
    6. char ssid[] = "abc";
    7. char pswd[] = "chenxu123";

    8. BlinkerNumber HUMI("humi");
    9. BlinkerNumber TEMP("temp");

    10. #define DHTPIN D7

    11. #define DHTTYPE DHT11   // DHT 11
    12. //#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
    13. //#define DHTTYPE DHT21   // DHT 21 (AM2301)

    14. DHT dht(DHTPIN, DHTTYPE);

    15. int humi_read = 0, temp_read = 0;

    16. void heartbeat()
    17. {
    18.     HUMI.print(humi_read);
    19.     TEMP.print(temp_read);
    20. }

    21. void dataStorage()
    22. {
    23.     Blinker.dataStorage("temp", temp_read);
    24.     Blinker.dataStorage("humi", humi_read);
    25. }

    26. void miotQuery(int32_t queryCode)
    27. {
    28.     BLINKER_LOG("MIOT Query codes: ", queryCode);

    29.     switch (queryCode)
    30.     {
    31.         case BLINKER_CMD_QUERY_ALL_NUMBER :
    32.             BLINKER_LOG("MIOT Query All");
    33.             BlinkerMIOT.temp(temp_read);
    34.             BlinkerMIOT.humi(humi_read);
    35.             BlinkerMIOT.print();
    36.             break;
    37.         default :
    38.             BlinkerMIOT.temp(20);
    39.             BlinkerMIOT.humi(20);
    40.             break;
    41.     }
    42. }

    43. void setup()
    44. {
    45.     Serial.begin(115200);
    46.     BLINKER_DEBUG.stream(Serial);
    47.     BLINKER_DEBUG.debugAll();
    48.     pinMode(LED_BUILTIN, OUTPUT);
    49.     digitalWrite(LED_BUILTIN, LOW);

    50.     Blinker.begin(auth, ssid, pswd);
    51.     Blinker.attachHeartbeat(heartbeat);
    52.     Blinker.attachDataStorage(dataStorage);
    53.     BlinkerMIOT.attachQuery(miotQuery);
    54.     dht.begin();
    55. }

    56. void loop()
    57. {
    58.     Blinker.run();

    59.     int h = dht.readHumidity();
    60.     int t = dht.readTemperature();

    61.     if (isnan(h) || isnan(t))
    62.     {
    63.         BLINKER_LOG("Failed to read from DHT sensor!");
    64.     }
    65.     else
    66.     {
    67.         humi_read = h;
    68.         temp_read = t;
    69.     }

    70.     Blinker.delay(2000);
    71. }
    复制代码






  • TA的每日心情
    奋斗
    2020-11-4 23:38
  • 签到天数: 49 天

    [LV.5]常住居民I

    发表于 2020-10-26 22:48 | 显示全部楼层
    免费版只有5个数据存储key,用完就不能存了。可以通过 菜单》开发者 删除之前的key
  • TA的每日心情
    奋斗
    2020-10-14 19:55
  • 签到天数: 3 天

    [LV.2]偶尔看看I

     楼主| 发表于 2020-10-27 21:05 | 显示全部楼层
    奈何col 发表于 2020-10-26 22:48
    免费版只有5个数据存储key,用完就不能存了。可以通过 菜单》开发者 删除之前的key ...

    微信图片_20201027210559.jpg 怎么删除呢,没有按钮操作呢。
  • TA的每日心情
    奋斗
    2020-11-4 23:38
  • 签到天数: 49 天

    [LV.5]常住居民I

    发表于 2020-10-27 21:16 | 显示全部楼层
    可能是一个bug,等我们排查下
  • TA的每日心情
    奋斗
    2020-11-4 23:38
  • 签到天数: 49 天

    [LV.5]常住居民I

    发表于 2020-10-28 00:08 | 显示全部楼层
    我们已经尝试修复了这个问题,您再试试呢
  • TA的每日心情
    奋斗
    2020-10-14 19:55
  • 签到天数: 3 天

    [LV.2]偶尔看看I

     楼主| 发表于 2020-10-28 21:27 | 显示全部楼层
    本帖最后由 lslcxlsl 于 2020-10-28 21:29 编辑
    奈何col 发表于 2020-10-28 00:08
    我们已经尝试修复了这个问题,您再试试呢

    已经正常了 Screenshot_2020-10-28-21-27-30-601_iot.clz.me.jpg
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    热门推荐

    【创客入门偏方】一起来造六轴机械臂(三) 配件收集篇
    【创客入门偏方】一起来造
    【创客入门偏方】一起来造六轴机械臂(二) 3D打印篇
    【创客入门偏方】一起来造
    【创客入门偏方】一起来造机械臂(一) 项目介绍篇
    【创客入门偏方】一起来造
    使用lcd屏幕和ds18b20测温度时程序编译错误
    使用lcd屏幕和ds18b20测温
    希望有大佬帮助一下刚入门的小萌新,真心求教!
    【Arduino】108种传感器模块系列实验(资料+代码+图形+仿真)
    【Arduino】108种传感器模
    37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
    Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
    快速回复 返回顶部 返回列表