Using 8 channel relay boards without separate 'on' and 'off'

I’ve just purchased a low cost APDC-8L 433MHz relay board https://www.aliexpress.com/item/12V-8-CH-channel-RF-Wireless-Remote-Control-Switch-Remote-Control-System-receiver-transmitter-315-433/32640449038.html and it only seems to have three modes:

  • Momentary (transmit code continuously to hold output on)
  • Interlock (turn on one relay at a time, turning all the others off)
  • Toggle (each relay toggles on and off on receipt of a single code)

I would like to use these for lighting control, but for that I need separate on and off control so I know that the lights are in the correct state even if the board misses one transmission.

Is there a way to configure this, or do I need to find a different relay board for this application?

Some extra detail if it helps, the commands sent by the RF controller are Lighting 4 where S1-S16 are fixed as 0101 0101 0101 0101 and S17-S24 are the binary representation of the number of the button that has been pressed:
1- 1100 0000
2- 0011 0000
3- 1111 0000

7- 1111 1100
8- 0000 0011

Well it isnt a perfect board for that, but it depends on how you plan to use it. Are you planning to use a microcontroller and Rf transmitter to control the board? In that case you can have the microcontroller keep track if it is meant to be one or off.
Ofcourse you still will have the problem that if a transmission is missed the state of the lamop as in openhab, no longer corresponds with the actual state of the lamp

Thanks @Kees_van_Gelder. That was what I was trying to explain, so I would like the state (on/off) to be in the command, rather than just a toggle.

I was hoping these boards might have some ‘hidden’ functionality to do that, so they have separate ‘on’ and ‘off’ messages. RF is never guaranteed, and there is no easy means of feedback to check if the state is correct.

indeed, as said… you could come a long way, but in the end there is always the unreliability of the rflink.
I use some legacy rf switches… that are rather reliable, but they do not toggle, just on or off.
I’ d suggest you find another solution

Rf based switches like these from Alibaba are difficult to work with if you want to remember the states. Note that the way these work is they all listen to the same frequency and it’s just a matter of checking whether the code is meant for that switch and/or channel of a relay. When ur microcontrollers sends a command , that’s the end of it. U wouldn’t know if the receiver gets it or not, and you won’t know if it would act on the command unless you visually check the switch to see if it’s on.

If you want to really make this work, I’d get an esp8266-12 like a Wemos D1 or nodemcu. Hook the GPIO to either NC or NO of the relay to ground of the ESP so that you do a digital read on the ESP to check if the switch is in or off (GPIO will be high or low, depending on how u hook it up). If that’s the case, you might as well just drive the relay board with the ESP LOL

Indeed, if one plans to use the relays for lowvoltage switching, just have an MQTT controlled wemos switch them.
Can do too if one wants to switch mains voltages but then perhaps the sonoff is a better option

Nothing wrong with relays and mains. The problem is the RF-based relay boards that has no means of determining its own state. I have switches driven by relays even in 240V without problems.

1 Like

I have no problems with it but some people get nervous about it.
Yes the RF problem is known

Thanks all for confirming that these don’t have undocumented ‘on’ and ‘off’ modes, I will use the board for other applications and look for another relay board for lighting or design my own.

It’s really helpful if you use some method that allows OpenHAB to read back the state of the lights. This allows you to deal with cases like “what happens if OH restarted?” “What happens if someone manually turns lights on” etc.

That was what I had started with. I was going to connect all the switch returns to mains-coil relays or optocouplers to get isolated inputs from all the switch positions, then control relays to turn the lights on and off.

The nice thing about that is that it can be configured so if you pull the power to the relay board it falls back to operate as a normal light (switch return connects to the light directly), and also you can use the switch inputs to trigger other functions in openhab.

But then I saw a potentially much cheaper way to do it using these inexpensive relay boards, and I couldn’t resist trying!

I’m in the UK, but fortunately in a house where the switch cable and feed to each light all come back to a single junction box for each floor (conventionally in the UK the junction box is in the ‘ceiling rose’ at the light fitting, so it’s harder to retro-fit controls).

I’ll go back to my original ESP32/Arduino plan, I think.