blinker App 设备过一会就会离线。重启app又恢复-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4469|回复: 15

[已解答] blinker App 设备过一会就会离线。重启app又恢复

[复制链接]
发表于 2021-4-18 13:03 | 显示全部楼层 |阅读模式
QQ图片20210418125923.jpg

重启后又恢复在线,,esp8266那边肯定没问题

重启后恢复在线连接

重启后恢复在线连接

发表于 2021-4-18 13:38 | 显示全部楼层
确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈
 楼主| 发表于 2021-4-18 18:43 | 显示全部楼层
Screenshot_2021-04-18-18-37-59-980_iot.clz.me.jpg
 楼主| 发表于 2021-4-18 18:45 | 显示全部楼层
库,app都是官网下的最新版。

运行blinker的text_wifi例子也是一样。离线连不上。app发的指令,esp8266收不到。。重启客户端就又连的上,显示在线。。是blinker有限制吗?
 楼主| 发表于 2021-4-18 18:46 | 显示全部楼层
奈何col 发表于 2021-4-18 13:38
确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...


库,app都是官网下的最新版。

运行blinker的text_wifi例子也是一样。离线连不上。app发的指令,esp8266收不到。。重启客户端就又连的上,显示在线。。是blinker有限制吗?

点评

那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈  详情 回复 发表于 2021-4-18 19:03
发表于 2021-4-18 19:03 | 显示全部楼层
@3@ 发表于 2021-4-18 18:46
库,app都是官网下的最新版。

运行blinker的text_wifi例子也是一样。离线连不上。app发的指令,esp8266 ...

那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈
 楼主| 发表于 2021-4-18 19:07 | 显示全部楼层
奈何col 发表于 2021-4-18 13:38
确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...

