02.11.2022, 20:11
Hi Tee_Trinker,
I use this function into resident script every 5 seconds:
-----
local coeff, energy, sampligSec
sampligSec=5 -- 5 seconds of sampling
coeff = 60*(60/sampligSec)
energy=grp.getvalue(yourdata) -- Wh
power=grp.getvalue(yourdata) -- W
energy=energy+(power/coeff)
---
I hope this is good for you.
I use this function into resident script every 5 seconds:
-----
local coeff, energy, sampligSec
sampligSec=5 -- 5 seconds of sampling
coeff = 60*(60/sampligSec)
energy=grp.getvalue(yourdata) -- Wh
power=grp.getvalue(yourdata) -- W
energy=energy+(power/coeff)
---
I hope this is good for you.