SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Success Response is wrong, Webhooks are unreliable

Open reneroth opened this issue 1 year ago • 0 comments

Analysis

Triggering a command via API will always return "success" immediately, even if it fails due to e.g. running out of battery or the gateway having lost network connection. There is no way for us to know if a command actually succeeded, or if a scene stopped halfway through, etc.

see this issue for more info: https://github.com/OpenWonderLabs/SwitchBotAPI/issues/258

Expected Behavior

I need to be able to see if a command has actually been executed. The mobile app can already show that info.
It would be enough of the webhook would a) return an event for such failures or b) the "timeout" and related behaviour was well documented. As it is now, not even the available events seem documented thoroughly.

Steps To Reproduce

  1. take the battery out of a device
  2. trigger an action from the api
  3. see "success" response, notice there are no inbound webhooks, no way for us as devs to know what is going on
  4. open iphone app, see the app is well aware that a request has failed

Logs

n/a

Configuration

stock config

Environment

doesnt matter, REST API

Additional Context

No response

reneroth avatar Jan 03 '25 10:01 reneroth