bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
178 stars 28 forks source link

[Question]: client.js commands work, but API schema to WS doesn't #344

Closed stratacorps closed 1 month ago

stratacorps commented 3 months ago

Ask your question

I am using node-red and testing web sockets using eufy-security-ws. I can connect and run several commands and was hoping this was my gateway to implementing a connection to my Habitat home automation system.

So I can connect to Eufy and my devices okay. But some of the commands are returning "unknown_command" as the result, however the same command from the client.js command works just fine.

As an example, from client.js I can issue:

device.snooze T801010101010110 60

and get correct results.

But in node-red, I have an inject command that looks like this:

{ "messageID": "test22", "command": "device.snooze", "serialNumber": "T801010101010110", "snoozeTime": 60 } and the response is payload: "{"type":"result","success":false,"errorCode":"unknown_command"}"

I know some commands are not supported on all devices based on the schema. But what confuses me is that I can issue the command from client.js but not from WS? Am I doing something wrong?

I am using the latest docker image of eufy-security-ws (1.8.0) which is using eufy-security-client v3.0.0

(Note: I first tried the implementation of another dev's node-red for eufy-security and unfortunately their solution isn't working. Using web sockets I am able to get events, properties, etc. and am just trying to understand how to troubleshoot differences between the two environments).

bropat commented 1 month ago

Without the deblug logs from eufy-security-ws I cannot tell you exactly what you are doing wrong.