Preflight Checklist
Problem Description
Based on the comment on this PR
It would be nice to be able to verify metrics generation with tests with JSON sample data.
i.e Having a list of sample metrics.
[
{
"serial_number":"A111222",
"timestamp":1611583070,
"data":{
"token_count":13,
"tampered":false,
"firmware_version":"1.14.2"
},
"historical_data":[
{
"timestamp":1611583070,
"panel_voltage":17.5,
"battery_voltage":12.5,
"panel_current":2.2,
"battery_current":3.2
},
{
"timestamp":1611583010,
"panel_voltage":15.7,
"battery_voltage":12.6,
"panel_current":2.2,
"battery_current":3.2,
"usb_load_1_current":0.7
}
],
"data_format":{
"variables":{
"battery_current":{
"name":"Battery Current",
"type":"float",
"unit":"A",
"description":"The battery current, negative means it is charging."
}
}
}
}
]
Proposed Solution
Get already generated metrics data as JSON i.e sample_metrics.json
Resources:
Alternatives Considered
No alternative considered
Additional Information
No response
Preflight Checklist
Problem Description
Based on the comment on this PR
It would be nice to be able to verify metrics generation with tests with JSON sample data.
i.e Having a list of sample metrics.
[ { "serial_number":"A111222", "timestamp":1611583070, "data":{ "token_count":13, "tampered":false, "firmware_version":"1.14.2" }, "historical_data":[ { "timestamp":1611583070, "panel_voltage":17.5, "battery_voltage":12.5, "panel_current":2.2, "battery_current":3.2 }, { "timestamp":1611583010, "panel_voltage":15.7, "battery_voltage":12.6, "panel_current":2.2, "battery_current":3.2, "usb_load_1_current":0.7 } ], "data_format":{ "variables":{ "battery_current":{ "name":"Battery Current", "type":"float", "unit":"A", "description":"The battery current, negative means it is charging." } } } } ]Proposed Solution
Get already generated metrics data as JSON i.e
sample_metrics.jsonResources:
Alternatives Considered
No alternative considered
Additional Information
No response