Roode icon indicating copy to clipboard operation
Roode copied to clipboard

Preserve last calibration results between reboots

Open gorbunovav opened this issue 3 years ago • 8 comments

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

gorbunovav avatar Jan 15 '22 15:01 gorbunovav

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

CarsonF avatar Jan 15 '22 19:01 CarsonF

@CarsonF This should be an optional configuration option.

Lyr3x avatar Jan 18 '22 15:01 Lyr3x

This should be an optional configuration option.

As in not the default functionality?

CarsonF avatar Jan 18 '22 15:01 CarsonF

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.

Lyr3x avatar Jan 18 '22 15:01 Lyr3x

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

CarsonF avatar Jan 18 '22 15:01 CarsonF

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

Lyr3x avatar Jan 18 '22 15:01 Lyr3x

@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.

gorbunovav avatar Jan 18 '22 15:01 gorbunovav

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 👍

Lyr3x avatar Jan 18 '22 15:01 Lyr3x