merbanan / rtl_433

Program to decode radio transmissions from devices on the ISM bands (and other frequencies)
GNU General Public License v2.0
6.14k stars 1.33k forks source link

Self Powered Switch Device 433mhz Model: QX-302, QX-305 #2902

Closed adminy closed 6 months ago

adminy commented 6 months ago

here is some logs from running rtl_433 -A and pressing the button a couple of times. No json, so its probably not a registered device yet. let me know how I can collect info for it and / or decode. thanks.

QX-302: https://logpaste.com/l8qA3HsW QX-305: https://logpaste.com/fPuVfdnJ

Wireless Frequency: 433.92Mhz

Manufacturer: Shenzhen QiChip Technology Co. Ltd.

zuckschwerdt commented 6 months ago

If you look at the "count" fields the numbers are too low. We expect more data, like 32 bits or even much more. From what we know of self-powered devices the transmissions are short and fast.

Re-run with a higher sampe rate, e.g. -s 1024k Also grab one sample, verify it looks promissing in https://triq.org/pdv/ and upload here as zip, see https://triq.org/rtl_433/ANALYZE.html

adminy commented 6 months ago

scans.tar.gz

looks promising on the verify step, but not totally sure. still feels like its not consistent across scans. this is data from QX-305 only.

zuckschwerdt commented 6 months ago

Actually a very simple OOK signal with 25 bits at 33/100 µs. This will decode the data: rtl_433 -R 0 -X 'n=name,m=OOK_PWM,s=33,l=100,g=150,r=1500'

If it only has one function (single press on single button) then use this to only accept that button: rtl_433 -R 0 -X 'n=name,m=OOK_PWM,s=33,l=100,g=150,r=1500,match={25}573ace8,countonly'

See https://github.com/merbanan/rtl_433/tree/master/conf example on how to write a documented conf file. PR or paste us the finished file if you like to.

adminy commented 6 months ago

I'm not sure that's it though ... https://logpaste.com/3X0Y7K6j, Also the single press command literally gives back nothing.

zuckschwerdt commented 6 months ago

Looks good, that's the expected output.

adminy commented 6 months ago

https://github.com/merbanan/rtl_433/pull/2903 Something like this then?

I was missing rtl_433 -R 0 -s 1024k -c qx-30x.conf -F json the -s flag. now its all working!

{"time" : "2024-04-15 23:02:13", "model" : "QX-30X", "count" : 2, "num_rows" : 4, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:14", "model" : "QX-30X", "count" : 1, "num_rows" : 5, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:15", "model" : "QX-30X", "count" : 1, "num_rows" : 3, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:26", "model" : "QX-30X", "count" : 3, "num_rows" : 5, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:27", "model" : "QX-30X", "count" : 3, "num_rows" : 6, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:31", "model" : "QX-30X", "count" : 2, "num_rows" : 5, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:33", "model" : "QX-30X", "count" : 2, "num_rows" : 5, "len" : 25, "data" : "573ace8"}
{"time" : "2024-04-15 23:02:42", "model" : "QX-30X", "count" : 2, "num_rows" : 5, "len" : 25, "data" : "573ace8"}

Sometimes the press doesn't register. Is there anything else I can do to make it more sensitive?

Also how do I discard "count", "num_rows" & "len" fields?

edco commented 6 months ago

I have a QX-304 which works with qx-30x.conf. Unfortunately I just got the one, single gang button to test, so I can't compare the data from different devices/buttons, but would it be reasonable to assume this is a 1527 code? In that case I'm thinking we'd ignore the final bit, and split the remainder into 20 and 4 bits:

  bits       >= 24,
  unique,
  get         = get=@0:{20}:id,
  get         = get=@20:{4}:button

This config should make it easier to quickly setup multiple switches and potentially cater to multi-gang switches too.

zuckschwerdt commented 6 months ago

Yes, that is reasonable. The EV1527 data bits (button code) would be the last 4 bits, and the sync is trailing. You can also add bits <= 25, too.

Document your findings along with the changes and PR if you like.