SwitchBot is a smart IoT robot to mechanically control all your switches and buttons. You can control the bot by your smartphone app (iOS or Android, SwitchLink, or other platform based on our open APIs.
This project aims to provide a super light-weight solution to control your SwitchBot on Raspberry Pi/OpenWRT or any other Linux based board.
On Raspberry Pi. You will need:
- A Raspberry Pi 3 or A Raspberry Pi 2 plugged with a Bluetooth dongle.
- A SwitchBot.
- An SD Card with a fresh install of Raspbian (tested against the latest build 2017-01-11 Jessie with Pixel).
Installation:
- Boot your fresh Pi and open a command prompt.
- Install the python pexpect library.
sudo apt-get install python-pexpect
- Clone this repo to the Pi.
git clone https://github.com/OpenWonderLabs/python-host.git
- run the python code.
cd python-host
sudo python switchbot.py
- Follow instructions to input the device number you want to control....
Enjoy:)
Share your words in our community.