-
Notifications
You must be signed in to change notification settings - Fork 0
Flic Button
Install the flic app, and register and log in.
Start the app.
In the phone tab, add a button and follow the instructions.
Click on the button. Press on the gear icon to get its Bluetooth address : it can be used as an identifier on the HTTP request.
Select the actions (adapt):
- Push -> Advanced -> Internet Request
- Type:
Put - URL:
http://192.168.1.5:8002/flic/button/781E7E/single - Validate certificates : off
- Type:
- Double push : same as push with URL terminating with
doubleinstead ofsingle - Hold : same same again but with
long
The xPL REST interface implements an HTTP server
to receive the button requests upon press and to forward the in the form of xPL messages.
it is found as central/xpl-rest.py.
If the service is not already running, start it with :
XPL_BASE_DIR=~/Controls/xPL $XPL_BASE_DIR/lights-blinds/xpl-rest.py
Press on the configured button and check if is properly sends HTTP requests :
cat /tmp/xpl-rest.log | tail -n 10
Based on the button actions, the REST server fires an xPL message which can be observed with xPL-monitor.
The xPL central control service allows to automatically send further xPL commands based on the reception of the xPL REST button message.