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

Updating FanController logic to merge the setSpeed and SetActive functions #403

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

05TEVE
Copy link
Collaborator

@05TEVE 05TEVE commented Feb 9, 2023

Removing the standalone setActive function that turns the fan on and instead sing the SetMultiState function to turn the fan on when it sets the speed.

Some Fan Controllers like the DETA 3 Speed Fan Controller with Light default to a particular speed when it is turned on. The existing logic sets the fan to active and then sets the speed. This causes a clash as the response from the switch turning the fan on will sets the speed to 3 and override the subsequent update speed call. This change fixes that by ensuring that only one call is made to turn the fan on and set the rotation speed.

Removing the standalone setActive function that turns the fan on and instead sing the SetMultiState function to turn the fan on when it sets the speed.
@05TEVE 05TEVE changed the title Merging the SetSpeed and Set Active Flags. Updating FanController logic to merge the setSpeed and SetActive functions Feb 9, 2023
@05TEVE
Copy link
Collaborator Author

05TEVE commented Mar 1, 2023

@iRayanKhan is there anything else required to have this PR merged?

@xrust83
Copy link

xrust83 commented Mar 1, 2023

Pay attention to the date of the lasting update of the plugin, March 25, 2021. It's easier to make a branch at all and make your own branch.

@05TEVE
Copy link
Collaborator Author

05TEVE commented Mar 3, 2023

@xrust83, It would be good to try avoid building another parallel version of the plugin here if possible. There have been minor PRs merged recently however as you state there are no version bumps. It would be great to be able to fix some of the simple issues and get a new version out there.

@michael-j-green
Copy link

michael-j-green commented Mar 3, 2023

I agree with @05TEVE. Unless @iRayanKhan has abandoned this project, I suggest we keep moving forward with this one.

There's already a crazy number of forks in different stages of completeness.

However, as I suggested on another issue, if @iRayanKhan is not available to continue (due to sickness, work, or just needs a break), it would be fantastic if he could add someone else to the project to commit those PR's.

Edit: was also thinking that many users using HomeBridge are using this repo rather than one of the many other forks. It would be a smoother update for those users for this repo to be updated rather than asking them to migrate to a new plugin.

@badbubblegum
Copy link

@05TEVE great work on these files, could not get the fan speed control working properly at all until I stumbled upon this. The only issue I have now is that I cannot switch fan on/off with Siri voice commands or by touching the button in the home app. It does turn on/off however when using the slider control when the home tile is open. Have you found a way around this?

- Refactoring to allow for the Fan function to be turned off or on from the icon in the home app.
- Adding in a variable option to allow the default speed the fan starts with to be set. (especially useful with DETA smart fan switches with default to speed 3).
@05TEVE
Copy link
Collaborator Author

05TEVE commented Jul 13, 2023

@05TEVE great work on these files, could not get the fan speed control working properly at all until I stumbled upon this. The only issue I have now is that I cannot switch fan on/off with Siri voice commands or by touching the button in the home app. It does turn on/off however when using the slider control when the home tile is open. Have you found a way around this?

Hi, I have pushed a fix that seems to work on my devices. I also added a default speed variable so that the fan starts on speed 1 as my DETA switches have an annoying habit of starting at full speed every time.

It could probably do with a bit of refactoring, but should do the job.

@badbubblegum
Copy link

@05TEVE great work on these files, could not get the fan speed control working properly at all until I stumbled upon this. The only issue I have now is that I cannot switch fan on/off with Siri voice commands or by touching the button in the home app. It does turn on/off however when using the slider control when the home tile is open. Have you found a way around this?

Hi, I have pushed a fix that seems to work on my devices. I also added a default speed variable so that the fan starts on speed 1 as my DETA switches have an annoying habit of starting at full speed every time.

It could probably do with a bit of refactoring, but should do the job.

Hi, Just updated and your fix works like a charm. Will report if I find any issues but great work and thanks!

@scooterpsu
Copy link
Contributor

Just wanted to say thanks for this. After updating to IOS 17 the separate commands were firing more often and actually conflicting a couple times and I was legitimately worried my controller would burn out.

@05TEVE 05TEVE merged commit 6129cac into iRayanKhan:main Jan 15, 2024
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.

5 participants