从编译到烧写配网一切正常,手机app也可以正确显示温度和湿度。但是,使用小爱同学查询温度时正常,查询湿度时失败,说“设备沟通失败”类似意思的话。硬件上只做了温湿度两个传感器,所以没有仔细测试其他的,但是初步测试其他传感器是能够播报程序里给的假数据的,只有湿度不行。
[66]
__ __ __
/\ \ /\ \ __ /\ \ v0.3.3
\ \ \___ \ \ \ /\_\ ___\ \ \/'\ __ _ __
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , < /'__`\/\`'__\
\ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\ __/\ \ \./
\ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\
\/___/ \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/
To better use blinker with your IoT project!
Download latest blinker library here!
=> https://github.com/blinker-iot/blinker-library
[100] _aliType:
[101] _duerType: &duerType=AIR_MONITOR
[105] _miType: &miType=sensor
[107] _authKey: 1ae1a31d0d43
[614] Waiting for WiFi 20s, will enter SMARTCONFIG or APCONFIG while WiFi not connect!
[2114] ESP8266_MQTT initialized...
[2114]
===========================================================
================== Blinker Timer loaded! ==================
Warning!EEPROM address 1536-2431 is used for Blinker Timer!
============= DON'T USE THESE EEPROM ADDRESS! =============
===========================================================
[2135] countdown state: false
[2136] _cdRunState: 0
[2138] _totalTime: 0
[2140] _runTime: 0
[2141] _action:
[2144] loop state: false
[2145] _lpRunState: 0
[2147] _times: 0
[2149] _tri_times: 0
[2151] _time1: 0
[2152] _action1:
[2154] _time2: 0
[2156] _action2:
[2157] _lpData: 0
[2159] WiFi Connected.
[2161] IP Address:
[2163] 192.168.3.58
[2175] [HTTP] begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey={这里是我的authkey}&duerType=AIR_MONITOR&miType=sensor
[3536] [HTTP] GET... code: 200
[3543] reply was:
[3543] ==============================
[3543] {"detail": {"broker": "aliyun", "deviceName": "190006900B82K2JSYWMBAJ4W", "iotId": "rtphQJHbX7rm6uXF79oP000000", "iotToken": "127240d2376242f9abfd299845093850", "productKey": "JgCGbHlndgz", "uuid": "714b3fc9da4d66954ea123767ee80b73"}, "message": 1000}
[3560] ==============================
[3564] ====================
[3566] DEVICE_NAME_MQTT: 190006900B82K2JSYWMBAJ4W
[3570] MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
[3574] MQTT_ID_MQTT: 190006900B82K2JSYWMBAJ4W
[3578] MQTT_NAME_MQTT: rtphQJHbX7rm6uXF79oP000000
[3582] MQTT_KEY_MQTT: 127240d2376242f9abfd299845093850
[3587] MQTT_BROKER: aliyun
[3590] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[3595] PORT: 1883
[3596] UUID_MQTT: 714b3fc9da4d66954ea123767ee80b73
[3601] ====================
[3603] BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/190006900B82K2JSYWMBAJ4W/s
[3610] BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/190006900B82K2JSYWMBAJ4W/r
[3616] Freeheap: 10248
[3622] mDNS responder started
[3623] webSocket_MQTT server started
[3624] ws://190006900B82K2JSYWMBAJ4W.local:81
[4629] Current time: Fri Jan 10 16:03:34 2020
[4629] NTP time: 1578643414
[4630] time (millis() - ntpFreshTime): 4630
[4630] ntpGetTime: 0
[4631] 1
[4632] ==== needInit ====
[4634] message: /share/device?deviceName=190006900B82K2JSYWMBAJ4W&key=1ae1a31d0d43
[4642] blinker server begin
[4644] Freeheap: 32104
[5631] HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/share/device?deviceName=190006900B82K2JSYWMBAJ4W&key={这里是我的authkey}
[5631] HTTPS payload: /share/device?deviceName=190006900B82K2JSYWMBAJ4W&key={这里是我的authkey}
[5639] [HTTP] status... code: 200
[5644] {"detail": {"users": []}, "message": 1000}
[5647] payload: {"users":[]}
[5651] sharers data: {"users":[]}
[5653] load timing
[5655] load timing taskCount: 0
[5657] freshTiming wDay: 5, nowMins: 963, nowSeconds: 57815
[5662] nextTask: 10 apartSeconds: 28585 wDay: 5
[5667] cbackData: 10
[5668] change apartSeconds: 3600
[5772] Connecting to MQTT...
[6942] MQTT Connected!
[6942] Freeheap: 11288
[6943] millis: 6942, connect_time: 4632
[6943] MQTT conn init success
[25608] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"MIOT","toDevice":"190006900B82K2JSYWMBAJ4W"}
[25609] data: {"get":"state"}
[25611] fromDevice: MIOT
[25613] form MIOT
[25635] MIOT parse data: {"get":"state"}
[25635] MIOT Query codes: 0
[25636] MIOT Query All
[25637] response to MIOT: {"temp":"20.00","humi":"20.00","pm25":"20","co2":"20"}
[25640] isJson: {"data":{"temp":"20.00","humi":4
[25740] {"data":{"temp":"20.00","humi":"20.00","pm25":"20","co2":"20"},"fromDevice":"190006900B82K2JSYWMBAJ4W","toDevice":"MIOT_r","deviceType":"vAssistant"}
[25743] ...OK!
[25744] Freeheap: 9464
[32025] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"MIOT","toDevice":"190006900B82K2JSYWMBAJ4W"}
[32026] data: {"get":"state"}
[32027] fromDevice: MIOT
[32029] form MIOT
[32052] MIOT parse data: {"get":"state"}
[32052] MIOT Query codes: 0
[32052] MIOT Query All
[32053] response to MIOT: {"temp":"20.00","humi":"20.00","pm25":"20","co2":"20"}
[32056] isJson: {"data":{"temp":"20.00","humi":[32119] {"data":{"temp":"20.00","humi":"20.00","pm25":"20","co2":"20"},"fromDevice":"190006900B82K2JSYWMBAJ4W","toDevice":"MIOT_r","deviceType":"vAssistant"}
[32122] ...OK!
[32123] Freeheap: 9464