ESPHome and 433mhz superheterodyne RF receiver

Iā€™ve been testing 433 MHz in the workshop for a long time. I am using a receiver marked in the photo, see. with my code the noise is minimalā€¦ I STRONGLY RECOMMEND USING ESP32! esp8266 and others have to make noise.

remote_receiver:
  - id: rc_receiver
    pin:
      number: GPIO22
      inverted: True
    dump: rc_switch
    tolerance: 60%
    filter: 250us
    idle: 4ms
    buffer_size: 2kb


I have not had a chance to try this yet as this particular project took the back burner, but this looks like a good solution!

Hey everyone Iā€™m having issues using the transmitter. I got the following from Amazon. The receivers work just fine and Iā€™m able to read my remote signal data but after lot of trial I canā€™t get the transmitter to work. Any advice will be truly appreciated.

HiLetgo 5 Sets 433M Transmitter +ā€¦ Amazon.com

Here is a path to flash the Portisch chip to receive raw data.

How did you do your project? I am trying to do the same but I am totally lost. I am not getting any data from the receiver. Could you help me? Sorry for the inconvenience

Your post will probably only be inconvenient for you as nobody will be able to help you based on the vague and little information you provide. :man_shrugging:

As a hint take a little time and read this here from top to bottom :point_down:

Then open a new thread with a meaningful title and provide detail information on what you did, how you did it and donā€™t forget to provide your yaml, logs and schematics :page_facing_up:

Good luck :crossed_fingers: and welcome to the forum :wave:

Hi !
I want to get and decode some rf signals and send them later via Homeassistant just like described in post #1.
Unfortunately I also have the same problem like you described.
Also ordered superheterodyne receiver / transmitter and Iā€˜m using D1 Mini.

Link

Like you I already tried different filter, idle, tolerance values and pins.
Currently I receive some signals with this code so at least the receiver could be okay.
On the other hand I receive a lot of data if for example ā€žrawā€œ is commented in without doing anything so Iā€˜m not sure if the receiver is working correct.
Unfortunately the receiver does not receive anything if I press any button on my remotes and I tried several ones.

remote_receiver:
  pin: 
    number: D2
    mode: INPUT
    inverted: True
  dump:
    - aeha #Decode and dump AEHA infrared codes.
    #- canalsat #Decode and dump CanalSat infrared codes.
    #- canalsatld #Decode and dump CanalSatLD infrared codes.
    - coolix #Decode and dump Coolix infrared codes.
    - dish #Decode and dump Dish infrared codes.
    - drayton #Decode and dump Drayton Digistat RF codes.
    - jvc #Decode and dump JVC infrared codes.
    - lg #Decode and dump LG infrared codes.
    - magiquest #Decode and dump MagiQuest wand infrared codes.
    - midea #Decode and dump Midea infrared codes.
    - nec #Decode and dump NEC infrared codes.
    - nexa #Decode and dump Nexa (RF) codes.
    - panasonic #Decode and dump Panasonic infrared codes.
    - pioneer #Decode and dump Pioneer infrared codes.
    #- pronto #Print remote code in Pronto form. Useful for using arbitrary protocols.
    #- raw #Print all remote codes in their raw form. Also useful for using arbitrary protocols.
    - rc5 #Decode and dump RC5 IR codes.
    - rc6 #Decode and dump RC6 IR codes.
    - rc_switch #Decode and dump RCSwitch RF codes.
    - samsung #Decode and dump Samsung infrared codes.
    - samsung36 #Decode and dump Samsung36 infrared codes.
    - sony #Decode and dump Sony infrared codes.
    - toshiba_ac #Decode and dump Toshiba AC infrared codes.
  tolerance: 50
  filter: 1us
  idle: 1ms
  buffer_size: 2kb

Did you get your rf receiver working ?
Or did you tried the referenced esp home code from @swedude ?

Okay got it working with an 433 Mhz garage door opener with following settings.

