RF Custom App: Signal (from signal analyzer) sent but not received

Hello,

I try to create my first app to simulate one of my RF remote controller.
I followed some quick start auto to mange creating the driver and device correctly.
Then I used the RF signal analyzer tool (here) to create the signal file, while generated that predicted signal:

Signal: {
“sof”: [
5844
],
“eof”: [
554
],
“words”: [
[
550,
209
],
[
170,
586
],
[
171,
5858
]
],
“interval”: 10000,
“sensitivity”: 0.5,
“repetitions”: 20,
“minimalLength”: 83,
“maximalLength”: 83
}

Payload: 00001011001000110111110120000101100100011011111012000010110010001101111101200001011
Match: 100%

I translated it like this in my signal-rc-12.json file:

{
  "sof": [
    5844
  ],
  "eof": [
    554
  ],
  "words": [
    [
      550,
      209
    ],
    [
      170,
      586
    ],
    [
      171,
      5858
    ]
  ],
  "interval": 10000,
  "sensitivity": 0.5,
  "repetitions": 20,
  "minimalLength": 83,
  "maximalLength": 83,
  "cmds": {
    "up":   [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,1,0,1],
    "down": [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,1,1],
    "idle": [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,0,1,1,1]
  }
}

Note that I created myself this cmds property content… I did not find some info about how to do, but that was my guess (extracting the first set of the detected payload until the first ‘2’.

Note that the above example only allowed me to fill the “up” in cmds property. The “idle” and “down” values are coming from additional analysis when pushing some other buttons on my remote.

Then, in my device I send the command matching the requested button (I have a device with capability windowcoverings_state, which have values ‘up’, ‘down’, or ‘idle’):

class MyDevice extends Device {

  /**
   * onInit is called when the device is initialized.
   */
  async onInit() {
    this.log('MyDevice has been initialized');

    this.registerCapabilityListener("windowcoverings_state", async(value) => {
      this.log("Activated button: ", value)
      // create & register a signal using the id from your signal manifest
      const mySignal = this.homey.rf.getSignal433("signal-rc-120");

      // transmit the bits 01011001
      //await mySignal.tx([0, 1, 0, 1, 1, 0, 0, 1]);

      // transmit predefined command
      await mySignal.cmd(value, {"repetitions": 4});
    })
  }

...

… but it does not works (the homey seems to send the signal, since I don’t get an error, while if I request to send a command not existing it fail… but my RF device does not receive the command sent by the Homey)
I tried to analyze several times the signal: the values are slightly the same, but the payload is always exactly the same.
What did I do wrong ? Did I converted wrongly the payload ? Something else ?

Note that I know that simulating the RF signal for this remote should be possible, because my Broadlink RF device was able to learn it and simulate it (but I want to get rid of this device)

Thanks for your help.

In fact, I’m not sure about what I’m doing:

Thanks to the analyzer, I get an average signal composed of start, end and words. But also a payload.
When defining a signal in homey app, I must provide a start, end, and set of words.
When sending this signal in homey app, I have to add the payload (a serie of bits), or the name of a command (pointing to a payload, so it’s the same thing).

But in documentation I read that a signal is only composed of start, words, and end. And that words are the data of the signal. So what is the payload about ? It will replace the words ? It will be added somewhere in between ?
The question is valid for what are these info from Signal Analyzer, and for the homey API about how it use these word/payload info.

Thanks !

There are some topics, for example Creating an app for a recorded 433Mhz signal - #3 by HarriedeGroot

This other topic is not going so much in details (focusing on running the signal recording, which I manage to do, not on how to use it afterward)… and finish on “I bought a Broadlink”… :roll_eyes:

1 Like

Thanks. I saw this one also, but it does not help explaining how to create the signal. Additionally, this one strongly added noise to my learning of RF signal API, because I finally understood that it is in reality not designed to give an example but to cover all possible cases of RF usages, making it much more complex than it should be for learning purposes, with non standard structure (not matching Athom documentation, because trying to do something adapting dynamically to all use-cases) and with 90% of code which will be not used by each app.
I want to cover only the simple case of sending a signal, without learning and receiving features that I won’t use.

Do you have a recording of the data of a long press? Can you share it? please use Preformatted text
image
I think there is something wrong in the de words you defined, 3 words is not very usual, maybe I can find something. ( PM is also possible )

I can imagine that all other 433 senders should be off to record the signal of one sender only.

Even when no one moves in my house, I am always recording a 433 signal without pushing any button. Very rarely, nothing is recorded. So motion and temperature senders will interfere with the recorded signal.

I did two long presses:

[[5859,553,203,552,204,560,194,558,206,169,586,556,197,182,580,175,575,562,202,548,214,174,582,547,204,561,203,549,205,175,582,174,580,557,204,173,591,172,579,181,578,170,588,169,588,556,204,172,580,181,5858,545,227,535,227,538,210,547,215,163,589,550,209,175,586,168,588,555,204,550,204,183,580,549,203,559,204,562,205,171,583,173,582,560,203,175,581,172,590,171,578,182,578,180,578,556,204,173,580,182,5862,562,206,545,221,544,212,554,202,177,581,558,203,171,582,176,586,554,204,560,203,173,581,560,203,548,215,552,205,170,587,171,589,549,212,172,579,182,578,180,578,180,578,181,577,555,204,173,590,172,5865,558,208,561,198,554,213,552,210,170,589,548,207,173,582,176,586,554,202,559,203,173,581,559,203,558,207,552,207,170,583,183,583,549,204,176,589,173,579,174,592,172,590,172,577,558,204,173,580,182,5865,562,212,550,212,549,201,556,216,166,583,559,207,173,578,174,584,564,204,549,203,186,580,558,202,558,205,556,198,181,581,173,579,560,207,168,589,180,577,180,580,179,579,180,578,556,204,173,591,173,5866,563,211,543,213,551,216,549,206,173,578,560,207,168,588,169,588,557,215,550,203,174,582,559,204,549,204,562,206,171,586,170,590,557,201,180,579,180,578,171,587,179,579,180,578,557,204,173,590,171,5869,561,214,540,216,551,214,548,201,174,583,562,202,173,591,173,579,557,204,560,203,173,582,560,203,561,194,563,206,176,582,175,582,558,203,172,590,174,581,173,580,181,579,181,578,555,202,184,580,173,5869,560,215,550,205,550,206,560,201,174,594,554,205,171,579,181,579,557,202,561,203,173,580,562,203,558,206,552,206,170,586,172,589,551,205,181,580,180,579,180,579,180,578,170,588,556,204,173,590,171,5874,552,218,548,214,539,216,549,204,173,590,552,206,170,588,181,579,557,204,558,204,174,581,559,203,552,204,560,206,170,592,173,579,561,197,177,588,169,588,180,579,169,588,180,577,557,204,173,590,172,5863,569,206,546,214,552,204,552,213,167,591,548,207,182,580,176,586,554,205,549,204,184,582,549,204,561,204,552,204,182,586,170,576,558,210,176,576,178,587,180,578,180,578,180,578,556,204,174,581,181,5866,561,217,548,202,551,216,546,214,163,591,549],[198,5857,563,204,551,206,555,205,550,206,174,588,559,196,174,583,177,587,555,204,559,203,175,583,548,204,560,204,560,204,171,583,176,582,561,203,173,583,174,580,181,579,171,588,170,588,557,204,172,580,182,5863,559,225,528,226,539,220,543,217,160,589,557,204,173,590,171,579,556,203,559,204,173,589,558,205,553,206,552,207,176,578,175,590,548,204,183,579,172,582,175,590,172,579,182,579,556,202,184,581,173,5863,562,225,539,206,550,217,549,200,174,594,554,204,173,580,181,579,555,214,551,203,173,582,558,204,559,205,555,204,176,581,172,589,550,206,180,579,180,579,181,578,179,579,169,588,557,204,173,591,172,5869,554,209,556,204,552,215,551,206,173,579,559,212,171,579,180,579,558,206,556,205,172,579,557,202,559,214,548,207,170,586,178,587,546,207,182,581,175,585,168,588,169,588,180,577,558,204,173,591,172,5869,556,218,546,214,540,216,550,206,173,589,549,206,181,579,180,579,556,204,560,203,175,579,560,203,560,205,552,206,176,583,175,583,560,203,175,580,173,581,181,579,181,578,181,578,555,212,173,582,173,5870,564,210,552,203,553,205,552,206,175,593,549,206,174,590,164,593,554,205,548,213,173,582,559,203,559,204,555,204,176,580,171,590,549,212,172,580,182,578,180,579,171,586,181,578,557,214,163,592,172,5872,556,212,552,211,551,200,554,213,166,592,548,214,172,581,176,587,555,205,550,203,184,580,558,203,551,205,561,206,170,583,172,592,551,205,172,589,175,583,172,591,171,580,180,578,557,203,183,580,172,5880,551,215,550,206,549,207,559,207,173,581,553,206,181,579,180,578,555,202,560,204,175,582,560,204,558,206,551,207,176,582,173,581,560,204,172,593,174,580,174,590,172,578,180,578,558,204,173,591,172,5874,553,209,554,212,553,204,551,215,163,589,559,207,164,594,167,587,557,204,549,214,173,581,560,203,558,205,552,206,170,592,171,579,560,206,175,586,168,587,170,587,180,578,180,579,557,203,173,591,172,5868,565,204,551,216,549,207,549,207,172,591,551,206,180,579,180,578,557,203,561,203,173,590,550,204,552,216,547,207,169,596,167,583,560,206,172,580,184,583,169,587,169,588,169,588,554,202,174,590,174,5877,558,205,549,217,547,212,544,215,172,578]]

Which resulted in a similar result:

Signal: {
  "sof": [
    5859
  ],
  "eof": [
    549
  ],
  "words": [
    [
      554,
      206
    ],
    [
      175,
      583
    ],
    [
      176,
      5866
    ]
  ],
  "interval": 10000,
  "sensitivity": 0.5,
  "repetitions": 20,
  "minimalLength": 255,
  "maximalLength": 255
}

Payload: 000010110010001101111101200001011001000110111110120000101100100011011111012000010110010001101111101200001011001000110111110120000101100100011011111012000010110010001101111101200001011001000110111110120000101100100011011111012000010110010001101111101200001
Match:   75%

I notice, the payload is longer than with short presses, but is always composed of series of ‘000010110010001101111101’, splited with ‘2’

What do you think I should do with that ? In particular about words and payload (I still don’t understand the role of the payload…)

Thanks for your help.

@Rmb : I have really few devices using RF-433 in my home. All my devices are using z-wave or Wifi. When I register a signal without pressing a button, nothing is registered.

I also made a try (several in fact) by moving my controller very near of the homey during record, pressing the button a lot of time, and I got a result slightly different, with two numbers into ‘sof’ and ‘eof’ (instead of only one before). I retried several times and got the same thing.
… but I’m unable to run such signal: if get the following error from build process:

:heavy_multiplication_x: Error: Invalid signal: 433.signal-rc-120
eof_out_of_bounds

Here is the registered signal for this try:

[[5850,551,203,551,204,551,215,552,205,171,583,551,204,175,580,173,590,547,202,558,204,172,590,548,204,557,206,547,208,177,582,173,582,549,204,184,579,173,580,182,578,169,588,169,588,555,204,172,579,180,5853,554,218,537,212,547,216,550,206,173,590,550,206,164,593,168,586,545,11,1,205,547,204,173,580,557,202,559,204,558,206,176,578,173,590,550,203,175,583,172,580,181,578,180,578,169,588,556,205,172,578,181,5850,549,224,540,226,539,213,550,206,173,581,552,206,170,588,170,588,557,204,549,202,184,581,549,204,559,203,549,215,170,584,175,582,550,203,175,580,182,579,180,578,180,577,170,588,555,205,172,581,180,5855,555,219,543,211,551,209,547,213,162,590,548,210,176,575,178,587,555,205,548,203,185,581,548,203,560,204,558,205,170,581,181,577,558,202,180,578,181,577,170,588,170,587,170,588,555,204,173,580,181],[194,5859,549,204,555,213,551,204,551,205,175,590,549,207,173,582,175,585,555,204,549,212,175,581,549,204,559,204,558,205,170,583,175,580,560,207,173,580,176,585,168,587,170,587,169,587,555,202,173,590,172,5867,545,227,537,223,540,213,547,206,173,589,552,208,168,587,169,587,555,202,559,204,172,589,549,204,559,206,556,210,167,582,170,589,559,196,173,594,167,587,169,588,169,588,170,588,555,204,173,580,183,5860,551,216,547,212,551,215,549,206,173,579,551,216,164,594,168,586,554,202,558,203,172,592,550,203,558,205,553,206,170,587,171,590,552,207,168,588,170,588,169,587,170,588,170,587,556,202,173,590,172,5869,543,229,538,217,537,224,541,215,163,599,539,212,169,587,170,588,557,204,549,213,173,580,559,204,558,205,232,65535],[195,5851,553,214,549,204,551,204,552,214,166,582,560,204,172,582,173,580,558,203,559,203,172,582,559,204,549,204,558,206,176,583,172,580,560,202,175,580,173,590,172,578,170,588,169,587,558,204,173,579,170,5862,549,223,539,226,538,216,548,206,173,581,552,206,171,588,168,588,558,204,549,213,174,581,549,214,551,204,549,215,171,582,174,580,559,204,172,583,174,579,181,578,181,578,170,588,555,205,173,580,181,5858,555,216,538,217,546,219,539,220,167,577,556,206,173,589,164,10,1,583,556,204,547,212,174,582,548,214,549,204,558,205,170,582,180,579,10,1,549,208,168,587,168,588,169,588,170,587,170,587,555,205,173,579,181,5855,552,228,539,223,542,214,539,214,172,589,551,207,168,587,169,588,556,204,549,214,175,580,550,203,559,204,557,206,170,593,163,587,559,207,175,583,168,587,169,588,169,587,170,587,557,204,173,590,172,65535],[202,5861,546,207,556,205,552,205,560,206,174,579,557,201,181,579,170,587,557,205,548,213,174,581,549,214,549,204,557,206,170,593,163,590,548,210,175,586,168,588,169,586,170,587,180,577,556,204,173,580,182,5865,553,218,537,224,539,216,549,207,173,590,550,207,168,587,169,588,558,205,547,214,164,590,558,204,557,205,545,209,179,583,171,587,555,202,170,588,172,583,177,586,168,587,169,587,555,204,173,590,172,5856,559,223,539,223,540,215,540,216,165,595,554,205,171,579,181,579,556,204,559,204,174,582,550,214,549,204,558,206,169,593,171,578,558,206,169,593,171,579,175,583,173,590,173,578,557,204,173,590,172,5867,553,219,542,212,551,214,539,216,174,578,558,202,170,598,161,588,558,204,549,214,164,592,548,214,549,204,558,205,170,592,173,578,558,208,167,588,169,588,169,587,170,588,170,588,556,204,173,580,181,5866,553,218,537,223,540,215,247,65535],[202,5846,550,219,543,217,547,205,547,214,172,581,560,203,173,581,173,590,548,204,548,214,173,581,548,214,549,204,558,206,170,583,175,588,547,207,173,582,175,587,169,587,169,588,168,587,556,204,173,580,181,5852,549,234,529,224,538,223,539,210,176,584,544,215,172,579,170,589,557,205,548,214,164,590,549,213,549,204,557,206,170,582,174,589,548,210,175,585,168,587,170,587,169,587,169,587,556,204,173,580,181,5855,553,227,538,223,540,214,540,216,173,579,560,206,164,595,167,586,555,204,549,214,173,580,559,203,548,215,544,213,166,590,171,590,549,207,169,588,170,587,169,588,169,588,170,588,556,204,173,591,172,5861,552,219,543,212,552,214,538,216,174,579,559,207,169,587,169,588,555,204,548,215,173,579,559,204,548,215,547,219,167,584,166,591,547,217,162,590,176,585,168,587,169,588,169,588,556,205,173,580,182,5860,551,228,533,221,541,224,540,216,163,590,548,210,175,586,168,587,556,204,549,214,173,580,550,214,550,204,557,207,169,593,171,65535],[196,5864,550,204,559,203,548,215,545,212,166,582,559,207,173,580,172,583,553,206,556,204,173,590,547,204,558,203,551,215,170,584,166,592,549,207,173,579,173,583,178,587,168,586,170,587,555,204,173,579,181,5856,555,216,539,216,547,212,551,215,164,587,548,207,173,593,165,587,556,204,548,203,174,592,548,204,559,203,559,204,171,581,181,578,559,198,177,586,168,588,169,588,169,588,170,587,555,205,172,580,181,5855,554,229,534,219,543,222,531,224,164,591,549,206,174,581,176,585,555,204,548,214,163,589,550,214,547,215,545,212,166,592,173,580,558,207,174,584,167,588,168,588,171,586,169,587,555,204,174,580,182,5860,554,217,545,219,543,211,553,203,175,589,548,207,172,582,177,586,555,204,549,213,173,581,550,214,549,214,546,207,169,593,171,582,558,206,170,587,169,583,172,588,174,580,174,592,547,214,173,582,172,5868,553,219,542,222,228,65535],[195,5856,553,203,557,206,555,203,551,205,174,588,547,212,167,587,169,588,556,204,548,203,184,581,548,204,559,204,558,205,169,582,180,578,558,201,171,588,169,588,169,588,169,588,169,588,556,204,172,579,181,5854,552,229,533,219,547,214,539,216,173,579,560,206,164,584,177,587,555,204,548,214,162,590,548,214,548,215,547,218,156,593,171,582,550,215,165,590,175,580,173,580,182,578,170,588,556,204,173,580,182,5858,554,219,543,211,547,214,547,213,173,582,552,206,170,587,169,588,556,204,558,203,173,590,549,203,557,206,555,204,176,580,172,589,550,206,181,577,171,588,170,588,169,588,169,588,557,204,172,581,181,5861,548,224,539,226,539,216,549,208,169,587,555,205,173,589,170,577,557,204,558,203,176,582,560,203,552,204,557,207,170,591,170,589,550,207,169,588,170,588,169,588,170,588,170,588,555,205,173,578,182,5864,552,220,543,223,541,214,550,204,171,591,550,207,170,587,169,587,557,205,549,214,172,579,558,203,193,65535],[199,5852,553,215,546,207,555,210,552,202,171,589,547,211,174,584,168,587,555,204,549,203,174,591,547,204,560,204,548,204,182,583,173,581,550,203,184,582,172,580,181,578,170,588,170,587,555,204,173,580,181,5854,549,224,539,225,539,216,549,206,174,580,551,207,180,578,170,588,556,204,548,214,173,581,558,204,548,215,547,207,170,591,171,589,549,207,168,588,170,588,169,588,169,587,169,588,557,204,173,579,182,5854,547,237,524,230,532,232,531,224,163,589,548,210,175,586,167,587,555,205,548,214,172,581,549,214,550,204,552,215,170,583,173,589,549,204,175,583,174,589,173,578,181,578,180,579,557,204,173,580,182,5859,552,227,538,223,541,213,541,216,173,579,559,206,175,584,168,587,555,205,547,214,173,590,551,203,550,215,547,206,171,590,171,579,559,207,170,588,170,588,169,587,171,587,180,578,555,201,175,591,173,5858,559,224,540,215,539,216,548,217,164,593,545,206,181,578,170,589,557,205,547,214,173,580,559,204,551,204,557,207,170,591,170,589,549,207,170,588,171,587,170,588,169,65535],[193,5856,561,203,549,204,558,206,552,206,170,582,556,204,182,579,175,584,555,194,557,214,163,591,549,204,560,203,548,204,182,583,176,582,547,214,174,581,172,579,181,578,170,588,169,588,557,204,172,580,181,5855,545,238,524,229,533,221,543,222,161,591,549,212,164,583,177,587,554,205,549,204,173,591,548,212,549,203,558,206,176,583,173,579,559,203,175,582,173,591,172,579,170,587,171,586,556,204,173,579,183,5860,551,228,534,219,543,212,552,204,175,580,558,207,173,581,176,585,555,204,548,214,173,581,548,214,548,215,546,208,169,592,171,583,550,213,165,592,171,589,174,583,169,587,169,588,556,204,173,580,181,5861,548,234,529,225,538,216,549,216,164,583,552,216,171,578,172,589,554,202,561,203,172,590,548,204,555,213,551,204,174,588,172,581,552,212,173,590,172,578,170,589,169,588,170,588,557,204,173,580,182,5858,556,228,532,221,542,212,552,215,164,590,548,211,175,583,169,587,556,205,548,214,175,581,288,65535],[197,5858,549,214,550,204,558,206,545,213,167,591,546,203,183,580,175,585,554,204,548,204,173,591,548,203,560,203,559,205,170,582,171,589,548,217,164,582,177,586,169,587,169,588,168,588,554,205,173,589,171,5859,549,224,538,216,548,206,548,217,164,583,563,205,173,579,180,578,556,204,559,203,175,582,550,203,559,204,558,205,170,593,161,592,549,214,161,592,173,581,173,590,171,579,170,588,557,204,173,580,181,5864,550,225,539,213,549,211,550,207,168,587,554,203,173,590,172,589,547,203,561,203,173,580,560,204,550,204,558,206,171,592,174,578,559,206,175,583,169,587,168,588,169,588,169,589,556,204,173,580,181,5865,548,225,538,224,539,210,551,207,169,589,556,204,173,591,170,578,557,203,558,204,172,589,551,204,562,205,555,204,176,580,172,589,550,206,181,577,181,578,180,578,170,587,181,578,557,204,173,591,172,5863,552,220,543,212,552,214,540,216,163,590,559,206,164,594,168,587,556,204,527,65535],[199,5850,552,206,557,204,559,203,549,204,172,582,559,203,172,582,174,10,1,581,547,213,548,204,173,582,559,204,558,205,555,203,177,579,171,589,549,212,172,579,170,588,170,588,169,588,168,588,556,205,172,580,181,5853,554,217,545,220,542,213,552,203,175,581,558,207,172,582,177,584,544,10,1,205,548,204,173,590,548,204,559,204,558,205,171,592,161,589,558,207,163,594,168,587,168,589,168,587,169,588,556,204,173,589,172,5863,548,226,538,215,549,206,548,217,173,585,553,204,172,590,171,579,557,204,559,204,173,582,558,203,549,214,545,213,166,592,172,578,558,202,181,579,182,578,169,588,180,577,180,578,557,204,173,580,182,5857,555,228,533,220,542,213,551,215,164,589,548,210,175,587,168,588,555,204,558,203,172,589,549,203,558,207,554,211,166,583,175,589,548,206,174,594,167,587,168,588,170,587,169,589,556,204,173,580,181,5867,548,224,539,215,549,216,539,216,164,595,553,202,173,590,172,588,546,204,559,203,172,589,548,215,555,202,555,205,173,589,174,574,564,204,173,65535],[188,5863,555,201,560,203,549,204,562,204,171,583,549,215,168,588,173,578,559,198,563,204,172,578,556,204,559,203,548,215,170,583,170,590,546,211,169,588,169,588,168,588,169,588,171,587,555,205,173,579,181,5854,552,227,537,222,537,215,549,206,172,591,549,207,168,588,171,588,555,205,547,214,173,581,558,203,549,204,558,207,170,581,181,579,559,207,169,587,169,588,169,588,170,587,169,587,556,204,173,580,182,5856,559,224,537,216,548,206,548,217,164,584,553,216,172,578,171,587,556,204,559,204,172,590,549,204,557,206,556,209,167,582,175,587,548,206,174,593,168,587,169,587,169,588,169,588,555,204,173,591,172,5860,565,206,549,208,556,204,551,216,163,590,559,206,163,594,168,587,554,204,549,214,174,582,558,204,548,215,547,208,169,592,176,582,548,215,171,582,173,589,163,592,172,590,171,578,556,204,173,591,172,5870,552,219,543,222,540,214,549,206,173,589,549,207,168,588,170,588,556,204,549,214,173,581,548,65535],[199,5853,557,204,550,203,559,203,551,205,182,582,550,204,176,580,174,581,557,204,560,203,176,581,558,203,549,204,555,213,165,591,171,579,558,208,168,587,170,588,169,587,169,588,168,588,556,204,174,580,180,5853,556,227,539,218,543,211,542,214,175,579,557,207,172,581,176,586,554,205,547,214,173,581,548,214,548,204,558,206,170,591,171,578,560,207,168,588,170,588,169,587,170,587,169,588,556,205,172,580,181,5866,551,221,538,215,550,215,539,217,162,591,553,207,168,587,170,588,556,204,558,203,173,582,558,204,558,205,556,198,180,583,175,587,547,206,173,582,178,586,168,588,169,588,169,588,556,204,172,591,172,5864,551,223,540,215,549,217,547,207,173,580,553,205,182,579,170,588,556,204,559,203,173,590,549,203,559,205,555,200,178,582,181,577,559,207,169,587,170,588,169,587,170,588,170,587,557,204,173,590,172,5868,547,224,538,215,550,217,548,203,170,588,556,204,173,590,173,578,557,204,559,203,172,590,548,205,557,207,534,65535],[198,5850,551,227,535,214,547,215,547,212,166,592,549,206,173,578,174,583,562,205,547,204,173,590,548,214,548,204,558,206,170,583,172,590,551,204,173,592,163,592,172,579,181,578,169,587,556,204,173,589,172,5854,559,224,539,215,540,212,550,210,175,586,555,204,172,579,171,588,555,204,559,204,174,579,561,203,550,204,558,206,171,591,171,578,560,208,168,586,170,587,169,588,171,587,169,588,555,205,173,580,181,5860,549,224,539,224,537,216,549,216,163,593,543,216,172,578,170,588,556,204,559,203,173,580,559,214,545,211,553,203,176,580,171,591,549,207,169,588,170,10,1,578,180,578,181,577,180,578,556,204,173,580,182,5869,545,228,533,221,543,212,552,215,164,589,547,217,164,584,177,587,556,204,548,214,174,581,548,214,548,215,547,207,169,586,171,589,558,208,168,588,169,587,170,588,170,587,170,589,554,202,173,592,172,5866,552,220,543,212,551,213,548,207,173,590,550,208,168,588,169,598,547,205,548,214,173,580,559,65535],[197,5859,555,203,550,205,550,216,549,204,173,579,558,202,181,579,170,589,554,205,548,214,173,581,550,213,549,203,558,205,171,583,175,582,560,203,173,581,173,591,172,578,171,588,170,588,553,202,173,581,182,5861,549,223,541,214,549,205,548,217,173,580,553,207,169,588,169,588,554,204,559,203,173,579,560,204,559,205,547,207,169,593,170,581,556,204,182,579,175,585,168,587,169,588,170,586,555,204,173,580,182,5859,555,227,534,219,547,214,540,214,174,578,559,208,168,587,169,588,555,204,548,214,173,581,560,203,549,215,547,207,169,593,175,579,550,216,171,582,173,582,172,590,171,580,181,579,556,205,173,591,172,5866,553,219,543,212,542,214,11,1,540,216,163,589,559,206,163,594,167,587,557,205,547,214,175,581,559,203,549,215,547,207,170,590,171,589,548,212,173,579,180,579,180,578,170,589,170,588,556,204,173,591,172,5864,552,220,543,222,541,215,550,205,174,579,560,206,175,585,168,587,555,201,559,203,173,582,559,203,558,205,551,207,169,593,170,593,548,205,172,589,165,594,168,586,169,588,169,588,556,204,174,590,172,65535],[194,5862,560,198,562,202,558,203,558,204,170,583,560,207,173,579,173,581,562,201,559,203,173,582,560,203,549,215,545,213,173,577,181,580,552,206,182,578,181,577,181,577,180,577,180,578,554,203,173,11,1,581,172,5870,545,228,537,223,541,215,549,205,174,589,549,207,168,588,169,589,556,204,559,203,175,580,559,203,558,206,545,214,166,591,173,579,560,207,168,588,170,588,169,588,169,589,169,588,556,204,174,580,182,5859,559,224,538,216,549,206,548,209,177,586,555,205,173,589,171,578,557,204,558,204,175,579,560,204,558,205,557,203,176,580,171,590,549,206,181,579,180,578,180,578,170,588,170,587,557,204,173,591,172,5868,549,225,539,213,549,215,540,219,167,586,556,204,172,590,172,578,556,204,560,204,174,582,560,203,550,204,559,206,170,591,171,589,550,208,168,588,170,587,170,588,170,588,170,587,556,205,173,580,182,5866,548,225,539,216,549,216,538,220,168,586,555,204,172,590,172,589,547,204,559,203,175,582,548,213,550,215,547,207,170,65535],[193,5859,561,203,549,204,562,205,547,207,168,587,556,204,172,580,184,574,563,205,547,204,173,592,549,203,559,203,558,205,170,582,174,588,547,207,173,583,177,587,168,588,170,588,168,587,556,204,173,580,181,5852,563,218,537,223,541,214,550,206,173,579,560,208,167,586,170,588,556,205,547,204,174,592,549,203,560,203,558,205,171,583,173,582,559,204,173,582,173,591,172,580,181,577,170,588,555,204,174,580,182,5857,558,225,538,215,548,206,549,216,164,593,554,204,172,579,181,578,556,204,559,204,175,580,560,203,549,215,547,207,169,593,171,582,551,216,171,582,173,581,173,591,172,579,181,577,557,204,173,589,172,5863,561,212,550,211,552,207,555,205,172,590,547,204,174,592,171,579,557,204,558,204,175,590,550,204,558,205,545,213,166,590,171,589,550,205,182,579,170,588,170,588,170,588,180,578,556,204,173,590,172,5863,551,225,539,225,539,220,542,217,160,588,556,205,172,591,172,578,10,1,546,204,559,204,172,592,547,215,546,207,556,203,171,590,173,582,552,216,171,579,180,578,171,65535],[199,5857,552,206,556,202,556,207,549,205,173,579,561,207,168,588,168,588,556,204,549,203,184,581,549,203,559,203,552,214,172,578,175,583,559,203,176,582,173,579,181,578,180,578,171,587,557,204,173,580,171,10,1,5857,549,234,529,225,539,215,548,206,174,582,551,216,162,588,170,587,557,205,548,214,172,582,558,203,548,215,547,207,169,596,171,580,556,207,173,580,176,586,168,588,169,588,168,588,556,204,173,591,162,5871,547,228,539,219,543,212,552,204,175,580,558,207,172,582,176,586,556,205,547,215,162,590,558,204,550,204,562,205,176,577,172,592,549,204,172,592,173,581,173,590,171,588,163,589,556,204,173,580,182,5868,550,223,540,213,547,214,548,211,164,11,1,584,554,205,171,580,181,577,556,204,558,204,172,592,551,203,558,205,556,199,179,584,175,587,547,207,173,583,177,586,170,587,171,587,169,588,555,204,174,580,182,5861,553,227,537,223,541,215,352,65535],[198,5861,547,214,548,204,551,216,544,213,166,591,546,213,172,582,177,585,543,215,548,203,173,591,547,214,549,204,558,205,170,583,172,589,548,215,170,584,166,591,173,579,173,584,176,587,554,205,173,580,180,5861,544,237,527,231,531,223,541,214,164,591,548,217,164,581,177,585,555,204,548,214,173,581,548,214,551,204,557,205,170,582,172,589,550,215,170,583,175,580,171,590,175,585,170,587,555,204,173,579,181,5854,553,229,533,221,543,213,551,215,164,590,548,207,173,593,166,586,555,202,558,204,173,582,560,203,557,205,555,204,176,579,171,591,550,206,181,578,170,588,170,588,170,588,169,588,556,205,173,579,182,5862,559,226,528,226,539,216,550,207,169,588,555,204,173,590,172,578,557,203,560,203,175,589,551,203,558,206,551,206,169,587,181,578,559,207,175,583,168,587,170,588,168,588,169,11,1,578,556,205,173,590,172,5865,552,220,542,223,541,214,549,205,173,590,549,207,171,587,169,588,556,204,550,214,174,582,550,214,548,205,558,65535],[203,5847,558,206,556,204,551,205,561,196,174,589,558,195,174,583,177,586,555,205,549,203,173,591,548,203,559,203,562,205,171,579,175,580,559,204,173,592,163,591,172,579,181,578,172,587,555,204,173,580,181,5857,554,217,547,211,552,214,540,216,163,589,548,210,176,586,168,587,555,205,548,213,175,581,549,214,548,204,558,206,170,591,170,579,558,202,181,578,172,589,168,589,169,588,170,588,556,204,173,580,181,5857,558,224,539,216,548,212,550,207,169,586,555,205,172,590,171,579,556,204,559,203,173,581,558,204,551,215,552,206,169,592,172,582,548,215,171,583,172,592,164,590,172,579,182,578,556,203,174,590,172,5870,550,226,538,216,550,208,544,216,172,589,547,204,173,591,172,578,556,204,559,204,172,589,549,215,547,207,554,212,166,592,173,579,559,207,168,587,170,588,170,587,170,588,170,588,557,204,173,580,182,5866,548,225,538,223,539,219,543,216,171,579,557,204,174,591,172,578,556,204,559,203,173,589,547,216,546,218,542,213,166,592,173,578,558,65535]]

and the analyzer result:

Signal: {
  "sof": [
    191,
    5860
  ],
  "eof": [
    418,
    65535
  ],
  "words": [
    [
      551,
      210
    ],
    [
      171,
      585
    ],
    [
      179,
      5859
    ]
  ],
  "interval": 10000,
  "sensitivity": 0.5,
  "repetitions": 20,
  "minimalLength": 111,
  "maximalLength": 111
}

Payload: 000010110010001101111101200001011001000110111110120000101100100011011111012000010110010001101111101200001011001
Match:   100%

The Payload is the actual transmitted data
a longer pulse followed by a shorter pulse is a “0” defined in “words” as [ 554, 206 ]
a shorter pulse followed by a longer pulse is a “1” defined in “words” as [ 175, 583 ] (values are +/- 100

Great, it works !!!

For people interested in the subject, I resume the exchanges we had with @JPe4619 (thank you very much !):

The signal sent is composed of three parts:

Sof: starting part (and always the same)
Payload: variable part (depending on the button pressed)
Eof: end of the signal (always the same)

The signal is composed of a series of pulses more or less intense. That’s the numbers we see when scanning a RF signal through the Signal Analyzer, or through the homey developper tool: a low number is a low pulse, a high number is a high pulse, a very high number is a very high pulse, …

The sof and eof (which can be empty) are expressed directly with pulses intensity numbers.
In my case, there is no need of eof, so it is simply .

The payload is a serie of bits (0 or 1). These bits are (always ?) expressed thanks of a serie of two pulses:
0 is expressed with two pulses going down (ie. 500 followed by 200)
1 is expressed with two pulses going up (ie. 200 followed by 500)
The high and low pulses intensity are different for each device. (I imagine that,there could be more complex encoding of 0 or 1, for instance 0 could be a pulse 10, then a pulse 500, then a pulse 100…) That’s why these 0 and 1 encoding must be configured in your signal, using the words attribute in the signal.
This words attribute must contain an array or two elements. The first one is another array of pulses to sent to encode a zero. The second one is another array of pulses to send to encode a one.

Other point, the remote usually send the payload several times, while we only define it only one time into homey signal file (plus a repetition value, and a min/max value that much match the number of bits in the payload).

In my case, the signal got by the homey was trunkated at the beginning (so trunkated sof). Looking at the following signals (because I pressed the button several times during the record) showed the complete signal and were containing complete sof.

Now an example:
Imagine we get the following signal:
134,5844,560,210,555,208,211,567,550,203, 561,214,559,212,207,564,540,208,548,201
With payload analysis: 0,0,1,0,2,0,0,1,0,2,0

We can see that the sof is probably
123,5844
The rest of the signal match the payload.
There is nothing more behind, so that means there is no eof.
The payload is splited with 2, which means repetition of the payload. If we isolate only one repetition it is 0,0,1,0, matching 560,210,555,208,211,567,550,203.
That means that we have here 2 repetitions (or a little more), and that length is 4 (4 bits)
We need now to identify the words (definition of 0 and 1): looking at the pulses matching the payload, we can make an average of low and high pulses.
Words : [[560,208],[211,567]]

I hope this is clear and will help people to copy RF signals more easily.

Thanks again to @JPe4619 !

2 Likes

Any idea what the name is of this coding method? It is not NRZ or Manchester encoding.

I don’t know at all… and perhaps I’m wrong, but it looks like it worked :slight_smile:

I try to figure out what you mean here: a 0 is expresses by a long pulse followed by a short pulse? I am confused by the wording “going down”.

a longer pulse followed by a shorter pulse is a “0” defined in “words” as [ 554, 206 ]
a shorter pulse followed by a longer pulse is a “1” defined in “words” as [ 175, 583 ]

Read ‘pulse’ as signal-level during a period of time.
‘0’ is 554 msec high-level direct followed by 296 msec low-level.
These are measured receive times, normally for transmitting, the short periode is 1/3 and the longer period is 2/3 of the total ‘Word’ time. Receivers are normally reading the level of the ‘word’ at 1/2 of the length of the ‘word’.

1 Like

Thanks. Also for putting “words” between quotes, as to me word is something like 16 or 32 bits.

1 Like

For anyone that would be interested in creating an Homey app for their RF device, here is how I processed:

have a look at this:
Tuto
(Vidéo are helpful)
Then use the Homey Developper Tool to register a button of your remote.
Then you can use this tool made by someone here to make a first analysis of the signal. The goal is to identify the header, the trailer, and the data in the middle, and to compute an average signal (because of noise, each register session will result in a slightly different signal, so we need to find a average one). You also need to understand the structure of the signal and how a change in low-high signal means a 1 or a 0. See the discussion above.
Once you have your signal, you have to copy it into a dedicated file in your app, register this signal, and sent it when the app triggers.
I will not go into detail about that, it would be too long, but the documentation was quite clear about that (the only part not clear is how the signal is structured, and so how to guess the average signal), but here is the final content of my project:


And here are the more important files (keep in mind my device is a curtains type. If you have some other device type, it should have slight different content):

RF signal file (signal-rc-120.json):

{
  "sof": [
    189,
    5841
  ],
  "eof": [],
  "words": [
    [
      569,
      191
    ],
    [
      188,
      569
    ]
  ],
  "interval": 10000,
  "sensitivity": 0.5,
  "repetitions": 10,
  "minimalLength": 24,
  "maximalLength": 24,
  "cmds": {
    "up":   [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,1,0,1],
    "down": [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,1,1],
    "idle": [0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,0,1,1,1]
  }
}

app.json file (into .homeycompose):

{
  "id": "com.nutyzeta.esmartcurtain",
  "version": "1.0.1",
  "compatibility": ">=5.0.0",
  "sdk": 3,
  "platforms": [
    "local"
  ],
  "name": {
    "en": "ESmart Controler",
    "fr": "Télécomande RF ESmart"
  },
  "description": {
    "en": "Simulate RF controler to open/close ESmart video projection screen.",
    "fr": "Simule la télécommande permettant d'ouvrir ou fermer l'écran de vidéoprojection ESmart."
  },
  "category": [
    "tools"
  ],
  "permissions": [
    "homey:wireless:433"
  ],
  "images": {
    "small": "/assets/images/eSmartCurtain_app_small.png",
    "large": "/assets/images/eSmartCurtain_app_large.png",
    "xlarge": "/assets/images/eSmartCurtain_app_xlarge.png"
  },
  "brandColor": "#2A5298",
  "author": {
    "name": "Ezeta"
  },
  "homepage": "https://esmart.de",
  "tags": {
    "en": [
      "esmart",
      "rf",
      "remote",
      "controler",
      "curtain",
      "video",
      "screen",
      "projection"
    ],
    "fr": [
      "esmart",
      "rf",
      "télécomande",
      "télécommande",
      "rideau",
      "vidéo",
      "écran",
      "projection",
      "projecteur"
    ]
  },
  "contributing": {
    "donate": {
      "paypal": {
        "username": "pelouas"
      }
    }
  }
}

device.js (into folder drivers/controler-rc-120)

'use strict';

const { Device } = require('homey');

class MyDevice extends Device {

  /**
   * onInit is called when the device is initialized.
   */
  async onInit() {
    this.log('MyDevice has been initialized');

    this.registerCapabilityListener("windowcoverings_state", async(value) => {
      this.log("Activated button: ", value)
      // create & register a signal using the id from your signal manifest
      const mySignal = this.homey.rf.getSignal433("signal-rc-120");

      // transmit the bits 01011001
      //await mySignal.tx([0, 1, 0, 1, 1, 0, 0, 1]);

      // transmit predefined command
      await mySignal.cmd(value); //, {"repetitions": 4});
    })
  }

  /**
   * onAdded is called when the user adds the device, called just after pairing.
   */
  async onAdded() {
    this.log('MyDevice has been added');
  }

  /**
   * onSettings is called when the user updates the device's settings.
   * @param {object} event the onSettings event data
   * @param {object} event.oldSettings The old settings object
   * @param {object} event.newSettings The new settings object
   * @param {string[]} event.changedKeys An array of keys changed since the previous version
   * @returns {Promise<string|void>} return a custom message that will be displayed
   */
  async onSettings({ oldSettings, newSettings, changedKeys }) {
    this.log('MyDevice settings where changed');
  }

  /**
   * onRenamed is called when the user updates the device's name.
   * This method can be used this to synchronise the name to the device.
   * @param {string} name The new name
   */
  async onRenamed(name) {
    this.log('MyDevice was renamed');
  }

  /**
   * onDeleted is called when the user deleted the device.
   */
  async onDeleted() {
    this.log('MyDevice has been deleted');
  }

}

module.exports = MyDevice;

in the same folder, file driver.compose.json:

{
  "name": {
    "en": "Controler RC-120",
    "fr": "Télécomande RC-120"
  },
  "class": "curtain",
  "capabilities": [
    "windowcoverings_state"
  ],
  "platforms": [
    "local"
  ],
  "connectivity": [
    "rf433"
  ],
  "images": {
    "small": "{{driverAssetsPath}}/images/esmartRc120_device_small.png",
    "large": "{{driverAssetsPath}}/images/esmartRc120_device_large.png"
  },
  "pair": [
    {
      "id": "list_devices",
      "template": "list_devices",
      "navigation": {
        "next": "add_devices"
      }
    },
    {
      "id": "add_devices",
      "template": "add_devices"
    }
  ]
}

And the driver.js file:

'use strict';

const { Driver } = require('homey');

class MyDriver extends Driver {

  /**
   * onInit is called when the driver is initialized.
   */
  async onInit() {
    this.log('MyDriver has been initialized');
  }

  /**
   * onPairListDevices is called when a user is adding a device
   * and the 'list_devices' view is called.
   * This should return an array with the data of devices that are available for pairing.
   */
  async onPairListDevices() {
    return [
      // Example device data, note that `store` is optional
      {
        name: this.homey.__("defaultDeviceName"),
        data: {
          id: 'my-esmart-rc120-controler',
        }
      }
    ];
  }

}

module.exports = MyDriver;

I recommend you create your app following the tutorial, and go have a look to this code only when you face an issue. Do not the reverse way ( copying-pasting the code as-is), because it would not work (you need to follow some steps to configure the app, add capabilities, add some dependencies, … that won’t be done if you just copy paste these files).
An additional advice, don’t forget to install the Docker app (which is needed to run the app, and was not straight forward in the tuto). And for the code editor, I installed Visual Studio.

Good luck !

3 Likes