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

Preserve last calibration results between reboots #91

Open
gorbunovav opened this issue Jan 15, 2022 · 8 comments
Open

Preserve last calibration results between reboots #91

gorbunovav opened this issue Jan 15, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request feature request

Comments

@gorbunovav
Copy link
Contributor

gorbunovav commented Jan 15, 2022

Is your feature request related to a problem? Please describe.

The calibration process requires some stable and predictable conditions.
The auto-calibration feature is useful since it allows to simplify the sensor setup.
Periodical re-calibration makes sense to adjust expectations to the changing environment.
Automatic re-calibration on boot is unpredictable.

Describe the solution you'd like

Preserve calibration results in some way. And don't perform automatic calibration on boot if data already present.
Re-calibration can be performed on schedule via the exposed service.

Describe alternatives you've considered

Use manual calibration (e.g. turn-on automatic method, grab values, fill into config).
Downsides:

  • each time sensor boots with some default values unrelated to the latest calibration results
  • more manual work
@CarsonF
Copy link
Collaborator

CarsonF commented Jan 15, 2022

I'll work on this. It goes hand in hand with the sensors refactor I'm about to start.

@Lyr3x Lyr3x added enhancement New feature or request feature request labels Jan 15, 2022
@Lyr3x
Copy link
Owner

Lyr3x commented Jan 18, 2022

@CarsonF This should be an optional configuration option.

@CarsonF
Copy link
Collaborator

CarsonF commented Jan 18, 2022

This should be an optional configuration option.

As in not the default functionality?

@Lyr3x
Copy link
Owner

Lyr3x commented Jan 18, 2022

Yes the default should be false because i know that it can cause problems. Thresholds change by a lot depending on the sunlight and temperature. If you dont recalibrate for quite some time you getting worse results.

@CarsonF
Copy link
Collaborator

CarsonF commented Jan 18, 2022

That makes this the opposite of #58 then. Maybe we should discuss more.

@Lyr3x
Copy link
Owner

Lyr3x commented Jan 18, 2022

I have #58 in mind and really want to implement that soon because this eliminates the frequent recalibration issue.

If #58 is done we this feature here can be default: true

@gorbunovav
Copy link
Contributor Author

@Lyr3x but this feature only prevents the re-calibration on boot. So in the described scenario disabling it will only help if you are rebooting the device regularly.
Although I agree that it can be configurable.

@Lyr3x
Copy link
Owner

Lyr3x commented Jan 18, 2022

I think most of the users do reboot frequently to update the firmware and use the chance to get fresh thresholds in. I do understand why some don't want to do that always though 👍

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

No branches or pull requests

3 participants