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

Expose FanSpeed#State for IFAN03/IFAN02 #6636

Closed
SirGoodenough opened this issue Oct 13, 2019 · 10 comments
Closed

Expose FanSpeed#State for IFAN03/IFAN02 #6636

SirGoodenough opened this issue Oct 13, 2019 · 10 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@SirGoodenough
Copy link

SirGoodenough commented Oct 13, 2019

I have spent some time trying to re-create the 1 beep for low, 2 beeps for med, 3 beeps for high that the IFAN02 provides (With Tasmota) but with the IFAN03. My daughter is handicapped and she finds the beeping helps her quite a bit when controlling the fan remotely. I have been trying to isolate the FanSpeed#State and trigger off of that, but that does not appear to be exposed. The rule does not syntax error, however the trigger never happens so I assume it is not exposed.
Trying to control the buzzer triggering off the power commands is not easily doable either as the 3 relays come on at odd times to kick startup of the motor at speed changes. I do not want to go out to an external program like Node Red or Home Assistant to tell the buzzer to go, but that may be where I am headed without FanSpeed#State available.

03:14:55 MQT: Jens_Fan/stat/RESULT = {"FanSpeed":2}
03:14:59 MQT: Jens_Fan/stat/RESULT = {"FanSpeed":3}
03:17:16 CMD: rule1
03:17:16 MQT: Jens_Fan/stat/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Free":472,"Rules":"on fanspeed#state=3 do buzzer 3,3 endon"}

And no trigger...

@Jason2866
Copy link
Collaborator

You can try the provided firmware. Your rule should work with. Since i didnt have a sonoff ifan i couldnt test it. If it works give me a feedback, and i will do a PR to include it as standard in Tasmota.
Sonoff_ifan_rule.zip

@arendst arendst added the enhancement Type - Enhancement that will be worked on label Oct 14, 2019
@arendst
Copy link
Owner

arendst commented Oct 14, 2019

I'll see if I can do it in code. Makes it a lot simpler for the script kiddies ;0)

arendst added a commit that referenced this issue Oct 14, 2019
Change iFan03 beep protocol (#6636)
@arendst arendst added the fixed Result - The work on the issue has ended label Oct 14, 2019
@arendst
Copy link
Owner

arendst commented Oct 14, 2019

Try the latest dev version. Precompiles are available within an hour.

@arendst
Copy link
Owner

arendst commented Oct 14, 2019

Oh BTW it is no longer needed to use a script; it will beep anyway.

@meingraham
Copy link
Collaborator

So, this adds beeps to the FanSpeed setting; yes?

There is still no FanSpeed#State rule trigger; right?

@arendst
Copy link
Owner

arendst commented Oct 14, 2019

Yes, Right.

@ascillato2
Copy link
Collaborator

Closing this issue as it has been added. Thanks


Support Information (Guide)

See Wiki for more information.
See FAQ for common questions/answers and links if none of your question is in the list.
See Chat for more user experience.
See Community for forum.
See Code of Conduct

@SirGoodenough
Copy link
Author

Thanks very much for the quick response.
I really hate to be a whiner, but this didn't quite solve my problem.
At this point it looked like you replaced the single beep that happened previously with the remote with 1, 2, or 3 beeps on the 3 fan speed changes. Yes, I did setoption67 to on and tried off as well.
As my Daughter cannot use the remote, and only interfaces with the fan at this point from the console or home Assistant, the beep doesn't happen there. I checked from the console and from mqtt commands and the beep only happens when using the 433 remote.
A minor thing that we can be fine without, the ifan02 puts out a long beep with fanspeed 0, and in this iteration there is no beeps when the fan is set to fanspeed 0 from any method.
Let me know what you think, if exposing fanspeed#status is easier, I am fine scripting to it. It may well be of use to others for other things as well. I am not a programmer, so I don't know what this takes.
Thanks for your time.

arendst added a commit that referenced this issue Oct 15, 2019
 * Add incremental beeps to Ifan03 remote control fan speed buttons (#6636)
 * Add rule support after every command execution like Fanspeed#Data=2 (#6636)
@arendst
Copy link
Owner

arendst commented Oct 15, 2019

The latest commit solves the RC button beeps by providing a longer beep when speed 0 is pressed.

In addition al commands are now also fed through the rule processor solving your initial issue. Only change is that you should use #data instead of #state.

So your rule should look like this:

on fanspeed#data=3 do buzzer 3,3 endon

@SirGoodenough
Copy link
Author

SirGoodenough commented Oct 16, 2019

Thankyou!
I tested and all works perfect with setoption67 on for use with the button and with setoption67 off I tested with rules.

Here's a good rule for this in case someone else looks this up and wants some hints...

rule1 on fanspeed#data=0 do buzzer 1,5 endon on fanspeed#data=1 do buzzer 1,2 endon on fanspeed#data=2 do buzzer 2,2 endon on fanspeed#data=3 do buzzer 3,2 endon

Thanks again for your help and I sent you a paypal yesterday for your trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

5 participants