How to send commands received from remote RF 433

Hi.I got working gateway on NodeMCU with CC1101. I was able to read signal from my remote pressing just one button for on and off.

Consecutive presses generate different mqtt messages as follows:

  1. {“value”:492057702,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“-”,“binary”:“00011101010101000011010001100110”,“raw”:“7703,261,722,260,749,241,762,739,263,749,237,753,261,235,750,765,251,262,741,735,246,252,760,754,245,250,761,727,247,271,739,248,760,249,762,246,733,770,225,765,247,270,738,749,247,243,761,248,760,248,761,746,249,741,247,244,786,226,764,748,249,741,247,245”,“frequency”:433.92}
  2. {“value”:492057719,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“0F1FFFF001F0F1F1”,“binary”:“00011101010101000011010001110111”,“raw”:“7683,258,750,247,768,244,747,743,259,749,259,722,260,252,740,766,260,225,771,740,243,242,754,744,275,242,758,747,248,242,760,247,758,248,759,246,732,745,251,764,248,245,760,749,247,244,761,247,760,249,761,747,248,742,248,742,268,251,741,752,248,746,246,772”,“frequency”:433.92}
  3. {“value”:492057600,“protocol”:1,“length”:32,“delay”:247,“tre_state”:“0F1FFFF001F00000”,“binary”:“00011101010101000011010000000000”,“raw”:“7674,259,721,260,749,234,774,734,253,734,275,736,248,258,741,756,246,251,765,727,247,245,763,750,247,247,759,750,248,244,761,248,758,249,760,246,733,745,251,763,268,249,737,749,248,248,757,248,759,250,761,246,758,222,756,247,778,248,759,222,758,246,754,246”,“frequency”:433.92}
  4. {“value”:492057617,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“0F1FFFF001F00F0F”,“binary”:“00011101010101000011010000010001”,“raw”:“7690,244,763,231,776,233,749,729,282,733,254,735,275,236,740,758,246,253,761,729,271,247,736,751,271,248,736,750,247,245,761,249,759,248,761,247,733,745,252,764,248,245,763,749,248,243,759,248,758,250,762,247,757,221,756,745,275,244,761,247,759,222,757,745”,“frequency”:433.92}
  5. {“value”:492057634,“protocol”:1,“length”:32,“delay”:247,“tre_state”:“-”,“binary”:“00011101010101000011010000100010”,“raw”:“7677,287,723,261,747,242,761,739,263,750,237,753,259,237,751,761,250,237,742,760,245,252,761,729,270,249,740,752,246,245,763,248,760,249,760,247,732,745,259,751,259,251,752,743,259,251,748,246,750,270,732,246,753,744,244,265,759,250,762,248,734,770,224,265”,“frequency”:433.92}
  6. {“value”:492057651,“protocol”:1,“length”:32,“delay”:247,“tre_state”:“0F1FFFF001F00101”,“binary”:“00011101010101000011010000110011”,“raw”:“7678,251,750,259,722,260,749,756,258,740,252,736,249,260,740,757,245,252,761,728,268,248,736,751,272,247,737,750,247,245,762,248,761,248,761,246,732,771,224,765,248,270,739,748,248,243,761,248,759,249,760,247,732,771,224,765,272,247,737,250,761,747,248,742”,“frequency”:433.92}
  7. {“value”:492057668,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“0F1FFFF001F0F0F0”,“binary”:“00011101010101000011010001000100”,“raw”:“7677,260,761,244,740,245,769,742,259,749,233,748,260,252,739,741,259,252,744,766,259,227,742,767,259,251,747,744,258,227,770,245,749,247,754,246,754,745,257,751,259,251,751,742,244,265,732,246,781,248,758,745,244,243,760,247,759,249,762,748,248,242,760,247”,“frequency”:433.92}
  8. {“value”:492057685,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“0F1FFFF001F0FFFF”,“binary”:“00011101010101000011010001010101”,“raw”:“7674,258,750,243,763,244,740,741,260,749,260,748,262,234,749,741,262,260,749,725,261,261,750,739,258,262,724,758,253,237,767,232,767,255,736,250,760,750,247,743,271,249,735,752,248,244,762,248,759,250,761,747,249,242,761,746,248,271,738,749,248,243,762,747”,“frequency”:433.92}

and then it goes back to the first one but the raw value is changing:

  1. {“value”:492057702,“protocol”:1,“length”:32,“delay”:248,“tre_state”:“-”,“binary”:“00011101010101000011010001100110”,“raw”:“7703,259,722,261,748,260,749,733,254,760,252,736,248,260,741,756,246,251,765,727,248,270,737,750,248,275,735,749,248,243,761,247,758,249,760,247,732,745,251,765,248,245,762,749,247,244,761,248,757,249,760,747,249,741,247,244,787,226,763,750,247,744,247,245”,“frequency”:433.92}

So the question is: what message should be send in this case to emulate key press?

Welcome @bartek

It looks like the value is alternating and cycling through 492057600 to 492057719 in steps of 17.

So what happens when you send the next required value on its own?

It turned out, it only needs to be different from the previous one. So first:

{“value”:492057651,“protocol”:1,“length”:32,“delay”:248}

then any of the others.