Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error #57

Closed
LIrahara opened this issue Nov 20, 2024 · 5 comments · Fixed by #58
Closed

Internal Server Error #57

LIrahara opened this issue Nov 20, 2024 · 5 comments · Fixed by #58

Comments

@LIrahara
Copy link

Hi kira,

Everything has been working well uo until recently. I'm now getting internal server errors when running through home assistant. Some commands work but the vast majority come up with an internal server error.
Performing the same with the switchbot app presents no issues, so I believe the api is working.

Are you aware of any issues like this?

@KiraPC
Copy link
Owner

KiraPC commented Nov 20, 2024

Hello,

Since no recently release was made everything should work normally.

I guess there are some issues with APIs.

EDIT: I've analyzed the API, and it seems the internal server error is related to the option "mode=auto".

I'm opening a bug: OpenWonderLabs/SwitchBotAPI#366

@KiraPC KiraPC closed this as completed Nov 20, 2024
@KiraPC KiraPC reopened this Nov 20, 2024
@LIrahara
Copy link
Author

Legend. Thanks much.

@tecnolive
Copy link

I have the same problem, how to solve it?

@MrXANA91
Copy link
Contributor

MrXANA91 commented Nov 20, 2024

I have the same issue when sending anything other than a 'turnOff' command or a 'setAll' command with a mode=dry.


Logs

Keeping the temperature (20°C), the fan speed (2: low) and the power state (on) the same, and only changing the mode

setAll (mode=dry) command

2024-11-20 20:46:50.169 DEBUG (SyncWorker_56) [custom_components.switchbotremote.client.remote] Sending command setAll
2024-11-20 20:46:50.169 DEBUG (SyncWorker_56) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'command', 'command': 'setAll', 'parameter': '20.0,3,2,on'}
2024-11-20 20:46:50.169 DEBUG (SyncWorker_56) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/****/commands
2024-11-20 20:46:51.150 DEBUG (SyncWorker_56) [custom_components.switchbotremote.client.client] Call service https://api.switch-bot.com/v1.1/devices/****/commands OK

setAll (mode=heat) command

2024-11-20 20:45:21.081 DEBUG (SyncWorker_24) [custom_components.switchbotremote.client.remote] Sending command setAll
2024-11-20 20:45:21.081 DEBUG (SyncWorker_24) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'command', 'command': 'setAll', 'parameter': '20.0,5,2,on'}
2024-11-20 20:45:21.081 DEBUG (SyncWorker_24) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/**/commands
2024-11-20 20:45:21.992 DEBUG (SyncWorker_24) [custom_components.switchbotremote.client.client] Received error in response {'status_code': 190, 'body': {}, 'message': 'internal server error'}

Here, mode=2 for heat, but this response is the response I get for 'auto', 'cold' and 'fan' as mode.

turnOff command

2024-11-20 20:45:36.556 DEBUG (SyncWorker_32) [custom_components.switchbotremote.client.remote] Sending command turnOff
2024-11-20 20:45:36.556 DEBUG (SyncWorker_32) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'command', 'command': 'turnOff', 'parameter': 'default'}
2024-11-20 20:45:36.556 DEBUG (SyncWorker_32) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/****/commands
2024-11-20 20:45:37.389 DEBUG (SyncWorker_32) [custom_components.switchbotremote.client.client] Call service https://api.switch-bot.com/v1.1/devices/****/commands OK

turnOff command also works fine.


This is most likely an issue from the SwitchBot servers. I will try to temper with the calls to see what's working and what's not, but not sure I'm able to pull anything there.

@gawertm
Copy link

gawertm commented Nov 23, 2024

same issue here, many internal server errors unfortunately. will follow the thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants