From e1919e77f8fa775a3434f7bd7ee23100d6b4d527 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 2 Dec 2013 16:40:20 +0200 Subject: beta 2013.12.02 15:22 --- scripts/context/lua/mtx-youless.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-youless.lua b/scripts/context/lua/mtx-youless.lua index eace4278a..1ffac0336 100644 --- a/scripts/context/lua/mtx-youless.lua +++ b/scripts/context/lua/mtx-youless.lua @@ -1,6 +1,6 @@ if not modules then modules = { } end modules ['mtx-youless'] = { version = 1.002, - comment = "script tp fetch data from kwk meter polling device", + comment = "script tp fetch data from kwh meter polling device", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE", license = "see context related readme files" @@ -12,6 +12,8 @@ if not modules then modules = { } end modules ['mtx-youless'] = { require("util-you") +local formatters = string.formatters + -- the script local helpinfo = [[ @@ -28,7 +30,7 @@ local helpinfo = [[ collect data from device don't backup old datafile don't write data to file (for checking) - summative kwk data + summative kwh data collected watt data ip address of device @@ -38,7 +40,7 @@ local helpinfo = [[ Example - mtxrun --script youless --collect --host=192.168.2.50 --kwk + mtxrun --script youless --collect --host=192.168.2.50 --kwh mtxrun --script youless --collect --host=192.168.2.50 --watt somefile.lua @@ -62,6 +64,7 @@ function scripts.youless.collect() local variant = environment.arguments.kwh and "kwh" or environment.arguments.watt and "watt" local nobackup = environment.arguments.nobackup local nofile = environment.arguments.nofile + local password = environment.arguments.password local filename = environment.files[1] if not variant then report("provide variant --kwh or --watt") @@ -89,6 +92,7 @@ function scripts.youless.collect() host = host, variant = variant, nobackup = nobackup, + password = password, } if type(data) ~= "table" then report("no data collected") -- cgit v1.2.3