Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Mqtt 读取设备属性, 总是超时 #498

Open
pengpengno opened this issue Apr 18, 2024 · 8 comments
Open

使用Mqtt 读取设备属性, 总是超时 #498

pengpengno opened this issue Apr 18, 2024 · 8 comments
Assignees

Comments

@pengpengno
Copy link

已查阅了 文档, 文档中说是10s内 未应答即超时,可是实际情况 在10s 内 回复也还是超时, 报文如下

下行读取报文

qos0 /1236859833832701953/tm/properties/read
messageId: 0
dup: false
retain: false
will: false

{"headers":{"deviceName":"tm","productId":"1236859833832701953","traceparent":"00-a2e9b6c0c798ce87cc7d69885dd6c523-b4faf5c8c6d26e92-01"},"messageId":"1780905542328766465","deviceId":"tm","timestamp":1713435943573,"properties":["temperature"],"messageType":"READ_PROPERTY"}

上行 上传属性报文

qos0  /1236859833832701953/tm/properties/read/reply
messageId: -1
dup: false
retain: false
will: false

{
 "timestamp":1713434585865,
 "messageId":"1780905542328766465",
 "properties":{"temperature":"50"},
 "deviceId":"tm",
 "success":true
}

这里可以看书 上下行报文 messageId 相同的 而且 操作确认是在10s 应答完成的, 只是没有更改 timestamp 值 为回复时间戳(有些麻烦)

如下是系统内的截图
下行 读取报文
image

上行报文
image

图中可以看到是相差6s 的, 不清楚超时的缘由, 希望社区能够提供帮助 ,感谢!

@zhou-hao
Copy link
Member

解码的结果看看呢。

@pengpengno
Copy link
Author

解码的结果是这样的
image

@zhou-hao
Copy link
Member

解码结果似乎不对。设备日志里有回复的日志没?

@pengpengno
Copy link
Author

设备里面没有回复的日志
image

我想了下 可能是这个地方和 演示文档有出入, 文档上选中jar 类型上传,会有个 类名 ,我目前使用版本上没有

image

我使用的版本是docker 2.2.0-SNAPSHOT 的
image

@zhou-hao
Copy link
Member

是使用的最新的官方协议么? https://github.com/jetlinks/jetlinks-official-protocol

@pengpengno
Copy link
Author

嗯 没有手动打包,直接用的package目录下的 jar, 我重新上传看下

@zhou-hao
Copy link
Member

有没有做修改

@pengpengno
Copy link
Author

没有修改,直接使用的 这个文件
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants