ESPhome 433mhz deep sleep transmitter

Ok, i’ve enabled

logger:
  level: VERY_VERBOSE
  tx_buffer_size: 896
  logs:
    remote_receiver.esp8266: VERY_VERBOSE

And I can see my receiver is receiving what appears to be signals and some RAW data. This I guess, I can confirm that at least my receiver is working fine.

I just cant get my transmitter to transmit using

remote_transmitter:
  pin: GPIO4
  carrier_duty_percent: 100%

binary_sensor:
  - platform: gpio
    pin: GPIO26
    name: mail_sensor
    on_press:
      then:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '100010000000000010111110'
          protocol: 2

Ok heres an update.

I’ve got it transmitting now, however its kind of quite uncontrolled.

It sends multiple signals, like 50 state changes from one physical state change.
And only half of those make it to the receiver.

Is there a way to filter this down?

Thanks

Progress is good!

[22:24:56][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:24:56][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:24:56][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:33][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:34][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:35][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:36][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:37][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:38][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:38][D][binary_sensor:036]: 'mail_sensor': Sending state OFF
[22:26:40][D][binary_sensor:036]: 'mail_sensor': Sending state ON
[22:26:40][D][binary_sensor:036]: 'mail_sensor': Sending state OFF

Ok fixed that with

mode: INPUT_PULLUP

Next question, this only sends a signal on “ON” state change and does not report “OFF”

    on_press:
      then:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '100010000000000010111110'
          protocol: 2
          repeat:
            times: 10
            wait_time: 0s

Is there also a way to send the command for the off as well?

Thanks

Use on_release:. Or simply a timeout.