feat: Add Smart Mix (unoccupied behavior) support for Haiku H/I fans#190
Open
jhesketh wants to merge 2 commits intojfroy:mainfrom
Open
feat: Add Smart Mix (unoccupied behavior) support for Haiku H/I fans#190jhesketh wants to merge 2 commits intojfroy:mainfrom
jhesketh wants to merge 2 commits intojfroy:mainfrom
Conversation
Add SmartMixProperties at Properties field 42, matching behavior observed on Haiku H/I Series devices when motion sense is enabled and unoccupied behavior is changed in the BAF app. The schema models smart_mix_enable and speed (1-7), where absent/false represents Turn Off and true+speed represents Smart Mix. Expose has_smart_mix, smart_mix_enable, and smart_mix_speed on Device with read/write support. Writes preserve existing sub-message fields via copy-before-commit semantics so updates to one Smart Mix value do not unintentionally clear the other. Disclaimer: This commit was developed with assistance from Claude and Codex and is based on reverse-engineering/experimentation on limited hardware. Please review carefully and validate behavior on your own target devices before relying on it.
…eed writes Fix query merge semantics for nested protobuf messages by clearing incoming sub-message fields before MergeFrom. Without this, omitted inner fields could remain stuck from previous state (for example, smart_mix_enable staying true when firmware omits it to indicate Turn Off). Also update smart_mix_speed writes to avoid forcing smart_mix_enable and issue a follow-up query after commit. This handles a firmware/client quirk where speed writes are accepted but not always pushed immediately to connected clients, ensuring local Device state reflects confirmed values. Disclaimer: This commit was developed with assistance from Claude and Codex and is based on reverse-engineering/experimentation on limited hardware. Please review carefully and validate behavior on your own target devices before relying on it.
ac2c287 to
62b872e
Compare
jfroy
requested changes
Feb 24, 2026
Owner
jfroy
left a comment
There was a problem hiding this comment.
Separate the subfield merge fix/change in a PR and add unit tests for it. I don't see obvious issues with the code, but I'd like an independent commit to look at if a bug report comes in later.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavior
Fixes Included
Device Scope
Notes