From e6d7448d77596e09006963774e328538b0e70bf7 Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sun, 7 Jun 2020 11:20:29 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=C3=A9=20un=20canary=20supl=C3=A9mentaire?= =?UTF-8?q?=20dans=20Grafana=20(tmr=5Fsocat1=5F)=20pour=20les=20probl?= =?UTF-8?q?=C3=A8mes=20de=20socat=20observ=C3=A9s=20pendant=20la=20nuit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mesures/energy/transfo_courant_clip_1p_1/0_tst4_socat.lua | 5 ++++- Mesures/energy/transfo_courant_clip_1p_1/_zremote_cmd.txt | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Mesures/energy/transfo_courant_clip_1p_1/0_tst4_socat.lua b/Mesures/energy/transfo_courant_clip_1p_1/0_tst4_socat.lua index 8774e56..ef09e15 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/0_tst4_socat.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/0_tst4_socat.lua @@ -27,7 +27,7 @@ telnet -rN localhost 23000 ]] -print("\n 0_tst4_socat.lua zf200606.1256 \n") +print("\n 0_tst4_socat.lua zf200607.1102 \n") local node, table, tmr, uwrite, tostring = node, table, tmr, uart.write, tostring @@ -158,6 +158,9 @@ end tmr_socat1=tmr.create() tmr_socat1:alarm(15*1000, tmr.ALARM_AUTO , function() + + if http_post~=nil then http_post(influxdb_url,"energy,memory=tmr_socat1_"..yellow_id.." ram="..node.heap()) end + -- rt_retry=1 -- if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH) end if srv_rt~=nil then diff --git a/Mesures/energy/transfo_courant_clip_1p_1/_zremote_cmd.txt b/Mesures/energy/transfo_courant_clip_1p_1/_zremote_cmd.txt index fa9c6eb..62eeffe 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/_zremote_cmd.txt +++ b/Mesures/energy/transfo_courant_clip_1p_1/_zremote_cmd.txt @@ -1,5 +1,5 @@ # Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom -# zf200606.1231 +# zf200607.1109 Todo à faire pour ce projet ! @@ -102,6 +102,7 @@ verbose=true ./luatool.py --ip $zIP:$zport -f 0_cron.lua ./luatool.py --ip $zIP:$zport -f 0_http_post.lua ./luatool.py --ip $zIP:$zport -f 0_htu21d.lua +./luatool.py --ip $zIP:$zport -f 0_tst4_socat.lua ./luatool.py --ip $zIP:$zport --zrestart