Three position rotary switch equivalent (controlling duct fan)

The main feature of the rotary switch is that it has multiple discrete states. For example with three position rotary switch it can be in three different positions but only one at a time.

A very useful case that I have is controlling duct fan, that has 3 speeds. Slow, Mid and Full speed. If you use an analog three position rotary switch you can be sure that power is provided to only one of the wires while the others are off. Actually it is very dangerous to supply voltage to the multiple wires of the fan.

For example a three way light switch (with three buttons) might turn on/off three different lamps, but what about a three button light switch that turn on only a single lamp and the other two to be always off?

That is the question - does anyone know even a single zigbee/wifi/etc “relay switch” or three way light switch that can be configured to provide power always to single channel?

I can’t believe that no one needed smart demultiplexer (device that has one digital input and multiple binary outputs)!

When I think how to emulate this only with rules in HA, I always end up scratching my head, because of concurrency and timing. I don’t want to end up even for a second to have to outputs with live current on them - it will be catastrophic for the fan/motor.

  • One strategy is having three buttons (B1/B2/B3) light switch and three channel (R1/R2/R3) relay switch.
    In HA you can say on B1 button event turn off all R2/R3 channels and turn on only R1 channel. The same must be configured for B2 and B3 buttons.

    • One problem when B1 is turned on and you want to turn R2/R3 relay channels off and only then to turn R1 on is that some of the events R2/R3 off might not be executed or maybe there is delay and everything is awfully slow or maybe while the HA is trying to turn on B1, the user might quickly turn on/off other buttons, for example B2 or B3 which will cause a storm of events and not sure what will actually happen.
  • Another alternative is a single light button B1 (instead of three) which toggles the three states of the relay switch (R1, R2, R3), so every click of button B1 rotates the state of R1/R2/R3. Still I need to turn off first all the other channels first, wait HA to confirm that all the channels are off and only then to turn the next relay channel on. Also while this is happening I need to ignore any further clicks of the button B1 or somehow queue those events.

Any ideas how to simulate three position rotary switch with buttons unless there is an appropriate hardware or at lease demultiplexer?

Somewhat mitigation could be a relay that support single request/call/command that can change the state of all channels at once, so you might call “turn of R2, R3 and turn on R1” and the relay to execute that in one pass, so you wont wary failing one of those while the other get executed.

Don’t rely on software to do this.

1 Like

See also Simulating DPDT Rocker Switch with Reverse Polarity with Relays

Thanks nickrout! Sound a bit more complicated that I would like it to be. I guess I need just 3 normal relays, but also some ESP-like module that can turn on/off three outputs those relays. Do you know any Home Assistant compatible device, ESP-like module that have out of the box support for task like that?

An esp? You can’t get any more esplike than an esp. I prefer the esp32.

What I meant was zigbee relay switch from some brand that is hackable, probably ESP based? It would be easy to modify few lines of code, recompile and flash, instead of building it myself.

I think you are confusing things. Esp devices use wifi, not zigbee.

There are DIY zigbee devices though, Search the usual zigbee databases for DIY.

An esp-like device for zigbee is the z1-mini Z1-Mini zigbee development board

Also take a look around on tindie, this popped up https://www.tindie.com/products/a_lab_technology/zigbee-4-channel-relay/

But you are still going to either rely on software interlocking, or wire it right.

The diagram is an example of hardware interlocking. It is labelled 12v but the principle applies to any voltage.

It switches three levels, and only one level can be on at a time.

If level 1 is on, not power is switched to 2 or 3.

Level 2 is only fed with 12v if level 1 is off, level 3 can only be fed if 2 and 1 are off.

If the controller fails and all go to off, no voltage is output.

Hope that makes sense.

1 Like

Thank you so much for the reply!

Indeed, wifi and zigbee are the options for me. I just saw something that could work out the box for me: SONOFF 4CH PRO R3

It seems it can be integrated in HA and also supports interlocking for the all 4 channels! I should be able to configure only one of the relay to be on. I plan of using a normal wifi/zigbee “button” that will toggle between 4 possible speeds: low, mid, high, off and leave the heavy work on the Sonoff to deal with the interlocking.

I prefer not building it myself mostly because I have no time for doing all the design, 3D printing of the case and then writing and testing the software. Otherwise I have couple of ESP modules lying around, but feels like Sonoff might have done better job than what I would do :slight_smile:

I read in another thread that the R2 had hardware interlock and the R3 is software, but other than reading that somewhere, I have no idea :slight_smile:

As far as I understand the difference is that in R2, the hardware part is that you are selecting the mode with switch on the board (i.e. something like jumper), while in R3 you can use the app to do that, but I believe it is always software beneath, since R2 supports three different modes for the same set of relays, so they couldn’t be permanently wired with just single on/of switch on the board.

Thanks again! I hope, I will be able to report success soon :slight_smile:

1 Like

I have been looking into the same thing. However, in my situation I want to go a step further, and be able to run input and exhaust at separate speeds (for when the kitchen fan is on). So I’ve actually been looking at 2 Sonoff 4CH switches. Anyway, would like to hear how this turned out for you @perlsite