I have created a new add-on using the SwitchBotAPI and have released it.
Please refer to the following topic for more details.
Additionally, I will share what I discovered during development.
While not documented in the API specifications,
I have found commands to operate default buttons of automatically detected or list-selected virtual infrared remote devices.
The command type is “tag”.
Example payload for preset commands {"commandType":"command","command": "turnOn","parameter": "default"} {"commandType":"command","command":"setPosition","parameter":"0,ff,70"}
Example payload for custom commands: {"commandType":"customize","command": "MyButtonName","parameter": "default"}
Example payload for tag commands {"commandType":"tag","command": "1","parameter": "default"}
Based on a limited range of testing, it seems that the buttons are assigned sequentially from the top left of the screen, with smaller numbers assigned first.
Does anyone have API version 1.0 working with a recent version of Home Assistant like 2023.8? I got a message when I upgraded saying:
The switchbot integration does not support YAML configuration
How can I configure it then via some automated method? Don’t the Home Assistant developers understand that if you integrate a 100 services that you can’t do that manually anymore?
I have over 53 switchbot devices.
Is anything known about how long API version 1.0 will still work? I configured it with the understanding that it would work “forever”. Is there an alternative to Switchbot temperature sensors that will continue to work?
Update: actually, I am thinking that perhaps the Home Assistant Switchbot integration is completely independent of these REST-calls. As such, I should just be able to not install the integration and the error would go away. It has been a long time ago that I set it up. Can someone acknowledge that please?
I wouldn’t mind porting my configuration to the 1.1 API if that has some real benefits. All I care about is the temperature value right now.
The Switch Bot native integration uses Bluetooth, not the API.
If you have rest sensors to get temperature from your switch bot meters and this solution is OK for you, there is no need for the native integration.
Personally I have switched to the native integration with a Bluetooth dongle and an ESP32 Bluetooth proxy, when this topic was created meters was not compatible with the native integration which used YAML.
I haven’t found a Bluetooth device that doesn’t scream in dmesg all day long how it doesn’t work. Which one are you using? I bought the “best” that Amazon had a year ago or so.
(I also tried the ESP32 Bluetooth proxy, but not all sensors are reachable.)
How could I test this integration? The possibility of creating a media player for each device added to SwitchBot (in my case TV and amplifier) would already be sufficient for me. With broadlink I was able to do this with “SmartIR” and for me it’s great
I tried to integrate Switchbot and it tells me it can’t find anything connected to Bluetooth. I was trying to connect the hub with IR but I couldn’t. Even on off it would have been enough for me
Thank you for the SwitchBot cloud integration. Am I right to say that this integration only supports remote and hub, and won’t be able to work with other devices like curtain bots yet?
The documentation here SwitchBot Cloud - Home Assistant seem to suggest everything will work, so it was a bit misleading. I was confused and thought there was a bug until I looked at the PR and realized it isn’t a full support yet.
Yes for now it supports only supports plugs and remotes through hubs.
I am currently working on a better support for the remote feature. Will probably extend to the vacuum cleaner and camera (if the api is available).
For already supported Bluetooth devices, I am not planning yet for support but maybe another developper will add them.
Yeah. I am working on it.
From my understanding, there are 3 groups of commands:
Those recognized by both the app and by default by the api (working on them now)
Those recognized by the app and and probably custom command for the api, I am still looking for how to call them and make it easy to use
Those added to the app as custom button and custom command for the api. If possible, I need to find a way to get the list of custom commands or an easy way to add them in Home Assistant