Hi there - First off thank you so much for this great discussion on this topic. I have been able to get one set of my SwitchBot Curtain 2 working with the API integration. However, when I am working to add my second curtain 2 for another room, I am getting the following error.
Template variable warning: 'parameter' is undefined when rendering '{"command": "{{ command }}","parameter": "{{ parameter }}"}'
What is interesting to me is when I open the switchbot app and look at the log for the device, i do see a Failed to connect warning where it calls out API. So it seems like it is connecting and authenticating okay, but having problems getting to the curtain 2 from the hub. I double checked the deviceID and can use curl to query the url status, and it reports as expected.
What is interesting to me is that the API request to fetch the location (closed/open) is working, it is just when I try to do a close/open/stop on the cover. So to me it seems like the POST command and call is failing. But it shouldnât be a problem with the POST command since the same code works for the other curtain setâŚ
Any thoughts on where to look, or others have problems with just a single device? Almost seems like a permission issue or something.
Between spinning up the container, adding the switchbot plugin, and setting it up, I probably only lost 15 minutes. Muuuuuch less than the amount of time I was sinking into getting Bluetooth working through Docker or setting up these python scripts.
Once Homebridge was done, it was automatically detected by Home Assistant and waiting for me in the integrations page. Couple clicks later, Iâm able to control my âBotâ (the button-pushing one) with the switch.toggle service
Ugh, well thatâs sad⌠Iâm not sure what is going on with the integration team, but this sounds like an easy method of using the API rather than Bluetooth. (Which I have never liked as a point of communication. Using BT for initial install is fine, but unfortunately right now the official integration gets a B- for competition and a D+ for effort) any time I try to setup a Bluetooth dongle, it works great for a day then I get severe hardware hci issues. Ends up bricking supervisor. The proxy will work but itâs another item you gotta plug in and well at the end of it all you can only passively connect to 3 devices maximum.
@Nardol is there anyway to convert this integration to have 2 methods of connection. 1 current system, 2 cloud/API?
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.