RM Control is an app to control an RM2 by BroadLink. It allows users to learn IR and RF codes, store them, and fire them.
- vue.js front-end
- python back-end
- process watcher by supervisord
build-essential
libavahi-compat-libdnssd-dev
nodejs
(>6.0.0)node-gyp
python
(2.7) andpython-dev
git clone https://github.com/ericmagnuson/rmcontrol.git && cd rmcontrol
sudo python setup.py install
export FLASK_APP=rmcontrol; python -m flask initdb
python run.py
RM Control can be interacted with by visiting the included web interface found at http://127.0.0.1:5000 or by talking directly with the API as described farther below.
curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt update
sudo apt install build-essential git libavahi-compat-libdnssd-dev nodejs node-gyp python-setuptools python-pip python-dev
pip install pycrypto
sudo reboot now
sudo npm install -g --unsafe-perm request homebridge homebridge-httpmulti
- To install RM Control, follow the steps in Installation above.
- Using Homebridge-HttpMulti, configure Homebridge to send commands to the RM Control API. See
config.json.sample
for an example.
sudo apt install supervisor
- In
/etc/supervisor/conf.d/
, add two configuration files,rmcontrol.conf
andhomebridge.conf
. See sample files for help. sudo systemctl enable supervisor
sudo systemctl start supervisor
GET /
Shows all commands.
POST / {name: <name>}
Listens for a command from the RM2, and if a command is received, it will be saved with the given name.
POST /<name>
Fire the given command.
PATCH /<name> {name: <name?>, code: <code?>}
Edit the requested command by passing in a new name and/or code.
DELETE /<name>
Delete the given command.
- Add progress icon when learning.
- Finish edit capability.
- Gracefully handle errors if RM2 cannot be found.