I wanted to add historic data to my P1 (gas and Electra) via the following instruction on the Wiki (nice documentation by the way):
Now I looked at the Domoticz code and the AddDBLogEntry parameter is only used for Managed counters, nowhere else.Note on counters
Usually, counters are updated daily to feed week/month/year history log views. Starting version 4.11774, if you want to disable that behavior to control everything from an external script or a plugin (already the case for managed counter), you can set the "DisableLogAutoUpdate" device option to "true", for instance in a Python plugin:
Domoticz.Device(Name="MyCounter", Unit=1, Type=0xfa, Subtype=0x01, Options={"DisableLogAutoUpdate" : "true").Create()
Starting version 4.11774, you can too directly insert data in in history log. Set the "AddDBLogEntry" device option to "true", for instance in a Python plugin:
Domoticz.Device(Name="MyCounter", Unit=1, Type=0xfa, Subtype=0x01, Options={"AddDBLogEntry" : "true").Create()
and:
Then, depending on counters, you can insert values in history log. For most counters:
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=COUNTER;USAGE;DATE
Before I do a try out on a copy of my DB, I want to make sure if it is possible to add historical data like this for current and daily usage.
Or is it limited to managed counters as the code suggests