Method not found


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:

Am I missing something? What’s the authoritative doc for integration with WS?

While not the official integration docs, you could check out Ezlo-Hub-Kit for discovering and connecting to Ezlo hubs via NodeJS.

See Announcing Ezlo-Hub-Kit & EZ-Apps
The source code is here GitHub - bblacey/ezlo-hub-kit: SDK for Ezlo Innovation's Home Automation Hubs/Controllers

Thanks :slight_smile: I ended up trying it out, however I get deconnections every 60 seconds, and often the reconnection fails. Have you ever seen that?

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.