diff options
author | makefu <github@syntax-fehler.de> | 2019-01-28 08:31:35 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2019-01-28 08:31:35 +0100 |
commit | 0c25e9790578821a1038831ea852c6bfbc83ff97 (patch) | |
tree | bb6683700824a64344c3d43c6f7403ae3f38310c | |
parent | 742c041b7246176f96709561b6c51ad87b3d861e (diff) |
ma bureautomation: use mqtt instead of curl
seems they've change something in their security security
-rw-r--r-- | makefu/2configs/bureautomation/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix index 3897537ea..917044d63 100644 --- a/makefu/2configs/bureautomation/default.nix +++ b/makefu/2configs/bureautomation/default.nix @@ -5,7 +5,7 @@ let port = 3001; runit = pkgs.writeDash "runit" '' set -xeuf - PATH=${pkgs.curl}/bin:${pkgs.coreutils}/bin + PATH=${pkgs.mosquitto}/bin:${pkgs.coreutils}/bin name=''${1?must provide name as first arg} state=''${2?must provide state as second arg} # val=''${3?must provide val as third arg} @@ -14,9 +14,10 @@ let test $state = alerting || exit 0 echo $name - $state - curl 'http://bauarbeiterlampe/ay?o=1' + topic=plug + mosquitto_pub -t /bam/$topic/cmnd/POWER -m ON sleep 5 - curl 'http://bauarbeiterlampe/ay?o=1' + mosquitto_pub -t /bam/$topic/cmnd/POWER -m OFF ''; in { services.logstash = { |