cympfh / switchbot-python-host

The python code running on Raspberry Pi or other Linux based boards to control SwitchBot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-host

What is the SwitchBot opensource project?

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.

The python-host distribution is supported and tested on Python 2.7.

How to Install?

On Raspberry Pi. You will need:

Installation:

  • Boot your fresh Pi and open a command prompt.
  • Install the require library.
sudo apt-get update
sudo apt-get install python-pexpect
sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev 
sudo apt-get install libudev-dev libical-dev libreadline-dev
sudo pip install bluepy
  • 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.

About

The python code running on Raspberry Pi or other Linux based boards to control SwitchBot.

License:Apache License 2.0


Languages

Language:Python 100.0%