安少
发表于 2021-3-19 19:21
bitcat 发表于 2021-3-19 15:17
作为一个新手 看的有点头大
写的比较跳,像搭积木一样,一环扣一环
lianggejimo
发表于 2021-3-27 17:16
求助楼主和各位感谢了:更新了点灯库和8266-package。。。。提示'class BlinkerESPMQTT' has no member named 'aqi'没有“aqi”成员什么情况?天气地址也改成了新的数字定义!
与子同袍。
发表于 2021-3-29 16:52
wactor8431 发表于 2021-3-17 17:23
请问 如何解决? 参数空?
嗯嗯 更新下blinker库,参数空就可以获取到当地的天气数据
lianggejimo
发表于 2021-3-29 23:39
安少 发表于 2021-3-17 18:37
在此感谢小白求知楼主: 提示'class BlinkerESPMQTT' has no member named 'aqi' ..........package-2.74 版本,Blinker库0.3.6版本都更新了..int location =000000; 也改了新定义!还漏了什么东西吗?........
wactor8431
发表于 2021-4-7 20:14
在此感谢小白求知楼主: 提示'class BlinkerESPMQTT' has no member named 'aqi' ..........package-2.74 版本,Blinker库0.3.6版本都更新了..int location =000000; 也改了新定义!还漏了什么东西吗?........
wactor8431
发表于 2021-4-7 20:46
wactor8431 发表于 2021-4-7 20:14
在此感谢小白求知楼主: 提示'class BlinkerESPMQTT' has no member named 'aqi' ..........package-2.74 ...
胡乱搞,把这里注息就好了,也显示天气。就是获取时间变慢
void tianqi() {
Blinker.weather();
Blinker.delay(1000);
// Blinker.aqi(location);
}
wactor8431
发表于 2021-4-7 21:26
wactor8431 发表于 2021-4-7 20:46
胡乱搞,把这里注息就好了,也显示天气。就是获取时间变慢
void tianqi() {
Blinker.weather();
是这里需要 aqi吗?
void airData(const String & data) {
//BLINKER_LOG("空气质量: ", data);
DynamicJsonDocument jsonBuffer(512);
DeserializationError error = deserializeJson(jsonBuffer, data);
JsonObject doc = jsonBuffer.as<JsonObject>();
if (data == '{') {
strcpy(a_aqi, jsonBuffer["aqi"]); //空气质量
strcpy(a_level, jsonBuffer["level"]); //空气等级
strcpy(a_pm25, jsonBuffer["pm25"]); //pm2.5
a2 = 1; a4 = 1;
}
else {
BLINKER_LOG("airData_error!");
//Serial.println(error.c_str());
delay(1000);
a2 = 1; a4 = 1;
return;
}
}
注息了 // Blinker.aqi(location);
空气质量就获取不到数据了
广达文西
发表于 2021-4-9 08:02
学习了,
lianggejimo
发表于 2021-4-9 22:01
wactor8431 发表于 2021-4-7 20:46
胡乱搞,把这里注息就好了,也显示天气。就是获取时间变慢
void tianqi() {
Blinker.weather();
感谢了!没仔细看文档....
wactor8431
发表于 2021-4-14 15:21
很奇怪,早上7点半 通电,模块可以正常。到了10点后模块就开始不停重启,不显示。通过串口监视器,它不停重复以下东西,搞不懂啥问题。
15:17:26.932 -> WiFi Connected.
15:17:26.932 -> IP Address:
15:17:26.932 -> 192.168.3.88
15:17:26.932 -> begin: http://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=f36b29f74134&version=0.1.0&protocol=mqtt
15:17:27.034 -> GET... code: 200
15:17:27.034 -> reply was:
15:17:27.034 -> ==============================
15:17:27.034 -> {"detail": {"broker": "aliyun", "deviceName": "FC9850500BDM|securemode=3,signmethod=hmacsha1|", "host": "mqtt://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "FC9850500BDMG6LSVANSS977&JgCGbHlndgz", "iotToken": "af51c3dad93eddd51077c4274fbc9d5bbd0963ae", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "cb6c7ff2297b11ebb5da5254"}, "message": 1000}
15:17:27.068 -> ==============================
15:17:27.068 -> _num: 4
15:17:27.068 -> ====================
15:17:27.068 -> DEVICE_NAME_MQTT: FC9850500BDMG6LSVANSS977
15:17:27.068 -> MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
15:17:27.068 -> MQTT_ID_MQTT: FC9850500BDM|securemode=3,signmethod=hmacsha1|
15:17:27.068 -> MQTT_NAME_MQTT: FC9850500BDMG6LSVANSS977&JgCGbHlndgz
15:17:27.102 -> MQTT_KEY_MQTT: af51c3dad93eddd51077c4274fbc9d5bbd0963ae
15:17:27.102 -> MQTT_BROKER: aliyun
15:17:27.102 -> HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
15:17:27.102 -> PORT: 1883
15:17:27.102 -> HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
15:17:27.102 -> PORT: 1883
15:17:27.102 -> UUID_MQTT: cb6c7ff2297b11ebb5da5254
15:17:27.102 -> ====================
15:17:27.102 -> BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/FC9850500BDMG6LSVANSS977/s
15:17:27.136 -> BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/FC9850500BDMG6LSVANSS977/r
15:17:27.136 -> Freeheap: 30472
15:17:27.136 -> mDNS responder started
15:17:27.136 -> webSocket_MQTT server started
15:17:27.136 -> ws://FC9850500BDMG6LSVANSS977.local:81
15:17:30.388 -> message: /weather?device=FC9850500BDMG6LSVANSS977&key=af51c3dad93eddd51077c4274fbc9d5bbd0963ae
15:17:30.388 -> blinker server begin
15:17:30.422 -> Freeheap: 31760
15:17:30.491 -> HTTPS begin: http://iot.diandeng.tech/api/v3/weather?device=FC9850500BDMG6LSVANSS977&key=af51c3dad93eddd51077c4274fbc9d5bbd0963ae
15:17:30.491 -> HTTPS payload: /weather?device=FC9850500BDMG6LSVANSS977&key=af51c3dad93eddd51077c4274fbc9d5bbd0963ae
15:17:30.491 -> status... code: 200
15:17:30.491 -> {"message":10002,"detail":"request limit"}
15:17:30.491 -> ERROR: request limit
15:17:30.491 -> payload: {"message":10002,"detail":"request limit"}
15:17:30.524 -> 天气: {"message":10002,"detail":"request limit"}
15:17:30.524 ->
15:17:30.524 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
15:17:30.524 ->
15:17:30.524 -> Exception (28):
15:17:30.524 -> epc1=0x402556a4 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
15:17:30.524 ->
15:17:30.524 -> >>>stack>>>
15:17:30.524 ->
15:17:30.524 -> ctx: cont
15:17:30.524 -> sp: 3ffffb90 end: 3fffffc0 offset: 0190
15:17:30.524 -> 3ffffd20:0000000a 000000e0 3ffffec0 4022abac
15:17:30.558 -> 3ffffd30:000000e0 000000e0 3ffffec0 4022b5f9
15:17:30.558 -> 3ffffd40:3fff3800 3fff37d4 3fff37f1 3fff3944
15:17:30.558 -> 3ffffd50:3fff3964 3fff3800 3fff3954 3fff3944
15:17:30.558 -> 3ffffd60:3fff3820 3ffffd58 3ffffd44 80000004
15:17:30.558 -> 3ffffd70:000000e0 000000e0 3fff01cc 40234f3c
15:17:30.558 -> 3ffffd80:00000000 00000000 3ffffe30 3fff30fc
15:17:30.558 -> 3ffffd90:0011001f 00000000 00010050 ff001388
15:17:30.558 -> 3ffffda0:3fff3684 005c005f 00000001 70747468
15:17:30.592 -> 3ffffdb0:00000000 84593465 3fff37ac 0000001f
15:17:30.592 -> 3ffffdc0:00fea854 3fff3394 0011001f 0010559d
15:17:30.592 -> 3ffffdd0:40000500 005609c5 80102c82 00000000
15:17:30.592 -> 3ffffde0:00000000 000000c8 0000002a ffffff01
15:17:30.592 -> 3ffffdf0:00000000 0000000a 00000000 401003a8
15:17:30.592 -> 3ffffe00:80000000 00000000 3fff33bc 401003a8
15:17:30.592 -> 3ffffe10:3fff49d4 3fff49f1 3fff51b4 3fff51d4
15:17:30.626 -> 3ffffe20:3fff3800 3fff51c4 3fff51b4 40100c20
15:17:30.626 -> 3ffffe30:4024e080 00000000 00001388 000017ad
15:17:30.626 -> 3ffffe40:3fff0778 3fff359c 3fff3700 000d000f
15:17:30.626 -> 3ffffe50:80000020 3fff3600 000d000f 8000000e
15:17:30.626 -> 3ffffe60:3fff3700 002a002f 80000000 40100f29
15:17:30.626 -> 3ffffe70:001af5ab 005af1f0 3ffefccc 0000002d
15:17:30.626 -> 3ffffe80:00000028 00000060 3fffff58 402493b6
15:17:30.626 -> 3ffffe90:3ffefecc 00000000 3ffefccc 00000009
15:17:30.660 -> 3ffffea0:402a8240 00000020 3fff3100 000d000f
15:17:30.660 -> 3ffffeb0:80004b4f 3ffffe24 3ffffe10 80ff3b0c
15:17:30.660 -> 3ffffec0:3fff3634 002a002f 00ffff58 00000000
15:17:30.660 -> 3ffffed0:0074007f 80ff14b0 3fff30d4 001e001f
15:17:30.660 -> 3ffffee0:002a8240 3fff2f54 000c000f 002499fc
15:17:30.660 -> 3ffffef0:3fff3514 0074007f 00ffff58 3fff336c
15:17:30.660 -> 3fffff00:0018001f 00000005 3fffff58 3fff13a4
15:17:30.660 -> 3fffff10:3fffff40 00000003 3fffff58 40249af8
15:17:30.693 -> 3fffff20:3fff3b0c 00000000 00000001 3fff13a4
15:17:30.693 -> 3fffff30:3fffdad0 00000000 3ffefccc 40235245
15:17:30.693 -> 3fffff40:00001388 005b146a 00000000 4024a666
15:17:30.693 -> 3fffff50:00001388 005b146a 3fff340c 0055005f
15:17:30.693 -> 3fffff60:0900003f 00000025 00000054 00000071
15:17:30.693 -> 3fffff70:00000000 00000000 3ffefccc 402379b4
15:17:30.693 -> 3fffff80:3fffdad0 00000000 3ffefbe8 402379e8
15:17:30.727 -> 3fffff90:3fffdad0 00000000 3fff1364 40237bba
15:17:30.727 -> 3fffffa0:3fffdad0 00000000 3fff1364 4024a748
15:17:30.727 -> 3fffffb0:feefeffe feefeffe 3ffe8594 40101165
15:17:30.727 -> <<<stack<<<
15:17:30.727 ->
15:17:30.727 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
15:17:30.761 ->
15:17:30.761 ->ets Jan8 2013,rst cause:2, boot mode:(3,6)
15:17:30.761 ->
15:17:30.761 -> load 0x4010f000, len 3584, room 16
15:17:30.761 -> tail 0
15:17:30.761 -> chksum 0xb0
15:17:30.761 -> csum 0xb0
15:17:30.761 -> v2843a5ac
15:17:30.761 -> ~ld
15:17:31.201 -> checkNum count: 5
15:17:31.201 -> checkNum count: 5
15:17:31.201 -> checkNum count: 5
15:17:31.201 -> checkNum count: 5
15:17:31.201 -> checkNum count: 5
页:
1
2
3
4
5
6
7
8
[9]
10
11
12
13