From 08a070813bda7291ffb018ac6a3f8582816d459a Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Thu, 4 Jun 2020 14:47:59 +0200 Subject: [PATCH] =?UTF-8?q?On=20dirait=20que=20cela=20fonctionne=20bien,?= =?UTF-8?q?=20cela=20envoie=20la=20puissance=20mesur=C3=A9e=20sur=20Grafan?= =?UTF-8?q?a=20maintenant,=20pour=20le=20compteur=203=20:-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua | 6 +++++- Mesures/energy/transfo_courant_clip_1p_1/boot.lua | 6 +++--- Mesures/energy/transfo_courant_clip_1p_2/0_cron.lua | 7 ++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua index 63627c6..e87e549 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_cron.lua @@ -1,5 +1,5 @@ -- Petit script pour faire office de crontab pour les mesures -print("\n 0_cron.lua zf200603.1950 \n") +print("\n 0_cron.lua zf200604.1441 \n") cron1=tmr.create() cron1:alarm(10*1000, tmr.ALARM_AUTO, function() @@ -14,6 +14,10 @@ cron1:alarm(10*1000, tmr.ALARM_AUTO, function() -- -- ztemp1=nil zhum1=nil ztemp2=nil zhum2=nil + http_post(influxdb_url,"energy,compteur=3 puissance="..zpower/1000) + + -- zarg="energy,compteur=2 puissance="..zpower/1000 + diff --git a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua index 939031a..cddd07d 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua @@ -1,11 +1,11 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot.lua zf200603.1953 \n") +print("\n boot.lua zf200604.1353 \n") -- function ztime_stamp() return tmr.now()/1000000 end function boot() - verbose = false + verbose = true print("On lance le boot...") print(node.heap()) collectgarbage() print(node.heap()) @@ -23,7 +23,7 @@ function boot() f="0_get_power.lua" if file.exists(f) then dofile(f) end - -- f="0_cron.lua" if file.exists(f) then dofile(f) end + f="0_cron.lua" if file.exists(f) then dofile(f) end print("verbose:",verbose) print("boot lancé...") gpio.write(zLED, gpio.HIGH) diff --git a/Mesures/energy/transfo_courant_clip_1p_2/0_cron.lua b/Mesures/energy/transfo_courant_clip_1p_2/0_cron.lua index 63627c6..2029cee 100644 --- a/Mesures/energy/transfo_courant_clip_1p_2/0_cron.lua +++ b/Mesures/energy/transfo_courant_clip_1p_2/0_cron.lua @@ -1,5 +1,5 @@ -- Petit script pour faire office de crontab pour les mesures -print("\n 0_cron.lua zf200603.1950 \n") +print("\n 0_cron.lua zf200604.1437 \n") cron1=tmr.create() cron1:alarm(10*1000, tmr.ALARM_AUTO, function() @@ -14,6 +14,11 @@ cron1:alarm(10*1000, tmr.ALARM_AUTO, function() -- -- ztemp1=nil zhum1=nil ztemp2=nil zhum2=nil + http_post(influxdb_url,"energy,compteur=3 puissance="..zpower/1000) + + -- zarg="energy,compteur=2 puissance="..zpower/1000 + +