SwitchBot gets an open API!

I could add the motion and contact sensors using the cloud API, but I have held off because I'm worried about the responsiveness and likelihood of missing events (due to the cloud polling required). Switchbot is able to support the types of use cases more effectively that you described because they would be able to see each event on their cloud backend and drive the automations from there.

There is a official local API now that could make their BLE devices a lot more useful for integration with Hubitat, but it would require a separate BLE-capable Python host (like a Raspberry Pi or always-on PC) on your local network. Is that something you would consider using?

Edit: I'll also note that there are plenty of cheap Zigbee or Z-Wave sensors that work well totally locally and don't have some of these external requirements or concerns. So, unless you rely heavily on the SwitchBot automations support in their system, those other devices might be a better option.

It would be nice to have local control of the SwitchBot Curtain.

1 Like

Did the Humidifier change?
I have one but am not able to add it as a child device.

I turned on debug and see this in the logs:
[debug] createChildDevice() failed: Device type 'SwitchBot Humidifier' in namespace 'tomw' not found
[debug] device = [deviceType:Humidifier, hubDeviceId:000000000000, deviceId:xxxxxxxxxxxx, deviceName:Humidifier, enableCloudService:true]
(deviceId obsfucated)

To be thorough, it also finds the Hub Mini and Indoor Cam too.
Those return as 'not supported' which I believe is expected:
[debug] createChildDevice() failed: deviceType not supported
[debug] createChildDevice: deviceType not supported)

The Humidifer (and other child devices) are optional components in HPM. Did you select them when you installed (or copy them manually if you did not use HPM)?

I used HPM. I just went through HPM and modified the 'hubitat_switchbot' to include the Humidifier as it was missing the device driver for it.
That change did the trick! Thanks for the pointer.

1 Like

I added MeterPlus support in version 0.9.10. Thanks @failmatic for your help with testing.

2 Likes

Please let me know if this is not allowed, but is anyone here interested in any or all of the 3 Switchbot curtain robots (rod) in white that I am selling? I also have the grommet kits and solar panels as well. PM me if you are interested. In the Los Angeles area if you want to pickup or we can workout shipping arrangements.

Might get better exposure as its own topic in the Lounge area.

4 Likes

I fell for their email marketing and bought an RGB Strip Light to play with.

Strip Light driver support was added in v0.9.11 of my drivers. If you use HPM, be sure to install the optional Strip Light driver component.

2 Likes

@tomw - first of all, thank you for this awesome integration -- it's a huge win!

I may have missed it on your github, but if you have a paypal for donations, please let me know -- I'd love to contribute for your work here and with Flume!!

I'm excited about the ability to use SB scenes, since my window fan remotes have unorthox buttons... I've got 6 control-related scenes working fine in the SB app and they've all successfully been integrated to HE using your driver here.

I can use the (indicated) "Execute Scene" option below to successfully run a scene.

But can you please tell me how I can leverage/access that same "Execute Scene" capability via RM or Button Controller or something like that?

For the life of me, I'm not able to connect the dots... I'm sure I'm missing something obvious.

Thanks in advance!

Edit - replaced original screenshot since it had some hub/device IDs that I'm not sure were vulnerable or not - better safe than sorry!

2 Likes

Thanks for your kind words. No need to donate to me -- just try to find a way to pay it forward to someone that needs it.

Good catch on this not being ready for use with Rule Machine. You'll have to use "Run Custom Action" to execute this command.

I had to make a quick change (added "Actuator" type so you can select that in Rule Machine). I didn't update the version number, so just use a "Repair" in HPM to get the update and you should be good to go.

I didn't try this myself, but it should work:

1 Like

Perfecto - so much winning! Between this and Flume, you are my hero for delivering on a couple of great API integrations here. Thank you again - your work on these projects is much appreciated.

This switchbot HubMini IR remote integration is allowing me to automate a couple dumb window fans that I wouldn't otherwise be able to integrate at all - I love it.

And for anyone considering a SwitchBot hub or Broadlink RM4 for IR remote stuff, the SwitchBot crushes the RM4 on better range and more forgiving placement options, but this integration is definitely the biggest win!

Thanks again, @tomw!

2 Likes

I got a great deal on Switchbots to finally put them on a few things in the house. I set one up but can’t control it through Hubitat. Do I need to have a Switchbot hub? If I do, which one? Do I need one in every room where a switchbot is located?

Yes. This is a cloud integration. The SwitchBot Curtains are connected by BT to the SwitchBot hub.

The Hub-mini should work. The older hub isn't available anymore to the best of my knowledge.

No. Just one.

2 Likes

Thank you. And just to confirm, the mini hub will control the bots too?

1 Like

It is supposed to, but I have never tested it.

Yes, the hub mini works with Bots.

1 Like

Thank you. I’m going to have to find my mini hub. It’s somewhere in a miscellaneous drawer or box! :smiley:

1 Like

Just got a SwitchBot Door Lock device and a keypad - Any suggestions on how to go about integrating that into Hubitat?

Thanks!

Shane

I'll have to add them to the driver -- I was waiting for someone to ask. :wink:

I am in the process of adding the new webhook support that the SwitchBot API recently added for real time events (no polling!). I'll send you some code that will help spit out the info that I need to add Lock support.

5 Likes