Alternative 433 control rc sw , new remote switch dimmer support, optional rfm69(updated 2025)

Warning messy code ahead!! I made this for myself and I added it here in case someone else has any use of it

I never had any luck getting the original 433 control code in esphome to work the way I wanted it too so I made this This are running rc switch and NewRemoteSwitch at the same time You can either use separate transmit and receive modules or a rfm69

If u use separate modules remove this line “#define use_rfm69” in 433_switch_main.h

And set rx pin in 433_switch_main.h “#define _rx_pin 3”

And tx pin in 433_switch_tx.h “#define _tx_pin 1 ”

If you want to use rfm69 just leave this line as it is” #define use_rfm69 ” in 433_switch_main.h and just set the pins you like for the rfm69 (_rx_pin, CSNq, SCKq, MOSIq), the current pins are setup to work with a esp01

If you are getting ota upload problems or random reboots try reducing the sensitivity in rfm69_control.h “{ REG_RSSITHRESH, 240},”

-always read and follow the laws regulating 433 radios where you live-

If neccecary change the nSeparationLimit to receive the right rc switch code, 2000-12000 something Find this line in 433_switch_main.h “const uint16_t nSeparationLimit = 4300; And maybe change this in the same file “int16_t nReceiveTolerance = 80;”

I have changed NewRemoteSwitch to ignore the sync pulse and just read enough valid signals in a row, this helped me with a few wall switches that I had problems picking up signals from

This code also support NewRemoteSwitch dimmer, the light platform only support transmit
but I have added a fake dimmer with cover platform that support transmit and receive

After this just set a wifi network in the .yaml file and change the names/codes for the switches just follow the same structure to add or remove switches

I know it looks messy but its working and I hardly ever miss a signal

[18:41:24][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 5804828 lenght 24 protocol 4'
[18:41:24][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 5804828 lenght 24 protocol 4'
[18:41:24][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 5923506 lenght 24 protocol 4'
[18:41:24][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 5923506 lenght 24 protocol 4'
[18:41:29][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 47542949unit 0switchType 1'
[18:41:29][D][text_sensor:015]: 'last sent/recieved ': Sending state 'recieved a
ddress 47542949unit 0switchType 1'
[18:41:29][D][light:264]: 'bedroom roof light' Setting:
[18:41:30][D][text_sensor:015]: 'last sent/recieved ': Sending state 'send addre
ss 48556258unit 1switchType 2 dimmer 15'
[18:41:30][D][switch:021]: 'livingroom roof light' Turning ON.
[18:41:30][D][switch:025]: 'nightplayer' Turning OFF.
[18:41:30][D][switch:021]: 'flower' Turning ON.
[18:41:30][D][text_sensor:015]: 'last sent/recieved ': Sending state 'send addre
ss 48556258unit 0switchType 1'
[18:41:31][D][text_sensor:015]: 'last sent/recieved ': Sending state 'send addre
ss 56327166unit 0switchType 0'
[18:41:32][D][text_sensor:015]: 'last sent/recieved ': Sending state 'send addre
ss 56384447unit 0switchType 1'
1 Like

What weren’t you able to get working with the Esphome integration the way you wanted it to? After reading that the “newer” library was more for receiver styles with a “push to learn” button, it made me scratch my head because I have some push to learn receivers that use a 1527 learning decoding modules like these…

I have no problem scooping 433mhz codes out of the air for most “generic” 433mhz controllers, key fobs, buttons, etc but, last time i tried to copy the codes for some of my ceiling fan/light devices i have around the house and I couldn’t for the life of me read those 433mhz codes and because i couldn’t, i never installed the RF smart conversion kits to upgrade these 3 ceiling fan/lights kits even though they use the same 1527 decoding/learning button on the receivers too.

What exactly are you setting up st your house? Was it in wall smart switches? Or did I misunderstand.

Did you have to wire everything up and first pair receiver/transmitter before capturing the codes you needed? Im wondering if it was needed for me, i just tried getting the remotes button codes first and never could.

The main part was that i could never get nexa and rc switch protocol 4 to receive at the same time, and i wanted the switches to update automatically when they received the same code. and a easy way to transmit without having to update esphome.
And with a rfm69 added to that my 433 automations hardly ever fail.

I use this mostly for self learning outlets/lights and some stuff i build myself, for nexa i can just make up some code and learn the outlet that code if i don’t have a remote i want to use for it, for rc-swith you need to learn it with a remote and then copy the matching on and off codes.
i think that is what you need to do with the ev1527
This might also help with capturing the pulses.
https://github.com/flax2000/esphome-find_raw_repeating-433

What do you mean having to update esphome just to transmit?

Ya, im aware. I already use several different RF and IR remotes and devices for integrating name brand devices and making my own DIY projects that use RF/IR. Its just those damn smart fan RF kits i boight from Amazon, i cant get the 433mhz codes from any remotes or if i do, they are inconsistent for example I press On/Off and the code i detect is always something different unlike other RF devices where they are repeated over and over.

instead of adding a new switch to my yaml file and uploading a new program to my esp module i can just use

action: esphome.433_switch_control_rc_tx_manual
data:
  adress: "77454545"
  protocol: 4
  lenght: 24

either in a automation or in Node-Red

or as a button directly

entity: zone.home
name: filament dryer off
show_icon: true
show_name: true
tap_action:
  action: call-service
  service: esphome.433_switch_control_rc_tx_manual
  service_data:
    adress: "13337488"
    protocol: 4
    lenght: 24
  target: {}
type: entity-button

getting different codes might be the wrong nSeparationLimit/idle timing
or like some of my my rc-switch remotes they send out 4 different codes for on or off, for a start i would look at the raw timings of the pulses.