On dirait que cela fonctionne bien, cela envoie la puissance mesurée sur Grafana maintenant, pour le compteur 3 :-)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user