You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用实时数据,并使用RTData,遇见3个问题
1、数据组件少时未出现与MQTT服务器断开的情况(大概6个组件),随着数量增加,发送提示断开的概率会随之增加(MQTT Disconnected)
2、提示断开后会再次尝试重发,发送数据会在原来的发送data外在增加一层data,变成了 {"data":{"data":{内容}发送类型等}发送类型等}
尝试使用 if(!STRING_contains_string(data,"data")){} 修复后没有2层data,但是还是会崩溃
3、随后就会出现内核崩溃
CORRUPT HEAP: Bad head at 0x3ffdb070. Expected 0xabba1234 got 0x00000000
abort() was called at PC 0x400871a1 on core 1
== 提问请到论坛 https://www.arduino.cn/forum-132-1.html ==
基本信息
设备信息
IDE 中的设置
手机信息及APP信息
问题描述
使用实时数据,并使用RTData,遇见3个问题
1、数据组件少时未出现与MQTT服务器断开的情况(大概6个组件),随着数量增加,发送提示断开的概率会随之增加(MQTT Disconnected)
2、提示断开后会再次尝试重发,发送数据会在原来的发送data外在增加一层data,变成了 {"data":{"data":{内容}发送类型等}发送类型等}
尝试使用 if(!STRING_contains_string(data,"data")){} 修复后没有2层data,但是还是会崩溃
3、随后就会出现内核崩溃
CORRUPT HEAP: Bad head at 0x3ffdb070. Expected 0xabba1234 got 0x00000000
abort() was called at PC 0x400871a1 on core 1
代码
setup里的代码
Blinker.begin(auth, ssid, pass);
// BLINKER_TAST_INIT(); //以为是线程导致的,屏蔽后依旧
Blinker.attachData(dataRead);
Blinker.attachHeartbeat(heartbeat);
Blinker.attachRTData(rtData);
void rtData()
{
Blinker.sendRtData("num-v1", ina1_voltage1000);
Blinker.sendRtData("num-v2", ina2_voltage1000);
Blinker.sendRtData("num-v3", ina3_voltage1000);
Blinker.sendRtData("num-i1", ina1_converted1000);
Blinker.sendRtData("num-i2", ina2_converted1000);
Blinker.sendRtData("num-i3", ina3_converted1000);
Blinker.sendRtData("num-t1", isnan(t1_temperature)?0:t1_temperature);
Blinker.sendRtData("num-t2", isnan(t2_temperature)?0:t2_temperature);
Blinker.sendRtData("num-t3", isnan(t3_temperature)?0:t3_temperature);
Blinker.sendRtData("num-pwm1", ledcRead(pwmChannel_1));
Blinker.sendRtData("num-pwm2", ledcRead(pwmChannel_2));
Blinker.sendRtData("num-pwm3", ledcRead(pwmChannel_3));
Blinker.printRtData();
}
LOG信息
[22380] Got: {"fromDevice":"ee265a9ff0c911eda8eb5254","data":{"rt":["num-v1","num-i1","num-t1","num-pwm1","num-v2","num-t2","num-i2","num-pwm2","num-v3","num-t3","num-i3","num-pwm3"]}}
[22385] data: {"rt":["num-v1","num-i1","num-t1","num-pwm1","num-v2","num-t2","num-i2","num-pwm2","num-v3","num-t3","num-i3","num-pwm3"]}
[22397] fromDevice: ee265a9ff0c911eda8eb5254
[22401] Authority uuid
[22424] available: 1
[22424] checkAvail: 1
[22424] parse data: {"rt":["num-v1","num-i1","num-t1","num-pwm1","num-v2","num-t2","num-i2","num-pwm2","num-v3","num-t3","num-i3","num-pwm3"]}
[22429] defined BLINKER_ARDUINOJSON
[22433] autoManager begin: 0 0
[22435] containsKey rt
[22437] ===>rt get_key: num-v1
[22440] ===>rt get_key: num-i1
[22443] ===>rt get_key: num-t1
[22445] ===>rt get_key: num-pwm1
[22448] data_rtKeyCount: 4
[22451] ========data_rtRun
[22453] _fresh need flush
[22456] isParsed
[22457] flush
[23451] autoFormatData key: num-v1, json: "num-v1":{"date":1684025805,"val":0.00}
[23452] new.
[23452] autoFormatData key: num-v2, json: "num-v2":{"date":1684025805,"val":1.25}
[23456] add.
[23457] autoFormatData key: num-v3, json: "num-v3":{"date":1684025805,"val":0.00}
[23464] add.
[23466] autoFormatData key: num-i1, json: "num-i1":{"date":1684025805,"val":-0.50}
[23473] add.
[23474] autoFormatData key: num-i2, json: "num-i2":{"date":1684025805,"val":-0.50}
[23481] add.
[23483] autoFormatData key: num-i3, json: "num-i3":{"date":1684025805,"val":-0.20}
[23490] add.
[23491] autoFormatData key: num-t1, json: "num-t1":{"date":1684025805,"val":0.00}
[23498] add.
[23500] autoFormatData key: num-t2, json: "num-t2":{"date":1684025805,"val":0.00}
[23507] add.
[23508] autoFormatData key: num-t3, json: "num-t3":{"date":1684025805,"val":0.00}
[23515] add.
[23517] autoFormatData key: num-pwm1, json: "num-pwm1":{"date":1684025805,"val":204}
[23524] add.
[23525] autoFormatData key: num-pwm2, json: "num-pwm2":{"date":1684025805,"val":511}
[23532] add.
[23534] autoFormatData key: num-pwm3, json: "num-pwm3":{"date":1684025805,"val":818}
[23541] add.
[23542] print: {"num-v1":{"date":1684025805,"val":0.00},"num-v2":{"date":1684025805,"val":1.25},"num-v3":{"date":1684025805,"val":0.00},"num-i1":{"date":1684025805,"val":-0.50},"num-i2":{"date":1684025805,"val":-0.50},"num-i3":{"date":1684025805,"val":-0.20},"num-t1":{"date":1684025805,"val":0.00},"num-t2":{"date":1684025805,"val":0.00},"num-t3":{"date":1684025805,"val":0.00},"num-pwm1":{"date":1684025805,"val":204},"num-pwm2":{"date":1684025805,"val":511},"num-pwm3":{"date":1684025805,"val":818}}
[23586] Proto print...
[23588] Freeheap: 202368
[23591] isJson: {"data":{"num-v1":{"date":1684025805,"val":0.00},"num-v2":{"date":1684025805,"val":1.25},"num-v3":{"date":1684025805,"val":0.00},"num-i1":{"date":1684025805,"val":-0.50},"num-i2":{"date":1684025805,"val":-0.50},"num-i3":{"date":1684025805,"val":-0.20},"num-t1":{"date":1684025805,"val":0.00},"num-t2":{"date":1684025805,"val":0.00},"num-t3":{"date":1684025805,"val":0.00},"num-pwm1":{"date":1684025805,"val":204},"num-pwm2":{"date":1684025805,"val":511},"num-pwm3":{"date":1684025805,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}
[23644] MQTT Publish...
[23646] Freeheap: 202368
[23651] {"data":{"num-v1":{"date":1684025805,"val":0.00},"num-v2":{"date":1684025805,"val":1.25},"num-v3":{"date":1684025805,"val":0.00},"num-i1":{"date":1684025805,"val":-0.50},"num-i2":{"date":1684025805,"val":-0.50},"num-i3":{"date":1684025805,"val":-0.20},"num-t1":{"date":1684025805,"val":0.00},"num-t2":{"date":1684025805,"val":0.00},"num-t3":{"date":1684025805,"val":0.00},"num-pwm1":{"date":1684025805,"val":204},"num-pwm2":{"date":1684025805,"val":511},"num-pwm3":{"date":1684025805,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}
[23701] ...OK!
[23702] Freeheap: 198844
[23704] Freeheap: 199884
[24543] autoFormatData key: num-v1, json: "num-v1":{"date":1684025806,"val":0.00}
[24543] new.
[24544] autoFormatData key: num-v2, json: "num-v2":{"date":1684025806,"val":1.25}
[24547] add.
[24549] autoFormatData key: num-v3, json: "num-v3":{"date":1684025806,"val":0.00}
[24556] add.
[24557] autoFormatData key: num-i1, json: "num-i1":{"date":1684025806,"val":-0.20}
[24564] add.
[24566] autoFormatData key: num-i2, json: "num-i2":{"date":1684025806,"val":-0.20}
[24573] add.
[24574] autoFormatData key: num-i3, json: "num-i3":{"date":1684025806,"val":-0.50}
[24591] autoFormatData key: num-t2, json: "num-t2":{"date":1684025806,"val":0.00}
[24598] add.
[24600] autoFormatData key: num-t3, json: "num-t3":{"date":1684025806,"val":0.00}
[24607] add.
[24608] autoFormatData key: num-pwm1, json: "num-pwm1":{"date":1684025806,"val":204}
[24615] add.
[24617] autoFormatData key: num-pwm2, json: "num-pwm2":{"date":1684025806,"val":511}
[24624] add.
[24625] autoFormatData key: num-pwm3, json: "num-pwm3":{"date":1684025806,"val":818}
[24633] add.
[24634] print: {"num-v1":{"date":1684025806,"val":0.00},"num-v2":{"date":1684025806,"val":1.25},"num-v3":{"date":1684025806,"val":0.00},"num-i1":{"date":1684025806,"val":-0.20},"num-i2":{"date":1684025806,"val":-0.20},"num-i3":{"date":1684025806,"val":-0.50},"num-t1":{"date":1684025806,"val":0.00},"num-t2":{"date":1684025806,"val":0.00},"num-t3":{"date":1684025806,"val":0.00},"num-pwm1":{"date":1684025806,"val":204},"num-pwm2":{"date":1684025806,"val":511},"num-pwm3":{"date":1684025806,"val":818}}
[24678] Proto print...
[24680] Freeheap: 202200
[24682] isJson: {"data":{"num-v1":{"date":1684025806,"val":0.00},"num-v2":{"date":1684025806,"val":1.25},"num-v3":{"date":1684025806,"val":0.00},"num-i1":{"date":1684025806,"val":-0.20},"num-i2":{"date":1684025806,"val":-0.20},"num-i3":{"date":1684025806,"val":-0.50},"num-t1":{"date":1684025806,"val":0.00},"num-t2":{"date":1684025806,"val":0.00},"num-t3":{"date":1684025806,"val":0.00},"num-pwm1":{"date":1684025806,"val":204},"num-pwm2":{"date":1684025806,"val":511},"num-pwm3":{"date":1684025806,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}
[24736] MQTT Publish...
[24737] Freeheap: 202200
[24743] {"data":{"num-v1":{"date":1684025806,"val":0.00},"num-v2":{"date":1684025806,"val":1.25},"num-v3":{"date":1684025806,"val":0.00},"num-i1":{"date":1684025806,"val":-0.20},"num-i2":{"date":1684025806,"val":-0.20},"num-i3":{"date":1684025806,"val":-0.50},"num-t1":{"date":1684025806,"val":0.00},"num-t2":{"date":1684025806,"val":0.00},"num-t3":{"date":1684025806,"val":0.00},"num-pwm1":{"date":1684025806,"val":204},"num-pwm2":{"date":1684025806,"val":511},"num-pwm3":{"date":1684025806,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}[24792] print: {"data":{"num-v1":{"date":1684025806,"val":0.00},"num-v2":{"date":1684025806,"val":1.25},"num-v3":{"date":1684025806,"val":0.00},"num-i1":{"date":1684025806,"val":-0.20},"num-i2":{"date":1684025806,"val":-0.20},"num-i3":{"date":1684025806,"val":-0.50},"num-t1":{"date":1684025806,"val":0.00},"num-t2":{"date":1684025806,"val":0.00},"num-t3":{"date":1684025806,"val":0.00},"num-pwm1":{"date":1684025806,"val":204},"num-pwm2":{"date":1684025806,"val":511},"num-pwm3":{"date":1684025806,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}
[[24846] Proto print...
[24848] Freeheap: 24846] ...Failed
[24851] Freeheap: 245476
245476
[24854] [24854] Freeheap: 244304
isJson: {"data":{"data":{"num-v1":{"date":1684025806,"val":0.00},"num-v2":{"date":1684025806,"val":1.25},"num-v3":{"date":1684025806,"val":0.00},"num-i1":{"date":1684025806,"val":-0.20},"num-i2":{"date":1684025806,"val":-0.20},"num-i3":{"date":1684025806,"val":-0.50},"num-t1":{"date":1684025806,"val":0.00},"num-t2":{"date":1684025806,"val":0.00},"num-t3":{"date":1684025806,"val":0.00},"num-pwm1":{"date":1684025806,"val":204},"num-pwm2":{"date":1684025806,"val":511},"num-pwm3":{"date":1684025806,"val":818}},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"},"fromDevice":"121FD9E6BOYWRPESH8PX5KZY","toDevice":"ee265a9ff0c911eda8eb5254","deviceType":"OwnApp"}
[24919] MQTT Publish...
[24921] Freeheap: 246564
[24923] ERROR: MQTT Disconnected
[24926] Freeheap: 246564
CORRUPT HEAP: Bad head at 0x3ffdb288. Expected 0xabba1234 got 0x3ffdc814
abort() was called at PC 0x400871a1 on core 1
ELF file SHA256: 0000000000000000
Backtrace: 0x40088fd8:0x3ffb1ac0 0x40089255:0x3ffb1ae0 0x400871a1:0x3ffb1b00 0x400872cd:0x3ffb1b30 0x4010efc7:0x3ffb1b50 0x40108f89:0x3ffb1e10 0x40108efd:0x3ffb1e60 0x4008d969:0x3ffb1e90 0x400823ce:0x3ffb1eb0 0x40087099:0x3ffb1ed0 0x4000bec7:0x3ffb1ef0 0x400d452b:0x3ffb1f10 0x400e2d97:0x3ffb1f30 0x400e2e5d:0x3ffb1f90 0x400ee3dc:0x3ffb1fb0 0x4008a266:0x3ffb1fd0
Rebooting...
编译信息
The text was updated successfully, but these errors were encountered: