Enhancements:
- Add solar production stats for microinverter input channel #169
- The external inverter input for SB2 AC models is considered as additional PV input channel for the system when collecting solar energy
- This new metric requires an additional request to the energy stats, similar to each other PV channel
- Add retry query capability on certain Api return codes #168
- When using multiple client sessions in parallel, there is no request serialization and sporadic request errors can occur if parallel requests are issued by the same IP address
- This specific request error code 21105 is now considered as Api busy error and a single retry will be attempted after random delay between 2-5 seconds
- Add request endpoint throttling capability #170
- Anker reduced the endpoint request limit per ~minute from ~25 requests down to ~10-12 requests per IP address
- The Api client session now applies a default throttle of 10 requests per endpoint per minute
- The limit can be changed to any positive number, 0 will disable the throttling
- IMPORTANT: The client session cannot know which other clients (App, other sessions) consumed already endpoint requests within last minute for the same IP address. Therefore the throttle works only reliably for a single client session to the Anker cloud. If you run parallel client sessions, you can reduce the throttle limit by half for each session to avoid exceeding the limit.
- Add api nickname to logger messages to differentiate messages from parallel logging Api sessions
- Enhance energy_export.py tool to utilize new throttling capability #171
- Estimated runtime cannot longer be calculated
- Progress messages have been added during the export
- Throttling messages will be printed to make users aware of delays
Fixes:
- Added improvements as mentioned under enhancements to prevent Api request errors because of reduced endpoint limits or parallel Api usage by multiple clients
Breaking changes:
- Due to unforeseeable throttling requirements, site updates and device details updates may take much longer than previously.
- Especially the energy details update runs multiple queries against same endpoint and is highly affected by throttling requirements.
- Try to avoid running energy details updates or other methods that must run against the energy statistical endpoints too often to avoid running into the endpoint throttling, that must delay next endpoint request for up to 1 minute to stay below the endpoint limit
Full Changelog: v2.5.0...v2.5.5