remote_receiver:
  pin: 
    number: D2
    mode: INPUT
    inverted: True
  dump: #all
    - aeha #Decode and dump AEHA infrared codes.
    #- canalsat #Decode and dump CanalSat infrared codes.
    #- canalsatld #Decode and dump CanalSatLD infrared codes.
    - coolix #Decode and dump Coolix infrared codes.
    - dish #Decode and dump Dish infrared codes.
    - drayton #Decode and dump Drayton Digistat RF codes.
    - jvc #Decode and dump JVC infrared codes.
    - lg #Decode and dump LG infrared codes.
    - magiquest #Decode and dump MagiQuest wand infrared codes.
    - midea #Decode and dump Midea infrared codes.
    - nec #Decode and dump NEC infrared codes.
    - nexa #Decode and dump Nexa (RF) codes.
    - panasonic #Decode and dump Panasonic infrared codes.
    - pioneer #Decode and dump Pioneer infrared codes.
    #- pronto #Print remote code in Pronto form. Useful for using arbitrary protocols.
    #- raw #Print all remote codes in their raw form. Also useful for using arbitrary protocols.
    - rc5 #Decode and dump RC5 IR codes.
    - rc6 #Decode and dump RC6 IR codes.
    - rc_switch #Decode and dump RCSwitch RF codes.
    - samsung #Decode and dump Samsung infrared codes.
    - samsung36 #Decode and dump Samsung36 infrared codes.
    - sony #Decode and dump Sony infrared codes.
    - toshiba_ac #Decode and dump Toshiba AC infrared codes.
  tolerance: 25 #20230830 Garage door opener
  filter: 250us
  idle: 3ms
  buffer_size: 2kb

Now I get something like this in the log window:

