Blinker APP分享设备问题-Arduino中文社区 - Powered by Discuz! Archiver

ahua7336 发表于 2021-3-17 12:32

Blinker APP分享设备问题

将自己的设备分享给他人后和设备在同一个wifi下接收的用户显示设备在线使用正常切换至移动网络后 显示设备离线无法操作!!! APP和库均是最新版本,开发板为ESP32模块反馈连接MQTT服务器也是正常的, 现原因不明,来个知道的帮我解答一下万分感谢!!!!!

奈何col 发表于 2021-3-17 14:22

我们这边测试是没有问题的,您可以使用debugall输出更多调试信息查看
https://www.arduino.cn/thread-84332-1-1.html

柒夏柒夜 发表于 2021-3-18 22:33

本帖最后由 柒夏柒夜 于 2021-3-18 22:37 编辑

同楼主   遇到同样问题,共享给别人的设备在同wifi的情况下才会显示在线,切换到其他网络或者数据就显示设备离线

奈何col 发表于 2021-3-18 23:23

柒夏柒夜 发表于 2021-3-18 22:33
同楼主   遇到同样问题,共享给别人的设备在同wifi的情况下才会显示在线,切换到其他网络或者数据就显示设 ...

同上,看看调试信息

三水 发表于 2021-3-19 17:00

更新最新库测试:https://github.com/blinker-iot/blinker-library/archive/dev_3.0.zip

ahua7336 发表于 2021-3-23 12:31

奈何col 发表于 2021-3-17 14:22
我们这边测试是没有问题的,您可以使用debugall输出更多调试信息查看
https://www.arduino.cn/thread-84332 ...

主账号登陆信息:
)⸮
⸮ܠ⸮⸮J⸮⸮1⸮⸮⸮1!y⸮⸮!⸮⸮⸮!⸮

