-
Notifications
You must be signed in to change notification settings - Fork 19
unsupported sensor type 18! Digital Barometer Thermometer Hygrometer (TFA 35.1154.01) #26
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 servic 8000 e and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wish support for this sensor type too. If I would now how the initial value is calculated by reveng tools (as mentioned in the whb.cpp file) I could try to add that by myself. Is the checksum for the whole byte stream? Or does it start after id? I don't know. I had no success with the reveng tool yet. |
I did first verify reveng functionality with a known sensor and a known init crc value, like this:
The type of sensor is 9, the init value should be 0xa7a41254. 4b 2d d4 2b is the init bytes, 1a is the length. 1a is also the first byte in the crc calculation. I found out that leaving out the three last bytes 80 5b 0d results in 0x00000000 as end value, and this is what we would like to accomplish. The command for verify would look like this:
Ok, next step would be to search for algorithm with reveng. We need many samples. I collected some samples from my sensor, and serching will be done like this:
The init crc value for the sensor seems then to be 0xca0abb08 |
Thanks a lot for the response. But I got it by myself. It was not mentioned where the crc-32 starts. Because there is the initial code which obviously not belongs to the crc range. That was my problem. I had a look into the whb.cpp and saw that first 4 bytes are skipped. That helps. I own a WHB07 which is already supported. With these information I was able to to calculate initial crc value for WHB07, finally for WHB18 and added WHB18 to the code. I also added the battery status for command line output. WHB18 also contains information of previous data (temp, hum, barometric pressure). Somebody interested in these code? |
I would be interested, sure, as I also have a WHB18 myself. I would like to get temp, humidity and pressure fed as parameter to external script using -e option. |
I've forked code and mad a pull request for my additions for WHB18. |
I did see your fork, you might consider using cvs_temp with extended range like this:
...to get better range for air pressure. The range is probably even bigger than 10 or 11 bits, so creating another cvt_pressure with 16 bit would be appropriate. Just my thoughts. |
type 0x18 sensor seems to be the only weatherhub that support barometric air pressure. The display shows air pressure in HPa, temperature and humidity.
According to MobileAllerts gateway inary upload document, the sensor sends a 3-byte tx counter, temperature as a word, humidity as a byte and air pressure as another word.
Typical debug output:
CRC-32 init value for the sensor is 0xf39c8e73.
The text was updated successfully, but these errors were encountered: