Send RF signal when reed switch opens

I think the problem is that it only triggers when the reed switch goes from closed to open. Your reed is already open when the device wakes as you use it to wake the device. Did the suggestion from @ Mahko_Mahko to send the signal on boot not work? Have you been able to send the signal at any stage when the device has be awake i.e. when deep sleep disabled?

Yea I actually have,

It seems a bit hit and miss, but it has sent the signal occasionally, however, it takes a while (like 30 seconds). This will be no good for me as the letterbox will have been opened and already closed by then.

I will try the on_boot.

Also, do you know how I can disable WiFi on esphome, I don’t need wifi on the transmitter and I think it is delaying the bootup. Also, it will not find a wifi network when booting so its useless, I can save power and maybe cut down the boot time.

Thanks

Ok, the on_boot function actually works pretty well,

I also added a delay to enter deep sleep of 10s to allow the signal to be sent, this seems to work well.

Is it also possible now to send a restore when closed before entering deep_sleep?

Something like,

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO27
      mode:
        input: True
        pullup: True
      inverted: False
      allow_other_uses: True 
    name: mail
    filters:
      - delayed_on: 25ms
      - delayed_off: 500ms
    on_release:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
          repeat: 
            times: 10
            wait_time: 10ms
      - lambda: get_cc1101(transciver).endTransmission();
      then:
      # switch relais? 
      # led blink with repeat action etc?
      # delay to complete
      - delay: 10s
      - deep_sleep.enter: mail

But this doesnt seem to work. Doesnt like it

If you can’t connect by wifi perhaps an ESP device is excess to requirement.


This is what I use. I removed the reed switch and put in in mailbox. The 433mhz door sensor is put in a waterproof box on the side of the mailbox facing the receiver in the house. Main problem was just keeping the sensor waterproof. It reports when mail flap opened and then closed. It reports quicker than an ESP could boot up and lasts more than a year on a AAA cell.

1 Like

I could do,

I don’t have any current RF in my environment, So I need to put in a receiver too. Obviously I am using the CC1101 which is a transceiver. Can this be used to receive the RF signals from a device such as your picture above?

Thanks

Most likely.

You can build something like this if you like.

Ok thanks, Ive got some 433mhz remotes that I have soldered a reed switch on the push button, how can I read these codes and know what codes to put in my receiver?

Thanks

OMGateway

Yes, the cc1101 works well in the OpenMqttGateway. The OMG is then discovered by HA. It will publish mqtt messages to HA for your 433 devices. You will need to set up mqtt on HA.

Maybe I’m missing something here about your cc1101 set-up but can’t you just see what shows up in the esp remote_reciever logs when you activate the transmitters?

Yea maybe, I just wasn’t sure if the RAW codes were like encoded or something?

So what you see is what’s sent?

Can you explain more on the cc1101 and OMG, I haven’t seen this and this might be a better way to do things.

Yes. If you dump all: then decoded codecs like rc_switch will show up in the logs.

Raw is handy for arbitrary protocols.

My experience is that most cheap rf devices are pretty straight forward to capture codes.

1 Like

OK thanks.

For some reason, I am unable to flash openmqttgateway using the web flasher.

Is there a bug? It does not work. The serial popup does not show up at all.

Does not work on Firefox (webserial is not implemented). It should work on Chrome and Edge.

Not working on Chrome,

Nothing pops up asking me to choose the com

Hi can you please provide more information on what device you are using here or a link?

Thank you


I have used all 4 of these at one point or another.

The RTL SDR connects to the usb of my HA device. It runs on the RTL-433 addon. It has the most protacols so it will even pickup my oil tank watchman. As it connects so close to the HA it limits where you can put it on your property. Most expensive at around £25
The sonoff RF bridge is flashed with Tasmota and is placed the closest to my mail box. Required a little surgery to cut some lines but well described and easy to follow. About £12

I’ve had 3 devices to try with OpenMQTTGateway. 1st was a simple nodemcu with stx882 receiver. I desoldered the curly antenna that came with it and soldered on a sma connector center wire to the antenna hole and the outer braid to the ground of the stx882 board. I then made my own ground plane antenna to connect to the sma. Cheapest around £8
The 2nd was a cc1101 to a esp32, again with my home made ground plane antenna.£10
3rd was the Heltec V3 with OMG and own antenna around £20. This picks up the most signals as being sensitive and can be placed away form the HA device.


All of them pick up my modified 433 door sensor which I attach to my mailbox. I have 3 running at present and all 3 are used as triggers with their different MQTT publish topics in case any are blocked. MQTT explorer is a must to set this all up if you haven’t used MQTT before.
Mostly this project was about learning about making 433Mhz antennas.

I am interested in what this device is.

image

Thanks