[66]
__       __                __
/\ \     /\ \    __        /\ \              v0.3.7
\ \ \___ \ \ \  /\_\    ___\ \ \/'\      __   _ __   
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , <    /'__`\/\`'__\
  \ \ \L\ \\ \ \_\ \ \/\ \/\ \ \ \\`\ /\  __/\ \ \./
   \ \_,__/ \ \__\\ \_\ \_\ \_\ \_\ \_\ \____\\ \_\  
    \/___/   \/__/ \/_/\/_/\/_/\/_/\/_/\/____/ \/_/  
    To better use blinker with your IoT project!
    Download latest blinker library here!
    => https://github.com/blinker-iot/blinker-library

[99] _aliType:
[101] _duerType:
[102] _miType:
[104] _authKey: eadaa1f349ab
[107] Connecting to PDCN_sjf
[113] ESP8266_MQTT initialized...
[113]
===========================================================
================== Blinker Timer loaded! ==================
     EEPROM address 1536-2431 is used for Blinker Timer!
========= PLEASE AVOID USING THESE EEPROM ADDRESS! ========
===========================================================

[140] countdown state: false
[141] _cdRunState: 0
[143] _totalTime: 0
[145] _runTime: 0
[147] _action:
[149] loop state: false
[150] _lpRunState: 0
[152] _times: 0
[154] _tri_times: 0
[156] _time1: 0
[157] _action1:
[159] _time2: 0
[160] _action2:
[162] _lpData: 0
[1694] WiFi Connected.
[1694] IP Address:
[1694] 192.168.123.201
[1705] [HTTP] begin: http://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=eadaa1f349ab&version=0.1.0&protocol=mqtt
[2117] [HTTP] GET... code: 200
[2121] reply was:
[2121] ==============================
[2122] {"detail": {"broker": "aliyun", "deviceName": "C75FEFECGO3T|securemode=3,signmethod=hmacsha1|", "host": "mqtt://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "C75FEFECGO3TVQ5P4WVAJX7X&JgCGbHlndgz", "iotToken": "fb89ace28d08c864982850a3655ccfab2edeadb5", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "508bfb7f80d495c47d5a3190852e9257"}, "message": 1000}
[2148] ==============================
[2153] _num: 4
[2153] ====================
[2155] DEVICE_NAME_MQTT: C75FEFECGO3TVQ5P4WVAJX7X
[2160] MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
[2164] MQTT_ID_MQTT: C75FEFECGO3T|securemode=3,signmethod=hmacsha1|
[2170] MQTT_NAME_MQTT: C75FEFECGO3TVQ5P4WVAJX7X&JgCGbHlndgz
[2175] MQTT_KEY_MQTT: fb89ace28d08c864982850a3655ccfab2edeadb5
[2180] MQTT_BROKER: aliyun
[2183] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[2188] PORT: 1883
[2190] HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
[2195] PORT: 1883
[2196] UUID_MQTT: 508bfb7f80d495c47d5a3190852e9257
[2201] ====================
[2203] BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/C75FEFECGO3TVQ5P4WVAJX7X/s
[2209] BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/C75FEFECGO3TVQ5P4WVAJX7X/r
[2216] Freeheap: 35928
[2221] mDNS responder started
[2223] webSocket_MQTT server started
[2224] ws://C75FEFECGO3TVQ5P4WVAJX7X.local:81
[17243] Current time: Sun Apr 18 10:59:44 2021

[17243] NTP time: 1618714784
[17244] ==== needInit ====
[17244] message: /share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
[17249] blinker server begin
[17252] Freeheap: 36616
[17847] HTTPS begin: http://iot.diandeng.tech/api/v1/user/device/share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
[17847] HTTPS payload: /share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
[17855] [HTTP] status... code: 200
[17859] {"detail": {"users": []}, "message": 1000}
[17863] _type: 16
[17864] payload: {"users":[]}
[17869] sharers data: {"users":[]}
[17870] load timing
[17873] load timing taskCount: 0
[17875] freshTiming wDay: 0, nowMins: 1139, nowSeconds: 68385
[17880] nextTask: 10  apartSeconds: 18015 wDay: 0
[17885] cbackData: 10
[17887] change apartSeconds: 3600
[17990] millis: 17990, connect_time: 17244
[17990] MQTT conn init success
[17990] =======================================================
[17991] =========== Blinker Auto Control mode init! ===========
[17997]      EEPROM address 0-1279 is used for Auto Control!
[18002] ======= PLEASE AVOID USING THESE EEPROM ADDRESS! ======
[18008] =======================================================
[18013] _______autoStart_______
[18017] _aCount: 1
[18018] new BlinkerAUTO() _num: 0
[18022] _haveAuto: 0
[18023] _autoState: 0
[18025] _logicType: 0
[18027] _compareType: 0
[18030] Connecting to MQTT...
[18032] reconnect_time: 0
[23546] Connection failed
[23546] Retrying MQTT connection in 5 seconds...
[28546] Connecting to MQTT...
[28546] reconnect_time: 1
[28817] MQTT Connected!
[28817] Freeheap: 36360
[37815] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
[37817] data: {"get":"state"}
[37819] fromDevice: 508bfb7f80d495c47d5a3190852e9257
[37824] Authority uuid
[37846] available: 1
[37846] checkAvail: 1
[37846] parse data: {"get":"state"}
[37846] defined BLINKER_ARDUINOJSON
[37847] autoManager begin: 0 0
[37849] autoFormatData key: state, json: "state":"online"
[37853] new.
[37855] timer codes: 000
[37857] autoFormatData key: timer, json: "timer":"000"
[37862] add.
[37863] autoFormatData key: version, json: "version":"0.1.0"
[37868] add.
[37870] print: {"state":"online","timer":"000","version":"0.1.0"}
[37875] Proto print...
[37877] Freeheap: 34272
[37880] isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[37896] MQTT Publish...
[37898] Freeheap: 34272
[37901] {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[37915] ...OK!
[37917] Freeheap: 33624
[37919] Freeheap: 34656
[37921] heartBeat isParsed 1
[37924] _fresh need flush
[37926] isParsed
[37928] flush
[41498] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
[41500] data: {"get":"state"}
[41502] fromDevice: 508bfb7f80d495c47d5a3190852e9257
[41507] Authority uuid
[41529] available: 1
[41529] checkAvail: 1
[41529] parse data: {"get":"state"}
[41530] defined BLINKER_ARDUINOJSON
[41530] autoManager begin: 0 0
[41532] autoFormatData key: state, json: "state":"online"
[41536] new.
[41538] timer codes: 000
[41540] autoFormatData key: timer, json: "timer":"000"
[41545] add.
[41546] autoFormatData key: version, json: "version":"0.1.0"
[41551] add.
[41553] print: {"state":"online","timer":"000","version":"0.1.0"}
[41558] Proto print...
[41561] Freeheap: 34272
[41563] isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[41579] MQTT Publish...
[41581] Freeheap: 34272
[41584] {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[41598] ...OK!
[41600] Freeheap: 33600
[41602] Freeheap: 34632
[41604] heartBeat isParsed 1
[41607] _fresh need flush
[41609] isParsed
[41611] flush
[71616] MQTT Ping!
[71617] Freeheap: 36360
[102224] MQTT Ping!
[102224] Freeheap: 36360
[132954] MQTT Ping!
[132954] Freeheap: 36552
[163562] MQTT Ping!
[163562] Freeheap: 36744
[194180] MQTT Ping!



这是从启动esp8266到打开app,再到app上离线的debug信息。。大佬麻烦帮忙分析分析
 楼主| 发表于 2021-4-18 19:12 | 显示全部楼层
奈何col 发表于 2021-4-18 19:03
那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...

[532717] MQTT Ping!
[532717] Freeheap: 36744
[563560] MQTT Ping!
[563560] Freeheap: 36744
[581359] Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
[581361] data: {"get":"state"}
[581364] fromDevice: 508bfb7f80d495c47d5a3190852e9257
[581368] Authority uuid
[581391] available: 1
[581391] checkAvail: 1
[581391] parse data: {"get":"state"}
[581391] defined BLINKER_ARDUINOJSON
[581392] autoManager begin: 0 0
[581393] autoFormatData key: state, json: "state":"online"
[581398] new.
[581400] timer codes: 000
[581402] autoFormatData key: timer, json: "timer":"000"
[581407] add.
[581408] autoFormatData key: version, json: "version":"0.1.0"
[581414] add.
[581415] print: {"state":"online","timer":"000","version":"0.1.0"}
[581421] Proto print...
[581423] Freeheap: 34656
[581425] isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[581442] MQTT Publish...
[581444] Freeheap: 34656
[581447] {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
[581461] ...OK!
[581463] Freeheap: 33984
[581465] Freeheap: 35016
[581467] heartBeat isParsed 1
[581470] _fresh need flush
[581473] isParsed
[581474] flush
[600009] message: /heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
[600010] blinker server begin
[600010] Freeheap: 36512
[600917] HTTPS begin: http://iot.diandeng.tech/api/v1/user/device/heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
[600918] HTTPS payload: /heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
[600927] [HTTP] status... code: 200
[600931] {"detail": "", "message": 1000}
[600934] _type: 23
[600936] payload: null
[611473] MQTT Ping!
[611473] Freeheap: 36552
[642285] MQTT Ping!
[642286] Freeheap: 36552
[673026] MQTT Ping!
[673026] Freeheap: 36552


这是重新打开app,后esp8266端的调试信息
 楼主| 发表于 2021-4-18 19:14 | 显示全部楼层
奈何col 发表于 2021-4-18 19:03
那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...

离线后就收不到get stata了

点评

app版本是?  详情 回复 发表于 2021-4-18 19:16
发表于 2021-4-18 19:16 | 显示全部楼层
@3@ 发表于 2021-4-18 19:14
离线后就收不到get stata了

app版本是?手机型号及系统版本是?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 11:45 , Processed in 0.118034 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表