Hi!
We have 80-odd systems in our VRM user, and use the API to collect and report monthly downtime for these. We use the https://vrmapi.victronenergy.com/v2/installations/{id}/stats endpoint with attributeCodes[]=To and a few other variables to get 15-min data.
One of our systems is frequently down at night due to missing power on AC in. In July it was down 69 hours by looking at the ve.bus state over the period.
When I check the downtime at this site from the stats API, "To" (time off) is (always) null and Ti (time inverting) is 900 (=15 min x 60 seconds), indicating the system was always inverting. The Ve.bus state is correctly reported as "off" for the same time period, and it is visibly down in the VRM gui.
For the remaining 80-odd sites, we can correctly sum over the "To" parameter to find downtime. We have five systems with same config as this, but with correct reporting.
Why does the To API data not correctly show downtime for this one system?