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

The Homey Community has been moved to https://community.athom.com.

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 https://github.com/athombv/node-homey-433/blob/master/HOWTO_CREATE_SIGNAL.md 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 ;)


Comments

  • I assume you sent multiple times the same signal... Then I'd say it's (see file):
    000010011001011100000001
    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
    with
    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 developer.athom.com 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: https://forum.athom.com/uploads/editor/g8/qe7swz0tr4h9.pdf. 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?

    [645,259,194,681,640,242,645,236,213,670,210,676,205,672,214,672,214,670,652,225,215,666,217,673,655,224,661,229,655,220,662,225,211,670,662,226,661,215,662,226,214,669,221,665,653,228,660,224,221,1794],
    [657,249,194,693,641,233,644,247,199,679,210,666,217,673,214,664,214,673,653,222,224,666,217,662,663,223,661,227,652,228,654,227,217,663,662,224,659,222,662,225,214,669,221,661,659,227,662,225,211,1770],
    [656,250,195,693,639,243,634,247,204,677,209,667,216,663,223,661,224,659,659,232,215,661,225,665,660,223,658,226,652,233,650,227,219,666,664,217,661,228,654,226,224,664,216,665,661,217,662,227,212,1770],
    [637,273,175,694,641,243,645,235,203,681,201,683,204,675,214,662,225,666,657,224,214,666,213,674,654,225,666,220,663,218,661,225,221,661,661,227,654,227,653,233,214,666,218,661,662,223,660,227,217,1788],
    [631,281,175,703,631,241,643,237,201,687,197,678,206,672,224,664,215,663,666,220,214,673,215,662,665,223,659,222,662,225,663,213,221,664,662,228,652,232,659,217,220,665,222,665,653,229,663,225,211,1770],
    [645,259,194,693,631,253,646,258,195,706,214,702,222,700,217,708,222,706,707,240,227,725,239,724,716,248,736,264,746,263,747,264,234,740,696,224,621,218,621,216,215,660,206,684,723,277,899,360,371,2658],
    [641,259,184,693,641,241,645,248,189,686,208,665,212,673,215,662,223,662,666,224,214,666,215,673,654,224,655,227,655,224,659,227,217,663,663,224,660,228,652,233,214,667,214,663,664,223,661,228,217,1788],
    [643,258,194,691,632,242,643,245,199,678,210,675,213,663,216,673,214,666,663,224,214,666,217,662,664,223,660,228,652,222,662,224,221,661,662,226,661,215,661,226,214,669,221,662,661,226,659,222,222,1038],
    [662,251,185,692,633,251,643,235,202,682,212,664,213,672,214,663,226,666,660,216,226,657,221,664,660,227,661,224,660,223,659,226,214,663,664,221,663,225,660,227,215,659,222,665,663,220,662,224,212,1602],
    [643,260,195,693,632,242,643,237,205,676,217,665,213,674,214,662,223,666,654,222,224,666,217,663,664,224,656,223,659,227,653,227,217,663,663,223,660,227,663,223,214,666,217,662,663,224,662,217,226,1578],
    [647,259,185,693,640,241,643,247,194,675,219,667,216,669,210,664,222,663,664,220,224,666,215,661,662,224,660,228,652,222,662,224,222,661,661,226,661,225,655,225,213,669,211,671,660,227,653,227,215,1776],
    [639,269,175,702,630,250,643,234,203,679,210,676,205,675,214,662,223,666,655,221,223,661,223,664,656,225,665,219,665,219,663,225,211,671,660,227,652,227,662,224,213,666,214,674,655,224,660,227,217,1788],
    [649,258,185,693,639,241,643,237,203,679,210,675,212,665,215,673,214,666,655,221,224,661,223,663,656,225,665,217,662,227,662,225,213,665,656,225,661,227,663,224,213,666,214,673,653,224,659,222,218,1782],
    [642,280,184,725,646,269,363,31,261,280,196,739,201,739,214,734,226,737,223,733,726,249,237,754,243,749,759,257,755,257,712,228,646,218,196,635,618,221,663,246,764,301,285,932,329,1033,1398,683,932,5436],
    [642,270,185,692,640,240,642,237,202,680,210,676,203,674,215,672,213,665,663,225,214,666,218,662,663,223,661,227,654,222,662,224,221,662,661,227,652,227,662,224,213,665,218,662,663,224,660,228,214,1782],
    [640,259,194,683,640,242,643,247,205,676,208,667,217,663,223,664,214,666,664,220,224,666,217,662,663,222,660,218,664,221,661,222,222,663,662,226,661,225,661,218,218,666,216,674,652,227,663,215,218,1776],
    [652,257,184,693,640,241,643,237,205,675,217,664,212,671,212,675,215,664,664,219,214,676,215,662,662,224,650,227,662,227,653,226,214,673,655,224,661,228,652,232,214,665,217,662,662,224,661,218,216,1770],
    [634,269,182,699,637,238,643,244,202,675,207,674,217,665,218,666,212,675,653,227,214,665,215,673,653,224,658,228,660,226,660,222,211,671,658,227,654,227,653,234,214,666,214,674,654,224,660,227,217,1788],
    [648,269,186,681,650,240,642,238,202,675,207,678,207,672,222,664,214,663,664,220,214,675,215,663,664,224,660,218,663,221,662,224,212,672,660,226,661,215,669,217,219,664,222,664,654,229,653,226,223,1800],
    [647,257,184,693,641,240,645,238,202,676,206,677,212,663,224,663,214,673,652,233,214,667,217,662,664,223,659,228,656,221,663,224,222,661,661,227,654,227,664,223,214,667,218,662,664,223,662,227,213,1776],
    [642,257,183,702,639,239,643,235,202,680,210,675,213,674,215,673,219,686,673,238,224,697,226,703,694,234,715,245,712,259,727,260,241,760,754,263,745,252,690,227,207,644,214,633,617,217,644,225,223,1776],
    [651,249,196,682,642,241,646,237,205,675,217,665,212,674,215,663,213,673,653,233,214,660,218,666,657,225,660,227,663,223,663,223,211,674,652,228,654,226,662,224,214,666,224,663,655,224,661,227,214,1776],
    [642,259,195,681,640,241,644,237,211,676,208,665,216,674,213,663,213,676,655,221,224,666,215,662,664,224,657,228,649,225,666,218,226,661,663,223,660,217,663,226,215,666,215,663,663,225,660,228,210,1770],
    [654,257,183,690,640,238,649,234,211,677,209,666,216,663,224,664,214,666,664,221,224,666,215,663,664,224,662,217,661,227,652,226,224,663,654,224,660,226,663,225,214,666,214,674,653,224,661,227,214,1776],
    [641,259,184,693,641,242,642,244,203,680,201,675,213,664,215,672,214,669,659,217,220,665,222,665,653,228,662,225,661,216,663,224,222,665,653,227,663,225,650,225,220,665,216,674,651,228,663,215,222,1788],
    [653,248,195,682,640,240,645,236,211,676,208,665,213,674,215,663,224,666,653,222,224,661,217,673,653,224,661,227,677,238,680,235,230,704,704,239,712,250,728,246,245,745,244,757,756,257,754,252,244,2016],
    [650,258,183,692,641,241,643,237,201,686,198,677,217,661,223,663,212,666,665,220,224,661,213,674,653,224,660,227,657,221,663,224,222,661,659,227,654,226,661,225,214,666,214,674,655,224,660,227,214,1776],
    [647,269,175,702,629,249,641,234,213,670,211,676,205,675,214,663,224,666,653,222,225,662,214,673,654,225,666,217,662,227,654,227,217,663,663,224,660,227,654,233,214,666,215,673,654,224,661,228,217,1788],
    [649,257,194,683,641,241,643,237,211,676,208,666,212,675,214,663,224,665,653,232,214,665,215,663,662,223,661,228,653,221,662,225,221,666,657,225,660,225,649,227,218,665,217,663,663,228,652,232,211,1770],
    [651,261,185,691,641,243,641,236,203,681,212,664,214,665,227,662,214,670,660,227,216,666,212,674,651,227,661,225,660,218,667,226,214,665,653,228,662,225,659,228,210,665,216,674,653,229,654,226,214,1770],
    [641,269,174,693,641,241,643,237,205,675,207,681,202,673,214,672,213,666,663,224,214,669,211,674,651,228,661,224,661,228,658,226,215,664,653,229,663,225,659,217,219,665,222,665,664,218,661,224,222,1638],
    [653,260,184,683,651,232,646,236,213,670,210,674,212,662,225,661,214,669,659,225,219,665,217,662,671,231,674,237,682,242,695,247,224,725,712,246,735,256,738,256,251,771,246,764,757,255,681,234,208,1830],
    [647,258,184,691,640,241,643,237,205,686,197,674,217,665,219,665,222,664,662,219,214,676,215,662,664,224,655,222,664,220,664,225,212,666,657,224,661,227,661,225,214,669,211,673,652,229,661,225,211,1764],
    [646,258,194,683,642,241,643,237,203,679,210,675,212,663,216,673,213,666,655,233,214,666,215,662,663,224,660,222,661,224,662,224,212,663,663,227,654,226,661,224,214,666,214,674,654,224,661,227,217,1788],
    [650,269,174,702,630,242,642,244,203,681,201,674,213,664,215,672,214,666,662,225,214,670,217,662,662,227,654,227,653,233,653,224,220,669,659,226,653,227,662,223,214,666,214,672,655,224,661,227,217,1788],
    [640,268,184,692,640,240,642,236,205,686,197,675,212,672,223,663,214,665,665,220,214,676,217,663,664,224,656,221,663,220,663,224,211,671,661,227,653,227,662,224,214,669,212,671,660,227,654,227,215,1776],
    [649,258,184,691,640,242,644,237,211,676,209,666,217,663,224,663,215,666,664,219,223,660,224,663,655,225,665,219,664,219,661,224,222,661,659,227,661,225,660,224,211,676,215,665,653,229,662,225,211,1770],
    [650,249,194,694,640,232,654,235,203,671,212,675,215,665,215,673,214,666,656,233,213,666,214,673,653,223,663,228,653,232,653,224,211,671,660,227,653,227,656,233,214,665,217,663,662,224,660,228,215,1782],
    [649,258,194,683,641,241,641,247,199,677,210,676,205,675,214,662,224,672,666,226,219,695,218,696,688,246,689,244,715,243,726,252,242,748,749,251,756,265,736,248,215,702,221,664,631,206,621,226,204,1704]


  • 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
    gives

    no SOF
    649,258,194,683,641,241,641,247,199,677,210,676,205,675,214,662,224,672,666,226,219,695,218,696
    0             1             0             0             1            1              1             1             1             0             1             1
    688,246,689,244,715,243,726,252,242,748,749,251,756,265,736,248,215,702,221,664,631,206,621,226,204,1704
    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.