home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.78k stars 30.88k forks source link

Switchbot cloud IR for airconditioners #130516

Open kristofvand opened 5 days ago

kristofvand commented 5 days ago

The problem

Since last update when i use switch bot to control my aircon units, when changing hvac mode, it no longer will switch to heat or cool, it always switches to cooling, no mather what mode i put it in.

What version of Home Assistant Core has the issue?

2024.11.1

What was the last working version of Home Assistant Core?

2024.10.X

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Switchbot Cloud

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 days ago

Hey there @seraphicrav, @laurence-presland, @gigatrappeur, mind taking a look at this issue as it has been labeled with an integration (switchbot_cloud) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `switchbot_cloud` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign switchbot_cloud` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


switchbot_cloud documentation switchbot_cloud source (message by IssueLinks)

SeraphicRav commented 5 days ago

@kristofvand Thanks for your feedback !

I just checked with the the AC I have and was not able to reproduce your issue.

What happens when you use the SwitchBot app, do you get the same behavior ?

kristofvand commented 4 days ago

in the switchbot app, the integration in amazon or google it all works perfectly. When i select heat it heats, when i select cooling it cools

In HA when i select any hvac modus it always results in cooling mode (or auto, that it has the same symbol on the airco so i'm not sure, but since airco is in the wrong setting this means i get no heat)

I just checked again and even setting the temperature setting does not work atm

kristofvand commented 4 days ago

If you want i could film my actions? Or if i need to send a log or something, Tell me where to find the log file.

roelbeerens commented 3 days ago

Pretty much the same here as well.

Using HA to change the temperature or mode always results in a 25 degree setting and as mentioned cooling or auto mode.

When using the SwitchBot app all commands are sent to the device properly.

Seems like the commands aren't sent properly from HA to Switchbot Cloud or there is something wrong with the handling of the request at Switchbot.

rpaillot commented 3 days ago

I got exactly the same issue. I noticed it only today. home assistant can't switch to heat, only cooling. In switchbot app, the switch to heat works perfectly.

It's very annoying for me cause we're entering the cold period in west Europe and if I have to let my AC on heat all day and night it's gonna cost me a fortune.

I'm going to try rolling back HA core version for now and tell you if it works again..

rpaillot commented 3 days ago

Rolled back to 2024.10.4, not working, units are still stuck to cooling mode. Tried uninstalling switchbot integration and installing it again, still same issue.

I wrote an email to switchbot support as the issue seems to be on their side in my opinion.

rpaillot commented 2 days ago

ok a bit of investigations : Switchbotcloud API seems to be broken.

In HA terminal use this command

curl -X POST "https://api.switch-bot.com/v1.0/devices/YOUR DEVICE ID/commands" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR TOKEN ID" \ -d '{ "command": "setAll", "parameter": "heat,23,auto", "commandType": "command" }'

Instantly, the AC goes to cooling mode instead of heat mode.

Thank you switchbot, great work !

SeraphicRav commented 2 days ago

@rpaillot Thanks for investigating the issue!

SeraphicRav commented 2 days ago

Strange question, as it works properly from Japan, does it work if you send the request using a VPN in Japan?

rpaillot commented 2 days ago

Strange question, as it works properly from Japan, does it work if you send the request using a VPN in Japan?

Interesting! should I use the VPN on my iPhone before using home assistant app or using a VPN inside home assistant box ?

SeraphicRav commented 2 days ago

Strange question, as it works properly from Japan, does it work if you send the request using a VPN in Japan?

Interesting! should I use the VPN on my iPhone before using home assistant app or using a VPN inside home assistant box ?

Should be from the Home Assistant box as it is the server which does the requests.

rpaillot commented 2 days ago

I have yet to try the VPN as its not so easy to setup.

are you using a Toshiba AC btw ?

kristofvand commented 2 days ago

I know I can't contribute much in terms of testing or coding but my air conditioners are from Bulex.

rpaillot commented 2 days ago

Ok mine is Toshiba.

definitely SwitchBot API has an issue. I wrote to support@switch-bot.com Maybe you can do the same and they might go faster in fixing the issue

kristofvand commented 2 days ago

Will do. I'll send a mail when I get home

SeraphicRav commented 1 day ago

are you using a Toshiba AC btw ?

Using Daikin

tmjramalho commented 15 hours ago

I also have the same problem, using Daikin AC's. On my Alexa integration stoped working also, but removing the switchbot skill from Alexa, and adding the skill again seems to resolve the issue. On home assistant is still not working. I sent a ticket with this issue to swicthbot, waiting for a reply from them...

rpaillot commented 14 hours ago

I also have the same problem, using Daikin AC's. On my Alexa integration stoped working also, but removing the switchbot skill from Alexa, and adding the skill again seems to resolve the issue. On home assistant is still not working. I sent a ticket with this issue to swicthbot, waiting for a reply from them...

Please send an email to support@switch-bot.com

They answered me and said they asked a technician but it's better if several people ask the support, they might take it more seriously.

patBrid commented 11 hours ago

Hello everyone, I have the same problem from france as you, Fujistsu air conditionner stay on cooling with home assistant. From switchbot application all is right I wrote to support@switch-bot.com yesterday, not response for now

rpaillot commented 11 hours ago

I just hope it’s not a rule they decided to avoid too many API requests from Home assistant users…

rpaillot commented 11 hours ago

I also have the same problem, using Daikin AC's. On my Alexa integration stoped working also, but removing the switchbot skill from Alexa, and adding the skill again seems to resolve the issue. On home assistant is still not working. I sent a ticket with this issue to swicthbot, waiting for a reply from them...

Wondering something : isn’t it possible to link Alexa to home assistant to get the skill ?

kristofvand commented 11 hours ago

you can link alexa to HA and control it that way but sadly this does not work 100% of the time, i get time outs in alexa, same with google. Trough the interface it works but via a routine half the time, they do not get set and i neet to first manually click the airco in alexa or google again to set it manually before it works again using routines. Before in HA it always worked correctly it would be nice if the API was fixed and worked again as before. Or there was a better solution. I mailed switchbot, can only hope if everyone mails they fix it.

SeraphicRav commented 3 hours ago

What about using matter for the time being if you have a Matter compatible SwitchBot hub ?