Skip to content

Update reset code based on the new OS image. Update ambient light threshold in toggle. - #118

Merged
jkaczman merged 2 commits into
mainfrom
update-reset-toggle
Jul 22, 2026
Merged

Update reset code based on the new OS image. Update ambient light threshold in toggle.#118
jkaczman merged 2 commits into
mainfrom
update-reset-toggle

Conversation

@arrdalan

@arrdalan arrdalan commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Updated and tested reset and toggle with the new OS.

fixes secluso/os#20

Comment thread reset/src/main.rs
@arrdalan
arrdalan force-pushed the update-reset-toggle branch from 7fa5ce4 to 5d1a48b Compare June 16, 2026 21:09
Comment thread toggle/src/main.rs
}

const LIGHT_THRESHOLD: u32 = 40;
const LIGHT_THRESHOLD: u32 = 20;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should document how this threshold is derived, perhaps in a comment here.

On a side note for future work: what if this is a good number for our houses, but it doesn't work well for other users? How can we make this adapt to different conditions?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was derived empirically.

That's a good question. I'm not sure that the threshold needs to vary much in different houses. If we do see it perform poorly in some locations, then we can look into a solution.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just to clarify: I'm not saying 20 is the best, most optimized threshold. We probably can improve it by doing more experiments.

Comment thread reset/src/main.rs Outdated
.arg("--output=short-iso")
.arg("-u")
.arg("secluso.service")
.arg("secluso_camera_hub.service")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have DEBUG_LOGS_FILENAME as a constant, what about secluso_camera_hub.service? It's used 3x across this file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jkaczman jkaczman moved this from Todo to Awaiting Merge in v1.2 Release Jun 19, 2026
@jkaczman jkaczman removed this from v1.2 Release Jun 26, 2026
@jkaczman jkaczman moved this to In progress in v1.2 Release Jun 26, 2026
@jkaczman jkaczman removed this from v1.2 Release Jun 26, 2026
@jkaczman
jkaczman merged commit 6b72422 into main Jul 22, 2026
9 checks passed
@jkaczman
jkaczman deleted the update-reset-toggle branch July 22, 2026 14:12
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

Successfully merging this pull request may close these issues.

Toggle and reset button support

2 participants