Rework of live data json #833
SunyAndreas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody,
first a quick remark: This is my first contribution to an Open Source project, so please let me know if I went wrong at some point or missed something I should have known in advance.
When I got my little solar collector, I found this project which I like a lot. I started using the web interface a lot and thought about simplifying the live data view, with the current power in focus and the rest available by demand. When checking the API, I had some questions about the live data, especially the InverterStatistics:
The live data contains a lot of data in the form of
"YieldTotal": { "v": 2.427999973, "u": "kWh", "d": 3 },
Much of the information here seems redundant, as from my understanding the unit is not very likely to change and probably will not during runtime. Also, the number of decimals are something the frontend should decide about. If it should be done in the frontend, it could also be done in the value field, which still contains all the digits. Am I missing something here? From my point of view, putting only the value in the json. In this case, the json for the InverterStatistics would look like this:
"DC": { "0": { "name": "Panel 1", "Power": 0, "Voltage": 0, "Current": 0, "YieldDay": 0, "YieldTotal": 0, "Irradiation": 0 },
I do get that with the array structure, it's easier to show all data at once in a table. But if you ever want to access a dedicated value, that will always require some search. Also, displaying all data is not much more complicated with the reduced JSON.
I made a fork with these changes here: https://github.com/SunyAndreas/OpenDTU/tree/feature/simplify_json
There are also some small adjustments to the live view to reduce the used space.
What do you think? Would you consider it an improvement to the project?
Thanks for reading, and all the best,
Andreas
Beta Was this translation helpful? Give feedback.
All reactions