summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Van Doorn <nick@nv.delivery>2021-08-31 23:49:53 -0700
committerNick Van Doorn <nick@nv.delivery>2021-08-31 23:49:53 -0700
commit0c756c5e491246f1141bb7a431c2810ad246983d (patch)
treee91d5d27f851f4eb45b3e6dec11a5ff5acb7068e
parent8ac1a3947d33663678561f77033a213f97a4cc43 (diff)
Very hip home automation
All the GPIO libraries are such a mess that this seems suitable for now
-rwxr-xr-xbin/lights-off3
-rwxr-xr-xbin/lights-on3
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/lights-off b/bin/lights-off
new file mode 100755
index 0000000..ee0afad
--- /dev/null
+++ b/bin/lights-off
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+ssh pi@raspberrypi.local -t 'echo 0 > /sys/class/gpio/gpio17/value'
diff --git a/bin/lights-on b/bin/lights-on
new file mode 100755
index 0000000..581b9af
--- /dev/null
+++ b/bin/lights-on
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+ssh pi@raspberrypi.local -t 'echo 1 > /sys/class/gpio/gpio17/value'