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 8b0c37f..307ff96 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 zf200615.1605 \n") +print("\n 0_cron.lua zf200615.1934 \n") cron1=tmr.create() cron1:alarm(10*1000, tmr.ALARM_AUTO, function() @@ -11,7 +11,7 @@ cron1:alarm(10*1000, tmr.ALARM_AUTO, function() http_post(influxdb_url,"energy,memory=cron1_"..yellow_id.." ram="..node.heap()) -- if yellow_id == 60 then http_post(influxdb_url,"energy,compteur=3 puissance="..zpower/1000) end - -- if yellow_id == 64 then http_post(influxdb_url,"energy,compteur=4 puissance="..zpower/1000) end + if yellow_id == 64 then http_post(influxdb_url,"energy,compteur=4 puissance="..zpower/1000) end -- http_post(influxdb_url,"energy,value=test2_"..yellow_id.." val=2") -- http_post(influxdb_url,"energy,value=test3_"..yellow_id.." val=3") 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 fe3f206..f87f570 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 zf200615.1850 \n") +print("\n 0_tst4_socat.lua zf200615.1937 \n") local node, table, tmr, uwrite, tostring = node, table, tmr, uart.write, tostring @@ -108,10 +108,8 @@ local function telnet_listener(socket) if debug_rec~=nil then debug_rec("durée de connexion... "..zlaps..", "..node.heap()) end if zlaps>1 then - -- if http_post~=nil then http_post(influxdb_url,"energy,memory=socat_disconnected_"..yellow_id.." ram="..node.heap()) end - print("rt_retry:",rt_retry) + if http_post~=nil then http_post(influxdb_url,"energy,memory=socat_disconnected_"..yellow_id.." ram="..node.heap()) end rt_retry=rt_retry-1 - print("rt_retry:",rt_retry) if rt_retry>=0 then local zstr="disconnect, reconnect 1x, "..node.heap() print(zstr) if debug_rec~=nil then debug_rec(zstr) end diff --git a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua index 84e87aa..6b9b525 100644 --- a/Mesures/energy/transfo_courant_clip_1p_1/boot.lua +++ b/Mesures/energy/transfo_courant_clip_1p_1/boot.lua @@ -1,6 +1,6 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot.lua zf200615.1852 \n") +print("\n boot.lua zf200615.1933 \n") function zztime_format(ztime) local tm = rtctime.epoch2cal(ztime + 2*3600) @@ -40,8 +40,8 @@ function boot() collectgarbage() print(node.heap()) zpower=0 - -- f="0_get_power.lua" if file.exists(f) then dofile(f) end - -- collectgarbage() print(node.heap()) + f="0_get_power.lua" if file.exists(f) then dofile(f) end + collectgarbage() print(node.heap()) f="0_cron.lua" if file.exists(f) then dofile(f) end collectgarbage() print(node.heap())