Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotune does not run if rig is turned off at night. #1400

Open
dcacklam opened this issue Jun 24, 2021 · 1 comment
Open

Autotune does not run if rig is turned off at night. #1400

dcacklam opened this issue Jun 24, 2021 · 1 comment

Comments

@dcacklam
Copy link
Contributor

Describe the bug
OpenAPS will not run autotune unless the rig is on at 0405 local time.

To Reproduce

  1. Have 2 rigs, one of which is on permanent power, and one of which is turned off at night to charge (If I don't turn it off, the Edison will shut down un-commanded after a short while on the charger while running)

  2. The shut down rig never runs autotune, because Autotune is a cron-job scheduled task at 0405.

Expected behavior
Autotune would leave a file (autotune.pid, or similar) that marks the last successful autotune run

Setup would add a script to rc.local such that if autotune has not run in the last 24hrs, it is run on boot-up, then delete the 'autotune.pid' file once complete.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Setup Information (please complete the following information):

  • 722
  • xdrip-js
  • Multiple rig-types (Pi4 with hat and Edison Explorer)
  • oref0 0.7.0-dev
@scottleibrand
Copy link
Contributor

If you want to implement this, you'll also need to adjust the data retrieval scripts: right now they're set up with relative offsets that assume it'll be run at 4am local time. If it runs too late in the day, it'll likely be missing data from the previous morning.

One other workaround we've used is to have all of our rigs rsync autotune results to/from a central server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants