SwitchBotAPI Driver for SwitchBot Bot

Thank you very much Tom

1 Like

in the returned curl command i can only see the hubs id but not the connected bot id but an interesting line: enablecloudservice: false, thou i can see the cloud icon on the hub and the bot as well.

Nice work. Worked first time on a Mac. (Terminal)

"we've now added our SwitchBot Meter Plus interface and a related description"

My driver integration has Meter support, and if I'm reading the updated API reference the only change I'd have to make is to update things related to names.

Does anyone have a Meter Plus that could help me work out the kinks? Drop a line or PM in the other thread that I linked to.

1 Like

The api description says: " For BLE-based devices such as Bot and Curtain, you MUST first add a Hub/Hub Mini/Hub Plus and then enable Cloud Service on the Settings page in order to make use of the web API!
Ok. I cant find this cloud service setting anywhere.

Not sure what hub it is talking about but HE doesn’t directly support BLE. Suspect it is talking about a proprietary device.

It is in the SwitchBot app. You have to check the settings for the individual Bot device.

ive been searching for for a while but i cant find it.

Is your Bot showing up in the SwitchBot app (on your mobile device)? I think so, because you mentioned seeing a cloud icon.

From "My Home", open up the specific device. Then hit the gear at the top right. There is an option labeled "Cloud Services" that you need to enable.

got it thank you very much

1 Like

Hi Tom, got the meter plus. Not able to create the child device for it. Here is a log


Awesome -- please see the update here: SwitchBot gets an open API! - #102 by tomw

Hi thanks for this great driver!

Where would I begin troubleshooting if I have a single switchbot curtain that stopped responding in hubitat? My other curtains work fine in hubitat. The unresponsive one works normally in the switchbot app. The unresponsive curtain also seems to update position/level info in hubitat when I control it in the switchbot app. However it doesn't respond to open/close commands in hubitat.

It looks like in the switchbot app when I go into the logs for the switchbot hub mini I'm getting an error. It says the curtain is offline and to reconnect it to the internet. I've turned cloud services off and on to no avail. I'm not sure what changed since the integration was working fine for the past few months.

That is odd behavior. I wonder if you've got an intermittent connection between the SwitchBot curtain device and your SwitchBot hub. They connect to each other over BLE (bluetooth), and the range can be a challenge.

How far apart are they? Have you ever seen it fail in the SwitchBot app? Have you ever seen any other curtains or other devices fail?

I wonder if the range could be affected by a dying battery or something. I don't have a curtain device, so I'm just sort of guessing. But I would just try to poke around and see what other clues you can turn up.

Thanks for the advice!

It was definitely an issue with the switchtbot hub mini. I could get the curtains to work intermittently if I connected it to the other switchbot hub with the working curtains (opposite side of the house). I ended up having to reset the swittchbot hub mini a couple times and eventually resetting my wifi network before things finally started working again.

It was definitely strange that hubitat could still see status changes to the curtains though. I could even control the AC that was linked to the malfunctioning switchbot hub. Just the curtain commands were failing for some reason.

Yeah, that is odd.

The commands are a one-time thing, whereas the attributes are refreshed periodically. So my guess would be that it's just a lot more likely that you'd notice a command failing whereas the attributes might just have updated on the subsequent refresh before you noticed the difference.

Anyway, I'm glad it is working again now. :slight_smile:

1 Like

Hello! I bought my first Switchbot bot (the button pusher) a few days ago, to turn on a Rinnai direct vent heater in an external building. I've noticed using the Switchbot app that occasionally it fails to work on the first try, and I have to press the button in the app a second time (seems either the hub doesn't get the command through the cloud, or the bot doesn't receive the bluetooth command, but I don't know which). The actual mechanical button press works perfectly once the little arm on the bot is activated. When it does work, the app says, 'Bingo!", so I have a confirmation that it worked and I've turned on the heat. Is there any confirmation received by the driver, that lets it know the button was actually pushed? I'd like to just set up a tile for my Hubitat device that I use to activate the Switchbot, rather than use the Switchbot app, but I need to know the heat is actually on. Thanks!

Hi @Madcodger, which Hubitat driver are you using? Just check the device type on the virtual device page to be sure.

Hi @tomw . I haven't installed either driver yet, but was wondering if the one you created had this "acknowledged" feature, before I install it. Thanks!