I'm trying to store values van managed counters just to calculate my annual usage based on my contract date.
I have the managed counters setup and they do the calculation however they don't keep the history.
I saw: local function updateHistory(id, date, nValue, sValues)
local url = domoticz.settings['http://192.168.1.7:8080'] ..'/json.htm?type=command¶m=udevice&idx=' .. 346 ..
'&nvalue=' .. nValue .. '&svalue=' .. sValues .. ';' .. date
domoticz.openURL(url)
return
end
But not sure how and where this will store the value, in meter_calendar or Multimeter_Calendar or somewhere else?
I have Grafana hooked up to a database copy and can do the calculation there once I have the history available for the managed counters.
Anyone care to guide me? Tried ChatGpt but is floods errors
Regards,
Hemant