My current energy script filters the P1 meter log database per year and searches for specific dates in that year.
[url]http://<IPaddr>:<Port>/json.htm?type=command¶m=graph&sensor=counter&idx=12345&range=year&year=2026[/url]
It returns the whole year, but filtering for 2026-01-01 it returns:
Code: Select all
{
"c" : "6409.15",
"d" : "2026-01-01",
"p" : "11.8244",
"v" : "9.91"
},Since I am only looking for data at one specific date (day of the year), I thought I could also do:
[url]http://<IPaddr>:<Port>/json.htm?type=command¶m=graph&sensor=counter&idx=12345&range=2026-01-01T2026-01-01[/url]
However, in this case not all data is present, I get (only showing "result" section below), so "c" and "p" are missing:
Code: Select all
"result" :
[
{
"d" : "2026-01-01",
"v" : "9.91"
},
{
"d" : "2026-01-01",
"v" : "20.11"
}
],
Ultimately I want to fetch the data of the P1 meter for one specific day of the year (e.g. contract start date).
Any idea's?