[21:42:44][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0010101110111100110000111011111001000110000111101101111111111011'

So my impression is that my other remote controllers are not using 433Mhz, rathermore they all use IRā€¦
But is there any option to capture IR signals, decode them and transmit them later all together with ESP Home ?
Also I have another remote control using 40.685 MHz (Hƶrmann), would there also be an option ?
Which hardware would I need for IR and 40 MHz ?

I only found a project which could support IR (and other protocols like BLE):

https://github.com/1technophile/OpenMQTTGateway

https://docs.openmqttgateway.com/

Edit: For anybody who is looking for an IR solution with ESP Home I found this guide:

If this is a modern BiSecur system I see no chance to remote control it with anything else but the original Hƶrmann remotes. They use a bidirectional encrypted communication that you cannot simply intercept and imitate from ESPhome. If you could, then anybody on the street could too and could open your garage door with minimal effort.
But the Hƶrmann garage door drives have a physical input that is meant to attach an external switch. Here you can add an ESP with a relay or an opto-coupler and control the door with ESPhome.

1 Like

Great idea ! Because wifi signal isnā€˜t strong if Garage door is closed idea would be to send a signal via my rf bridge over 433MHz and receive it with another esp inside the garage.
There a switch would be attached connected to the garage door opener.

For my Hƶrmann ā€žSupraMaticEā€œ it is described in manual.


Question: would the esp inside the garage need wifi or would 433MHz receiver be enough ?
Are there any recommendations for potential free relais for usage with esp ?

Be careful with any simple RF control for your garage door. Without a reliable rolling code encryption in that communication you will invite criminals to try and open your door. There are cheap Chinese gadgets on the market that iterate through all possible RF commands in a very short time. They are used while slowly driving through streets to see which garage doors will open. It really happens!

If you use Wifi on ESPhome instead a strong encryption is built in from the start. Better stay with that. It also gives you the possibility to update your ESP over there air.

Donā€™t use a relay. Use a 2x or 4x opto coupler. It is much cheaper and you donā€™t need a driver transistor. You can also use it to return the door closed state from your SupraMatic to your ESP.
Have a look at the diagram below where I did something similar with an older ProMatic and a KNX device. The only difference in your case would be that you will need resistors for all (!) your opto LEDs. The LEDs only need between 1 and 10 mA to fully open the photo transistor. So a resistor of about 360 Ohms would be ok. On the back path you need between 2.2k and 22k as shown in the diagram, i.e. 4k would be fine. Make sure you activate the internal pull-up for the corresponding ESP input off that back path GPIO.

Just a post to save anyone else some headaches. With the SRX882 I am using you need to pull the CS pin high. I eventually found that info here RF Transceiver - Tasmota This tutorial I was reading Insight Into How 433MHz RF Tx-Rx Modules Work & Interface with Arduino says that the CS and DATA pins are internally joined :frowning:

Never heard of that :joy: People really have to much timeā€¦ Donā€™t they just grab like amazon delivers directly from the front porch nowadays?

But we know that many of this ā€œkeylessā€ systems used in some Toyota, Jeep or other cars are easily relayed and allowing ā€œkeyless theftsā€ even 2023 :male_detective:

Probably a typo. 443MHz is right in the middle of a busy ham radio band. If anyone is using a wireless remote on 443MHz, you will soon meet your neighborhood ham radio operators looking for the illegal interference.

1 Like

Yes I get your point but as I mentioned my problem is that Wifi signal isnā€˜t reliable inside the garage.
So I thought using RF to bring my commands inside the garage would be a good ideaā€¦

Thatā€˜s an interesting pointā€¦ but unfortunately I donā€˜t get the point how I can find out the door closed position with the pins mentioned in the manual of my supramatic e1 ?!
https://www.ruschmetall.at/download/SupraMatic%20E-1.pdf
Pin 20/21 - external Impuls
Pin 14/15 - external Switch Door Open
Pin 14/17 - external Switch Door Close

In your diagram itā€˜s connected to + - in path D ?

Okay made some homework and measurements on the garage door opener.
My schematic would look like this:

In datasheet of optocoupler LTV-847 a typical Forward Voltage is given with Vf = 1.2V.
I calculated with desired led current of 5mA, so for the resistors my thoughts were these:
(3.3V-1.2V) / 0.005A = 420Ohm
ā†’ choosed 430Ohm based on E24 resistor row.

One connector pin of the garage door changes itā€™s state like this:
Door not open: 22.3V
Door completely open: 0.6V

With measured voltage at state garage door is OPEN the led calculation is like this:
(22.3V-1.2V) / 0.005A = 4220Ohm
ā†’ choosed 4,3kOhm based on E24 resistor row.

What would you think about the schematic and the resistor calculation ?

Here is my updated schematic, which is working for me !

I also made the yaml code ready:

esphome:
  name: esphome-web-9750b8
  friendly_name: GarageDoorOpener
  #on_boot:
  #  priority: -100
  #  then:
  #    - light.turn_on:
  #        id: onboard_led_pwm
  #        effect: "slow"
      
esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "Zq+TzloCQg+YcgnPaEWxTBUMpajQWV4dy254F9cfhZ4="

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-9750B8"
    password: "NCYi9k0FE2CH"

captive_portal:

#esp32_camera: #NOT WORKING IF ANYTHING ELSE IS IN YAML CODE
#  name: My ESP32-CAM 
#  external_clock:
#    pin: GPIO0
#    frequency: 20MHz
#  i2c_pins:
#    sda: GPIO26
#    scl: GPIO27
#  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
#  vsync_pin: GPIO25
#  href_pin: GPIO23
#  pixel_clock_pin: GPIO22
#  power_down_pin: GPIO32
#  #contrast: 0
#  #brightness: 0
#  #saturation: 0
#  resolution: 1600x1200

#esp32_camera_web_server:
#  - port: 8080
#    mode: stream
#  - port: 8081
#    mode: snapshot

sensor:
- platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
  name: WiFi Signal dB
  id: wifi_signal_db
  update_interval: 10s
  entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
  source_id: wifi_signal_db
  name: "WiFi Signal Percent"
  #on_value:
  #  then:
  #    - light.turn_on:
  #        id: onboard_led
  filters:
    - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  unit_of_measurement: "Signal %"
  entity_category: "diagnostic"    
- platform: uptime
  name: GarageDoorOpener Uptime

binary_sensor:
- platform: status
  name: "GarageDoorOpener Status"
- platform: gpio
  device_class: light
  pin: 
    number: GPIO13
    mode:
      input: true
      pulldown: true
  name: "LIGHT"
  on_press:
    output.turn_on:
      id: gpio_4
  on_release:
    output.turn_off:
      id: gpio_4
#- platform: gpio
#  pin:
#    number: GPIO14
#    inverted: true
#    mode:
#      input: true
#      pulldown: true
#  name: "OPEN"

button:
- platform: output
  name: "IMPULS"
  output: gpio_16
  duration: 1000ms
  # Optional variables:
  icon: "mdi:garage"
  on_press:
#  - logger.log: "Impuls Button pressed"
#  - light.turn_on:
#      id: onboard_led_pwm
#      effect: flashfast
#  - delay: 500ms
#  - if:
#      condition:
#        light.is_on: onboard_led
#      then:
#        - light.turn_on:
#            #id: onboard_led
#            id: onboard_led_pwm
#            effect: "constant_on"
#      else:
#        - light.turn_on:
#            id: onboard_led_pwm
#            effect: "slow"
  - output.turn_on:
      id: gpio_33
#  - delay: 500ms
#  - output.turn_off:
#      id: gpio_33


light:
# GPIO_4 is the flashlight pin
- platform: binary
  output: gpio_4
  name: flashlight
# GPIO_33 is the onboard led
#- platform: binary
#  output: gpio_33
#  id: onboard_led
#  name: onboard_led
#  on_turn_on:
#    - light.turn_on:
#        #id: onboard_led
#        id: onboard_led_pwm
#        effect: "constant_on"
#  on_turn_off:
#    - light.turn_on:
#        id: onboard_led_pwm
#        effect: "slow"
## On-Board LED PWM
#- platform: monochromatic
#  id: onboard_led_pwm
#  output: gpio_33_pwm
#  effects:
#    - pulse:
#        name: flashfast
#        transition_length: 0.0s
#        update_interval: 0.04s
#    - pulse:
#        name: fast
#        transition_length: 0.5s
#        update_interval: 0.5s
#    - pulse:
#        name: "slow"
#        #transition_length: 1s # defaults to 1s
#        update_interval: 2s
#    - pulse:
#        name: "constant_on"
#        #transition_length: 0.5s
#        #update_interval: 0.5s
#        min_brightness: 100%
#        max_brightness: 100%

# Example configuration entry
status_led:
  pin: 
    number: GPIO33
    inverted: true

output:
# Flashlight
- platform: gpio
  pin: GPIO4
  id: gpio_4
- platform: gpio
  pin: GPIO16
  id: gpio_16
# onboard led
- platform: gpio
  id: gpio_33
  pin: 
    number: GPIO33
    inverted: true
#- platform: ledc
#  id: gpio_33_pwm
#  pin:
#    number: GPIO33
#    inverted: true

If somebody want to order a pcb I made oneā€¦:
PCB_PCB_GarageDoorOpener_2023-11-03

Unfortunately I canā€™t upload the gerber files because zip files are not allowed.
Anyhow here is the project:

This also is the true for stl files of my printed housing I designed, so here is the project:

The wifi signal is not strong but still working, we will see how reliable it is:

Edit:
Just like I expected wifi signal isnā€˜t reliable enough so it happens that the door opener isnā€˜t available.
This especially happens if the (metal) door is closed, so it canā€˜t be opened again.
I already used an external antenna for the esp.
Also I tried a repeater but also the repeater doesnā€™t receive a signal which is strong enoughā€¦

At the beginning my idea was to use a 433MHz transmitter / receiver but this seems not a good idea.

What else can I do to get the garage door opener working reliable ?

Whatā€™s the recommended rf receiver?
Iā€™m trying to setup the same one and I canā€™t get it to work yet

You literally just quoted the answer in your post :point_down:

Itā€™s also written in the title of the thread :writing_hand:

Very unfortunate, sadly Iā€™m out of cristal balls :crystal_ball: atm so you might want to try this thread instead :wink: