Skip to content

Switchbot API Response #145

@dylanmunro81

Description

@dylanmunro81

Current Situation

I'm using the SwitchBot API to trigger my switchbot to press a button. On occasion this doesn't work and when I check the logs against the SwitchBot Hub Mini in the app it shows different errors when it doesn't work such as unknown error or Connection error. The thing is though, the Switchbot API returns a Status Code of 100 and "Success" each and every time, regardless of whether the action has been successful or not. Is there any way to have the API respond with the actual status of the request so if need be I can automatically retry the request again?

Logs

• Press
3:56 pm Unknown error (190)
Press
3:54 pm Executed successfully
Press
3:54 pm Executed successfully
Press
3:40 pm Executed successfully
Press
3:40 pm Executed successfully
Press
3:19 pm Executed successfully
• Press
3:17 pm Connection error (161)
• Press
11:26 am Unknown error (190)
• Press
11:25 am Connection error (161)

Configuration

{
    "command": "press",
    "parameter": "default",
    "commandType": "command"
}

Environment

  • OS: Mac OS
  • Software: Postman
  • Node:
  • npm:

Additional Context

No response

Metadata

Metadata

Labels

questionFurther information is requestedstale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions