Hello,
Trying to automate the monthly reset of the usage stats on my home energy monitor (AeonLabs HEM v1).
I know from the excellent guide provided by l8nighter that the LUA script to do this is:
local meterID = ##
local kwh = luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH", meterID)
luup.call_action("urn:micasaverde-com:serviceId:EnergyMetering1", "ResetKWH", {}, meterID)
I’ve validated that it resets the KWH counter on my meter.
Where I’m struggling with this (I’m a n00b): how do I turn this snippet into something I can call from a manual scene? Or is that even the correct approach? Basically, I’d like to be able to call this function both manually and as part of a scene triggered by day of month.
Thanks,
BB