Controlling 433 mhz devices, can't find codes

Hi,

I recently discovered HA, and really loving it :). After integrating my doorbell, alarm system and CCTV, I am looking into integrating my 433 mhz devices. I believe this should be easily done with switch.rpi_rf and a simple 433 mhz kit (fs1000a + XD-RF-5V)

To be able to control the devices, I must discover the codes. That is where I am having issues.

I have a bunch of smartplugs, wall switches, and built-in receivers that work on 433 mhz from Trust. These are the devices I have:

These are the same as DIO or KaKu.
The problem is that these devices don’t have dip switches or anything, but a learn button.

When I use 433 utils, I can’t see any code passing by. Using an older 433 mhz remote (with dip switches), I can see it working. So I’m sure my receiver is working, but it can’t seem to find the codes of the newer remotes.

Can anyone point me in the right direction? Is my receiver compatible with these remotes, and how can I obtain the codes?

Thanks!

Mitch

Hi,

You have tu use this lib for Chacon/Dio/NewKaku :

I’ve tried with Arduino and some DIO devices, it works great. Don’t forget to add a 17.3cm antenna to your receiver to get the remote code. Without it’s was quite impossible for me.

I don’t really know if this is what you are looking for but following these instructions it is possible to build a gateway 433 MHz <==> MQTT (and then HASS) using an ESP8266 and a 433 MHz receiver. I setup a sensor that showed the MQTT payload (i.e. the code sent by the 433 MHz device) in the frontend.

I had the same issue with a wall button switch. It seems to be using the new style “learning” protocol as well. So far the only thing that picked it up was the NewRemoteSwitch library that @Minims posted.

I’m thinking of hooking up the 433 receiver to my rpi hosting HA though and I haven’t found a library to do it there yet. At the very least I could at least port the Arduino one if I don’t find anything.

I believe some equipment uses ‘non standard’ codes which you may struggle to read. I had this issue with a Chinese switch and ended up sending it back

Hi,

thanks for the tips. So I guess I can use this library with a separate Arduino to get the codes, and then use the 433 tx and rx on my Rpi in combination with https://home-assistant.io/components/switch.rpi_rf/ to control the receivers. Or do I need the arduino to control the receivers as well via HA.
Does anyone know if that component works with dimmers as well?

I see that pilight has support for newer Kaku devices (https://wiki.pilight.org/doku.php/devices). Any one has experience with that?

Thanks

I want to use switch.rpi_rf too since that seems like the most straightforward way to do it. I wasn’t able to get the codes with rpi-rf, but I haven’t tried if it works with codes from NewRemoteSwitch. I doubt it does though since it looks like a different protocol altogether.

I think the cleanest option would be adding a new protocol to rpi_rf and then just using that directly in switch.rpi_rf once it gets merged, however the lead time might be a bit high.

In the past I used this on RPi to get flamingo (NewKaku Protocol) remote code :

it may help if you don’t have an Arduino

@Minims that looks like a cool lib, but I’m not sure if it would work for me as I seem to be having some amount of noise in my receiver.

It seems like I have a floating input, however setting up pins with internal pullups / pulldowns doesn’t seem to make it that much better. That’s more or less where my electronics knowledge about it ends.

I did make some progress on the software end though, I wrote a C++ app with the excellent wiringPi library to record some of the transmission coming out of my RF receiver. After figuring out that testing it live would be a big PITA I started working on a recording in Octave.

In short, I think I got it figured out in a way that will work with noisy RF input robustly, I just have to rewrite it in C++ and add sane default / configurable thresholds for some confidence values, make it a usable CLI app and connect it to MQTT or something.

In the screenshot above there’s a recording I made of quickly pressing a button once (top plot), it seems like my button repeats the state several times before shutting off (probably for reliability). There’s also a stray packet read from the noise in the beginning (far left on bottom plot), however I’m confident it can be filtered out due to the large collective error rate in the timings it contains.

I have succesfully found the codes of “my” 433 Mhz outlets and been using them for a while now without issue.
I’ve made a “how to” for others (or mainly for me because i’ll forget this :slight_smile: )
Might be helpfull for you if still needed!

@MrBramme nice! More guides always helps :slight_smile:

I just released my tool for this if it helps anyone: Rfmqtt - RF 433MHz to MQTT bridge for Raspberry Pi