__       __                __
/\ \   /\ \    __      /\ \            v0.3.5
\ \ \___ \ \ \/\_\    ___\ \ \/'\      __   _ __   
\ \ '__`\\ \ \ \/\ \ /' _ `\ \ , <    /'__`\/\`'__\
\ \ \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: 3ccd7e862e1c
Connecting to Narva
ESP32_MQTT initialized...

===========================================================
================== Blinker Timer loaded! ==================
Warning!EEPROM address 1536-2431 is used for Blinker Timer!
============= DON'T USE 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
checkNum count: 4
checkNum count: 4
checkNum count: 4
checkNum count: 4
WiFi Connected.
IP Address:
192.168.3.17
HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=3ccd7e862e1c&version=0.1.0&protocol=mqtts
GET... code: 200
reply was:
==============================
{"detail": {"broker": "aliyun", "deviceName": "CC713A3AYFZPTS6O3P1B6JFW", "host": "mqtts://public.iot-as-mqtt.cn-shanghai.aliyuncs.com", "iotId": "9uOL1CfmTVfvj55TIEoT000000", "iotToken": "^1^1616473742606^bd94a0fb1faf8f6", "port": "1883", "productKey": "JgCGbHlndgz", "uuid": "5d9a1570b9576a36ea148306048e74db"}, "message": 1000}
==============================
_num: 5
====================
DEVICE_NAME_MQTT: CC713A3AYFZPTS6O3P1B6JFW
MQTT_PRODUCTINFO_MQTT: JgCGbHlndgz
MQTT_ID_MQTT: CC713A3AYFZPTS6O3P1B6JFW
MQTT_NAME_MQTT: 9uOL1CfmTVfvj55TIEoT000000
MQTT_KEY_MQTT: ^1^1616473742606^bd94a0fb1faf8f6
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: 5d9a1570b9576a36ea148306048e74db
====================
BLINKER_PUB_TOPIC_MQTT: /JgCGbHlndgz/CC713A3AYFZPTS6O3P1B6JFW/s
BLINKER_SUB_TOPIC_MQTT: /JgCGbHlndgz/CC713A3AYFZPTS6O3P1B6JFW/r
Freeheap: 196384
mDNS responder started
webSocket_MQTT server started
ws://CC713A3AYFZPTS6O3P1B6JFW.local:81
Current time: Tue Mar 23 12:29:04 2021

NTP time: 1616473744
==== needInit ====
message: /share/device?deviceName=CC713A3AYFZPTS6O3P1B6JFW&key=3ccd7e862e1c
blinker server begin
Freeheap: 233592
HTTPS begin: https://iot.diandeng.tech/api/v1/user/device/share/device?deviceName=CC713A3AYFZPTS6O3P1B6JFW&key=3ccd7e862e1c
HTTPS payload: /share/device?deviceName=CC713A3AYFZPTS6O3P1B6JFW&key=3ccd7e862e1c
status... code: 200
{"detail": {"users": ["b5ffffe4822311eb89785254", "7cc311a2822411eb89785254", "89980a18830f11eb89785254", "0d5dc568831011eb89785254", "c9083a61b0a15c8b4c163a911b039b8c"]}, "message": 1000}
payload: {"users":["b5ffffe4822311eb89785254","7cc311a2822411eb89785254","89980a18830f11eb89785254","0d5dc568831011eb89785254","c9083a61b0a15c8b4c163a911b039b8c"]}
sharers data: {"users":["b5ffffe4822311eb89785254","7cc311a2822411eb89785254","89980a18830f11eb89785254","0d5dc568831011eb89785254","c9083a61b0a15c8b4c163a911b039b8c"]}
sharer uuid: b5ffffe4822311eb89785254, length: 24
sharer uuid: 7cc311a2822411eb89785254, length: 24
sharer uuid: 89980a18830f11eb89785254, length: 24
sharer uuid: 0d5dc568831011eb89785254, length: 24
sharer uuid: c9083a61b0a15c8b4c163a911b039b8c, length: 32
load timing
load timing taskCount: 0
freshTiming wDay: 2, nowMins: 749, nowSeconds: 44947
nextTask: 10apartSeconds: 41453 wDay: 2
cbackData: 10
change apartSeconds: 3600
millis: 7892, connect_time: 5196
MQTT conn init success
=======================================================
=========== Blinker Auto Control mode init! ===========
Warning!EEPROM address 0-1279 is used for Auto Control!
=========== DON'T USE THESE EEPROM ADDRESS! ===========
=======================================================
_______autoStart_______
_aCount: 1
new BlinkerAUTO() _num: 0
_haveAuto: 0
_autoState: 0
_logicType: 0
_compareType: 0
Connecting to MQTT...
reconnect_time: 0
MQTT Connected!
Freeheap: 191480
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"5d9a1570b9576a36ea148306048e74db","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
data: {"get":"state"}
fromDevice: 5d9a1570b9576a36ea148306048e74db
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: 189368
isJson: {"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"CC713A3AYFZPTS6O3P1B6JFW","toDevice":"5d9a1570b9576a36ea148306048e74db","deviceType":"OwnApp"}
MQTT Publish...
Freeheap: 189368
{"data":{"state":"online","timer":"000","version":"0.1.0"},"fromDevice":"CC713A3AYFZPTS6O3P1B6JFW","toDevice":"5d9a1570b9576a36ea148306048e74db","deviceType":"OwnApp"}
...OK!
Freeheap: 189368
Freeheap: 190408
heartBeat isParsed 1
checkNum count: 4
checkNum count: 4
checkNum count: 4
checkNum count: 4
_fresh need flush
isParsed
flush


分享账号登陆信息:
MQTT Ping!
Freeheap: 191480
Got: {"deviceType":"DiyArduino","data":{"btn-tz":"tap"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
data: {"btn-tz":"tap"}
fromDevice: c9083a61b0a15c8b4c163a911b039b8c
_sharerCount: 5
ERROR: No authority uuid found, check is from bridge/share device, data: {"btn-tz":"tap"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"btn-tz":"tap"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"btn-tz":"tap"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"btn-tz":"tap"}
From sharer: c9083a61b0a15c8b4c163a911b039b8c
sharer num: 4
available: 1
checkAvail: 1
parse data: {"deviceType":"DiyArduino","data":{"btn-tz":"tap"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
checkNum count: 4
checkNum count: 4
checkNum count: 4
checkNum count: 4
flush
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
data: {"get":"state"}
fromDevice: c9083a61b0a15c8b4c163a911b039b8c
_sharerCount: 5
ERROR: No authority uuid found, check is from bridge/share device, data: {"get":"state"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"get":"state"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"get":"state"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"get":"state"}
From sharer: c9083a61b0a15c8b4c163a911b039b8c
sharer num: 4
available: 1
checkAvail: 1
parse data: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
checkNum count: 4
checkNum count: 4
checkNum count: 4
checkNum count: 4
flush

奈何col 发表于 2021-3-23 14:20

ahua7336 发表于 2021-3-23 12:31
主账号登陆信息:




更新lib

ahua7336 发表于 2021-3-23 15:00

奈何col 发表于 2021-3-23 14:20
更新lib

更新了新的库arduino nano 编译正常通过

esp32 报错 如下:In file included from C:\Users\kh7081227\Documents\Arduino\libraries\Blinker\src/BlinkerESPMQTT.h:16:0,
               from C:\Users\kh7081227\Documents\Arduino\libraries\Blinker\src/Blinker.h:36,
               from D:\液晶屏教程\STM32\arduino工程\卷帘门\sketch_may29a\sketch_may29a.ino:5:
C:\Users\kh7081227\Documents\Arduino\libraries\Blinker\src/Adapters/BlinkerMQTT.h: In member function 'int BlinkerMQTT::connectServer()':
C:\Users\kh7081227\Documents\Arduino\libraries\Blinker\src/Adapters/BlinkerMQTT.h:2353:18: error: 'class WiFiClientSecure' has no member named 'setInsecure'
         client_s.setInsecure();
                  ^
exit status 1
为开发板 ESP32 Dev Module 编译时出错。

奈何col 发表于 2021-3-23 18:23

ahua7336 发表于 2021-3-23 15:00
更新了新的库arduino nano 编译正常通过

esp32 报错 如下:

您确定是按文档安装的指定版本?我这边测试例程没有问题

ahua7336 发表于 2021-3-24 12:36

奈何col 发表于 2021-3-23 18:23
您确定是按文档安装的指定版本?我这边测试例程没有问题

APP版本:2.5.2
固件版本:0.3.6
开发板版本:ESP32 Arduino1.0.5

现象依旧相同:
Got: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
data: {"get":"state"}
fromDevice: c9083a61b0a15c8b4c163a911b039b8c
_sharerCount: 5
ERROR: No authority uuid found, check is from bridge/share device, data: {"get":"state"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
ERROR: No authority uuid found, check is from bridge/share device, data: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
From sharer: c9083a61b0a15c8b4c163a911b039b8c
sharer num: 4
available: 1
checkAvail: 1
parse data: {"deviceType":"DiyArduino","data":{"get":"state"},"fromDevice":"c9083a61b0a15c8b4c163a911b039b8c","toDevice":"CC713A3AYFZPTS6O3P1B6JFW"}
defined BLINKER_ARDUINOJSON
autoManager begin: 0 0
checkNum count: 4
checkNum count: 4
checkNum count: 4
checkNum count: 4
flush
页: [1] 2
查看完整版本: Blinker APP分享设备问题