SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Passcodes Created via API Don't Always Trigger Webhook, Despite "100 success" Response

Open mynameissue opened this issue 1 year ago • 2 comments

Current Situation

I create passcodes for the keypad touch via API, but sometimes it doesn’t work properly.There are three possible cases:

1 The passcode is created correctly, and the webhook comes after a minute. 2 A "timeout" webhook comes after a minute. 3 Nothing happens; no webhook is received, and the passcode is not created, even after waiting for 3 hours. In all cases, the API response is “100 success.”

Logs

{"statusCode":100,"body":{"commandId":"CMDxxxxxxxxxxxxxx"},"message":"success"}

Configuration

No external configuration file used. All settings are managed within the Google Apps Script code.

Environment

-Platform: Google Apps Script (GAS) -Runtime Version: V8 -Execution Environment: Google Cloud infrastructure (no local OS version or node/npm applicable)

Additional Context

No response

mynameissue avatar Sep 11 '24 05:09 mynameissue

I believe the issue I reported and closed (#290 ) is the same issue. I am still seeing the API commands to create and delete keys behave inconsistently.

dds82 avatar Jan 28 '25 13:01 dds82

You're right, the API always send a success response. But this is the expected response for the Keypad, as explained in the documentation : https://github.com/OpenWonderLabs/SwitchBotAPI?tab=readme-ov-file#keypad-touch-2.

BUT, there's no webhook response too (as explained here : https://github.com/OpenWonderLabs/SwitchBotAPI?tab=readme-ov-file#keypad-3), and this is anormal.

Already reported, but SwitchBot doesn't read our reports and fix his API, this is really a pity...

Larsene avatar Jan 28 '25 15:01 Larsene