summaryrefslogtreecommitdiff
path: root/localwebsite/classes/GPIORelaydClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'localwebsite/classes/GPIORelaydClient.php')
-rw-r--r--localwebsite/classes/GPIORelaydClient.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/localwebsite/classes/GPIORelaydClient.php b/localwebsite/classes/GPIORelaydClient.php
new file mode 100644
index 0000000..89c8dc9
--- /dev/null
+++ b/localwebsite/classes/GPIORelaydClient.php
@@ -0,0 +1,18 @@
+<?php
+
+class GPIORelaydClient extends MySimpleSocketClient {
+
+ const STATUS_ON = 'on';
+ const STATUS_OFF = 'off';
+
+ public function setStatus(string $status) {
+ $this->send($status);
+ return $this->recv();
+ }
+
+ public function getStatus() {
+ $this->send('get');
+ return $this->recv();
+ }
+
+} \ No newline at end of file