JSON/API energy counter inconsistancy
Posted: Friday 03 July 2026 12:51
Hi, I have 2 energy counters for electra and gas.
Note: these devices are created by AD using the built-in hardware device "P1 Smart Meter with LAN interface"
Using JSONAPI json.htm?type=command¶m=graph&sensor=counter&range=year results in 2 json sections:
- result
- resultprev
Each containing the datapoints of all days of current year (result) and past year (resultprev)
The result part of electra device returns : c1, c2, c3, c4, d, p, r1, r2, v1, v2
And resultprev : d, r1,r2, r3,r4
The resultpart of gas device returns: c, d, p,v
And resultprev : d, p, v
In the result section, both GAS and ELECTRA have the same info : counter, date, price , daily usage
In the resultprev section ELECTRA device has date, daily usage. Price is missing
In the resultprev section GAS device has date, PRICE, daily usage
The inconsistency IMO is that in resultprev there is no price for ELECTRA devices but there is for GAS devices.
I would like to have prices in the resultprev section for ELECTRA devices for this built-in hardware device type, too.
Note: I did not test this with a custom sensor, "slimme meter electra". I suspect the same behaviour.
kind regards!
Note: these devices are created by AD using the built-in hardware device "P1 Smart Meter with LAN interface"
Using JSONAPI json.htm?type=command¶m=graph&sensor=counter&range=year results in 2 json sections:
- result
- resultprev
Each containing the datapoints of all days of current year (result) and past year (resultprev)
The result part of electra device returns : c1, c2, c3, c4, d, p, r1, r2, v1, v2
And resultprev : d, r1,r2, r3,r4
The resultpart of gas device returns: c, d, p,v
And resultprev : d, p, v
In the result section, both GAS and ELECTRA have the same info : counter, date, price , daily usage
In the resultprev section ELECTRA device has date, daily usage. Price is missing
In the resultprev section GAS device has date, PRICE, daily usage
The inconsistency IMO is that in resultprev there is no price for ELECTRA devices but there is for GAS devices.
I would like to have prices in the resultprev section for ELECTRA devices for this built-in hardware device type, too.
Note: I did not test this with a custom sensor, "slimme meter electra". I suspect the same behaviour.
kind regards!