MorneSaunders360 / Solar-Sunsynk

Monitor your energy generation, storage, and usage data using an unofficial API from Sunsynk
MIT License
11 stars 2 forks source link

Extremely chatty with the api.sunsynk.net? #8

Closed a-c-m closed 1 year ago

a-c-m commented 1 year ago

I've just disabled this on my HomeAssistant as when reviewing my AdGuard logs i noticed it was hammering my DNS with api.sunsynk.net with requests (6 million requests in the last 30 days). I suspect i have something misconfigured or made a mistake - but thought i should raise it in case its actually a bug or bad default setting.

MorneSaunders360 commented 1 year ago

Hi there,

Thank you for bringing this to our attention. We recently identified that the Sunsynk integration did not have a scan_interval configuration, which could have led to the excessive requests you've observed.

To address this:

  1. Scan Interval Addition: We've now added a scan_interval configuration to the Sunsynk integration. This allows users to adjust the frequency of API polling. By default, it's set to every 30 seconds. This should significantly reduce the number of requests made to api.sunsynk.net.

  2. Action Required: To benefit from this fix, please re-add the Sunsynk integration to your Home Assistant instance. This will ensure the scan_interval configuration is set, and you should observe a marked reduction in the number of API requests.