summaryrefslogtreecommitdiffstats
path: root/prometheus/usr/local/bin/vent
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2021-01-12 16:58:31 +0000
committerfishsoupisgood <github@madingley.org>2021-01-12 16:58:31 +0000
commit7c6887eaaf812b63bab6c5e134f80a2ef36aeb31 (patch)
tree4b4b0d371107ae1b8540ca1618cb9aa796b72616 /prometheus/usr/local/bin/vent
parentf4b573fe337a436d5e2b20be4be031d77376d609 (diff)
downloadheating-7c6887eaaf812b63bab6c5e134f80a2ef36aeb31.tar.gz
heating-7c6887eaaf812b63bab6c5e134f80a2ef36aeb31.tar.bz2
heating-7c6887eaaf812b63bab6c5e134f80a2ef36aeb31.zip
works
Diffstat (limited to 'prometheus/usr/local/bin/vent')
-rwxr-xr-xprometheus/usr/local/bin/vent17
1 files changed, 17 insertions, 0 deletions
diff --git a/prometheus/usr/local/bin/vent b/prometheus/usr/local/bin/vent
new file mode 100755
index 0000000..28e5ad4
--- /dev/null
+++ b/prometheus/usr/local/bin/vent
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+case "$1" in
+ open)
+ mosquitto_pub -h 10.32.135.1 -t cmnd/vent/POWER2 -m 1
+ sleep 20
+ mosquitto_pub -h 10.32.135.1 -t cmnd/vent/POWER2 -m 0
+ ;;
+ close)
+ mosquitto_pub -h 10.32.135.1 -t cmnd/vent/POWER1 -m 1
+ sleep 20
+ mosquitto_pub -h 10.32.135.1 -t cmnd/vent/POWER1 -m 0
+ ;;
+ *)
+ echo unknown command
+ ;;
+esac