I’m trying to connect to my Ezlo hub with websockets using node and the WS package. The connection is successful, I send the Authorization header when connecting (Authorization: Basic ${this.configuration.token}) and it seems to be accepted. However all messages I send are answered with:
{
“error”: {
“code”: -32601,
“data”: “rpc.method.notfound”,
“message”: “Unknown method”
},
“id”: “49023463124”,
“method”: “hub.items.list”
}
Example of request:
{“id”:“49023463124”,“method”:“hub.items.list”,“params”:{“deviceIds”:[“645af8c71776ae13e87f7f62”]}}
Am I missing something? What’s the authoritative doc for integration with WS?
Sorry for the delayed reply but I was traveling. I haven’t experienced that disconnect rate/failure myself. Did you try to diagnose the root cause? Also, the EzloCloudRezolver credentials resolver includes source code for authenticating with your hubs if you want to roll your own. Here is an overview of the authentication strategy and entities employed.
Best Home Automation shopping experience. Shop at Ezlo!