×

RM Control通过BroadLink控制RM2应用程序

消耗积分:0 | 格式:zip | 大小:0.01 MB | 2022-04-21

王尚岱

分享资料个

授权协议 MIT License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 其他开源物联网

软件简介

RM Control

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.

Components

  1. vue.js front-end
  2. python back-end
  3. process watcher by supervisord

Requirements

  1. build-essential
  2. libavahi-compat-libdnssd-dev
  3. nodejs (>6.0.0)
  4. node-gyp
  5. python (2.7) and python-dev

Installation

  1. git clone https://github.com/ericmagnuson/rmcontrol.git && cd rmcontrol
  2. sudo python setup.py install
  3. export FLASK_APP=rmcontrol; python -m flask initdb
  4. 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.

VM Initialization (Under construction.)

  1. curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
  2. sudo bash nodesource_setup.sh
  3. sudo apt update
  4. sudo apt install build-essential git libavahi-compat-libdnssd-dev nodejs node-gyp python-setuptools python-pip python-dev
  5. pip install pycrypto
  6. sudo reboot now
  7. sudo npm install -g --unsafe-perm request homebridge homebridge-httpmulti
  8. To install RM Control, follow the steps in Installation above.
  9. Using Homebridge-HttpMulti, configure Homebridge to send commands to the RM Control API. See config.json.sample for an example.

Supervisor Setup

  1. sudo apt install supervisor
  2. In /etc/supervisor/conf.d/, add two configuration files, rmcontrol.conf and homebridge.conf. See sample files for help.
  3. sudo systemctl enable supervisor
  4. sudo systemctl start supervisor

API Documentation

GET /

Shows all commands.

POST / {name: }

Listens for a command from the RM2, and if a command is received, it will be saved with the given name.

POST /

Fire the given command.

PATCH / {name: , code: }

Edit the requested command by passing in a new name and/or code.

DELETE /

Delete the given command.

To Do

  • Add progress icon when learning.
  • Finish edit capability.
  • Gracefully handle errors if RM2 cannot be found.
 

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !