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

How to subscribe to websocket to get json data #1

Open
dpuact opened this issue Dec 3, 2024 · 0 comments
Open

How to subscribe to websocket to get json data #1

dpuact opened this issue Dec 3, 2024 · 0 comments

Comments

@dpuact
Copy link

dpuact commented Dec 3, 2024

The subscription address is as follows:
ws://host:port/api/ws
First,I need to connect.Then I send a subscription message:

{
    "authCmd": {
        "cmdId": 0,
        "token": ""
    },
    "cmds": [
        {
            "entityType": "DEVICE",
            "entityId": "71da9c40-9ce9-11ef-a2c5-87c7805860a6",
            "cmdId": 10,
            "type": "TIMESERIES"
        },{
            "entityType": "DEVICE",
            "entityId": "226528f0-9cea-11ef-a2c5-87c7805860a6",
            "cmdId": 10,
            "type": "TIMESERIES"
        }
    ]
}

I didn't find how to use websocket in the documentation

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

1 participant