[Request] Create a toggle for "reset events retrieved from the web API at midnight", resulting in an empty response until next inverter startup. #1875
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
After our discussion in #1800, in which we discussed the issue of inverter events not containing a date, I have tried to create an analysis of the issue of event timestamps. It is, in a way, similar to #1857, in that this is a problem of how state should be handled by OpenDTU or downstream tools. In OpenDTU Logger, I would like to implement a solution for tracking events in the following way:
data_age
=0
andevents
=1
.data_age
=0
andevents
=1
happens againevents
counter will increase every time a new event occurs./api/eventlog/status?inv=11418186xxxx
endpoint.start_time
andend_time
timestamps.Theoretically, this should work, as, according to @tbnobody in #1800, the inverter resets events at midnight.
However, OpenDTU keeps track of inverter events in the web interface, even after midnight / disconnection, until next startup of the inverter. This makes it a bit more troublesome to implement this.
Describe the solution you'd like
Create a toggle for "reset events retrieved from the web API at midnight", resulting in an empty response from the
/api/eventlog/status?inv=xxxx
web API until next startup.Another approach would be to create a toggle for "reset events web API endpoint after inverter restart",
Describe alternatives you've considered
Alternatively, if @tbnobody is open to implementing feature request #1845
[serial]/events/messages
for each inverter with a JSON array ofstart_time
,end_time
,message_ID
,message
with all messages.events
counter increases.[serial]/events/startup_dates
containing the startup datesdata_age
=0
andevents
=1
.Additional context
Please also let me know if I'm missing something in this analysis, or tell me why this wouldn't work. I'm open to hearing your constructive criticisms :) .
The text was updated successfully, but these errors were encountered: