The Switchbot is a BluetoothLE button pushing and switch toggling robot. The Switchbot plugin is not included in XTension but can be downloaded separately. It requires at least XTension version 9.4.8. This plugin connects to the Switchbot over Bluetooth LE so a Switchbot Hub is not needed. However, this does mean that your Switchbot must be within BluetoothLE range of your XTension machine in order to operate.
MD5 hash of the zip file: 521d43cc17b674c378c4dc60eeb2ff32
Download and decompress the above linked file. You should be left with a folder named “switchbot.isf” inside XTension pull down the “Database” menu and select “install plugin” A choose folder dialog will appear and you should select the switchbot.isf folder. XTension will copy the folder into your database and make it available for use. The same procedure can be used to upgrade an older version of the plugin. Since all plugin files and requirements are included in that folder as long as you’re backing up your XTension database you are also backing up your Switchbot plugin. Restoring your database to a new machine or a new hard drive is all that is necessary to get you back up and running again.
First delete or change the device type of any switchbot interfaces you have created in XTension.
All files relating to this plugin are kept inside your databases plugin folder. To find that pull down XTension’s Database menu and select “Reveal plugins folder in this database” and the plugins folder will appear in the Finder. Open the plugins folder and delete the “switchbot.isf” folder that you will find inside of it.
You should then restart XTension so that the plugin no longer appears in the list of available device plugins.
XTension does not yet get any into about battery level or other internal status. I can add this later and will prioritize such things if people let me know that they need this.
You cannot set the press time from XTension. This is the value of how long the press of a button lasts before it backs off. If you set the press time with the regular Switchbot app it will remember it and the same settings will be used when pressing or toggling from XTension.
It can take some time for the Switchbot to respond to a command depending on it’s sleep cycle. At this moment the timeout for a command other than scanning is preset to 30 seconds. I can make this adjustable in the future if you have devices that regularly take longer to respond please let me know.
You will see some debug logging when you use the Begin Scan button. You can just ignore that.
There may be problems parsing the output for multiple switchbots when scanning. I only have the one to test with so I was not able to test that. If you have multiple switchbots and they are not properly created in XTension after doing a scan please turn debug mode on for the interface and perform another scan. Send me the log output from the results of that and I will better be able to make sure that is working.
The security pairing of the Switchbot is not supported. If you have turned on the pairing requirement in the switchbot app on your phone you’ll need to turn that off before it will be recognized by XTension.