-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
WH45 Combi Sensor #2099
Comments
Also note that for bat it can return 6 for DC imput rather then battery use. |
What timings did you grab the codes with? |
Well I have almost every sensor that comes with the base station the line that I ran to look for it was |
If you can grab some samples https://triq.org/rtl_433/ANALYZE.html and upload here as zip. |
8xcu8samples.zip |
From the Manual is shows,.
Plus bat wish i presume can be 0 ~ 3 and 6 for DC |
What a coincidence. I have a WH45 and have been working on decoding it. Here's what I have:
I can prepare a PR if that makes things easier. |
I don't have commit access, but if you can make a PR, that's great because not only is it code that could be merged, but it is code that other people can run. I have a WH41, which is PM2.5/PM10 only. However, the PM10 is faux; it's a formula from PM2.5. From memory the PM2.5/PM10 encoding looks famiiar. |
The samples show FSK PCM, 56 µs. The timings above are correct. |
Okay, a PR it is. Since many Fineoffset devices share the same timings what is the preferred approach for adding a new device? Add it in fineoffset.c as part of an existing protocol #? Or add it as a new protocol either in fineoffset.c or its own file? A new protocol seems best to me, but I thought I'd ask first. I'll add that I'm also decoding two other Fineoffset devices, WN34 (temperature probe) and WH55 (leak detector), and could add those later. |
Running a device decoder is cheap, create a new file with a fresh decoder. Having multiple decoders in one source file is reserved for protocols that share e.g. a custom coding or checksum. |
However, I suspect there is significant shared decoding with this and the WH41. A similar situation is acurite which has various sensors with similar encodings. So do think about if you have to cut and paste or are reimplementing the same thing. |
Yes, I was talking about nested decoders like https://github.com/merbanan/rtl_433/blob/master/src/devices/fineoffset.c#L474-L478 |
The data layout is similar between WH41 and WH45 in that the battery bits and PM2.5/PM10 are encoded the same way, but they are at different offsets. Due to a bigger ID and the addition of temperature, humidity, and CO2, the only data that is aligned between the two is the family code :-). |
My point is really only that the code to unpack battery and PM2.5/PM10 should exist once and not be duplicated. That could well be a function called by both with the multiple words and address of variables. |
Yes, for complex situations: DRY ;) It's just a few bits here, no worries: https://github.com/merbanan/rtl_433/blob/master/src/devices/fineoffset.c#L415-L416 |
The PR is manually-merged, so I think this is fixed. @JaraLowell and others please update to latest master and test, and ask on the list or open a new issue if there are problems. |
@JaraLowell @anthyz Thank you both very much for your efforts. I just got a WH45 today and plugged it in, and (after remembering to restart rtl_433 after building the new code) saw nice json showing up in MQTT. A few minutes of hand-writing HA mqtt sensors later, and I have data being displayed! |
And if you are listening Ecowitt: I bought it because it worked with rtl_433. And thanks for answering questions about the WH0290 earlier in email. |
Awesome! Glad it's working for you! |
I own a DP250 (aka as WH45 from Ecowitt) the 5-in-1 Air Quality Sensor, with PM2.5 / PM10 / CO2 / Temperature / Humidity Detection Sensor. Seems tough rtl_433 does not see this one. So was wondering if there anything I can do to help for this to be added.
The text was updated successfully, but these errors were encountered: