SwitchBotAPI Driver for SwitchBot Bot

Hi @_RiC,
Thanks for the clarification. Regarding the DeviceID and OpenToken in the configuration, please do not use quotes ("). For example, if you have as DeviceID "abc123", then please fill in abc123
Hope this works.
When you have it running and the on/off status does not match the status of the bot itself, update the status of the Bot device with the SwithBot app to match the status in the hub.

And I'd like to echo what @tomw mentioned about the differences in both drivers.

2 Likes

They were all in pressmode, but it was late and I think I used the wrong ID. -.- Sorry my bad.
After some testing I tested the @toffehoff's version again and got it to work.
Thank you very much :slight_smile:

1 Like

Thank you very much I have fixed the problem I used the wrong ID -.-, now both versions work.
Is it possible to get rid of this? Even if the debug logging is turned off it logs.

Hi @_RiC, Thanks for flagging the logging. These lines should only appear if you update/change the settings (like OpenToken, DeviceID or devicemode); so you won't see them regularly.

Hi, I think im reading this correctly, i want to buy the curtain bots and control them via HE, To do this ill need a switchbot hub as well and an active internet connection? or will they work without the internet connection?

Yes, you need the SwitchBot hub and an active internet connection at the time when you want to control the curtains. Right now, there isn't an official API for operation without an internet connection.

1 Like

Hi @tomw,

I'm using your curtain driver but having a bit of an issue, wondering if you could help?

The switchbot system driver has created my curtain device, and if I go into that device and use the SwitchBot app, I can see the "Current States" changing from open to closed (although they're the wrong way around for me).

However I cant control it from Hubitat, I dont see any logs generated when I click anything.

E.g. I've tried On/Off toggles, I've tried Set Level/Set Position - but none seem to actually send anything to the device.

Any ideas what I'm doing wrong?

Hey @kraegd, I responded in this other thread: SwitchBot gets an open API!

To avoid confusion, let's keep comments in this thread focused on @toffehoff's SwitchBot Bot driver.

1 Like

late to the game, but you are a bloody legend, thanks mate

Thanks @telf8283 . You're welcome :slight_smile:

1 Like

I am a noob using hubitat, can someone show a step by step on how to execute a switchbot ir command,for example volumeAdd (I already have my curtains working)

Hi @mdjuarez, welcome to the hubitat family :slight_smile: You've posted your question in the thread about my driver which only supports the Bot. And no other features/devices of SwitchBot.
You may referring to the driver @tomw created. In that case, please post your question in this thread: SwitchBot gets an open API!

I will, thanks!

Does this work with a Hub Mini?
I have the Open Token and the curl command works, however I cannot get either of the two drivers to control my Bots.
I see the following in the curl command however -
"enableCloudService":false,"hubDeviceId":"000000000000"

Hi @philpugh It does work with a Hub Mini (I use one myself :slight_smile: ). I assume you have the bots connected to the hub and you can control them using the hub.
To check this: you need to see, in the SwitchBot app, a cloud with the each of the bots you want to control (and not a bluetooth symbol).
Hope this helps.

Yes I see the cloud symbol and are able to control them from the App.
I have also tried to add them to Alexa but not getting much joy there

In the settings of each bot, there is an option "Cloud Service". This should be set to "On". The message of the curl command suggests that that is not the case.
If that is set to "on", your hub is properly connected to the internet and you still get the "enabledCloudService: false", then you may need to check with SwitchBot on how to resolve that....

Ha now I feel stupid! I knew there would be a setting somewhere and I figured it would be in the Hub rather than the Bot

1 Like

Download the Hubitat app