Skip to content

add Driveway alarm motion sensor I8-W1901 #2493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

erlanger
Copy link
Contributor

This is a very nice (with high quality brass screw threads) motion sensor for driveways (SKU I8-W1901). The code was made based on generic_motion.c, and it works well. I have tested it at different distances and it worked up to about 45 meters.

It is a very simple sensor, since it only reports motion (without any signal indicating 'clear').

@zuckschwerdt
Copy link
Collaborator

If it's 25 bits (24+sync) and just an ID then this is a x1527(-style) encoder.
We support those through flex conf files, see https://github.com/merbanan/rtl_433/tree/master/conf

Can you change this PR to add a .conf file for this? Keep all the documentation but the actual code should shorten to just a few conf instructions.

@erlanger
Copy link
Contributor Author

erlanger commented Apr 27, 2023

The problem is that the data is in two separate rows, and .conf files don't support processing two rows at a time (as far as I know). The rows look like this:

[00] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[01] { 1} 80          : 1
[02] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[03] { 1} 80          : 1
[04] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[05] { 1} 80          : 1
[06] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[07] { 1} 80          : 1
[08] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[09] { 1} 80          : 1
[10] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[11] { 1} 80          : 1
[12] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[13] { 1} 80          : 1
[14] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[15] { 1} 80          : 1
[16] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[17] { 1} 80          : 1
[18] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[19] { 1} 80          : 1
[20] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[21] { 1} 80          : 1
[22] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[23] { 1} 80          : 1
[24] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[25] { 1} 80          : 1
[26] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[27] { 1} 80          : 1
[28] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[29] { 1} 80          : 1
[30] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[31] { 1} 80          : 1
[32] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[33] { 1} 80          : 1
[34] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[35] { 1} 80          : 1
[36] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[37] { 1} 80          : 1
[38] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[39] { 1} 80          : 1
[40] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[41] { 1} 80          : 1
[42] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[43] { 1} 80          : 1
[44] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[45] { 1} 80          : 1
[46] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[47] { 1} 80          : 1
[48] {25} c4 ea 67 00 : 11000100 11101010 01100111 0
[49] {25} c4 ea 67 00 : 11000100 11101010 01100111 0

I can't see a way to handle two rows in a conf file, but perhaps I am missing something. Also it is not 25 bits, but 26 (25+1).

@zuckschwerdt
Copy link
Collaborator

That row with a single bit should just be an artifact of the sync pulse. You really just want to match the ID and a minimum number of repeats for robustness, so match=c4ea67,repeats>=3,countonly right?

@erlanger
Copy link
Contributor Author

We can't use match=c4ea67 because the units have a pair function (to pair a receiver with the transmitter); this implies different transmitters have different IDs; but perhaps using a get=@0:{25}:id,repeats>=3,bits>=24 would work?

also how would I specify the sync bit in the conf file? The flex decoder from analysys has sync_width=0:
flex decoder: -X 'n=name,m=OOK_PWM,s=188,l=588,r=6200,g=616,t=160,y=0'

@zuckschwerdt
Copy link
Collaborator

Most .conf files are just examples you can edit as needed. Using a custom match= for each specific device is the best case to remove false positives.
In other words: the x1527 transmissions are not a strutured protocol, it's only an ID -- receive that ID and you know the doorbell-style device triggered, everything else is noise and false positives.

Re sync: the gap limit looks rather short what's the timing of the normal gaps, after the sync and between repeats?

@erlanger
Copy link
Contributor Author

Ah I see, I appreciate your explanation! and thanks for the prompt replies!

from looking at https://triq.org/pdv/#AAB026052300C80254032818302714818190909081909081818190819081909081819090818181928355+AAB025050100C802540328183027148181909090819090818181908190819090818190908181819455

the gap after the sync is about 5480 us

@zuckschwerdt
Copy link
Collaborator

The reset limit should be 7000 (the nominal value +10%, rounded up).
Interestingly the packet is truely 25 bits and then the sync. Usually we see 24 bits plus sync.
Maybe set the gap limit to 900 so you read the next sync into the same row, then match {26} bits for added filtering.

@erlanger
Copy link
Contributor Author

Ok, great; I will make the conf file, test it for a little bit and update the pr. Again, thanks for your prompt replies! You make rtl_433 an example to follow.

@zuckschwerdt
Copy link
Collaborator

Thanks, but I'd say it the whole community of contributors and enthusiastic people that bring this project to life.

@erlanger
Copy link
Contributor Author

Just submitted the conf file.

Yes, the whole community makes it a great project; but this community would not exist except for the nice work you do! :)

@zuckschwerdt
Copy link
Collaborator

Very nice walk-through in the documentation, this will be an ideal starting point for others with similar devices!

@zuckschwerdt zuckschwerdt merged commit 7d4b31a into merbanan:master Apr 27, 2023
andrewjw pushed a commit to andrewjw/rtl_433 that referenced this pull request Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants