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

Subscribe to a device telemetry #10595

Closed
jfparrado opened this issue Apr 18, 2024 · 2 comments
Closed

Subscribe to a device telemetry #10595

jfparrado opened this issue Apr 18, 2024 · 2 comments
Assignees
Labels
question generic question

Comments

@jfparrado
Copy link

Component

  • Generic

Description
I connect to the web socket "wss://demo.thingsboard.io/api/ws" via postman and then I authenticate with this message "{
"authCmd": {
"cmdId": 0,
"token": "{{tbtoken}}"
}
}
"
but when i try to subscribe to a device`s telemetry using this message "{
"tsSubCmds":
[
{
"entityType":"DEVICE",
"entityId":"06b63430-fd96-11ee-ad61-f7ea2501b433",
"cmdId":1
}
],
"historyCmds":[],
"attrSubCmds":[]
}"
i am getting this response "{
"subscriptionId": 1,
"errorCode": 2,
"errorMsg": "Failed to parse the payload",
"data": null,
"latestValues": {}
}"
how can i susbscribe to the telemetry of that device in the right way?

@jfparrado jfparrado added the question generic question label Apr 18, 2024
@devaskim
Copy link
Contributor

how can i susbscribe to the telemetry of that device in the right way?

To debug you can create dashboard with single widget, add your device as alias and after running the dashboard look at browser console in Network/WS tab. There you will find appropriate data format.

@devaskim
Copy link
Contributor

Also you can check thingsboard-telemetry-stream from my Thingsboard collection.

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

No branches or pull requests

5 participants