snicker / zwift_hass

Zwift Sensor Integration for HomeAssistant
53 stars 13 forks source link

Implement a rate limit #27

Closed devopsleigh closed 3 years ago

devopsleigh commented 3 years ago

My Pi-hole logs are showing over 20,000 hits per day on us-or-rly101.zwift.com; this is 10x the next item on that list. Please implement a static rate limit, or perhaps variable based on online status.

snicker commented 3 years ago

Hi @devopsleigh,

you may use the update_interval configuration parameter to tweak this. Currently it is set to every 15 seconds while offline.

When online, it is not able to be changed, and is set to every second. This number of requests in a 24hr period is not that high for these intervals considering there are 2x requests at every interval, and that your Zwift client will be making requests as well.

I am adjusting the online request threshold to be every 2 seconds today as there has been some additional throttling built into Zwift's servers.

Closing this issue.

devopsleigh commented 3 years ago

Thanks @snicker!