De restAPI's voor het opvragen van historische gegevens hebben dit formaat:
/api/v2/hist/{actual|hours|days|months}
of:
/api/v2/hist/{actual|hours|days|months}{/asc|/desc}
of:
/api/v2/hist/{actual|hours|days|months}/<recs>{/asc|/desc}
GET
http://dsmr-esp32.local/api/v2/hist/actual
{
"store": {
"44": [
{
"actual": {
"timestamp": "230102153122W",
"power_delivered_l1": 0.379,
"power_delivered_l2": 0.135,
"power_delivered_l3": 0.415,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.339
}
}
],
"45": [
{
"actual": {
"timestamp": "230102153126W",
"power_delivered_l1": 0.861,
"power_delivered_l2": 0.119,
"power_delivered_l3": 0.722,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.341
}
}
],
"46": [
{
"actual": {
"timestamp": "230102153133W",
"power_delivered_l1": 1.074,
"power_delivered_l2": 0.284,
"power_delivered_l3": 0.343,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.344
}
}
],
.
.
.
"152": [
{
"actual": {
"timestamp": "230102154119W",
"power_delivered_l1": 1.185,
"power_delivered_l2": 0.424,
"power_delivered_l3": 0.656,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.699
}
}
],
"153": [
{
"actual": {
"timestamp": "230102154123W",
"power_delivered_l1": 0.781,
"power_delivered_l2": 0.658,
"power_delivered_l3": 0.059,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.703
}
}
],
"154": [
{
"actual": {
"timestamp": "230102154129W",
"power_delivered_l1": 1.147,
"power_delivered_l2": 0.826,
"power_delivered_l3": 0.67,
"power_returned_l1": 0,
"power_returned_l2": 0,
"power_returned_l3": 0,
"gas_delivered": 5310.705
}
}
]
}
}
GET
http://dsmr-esp32.local/api/v2/hist/hours
Geeft een JSON string met de historische gegevens over de afgelopen 24 uur terug.
{
"hours": [
{
"recnr": 0,
"recid": "22122815",
"slot": 113,
"edt1": 6198.015,
"edt2": 9157.279,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5047.048
},
{
"recnr": 1,
"recid": "22122816",
"slot": 114,
"edt1": 6199.161,
"edt2": 9161.557,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5049.235
},
{
"recnr": 2,
"recid": "22122817",
"slot": 115,
"edt1": 6200.28,
"edt2": 9165.792,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5051.459
},
{
"recnr": 3,
"recid": "22122818",
"slot": 116,
"edt1": 6201.412,
"edt2": 9170.153,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5053.669
},
{
"recnr": 4,
"recid": "22122819",
"slot": 117,
"edt1": 6202.533,
"edt2": 9174.56,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5055.86
},
.
.
.
{
"recnr": 118,
"recid": "23010213",
"slot": 110,
"edt1": 6331.18,
"edt2": 9661.992,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5305.721
},
{
"recnr": 119,
"recid": "23010214",
"slot": 111,
"edt1": 6332.962,
"edt2": 9668.602,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5309.217
},
{
"recnr": 120,
"recid": "23010215",
"slot": 112,
"edt1": 6333.831,
"edt2": 9671.759,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5310.865
}
]
}
GET
http://dsmr-esp32.local/api/v2/hist/days
Geeft een JSON string met alle gegevens over de afgelopen dagen terug.
{
"days": [
{
"recnr": 0,
"recid": "22120223",
"slot": 0,
"edt1": 6059.023,
"edt2": 8676.882,
"ert1": 1183.884,
"ert2": 2600.835,
"gdt": 4809.171
},
{
"recnr": 1,
"recid": "22120323",
"slot": 1,
"edt1": 6074.667,
"edt2": 8676.882,
"ert1": 1183.884,
"ert2": 2600.835,
"gdt": 4814.832
},
{
"recnr": 2,
"recid": "22120423",
"slot": 2,
"edt1": 6091.162,
"edt2": 8676.882,
"ert1": 1183.884,
"ert2": 2600.835,
"gdt": 4821.213
},
.
.
.
{
"recnr": 29,
"recid": "22123123",
"slot": 29,
"edt1": 6288.5,
"edt2": 9500.478,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5223.111
},
{
"recnr": 30,
"recid": "23010123",
"slot": 30,
"edt1": 6315.821,
"edt2": 9604.45,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5276.099
},
{
"recnr": 31,
"recid": "23010215",
"slot": 31,
"edt1": 6333.831,
"edt2": 9671.759,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5310.865
}
]
}
GET
http://dsmr-esp32.local/api/v2/hist/months
Geeft een JSON string met alle gegevens van de afgelopen maanden terug.
{
"months": [
{
"recnr": 0,
"recid": "21013123",
"slot": 16,
"edt1": 4027.753,
"edt2": 5345.965,
"ert1": 706.531,
"ert2": 1609.39,
"gdt": 3426.986
},
{
"recnr": 1,
"recid": "21022823",
"slot": 17,
"edt1": 4160.245,
"edt2": 5526.37,
"ert1": 710.812,
"ert2": 1622.42,
"gdt": 3569.993
},
.
.
.
{
"recnr": 22,
"recid": "22113023",
"slot": 13,
"edt1": 6056.715,
"edt2": 8656.669,
"ert1": 1183.884,
"ert2": 2600.787,
"gdt": 4800.665
},
{
"recnr": 23,
"recid": "22123123",
"slot": 14,
"edt1": 6288.5,
"edt2": 9500.478,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5223.111
},
{
"recnr": 24,
"recid": "23010215",
"slot": 15,
"edt1": 6333.831,
"edt2": 9671.759,
"ert1": 1183.1,
"ert2": 2600.5,
"gdt": 5310.865
}
]
}