Rfxtrx binary sensors

Hi everyone!

I’ve discovered Home Assistant a few weeks ago and I really do like the software. I’ve bought a few cheap 433 MHz devices from China. They all use a PT-2262 chip and are supported by RFXCom under the “Lighting4” protocol. Unfortunately, I did not find the existing Home Assistant components really suitable for my sensors, mostly due to how the Lighting4 protocol is handled by the existing components and platform, as well as the pyRFXtrx lib.

That’s why I started to write a “binary_sensor” component running with the rfxtrx platform, in order to better suit my needs. It provides better support for cheap PT-2262 based sensors (motion detection, door/window opening…) and integrates within H.A. with no need for template or configuration tricks).

My fork is available at: https://github.com/y-pollart/home-assistant ; I’ve started to write some explanations on the wiki page over there.

Of course my work have just started and I do not consider it to be ready for a pull-request. But I’d be happy to hear from you guys!

Thanks in advance!
Yannick.

1 Like

@Danielhiversen
i think something like this could also be the answer for the doorbell and alarm sensors that only send a ‘on’ and no ‘off’ signal.
How do you feel about this?

Yes, I think we should have a rfxtrx binary sensor. It is on mye todo list, but not sure when I will find time for it.

Hi @Danielhiversen
I have a working implementation on my repository (“rfxtrx-binary-sensor” branch). I’m using it at home with motion sensors and door sensors.

Of course it’s not ready for a P.R. but I think it’s a good start. I’d be happy if you have some advice about my code and I would gladly help making the code ready for the master branch if you don’t have enough time.

1 Like

Hi, Thank you for this very helpfull topic to understand how to use Lighting 4. I’ll try with sensor KERUI sap.

For short time, I’m trying a chiness switch :

https://www.aliexpress.com/item/VHOME-SMART-HOME-1Button1way-Smart-Remote-Control-Toughened-Glass-Light-433mhz-Remote-Control-BY-Broadlink-home/32746731424.html?spm=a2g0s.9042311.0.0.gbu1tD

But I understand that I need a binary switch that don’t exist. Is that right ? Is that kind of component in roadmap ?
If not, I’ll go back to Livolo switch, easier to configure.

Thank a lot for your job and your answer :wink:

Bye

Sylvain

Hello and thanks for your message. From the link you have included, I guess it’s a touch-sensitive switch that can also be controlled by a remote?

If I understand correctly, you want to control your wall switch from home-assistant as well as from the remote, and make home-assistant aware of when you use your remote to set your switch to “on” and “off”?

The switch component is the right one to use, you should have one switch per remote, but I don’t know if the remote commands will be recognized (the switch component lacks proper support for lighting4 command bits).

Also remember there will be no state update on HASS when the physical switch (the one connected to your AC socket) is used directly.

I hope I was clear enough :slight_smile: