-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major
-
Component/s: SolarIn, SolarQuery
-
None
It would be nice if SolarNetwork could publish a global "generation right now" metric, to showcase how much power is getting produced at the moment. It would be too expensive to try to query across all data to do this, and SolarNetwork doesn't actually know which source IDs represent PV generation.
One way to accomplish this would be to provide a way for node owners to opt-in to a "global generation tracker" service. The owner would need a way to register a node ID + source ID + property name for this service. The service would hook into the data collection layer and extract the matching data as it flows into SolarNetwork, capturing the relevant power/energy value and possibly some geographic information like country and region.
Then a new SolarQuery API would make the tracker information available for applications to use. At a minimum the tracker information would be a sum total of all power information at the time of the call. Care must be taken to purge old data from the tracker, given a node could go offline at any time. If the tracked data is older than some reasonable amount (e.g. X minutes) then it should not contribute to the total.
It might also be useful to record the calculated totals as a global data stream/streams. This would provide a way to show the historical power/energy over time.