Github Boards Devices Community Docs Blog

Same Button, different Values

Hi I set up a NodeMCU with a SRX882 on pin D7 and compiled the RF-Firmware
I have a remote with multiple on/off buttons and noticed that the values are all over the place.
Sometimes buttons produce the same value. Sometimes one button produces different values or multiple values.
This is the MQTT history after only pressing 1 button multiple times.

{"value":263519,"protocol":1,"length":24,"delay":329}
{"value":263508,"protocol":1,"length":24,"delay":329}
{"value":263519,"protocol":1,"length":24,"delay":329}
{"value":263508,"protocol":24,"length":24,"delay":692}
{"value":267615,"protocol":1,"length":24,"delay":329}
{"value":263508,"protocol":5,"length":24,"delay":540}
{"value":267615,"protocol":1,"length":24,"delay":329}
{"value":263519,"protocol":1,"length":24,"delay":329}
{"value":263508,"protocol":1,"length":24,"delay":329}
{"value":267615,"protocol":1,"length":24,"delay":329}
{"value":263519,"protocol":1,"length":24,"delay":329}
{"value":263508,"protocol":1,"length":24,"delay":329}

What could I have set up wrong or what could be wrong with the remote?

Hi,

is it possible that your

is a remote for switchable electric plugs, like these?

I had a similar experience, when catching the codes for my plugs. Not sure if the duration of pressing the buttons makes any difference, or if it’s something else. But it the end I found that the different codes appeared with each press of a button, so I only took the one which actually switched the plug, and ignored the others.

Is it the same for you, that with each press you get two/multiple values? Or does each press produce a single different value?

Yes it might be exactly the same from the look.
I want to use the remote to trigger things in HomeAssistant rather than using HomeAssistant to switch the plug. I’m still checking if there is some sort of regularity with the codes and buttons.

Hopefully you’ll find as well, that one code will always be the same for each button, this being the ‘true’ code, which you can then use for HA.

If you still have the plugs though, and also have an STX882 connected it might be quicker to find the ‘true’ codes by seeing which codes will switch them, even if you only want to use them for HA controlling.

All the best.

P.S.: If your remotes are the same, it might help that I found that the ON and OFF codes are always a value of 3 apart, e.g. if

ON is 263519

then

OFF will be 263522

and so on.

Thanks. That’s some good info. I’ll have a look at that tonight