OpenWonderLabs / SwitchBotAPI

SwitchBot Open API Documents
841 stars 70 forks source link

Keypad Touch: Invalid API calls cause stability issues #300

Open dds82 opened 4 months ago

dds82 commented 4 months ago

Analysis

Invalid API calls eventually cause the keypad to disconnect from the hub.

The only way to reconnect it is to physically remove it from the mount.

Expected Behavior

The webhook should receive a "failed" callback. Under no circumstances should the keypad disconnect from the hub.

Steps To Reproduce

Send a Create Key command to create a temporary key, but set the start time to be later than the end time. This command will fail silently -- my webhook does not get a failure callback. Repeat that command a few times, and the keypad will eventually lose its connection to the hub.

Logs

No log output

Configuration

N/A

Environment

Additional Context

No response

m-lean commented 2 months ago

Is there any update on this issue? I am also experiencing this error. Although my requests are occasionally successful, they often result in error

{
    "statusCode": 171,
    "body": {},
    "message": "The device is offline"
}

which, according to the documentation, relates to the hub device.