Server api for controlling broadlink rm device. Based on https://github.com/mjg59/python-broadlink
- Go to setup.py location
- Install requirements listed in setup.py file
- Export flask env:
export FLASK_APP=black_bean
- Start server. From setup.py location type:
flask run
Server should launch on http://127.0.0.1:5000 by default
Device setup:
- Get wifi credentials (note: ssid can't contain polish letters)
- Use wifi_connector.py
- Put device in AP mode :
- Hold reset until light blinks fast
- Hold again, light should blink slowly
- Connect to BroadlinkProv network
- Launch wifi_setup.py with ssid, pass,** wpa+1** args
- Connect to your network.
- Start server. Server should detect your device at startup (may take several times)
[GET]
/commands -get all commands
[POST, GET, DELETE]
**/commands/|name| **-add/delete command or get existing
[GET]
/groups -get all groups
[POST, GET, DELETE]
**/groups/|name| **-create/remove group or get existing group
[POST, DELETE]
/groups/|name|/|command| -add/remove command from group
Creating wheel file from source code:
- pip install wheel
- python setup.py bdist_wheel