Decoding 433Mhz buttons

I purchased a few of these buttons (https://www.aliexpress.us/item/3256804423796239.html) and I have an SRX882S receiver. Trying to use ESPHome and running in to issues with what to say is a message from each button. I created an esphome image with dump: rc_switch. When I push Button A, it seems to vary a bit from one push to the next (maybe with how long I push the button?)

[20:51:27][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='100100100100110011110001'
[20:51:27][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='100100100100110011110001'
[20:51:27][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100100100100'

or

[20:52:21][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100100100100110011110001'
[20:52:21][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100100100100110011'

Then if I push button B, I get:

[20:53:00][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='010000111000000111000001'
[20:53:00][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='010000111000000'

or

[20:53:30][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01000011100000011'
[20:53:30][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=4 data='01000011'
[20:53:30][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01000011'
[20:53:30][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='010000111000000'
[20:53:30][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01000011'

How do I determine what to put in the receiver code in order to trigger on a button push?

The aliexpress listing you linked states they are EV1527, so the expected signal would be 24 binary bits.

What config have you got so far?

Esphome dashboard is awful on the phone, so could only get a screenshot.

So far, just using the dump to show in the logs what I had in the original message. My issue is pressing the same button twice seems to give slightly different responses.

So is there a way to set esphome to capture that consistently? It seems like the log shows something different depending how long you push the button. And not a whole lot different in time, less than a second difference

I know what you mean;)

Try having a play with these last three settings…

Tolerance, filter, idle…

If you are really struggling , you could load openmqttgateway on the the esp8266 or esp32 and it will take care of all the decoding and can be used to discover all the buttons on to HA.

hello you are trying to catch a protocol 1 signal
{ 350, { 1, 31 }, { 1, 3 }, { 3, 1 }, false }, // protocol 1
that gives a sync signal of 350*31= 10850us ->> 10ms

remote_receiver:
  pin: 3
  dump: rc_switch
  tolerance: 75%
  filter: 100us
  idle: 8ms   
[08:25:57][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='010
001100101101101111000'
[08:25:57][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='010
001100101101101111000'
[08:25:57][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='010
001100101101101111000'

it will still catch a lot of noise signals but you should be able to pick out the right ones.