From f2ac5a7fd1d938f87b6daac3b22c1ea5d9e92780 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Mon, 6 Aug 2018 20:24:21 +0200 Subject: [PATCH] Enregistrement consommation --- systems/LoutreOS/services.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index e2a2bf3..36b7385 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -71,6 +71,19 @@ in smart = { path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl"; }; + exec= { + commands = [ + "${pkgs.python}/bin/python ${ + pkgs.fetchgit { + url = "https://gitea.nyanlout.re/nyanloutre/tplink-smartplug.git"; + rev = "a0996112fc451b76448589698de440ad5fd6ea79"; + sha256 = "1f1625g7rfsddgk428g76p8fr7vz5gfhq3f452q17bjni3rf2pj3"; + } + }/tplink_smartplug.py -t 192.168.0.57 -c energy" + ]; + data_format = "json"; + name_suffix = "_tplink-smartplug"; + }; }; outputs = { influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };