This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to

This forum is now read-only for archive purposes.

Help needed with decoding 433 Mhz signal

Currently I am trying to add support for a motion sensor I found at Hornbach (Unitec CR2477). It communicates with RF at 433 Mhz, so I was able to record it's signals (see attachment)

I took a look at and got lost quite early.
You define words by starting at the first value after the start of frame and assign all values to a word of your wanted length until there are not enough values left to create a word. For instance if we use sof = [255, 400] for the example data above and start with a word length of 2 we would get the words [110, 1002] and [1100, 111]. If we would use a word length of 3 we would get the words [110, 1002, 1100][111, 108, 1010][109, 1102, 112] which are more words and represent less data.

This will probably be enough guidance for tech-savvy devs, but for John Joe this is describing rocket science. However, Athom does require an app for every device, so it would be nice if the tutorial would not require too much pre-existing knowledge about signal handling.

Could somebody guide me though it using the data attached? Would be nice if I could push an app to the store to support this motion detector available at your local hardware store ;)


  • I assume you sent multiple times the same signal... Then I'd say it's (see file):
    With 0 being [302;913] and 1 being [915;301]
    SOF: [312,933] and EOF: [307;2587]

    Could also be an extra 0 in front of the signal but the 428 as first digit seems strange. You might want to take another recording for confirmation..
  • BartOttenBartOtten Member
    edited October 2017
    @bvdbos thanks for the colored sheet. 

    For those reading this thread I've created an extended explanation and added more colors to the sheet ;-)

    Words should be defined as small as possible without increasing the amount of needed words.
    Aka: You should find a rhythm of value pairs. The length of the value pairs (called words) should be as short as possible so as many as possible will fit in one row.

    In the attached example, the difference is clearly visible:

    On the first row the words are 2 values long:
    word 1: low, high (yellow)
    word 2: high, low (orange)

    Using this rhythm, the first row leads to: word 1, word 1,  word 1, word 2, word 1 etc.

    What happens when was chosen for words of 3 values length, is shown on the last row.

    word 1: low, high, low (purple)
    word 2: high, low, high (green)
    word 3: high, low, low (grey)
    word 4: low, low, high (yellow)
    word5: low, high, high (blue)
    (and possibly more)

    Using this rhythm, the last lines leads to: 
    word 1, word 2, word 3, word 2, word 2, word 4, word 5...etc

    Not only are there less words in the last line, the variation of words is also huge!
  • I'm trying to do pretty much the same as you. Stuck as well. Could someone please have a look at the Excel file and possibly identify the sof, words and eof?

    Thanks a lot! 
  • JPeJPe Member
    edited October 2017
    I agree with @BartOtten , where he says:  "This will probably be enough guidance for tech-savvy devs, but for John Joe, this is describing rocket science. However, Athom does require an app for every device, so it would be nice if the tutorial would not require too much pre-existing knowledge about signal handling."
    A more "low level" description would stimulate much more people to finish the steps to a new app.
    Maybe @Bram can take this up?  @Athom
  • @bvdbos Any chance you could have a look at my excel file? Thanks. 
  • I'd say its:
    10001010 10110011 01110101
    SOF = [ ]
    1 = [313,959]
    0 = [948,324]
    EOF = [321,3042]
    1 and 0 may be the other way round, no way to know...
  • Thanks, I'll experiment a bit more later. Had figured the same but haven't tried swapping 0 and 1 yet. 
  • Anyone who already made the most basic app of all: The app of one button sending the same 433 MHz-signal every time without listening for anything?

    I have the signal (recorded) and all I need is a way to send it - and if someone already made that kind of "one button app" that could be used (and only substitute the code for the signal) - it would be fantastic - then I'd have a chance of getting there ;-)
  • Cool!
    When trying to upload via CLI I get an error message "signals.433.aDoorbell: invalid_sensitivity"
    Guess I should edit the code somewhere first (?) - but I can't figure out where?
    A little word of guidance available? :-)
  • Would never have found out by myself - thank you, indeed!
    The app installs fine now - but when trying to add a device in Homey, the signal is not recognised - and the device therefore not made.
    I'm a total rookie, I know, but if I can't add a device, then I can't get a way to generate an outbound signal - even if I get the figures right with sof, message and eof in the code - right?
    Guess there might be some compability issues from when the app was made and now (running 1.5.5)?

    (Hmm - am I actually hijacking the original thread and should the latter messages be moved to a seperate thread 'bout this app?)
  • What device are you working on? And what is your signal-definition? Maybe it's better to use the 433-generator to create to config-file?
  • Thank you for your replies @bvdbos and @GeurtDijker ,

    What I have is: 1) a gate, 2) a remote (Tedsen SKX1WD), and 3) Homey.

    It's only one-way communication from the remote to the gate on the 433 MHz band and the code it not rolling.
    I can record the code via as well as copy the remote to another remote - and know what the actual dip switches are set to if that helps.
    My only wish is to be able to make a button that I can press in Homey (or a flow that can) so that I can trigger opening the gate va Homey :-)

    I've been looking at the 433-generator - but I got los as @BartOtten...
    I'm sure it is better to - but for now just too complicated for me - therefore my little hope, that it could be possible to more or less copy-paste som of the recorded signal into an existing app :-)

    Guess I'll just have to read on the hard way :-)
  • Hope that somebody is 'smart' enough to make such an app, so that in general everybody can use it <span>:smile:</span>
  • christian1976christian1976 Member
    edited December 2017
    I am also stuck in 433 country... I bought a motor for a rollerblind, but stuck with the same signal problem.

    I now bought a broadlink device that can learn 433 just like you can do with IR. You just point and click and then it knows the signal. So for now i dont use my blinds with Homey, but i would really love to !!!!..

    So if anyone can work on a generic app for this it would be great... It must be possible, if broadlink can do it so can Athom ;-)
  • Initiated by this Topic I have also tried to get uesed to the 433 Generator. Unfortuately I am also stuck in this.

    One question. If I use the developer Tools, then signals and 433 recording, does this give me the same values as using the 433 Generator? If so, it is quite easy to get the values, not saying it is easy to Analyse them an build up the app.

    But at least one easy step. Can anyone confirm or deny?

  • The 433 generator does not create any signal at all, it just generates drivers files you can use as a starting point for an app. The recording in the developer tools is the signal you need to analyze in order to arrive at a working signal definition. 

    Whether it is easy or hard depends a lot on the signal itself, and whether you want send and receive or only send. If you only want to send you can skip most of the signal definition and just include the entire (recorded) signal in the 'SOF' field. The following link will give you an idea of what it involves: There are various posts and topics about this on the forum as well.

    And as mentioned elsewhere, if you get on the Athom slack channel help is always nearby :+1:

  • k1sk1s Member
    Hello, I'm one step further behind than @BartOtten, I read the same guide and got lost.  I don't how he/she got a file from the console?

    I entered this:
    var recordData; api('POST', '/manager/rf/record', {}, (err, result) => {console.log('done recording'); recordData = result; });
    and then pressed my door bell button about 20-25 times and got:
    done recording

    And then I entered this:
    recordData.reduce((lengths, recordEntry) => Object.assign(lengths, { [recordEntry.length]: (lengths[recordEntry.length] || 0) + 1 }), {});

    and got:
    Object {32: 3, 34: 7, 37: 1, 38: 2, 40: 1, 41: 1, 42: 2, 46: 1, 48: 1, 49: 1, 50: 39, 52: 1, 58: 1, 70: 1, 72: 1}.

    Then, because length 50 apparently came up 39 times, I entered:
    var fl = 50; recordData = recordData.filter(recordEntry => recordEntry.length === fl)

    and got:
    (39) [Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50), Array(50)]

    When I clicked the little arrow in the console I can see each Array(50) contains a list of numbers (example below), but I don't know how to get them into an excel file or then exactly what to do to identify the Start of frame, Words, End of frame, etc.  because I don't see the square brackets like in the example in David Thornley's guide.  Instead I see this:

      1. 0:657
      2. 1:249
      3. 2:194
      4. 3:693
      5. 4:641
      6. 5:233
      7. 6:644
      8. 7:247
      9. 8:199
      10. 9:679
      11. 10:210
      12. 11:666
      13. 12:217
      14. 13:673
      15. 14:214
      16. 15:664
      17. 16:214
      18. 17:673
      19. 18:653
      20. 19:222
      21. 20:224
      22. 21:666
      23. 22:217
      24. 23:662
      25. 24:663
      26. 25:223
      27. 26:661
      28. 27:227
      29. 28:652
      30. 29:228
      31. 30:654
      32. 31:227
      33. 32:217
      34. 33:663
      35. 34:662
      36. 35:224
      37. 36:659
      38. 37:222
      39. 38:662
      40. 39:225
      41. 40:214
      42. 41:669
      43. 42:221
      44. 43:661
      45. 44:659
      46. 45:227
      47. 46:662
      48. 47:225
      49. 48:211
      50. 49:1770

  • k1sk1s Member
    edited April 2018
    I found on another postmaxxie01 that  entering JSON.stringify(recordData); produces the square brackets and raw numbers, so now I have the full list (below), but don't understand how looking at it I can determine the 'words'.  

    Would greatly appreciate some help. Perhaps @bvdbos is still here?


  • bvdbosbvdbos Member
    edited April 2018
    Too busy at work and a wedding of a friend atm but a quick reply... For the lower line:
    0 : 650,258
    1 : 194,683

    no SOF
    0             1             0             0             1            1              1             1             1             0             1             1
    0             0             0              0             1            0              0            0              1            1             0             0     

    which leaves 204,1704 as EOF

    The values in the 0 and 1 should be calculated from the averages to get a better (stronger) signal...

Sign In or Register to comment.