SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Internal Server Error when using mode=1 as payload parameter for A/C devices

Open KiraPC opened this issue 1 year ago • 3 comments

Analysis

Call the POST /commands on A/C device with the following payload cause Internal Server Error

{ "command": "setAll", "parameter": "23,1,3,on", "commandType": "command" }

NB: Using any other value for the parameter mode the API success

Expected Behavior

Run the command with "auto" ad mode

Steps To Reproduce

curl --location 'https://api.switch-bot.com/v1.1/devices/*****/commands' \ --header 'Authorization: *****' \ --header 't: *****' \ --header 'sign: *****' \ --header 'nonce: ****' \ --header 'Content-Type: application/json' \ --data '{ "command": "setAll", "parameter": "23,1,3,on", "commandType": "command" }'

Logs

{
    "statusCode": 190,
    "body": {},
    "message": "internal server error"
}

Configuration

-

Environment

Postman

Additional Context

No response

KiraPC avatar Nov 20 '24 08:11 KiraPC

@KiraPC Hello ! Did you manage to solve the issue ? When adding more features on my end, I also got similar errors with dry and fan mode

Linking issue with https://github.com/home-assistant/core/pull/135467#issuecomment-2585853829

SeraphicRav avatar Jan 12 '25 18:01 SeraphicRav

This is a API related problem. In case of issue with my integration please open an issue on its repository

KiraPC avatar Jan 12 '25 18:01 KiraPC

@KiraPC I see, sorry, it is not an issue with your integration but with mine while adding features :D

SeraphicRav avatar Jan 13 '25 02:01 SeraphicRav