Switchbot

I’m interested in this product, they use an open Bluetooth API and I got this link from the team. Could be the starting of new binding?

Ah! 100$ for a device with a little motor and a plastic handle which can communicate via Wifi and BLE.
An ESP32-WROOM-32 can do the same communication and it costs around 3,40€

My friend “hacked” his Coffee machine which looks like a Borg now, not beautiful but it works. No manual switch.
Also the use cases displayed on their site, toggling a switch with a manual wifi switch?
Why not install for example a Sonoff Touch?

The " Learn from your original remote control." sounds interesting, but even this feature already exists.

A single switch already manageable via BLE, with no need of an hub, costs $29.

Maybe you can enlighten me with a use case of yours :confused:
When is it useful to attach an extra switch, to a switch?

Maybe I was misunderstood, I’m not advertising the product, I think, since it’s a smart device with API, could be nice to have an integration in openHAB.

I did not think that :slight_smile: I am just interested when this can be useful.
Maybe if you have a Device with a switch which can not be opened?

That can be a use case, or to activate/deactivate device with push button (fans, rice cookers, coffee machines, wall panel controls, etc.) have a look at these examples.

Not everyone is competent to open up and interfere with electrical devices, and a few of them even realize that.

See also

I like the rubber thumb idea :grin:

This made my day! :rofl:

I can give you one. I have a very expensive Bose BT speaker. It sounds great and I’m not willing to spend the money it would cost to replace it with something that sounds as good.

However, it has one flaw from an automation perspective. It will turn itself off if there is no sound played through it for 20 minutes and requires one to manually press the button to turn it back on. Some users have hacked together something to play an inaudible sound through the speaker periodically to keep it on but Bose warns that the battery may overheat and cause a fire. :angry: I was given this speaker as a gift before I was into home automation so had no idea to look for this seemingly simple feature.

I’m not going to open up the case and solder a relay to the on/off button. The looks and portability of the speaker are important. Having a little servo to physically push the button in a nice little package like this would be awesome! The communication is in my experience the easy part of the problem. It’s the power, motor, and creating a nice case that is the biggest challenge and this device gives them all to me for $30 (you don’t need the hub with their python script).

Anyway, because this is written in Python it will be of limited use in setting up an OH binding. It also seems to only work on Linux which would cut out Windows and Mac OH users from being able to use such a binding.

But their provided Python script could easily be used with the Exec binding or call directly from a JSR223 Jython Rule.

I just bought one of these at Prime Day for 17,50 €. See picture attached for my use case. I’m renting my flat and that Daikin air conditioner is a nightmare to program. Its thermostat doesn’t work either. Now I just turn the AC on and off from my phone and program it very easily with the Switchbot app. Of course, I’m hoping to integrate it on my OpenHAB installation and remove the proprietary app.

1 Like

I’ve just backed the kickstarter for the new switchbot curtain opener. When it arrives I’ll get started on the binding assuming nobody else is already working on it.

1 Like

I just came across their Kickstarter campaign, and the Switchbot Curtain seems like a thoughtfully designed device, from the way it grips the curtain rod/rail to the optional solar panel. Hopefully it works out well for you!

Hello everyone,
I found this thread when looking for “SwitchBot and OpenHAB”. As I did not find an “out-of-the-box” solution I started tinkering/ playing around with it and got it to work from OH.
I run OH 2.5.1-2 (Release Build) on a RPi 3 (integrated BT, no dongle) with Raspbian “stretch”

I would like to share what I did to make it work (wasn’t straight forward as I also learned some new concepts on the way).
First I connected the SwitchBot via BT to my (Android-) phone using the original SwitchBot app (no hub) and got the BT Mac address which I need later.
Then I installed “python-host” from OpenWonderLabs on Github following their instructions
and moved the “switchbot.py-file” to the location of my choice. The idea was to run the Python script from OH

To do this I installed the Exec-Binding through PaperUI
and also the RegEx Transformation (which I have not used any further yet)
The configuration I did through files:

Thing

Thing exec:command:<Thing name> [command="python <path to switchbot.py> <SwitchBot MAC> <command for SwitchBot>", interval=0, autorun=false]

(the available commands for the SwichBot are “Press”, “Turn On”, Turn Off", “Down” or “Up” (I found this looking through the switchbot.py file))

Item

Switch <SwitchBot_trigger> // item used for triggering the action and used in the "rule"
Switch <SwitchBot_Run> {channel="exec:command:<Thing name>:run", autoupdate="false"}

Sitemap

	Frame label="<Frame label>" {
		Switch item=<SwitchBot_trigger> label="<Trigger label>" icon="wallswitch"
	}

Rule

rule "<rule name for SwitchBot>"
when
   Item <SwitchBot_trigger> changed
then
    <SwitchBot_Run>.sendCommand(ON)
end

Sometimes I need to “trigger” it twice before it does something so I might need to change some timers to allow for the BT connection to be established

Status feedback would be nice but at this time I have no idea if or how this might be possible
I just came across a BT to MQTT by “zewelor” on github but did not do any further tests

Hope this helps anybody and if there is anybody who would like to comment or recommend any change/ different approach, this would be most welcome.

1 Like