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

@3@ 发表于 2021-4-18 13:03

blinker App 设备过一会就会离线。重启app又恢复



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

奈何col 发表于 2021-4-18 13:38

确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈

@3@ 发表于 2021-4-18 18:43


@3@ 发表于 2021-4-18 18:45

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

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

@3@ 发表于 2021-4-18 18:46

奈何col 发表于 2021-4-18 13:38
确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...


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

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

奈何col 发表于 2021-4-18 19:03

@3@ 发表于 2021-4-18 18:46
库,app都是官网下的最新版。

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

那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈

@3@ 发表于 2021-4-18 19:07

奈何col 发表于 2021-4-18 13:38
确保app、package、lib为最新版,并测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...


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

_aliType:
_duerType:
_miType:
_authKey: eadaa1f349ab
Connecting to PDCN_sjf
ESP8266_MQTT initialized...

===========================================================
================== Blinker Timer loaded! ==================
   EEPROM address 1536-2431 is used for Blinker Timer!
========= PLEASE AVOID USING THESE EEPROM ADDRESS! ========
===========================================================

countdown state: false
_cdRunState: 0
_totalTime: 0
_runTime: 0
_action:
loop state: false
_lpRunState: 0
_times: 0
_tri_times: 0
_time1: 0
_action1:
_time2: 0
_action2:
_lpData: 0
WiFi Connected.
IP Address:
192.168.123.201
begin: http://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=eadaa1f349ab&version=0.1.0&protocol=mqtt
GET... code: 200
reply was:
==============================
{"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}
==============================
_num: 4
====================
DEVICE_NAME_MQTT: C75FEFECGO3TVQ5P4WVAJX7X
MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
MQTT_ID_MQTT: C75FEFECGO3T|securemode=3,signmethod=hmacsha1|
MQTT_NAME_MQTT: C75FEFECGO3TVQ5P4WVAJX7X&JgCGbHlndgz
MQTT_KEY_MQTT: fb89ace28d08c864982850a3655ccfab2edeadb5
MQTT_BROKER: aliyun
HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
PORT: 1883
HOST: public.iot-as-mqtt.cn-shanghai.aliyuncs.com
PORT: 1883
UUID_MQTT: 508bfb7f80d495c47d5a3190852e9257
====================
BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/C75FEFECGO3TVQ5P4WVAJX7X/s
BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/C75FEFECGO3TVQ5P4WVAJX7X/r
Freeheap: 35928
mDNS responder started
webSocket_MQTT server started
ws://C75FEFECGO3TVQ5P4WVAJX7X.local:81
Current time: Sun Apr 18 10:59:44 2021

NTP time: 1618714784
==== needInit ====
message: /share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
blinker server begin
Freeheap: 36616
HTTPS begin: http://iot.diandeng.tech/api/v1/user/device/share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
HTTPS payload: /share/device?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab
status... code: 200
{"detail": {"users": []}, "message": 1000}
_type: 16
payload: {"users":[]}
sharers data: {"users":[]}
load timing
load timing taskCount: 0
freshTiming wDay: 0, nowMins: 1139, nowSeconds: 68385
nextTask: 10apartSeconds: 18015 wDay: 0
cbackData: 10
change apartSeconds: 3600
millis: 17990, connect_time: 17244
MQTT conn init success
=======================================================
=========== Blinker Auto Control mode init! ===========
      EEPROM address 0-1279 is used for Auto Control!
======= PLEASE AVOID USING THESE EEPROM ADDRESS! ======
=======================================================
_______autoStart_______
_aCount: 1
new BlinkerAUTO() _num: 0
_haveAuto: 0
_autoState: 0
_logicType: 0
_compareType: 0
Connecting to MQTT...
reconnect_time: 0
Connection failed
Retrying MQTT connection in 5 seconds...
Connecting to MQTT...
reconnect_time: 1
MQTT Connected!
Freeheap: 36360
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
data: {"get":"state"}
fromDevice: 508bfb7f80d495c47d5a3190852e9257
Authority uuid
available: 1
checkAvail: 1
parse data: {"get":"state"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
autoFormatData key: state, json: "state":"online"
new.
timer codes: 000
autoFormatData key: timer, json: "timer":"000"
add.
autoFormatData key: version, json: "version":"0.1.0"
add.
print: {"state":"online","timer":"000","version":"0.1.0"}
Proto print...
Freeheap: 34272
isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
MQTT Publish...
Freeheap: 34272
{"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
...OK!
Freeheap: 33624
Freeheap: 34656
heartBeat isParsed 1
_fresh need flush
isParsed
flush
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
data: {"get":"state"}
fromDevice: 508bfb7f80d495c47d5a3190852e9257
Authority uuid
available: 1
checkAvail: 1
parse data: {"get":"state"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
autoFormatData key: state, json: "state":"online"
new.
timer codes: 000
autoFormatData key: timer, json: "timer":"000"
add.
autoFormatData key: version, json: "version":"0.1.0"
add.
print: {"state":"online","timer":"000","version":"0.1.0"}
Proto print...
Freeheap: 34272
isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
MQTT Publish...
Freeheap: 34272
{"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
...OK!
Freeheap: 33600
Freeheap: 34632
heartBeat isParsed 1
_fresh need flush
isParsed
flush
MQTT Ping!
Freeheap: 36360
MQTT Ping!
Freeheap: 36360
MQTT Ping!
Freeheap: 36552
MQTT Ping!
Freeheap: 36744
MQTT Ping!



这是从启动esp8266到打开app,再到app上离线的debug信息。。大佬麻烦帮忙分析分析

@3@ 发表于 2021-4-18 19:12

奈何col 发表于 2021-4-18 19:03
那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...

MQTT Ping!
Freeheap: 36744
MQTT Ping!
Freeheap: 36744
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"508bfb7f80d495c47d5a3190852e9257","toDevice":"C75FEFECGO3TVQ5P4WVAJX7X"}
data: {"get":"state"}
fromDevice: 508bfb7f80d495c47d5a3190852e9257
Authority uuid
available: 1
checkAvail: 1
parse data: {"get":"state"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
autoFormatData key: state, json: "state":"online"
new.
timer codes: 000
autoFormatData key: timer, json: "timer":"000"
add.
autoFormatData key: version, json: "version":"0.1.0"
add.
print: {"state":"online","timer":"000","version":"0.1.0"}
Proto print...
Freeheap: 34656
isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
MQTT Publish...
Freeheap: 34656
{"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"C75FEFECGO3TVQ5P4WVAJX7X","toDevice":"508bfb7f80d495c47d5a3190852e9257","deviceType":"OwnApp"}
...OK!
Freeheap: 33984
Freeheap: 35016
heartBeat isParsed 1
_fresh need flush
isParsed
flush
message: /heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
blinker server begin
Freeheap: 36512
HTTPS begin: http://iot.diandeng.tech/api/v1/user/device/heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
HTTPS payload: /heartbeat?deviceName=C75FEFECGO3TVQ5P4WVAJX7X&key=eadaa1f349ab&heartbeat=600
status... code: 200
{"detail": "", "message": 1000}
_type: 23
payload: null
MQTT Ping!
Freeheap: 36552
MQTT Ping!
Freeheap: 36552
MQTT Ping!
Freeheap: 36552


这是重新打开app,后esp8266端的调试信息

@3@ 发表于 2021-4-18 19:14

奈何col 发表于 2021-4-18 19:03
那我再重复下:测试例程,再查看设备端调试信息,确保设备收到get state,并正常反馈 ...

离线后就收不到get stata了

奈何col 发表于 2021-4-18 19:16

@3@ 发表于 2021-4-18 19:14
离线后就收不到get stata了
app版本是?手机型号及系统版本是?
页: [1] 2
查看完整版本: blinker App 设备过一会就会离线。重启app又恢复