-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change to adaptive algorithm based updates
Instead of polling for a set SCAN_INTERVAL, the new algorithm will determine if the car has recently parked and update normally for the IDLE_INTERVAL (600). After the idle period is complete, updates are throttled to the SLEEP_INTERVAL until the car is asleep. There is now a regular ONLINE_INTERVAL (60) check which does not query the car and will immediately detect if a car has become awake to resume updates.
- Loading branch information
Showing
3 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
""" | ||
Python Package for controlling Tesla API. | ||
For more details about this api, please refer to the documentation at | ||
https://github.com/zabuldon/teslajsonpy | ||
""" | ||
IDLE_INTERVAL = 600 # interval after parking to check at regular update_interval | ||
ONLINE_INTERVAL = 60 # interval for checking online state; does not hit individual cars | ||
SLEEP_INTERVAL = 660 # interval required to let vehicle sleep; based on testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters