| 1 | === pilight example === |
| 2 | |
| 3 | Install pilight on some raspi and have the daemon listen to port 5000. |
| 4 | |
| 5 | Use [https://github.com/DavidLP/pilight] to control the daemon. Install via |
| 6 | {{{ |
| 7 | pip install --user pilight |
| 8 | }}} |
| 9 | |
| 10 | Example |
| 11 | {{{ |
| 12 | from pilight import pilight |
| 13 | pilight_client = pilight.Client(host='pick', port=5000) |
| 14 | data_on={"protocol": [ "intertechno_old" ], "id": 1, "unit": 0, "on": 1 } |
| 15 | data_off={"protocol": [ "intertechno_old" ], "id": 1, "unit": 0, "off": 1 } |
| 16 | pilight_client.send_code(data_on) |
| 17 | pilight_client.send_code(data_off) |
| 18 | }}} |