I need to detect the state of a light which is controlled by an RF switch (I-Lumos).
The switch works as a manual touch-button ON/OFF, there is an RF key fob to do the same and Home Assistant also controls the light via Broadlink RM4 RF command strings.
What Home Assistant cannot do is detect if the light has been turned on/off manually.
Because the switch is toggled on/off by the same command string, if the light has been (say) turned off manually, sending a ‘turn off’ command from Home Assistant will turn the light on!
There are numerous ways to detect mains electricity flowing but all I have found so far involve some powered circuitry (e.g. ESP32) to do the detecting. I need something which fits either inside the wall light switch or the ceiling rose - i.e. something small.
I am thinking about reed switches, triggered by the magnetic field around a mains wire, which then acts as a switch input to a Shelly device - the Shelly will be able to report its state to Home Assistant.
Anyone any ideas for thinking outside the box on this one?
I think you should replace the whole switch by a shelly instead of trying to figure out the state of the RF-switch…
Then you can still use the broadlink rf to capture the rf fob signals, and use that with an automation to toggle the shelly
(or anything else)
Thanks aceindy. I see what you mean.
I can use the existing rf switch ('cos it’s nice looking) as a push-button trigger for the Shelly to turn the lights on/off and also control the Shelly fr Home Assistant with a script.
I’ll go away and ponder the logistics of this setup!
Thanks again.
Exactly what I ment
Why make things more complicated then they actually are
I’ve had another idea after what you said.
I’m going to try to control the Shelly on/off function with the feed from the light switch (it’s a dimmer as well) and use the state reported by the Shelly in Home Assistant to set a variable - this is what I origionally
wanted, to use in another automation.
If this works, I will retain the dimming function of the light switch and still be able to control the lights both manually and from a Home Assistant script.
I’ll report later on my progress.
Not sure what kind of dimmer you’re using now, but you can also use a shelly 2 dimmer; it uses a normal pulse switch to operate it.
- single click —> toggle
- long click —> increase/decrease brightness
It will be hard to combine this with the RF switch though
You’re absolutely right!
I could not get the dimmer switch output to control the Shelly - the dimmer switches between mains (230 volts) and about 4 volts, this is not low enough to turn the Shelly off.
I’ve gone to plan ‘B’ - replaced the dimmer switch with a Shelly Dimmer 2.
Current Shelly firmware and Home Assistant integration gives me 1 button control over on/off and brighten/dim.
I’ve also got Alexa to control these functions (only on/off, bright - 100%, dim - 10%), but that’s enough for now.
Thanks for the brainstorming aceindy.
I might get into ‘flashing’ in the future - not brave enough to do it yet!
At the moment, I’ve got Alexa to run a HA script with the following setting :
service: homeassistant.turn_on
data:
brightness_pct: 10
target:
entity_id: light.shelly_shdm_2_xxxxxxxxxxxx
the above sets the dimmer to 10% brightness, 100 sets it back to full brightness.
I could probably tinker with an input parameter to define the brightness setting and, maybe, even get Alex to do it - not sure about Alexa at the moment though!