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.
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.
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 usesof = [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
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..
For those reading this thread I've created an extended explanation and added more colors to the sheet ;-)
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!
Thanks a lot!
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
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...
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 ;-)
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? :-)
in Homey firmware 1.3 or so the max Sensitivity changed:
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 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 :-)
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?
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
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:
Would greatly appreciate some help. Perhaps @bvdbos is still here?
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...