Skip to content
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

Change support for qx-30x to extract device and button ID #3008

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

edco
Copy link
Contributor

@edco edco commented Jul 25, 2024

Per my comment on the initial support request for these devices, this PR adds ID and button extraction based on the EV1527 encoding.

@adminy would you be able to give this a try with your switches and share the ID and button values extracted? I'm hoping you've got a 2-gang QX-302, but I'm keen to see the output regardless.

@zuckschwerdt
Copy link
Collaborator

These changes won't break anything, even if you get no test confirmation please ping back for merge in a few days.

@edco
Copy link
Contributor Author

edco commented Jul 30, 2024

These changes won't break anything, even if you get no test confirmation please ping back for merge in a few days.

Ping.

@adminy
Copy link
Contributor

adminy commented Jul 30, 2024

sure, I'll run a test tomorrow morning if that's okay.

@edco
Copy link
Contributor Author

edco commented Jul 30, 2024

Sounds good.

@adminy
Copy link
Contributor

adminy commented Jul 31, 2024

So your config didn't work out of the box, I had to add extra fields, namely name, modulation, short

# QX-30X
#
# This decoder reads button presses from QX-302, QX-304 and QX-305 self powered
# switches. These switches appear to use an EV1527 based encoding, where the
# first 20 bits contain the device ID, the next 4 bits identify which button on
# the device was pushed, and there may be a trailing sync bit. A sample rate of
# around 1MHz is recommended to reliably detect these devices.
#

decoder {
    name        = QX-30X,
    modulation  = OOK_PWM,
    short       = 33,
    long        = 100,
    gap         = 150,
    reset       = 1500,
    bits       >= 24,
    bits       <= 25,
    get         = get=@0:{20}:id,
    get         = get=@20:{4}:button,
    unique
}

Screenshot 2024-07-31 at 09 40 40

as for two gang switch, data is mostly the same:

{"time" : "2024-07-31 09:42:55", "model" : "QX", "count" : 6, "num_rows" : 8, "len" : 25, "data" : "631f9e8", "id" : 406009, "button" : 6}
{"time" : "2024-07-31 09:42:56", "model" : "QX", "count" : 6, "num_rows" : 8, "len" : 25, "data" : "631f9e8", "id" : 406009, "button" : 6}
{"time" : "2024-07-31 09:42:58", "model" : "QX", "count" : 1, "num_rows" : 2, "len" : 25, "data" : "635a5e8", "id" : 406949, "button" : 6}
{"time" : "2024-07-31 09:43:26", "model" : "QX", "count" : 2, "num_rows" : 4, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:43:29", "model" : "QX", "count" : 3, "num_rows" : 5, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:43:30", "model" : "QX", "count" : 4, "num_rows" : 6, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:43:30", "model" : "QX", "count" : 4, "num_rows" : 6, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:43:30", "model" : "QX", "count" : 4, "num_rows" : 6, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:43:39", "model" : "QX", "count" : 3, "num_rows" : 5, "len" : 25, "data" : "5ca81e8", "id" : 379521, "button" : 5}
{"time" : "2024-07-31 09:44:22", "model" : "QX", "count" : 4, "num_rows" : 6, "len" : 25, "data" : "4f003e8", "id" : 323587, "button" : 4}
{"time" : "2024-07-31 09:44:24", "model" : "QX", "count" : 5, "num_rows" : 7, "len" : 25, "data" : "4f003e8", "id" : 323587, "button" : 4}
{"time" : "2024-07-31 09:44:26", "model" : "QX", "count" : 4, "num_rows" : 6, "len" : 25, "data" : "4f003e8", "id" : 323587, "button" : 4}

@zuckschwerdt
Copy link
Collaborator

So your config didn't work out of the box, I had to add extra fields, namely name, modulation, short

Did you perhaps copy from the diff? The file seems complete (click the dots to the very right of the file name, then View File) https://github.com/merbanan/rtl_433/blob/dd57e1f879231b8c13530389284425d147681b3b/conf/qx-30x.conf

@adminy
Copy link
Contributor

adminy commented Jul 31, 2024

hahah, yeah, that's it.

@edco
Copy link
Contributor Author

edco commented Aug 2, 2024

as for two gang switch, data is mostly the same:

It seems wrong that each one would have a different device ID. But then-again, I suppose it's entirely possible that they've put a completely separate transmitter board in each of the switches, rather than trying to wire up the generators from both switches to a single board and attempting to tell the board which button is being pushed while sending a brief pulse of power to it.

It seems to me like it's working.

@zuckschwerdt zuckschwerdt merged commit 2727972 into merbanan:master Nov 5, 2024
8 checks passed
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.

3 participants