bortek
(bortek)
December 20, 2022, 4:27pm
94
It works!!! and you skip all hassle with Tuya.
I hooked up my RTL-SDR dongle.
Installed these 2 addons. Minimal config was required. Added this to the end of config/rtl_433/rtl_433.conf.template so that the radio is not being “spammed” by other devices transmitting on the same frequency
protocol 194 # Inkbird ITH-20R temperature humidity sensor
I was up and running in under 20 min. I can have the data in HA. Themerature from Pool sensor is reported correctly but humidity shows 130% which is probably due to the fact that it does not have any humidity sensor.
Addons
Other sources to read
opened 01:56PM - 08 Aug 20 UTC
closed 12:31PM - 07 Oct 21 UTC
todo
It would be useful for some devices to be able to optionally compress or discard… the preamble.
Implementing a decoder for the Inkbird ITH-20R temperature and humidity sensor has required increasing BITBUF_COLS and PD_MAX_PULSES substantially which increases the memory footprint. The preamble from this device is 14400 on-off bits which pushes the actual payload out of the available data window for decoding.
Please see this conversation in the group for the full context
https://groups.google.com/g/rtl_433/c/oeExmwoBI0w
Dmitriy Kozyrev wrote a decoder and for the device and posted a link to a zip of his work. I've merged the changes into my working copy and have pushed to my fork for convenience.
This is the message format the decoder reads as copied from Dmitriy's post:
```
Total packet length 14563 bits:
Preamble: aa aa aa ... aa aa (14400 on-off sync bits)
Sync Word (16 bits): 2DD4
Data (147 bits):
Byte Sample Comment
0-2 D3910F Always the same across devices, a device type?
3 00 00 - normal work , 40 - unlink sensor (button pressed 5s), 80 - battery replaced
4 01 Changes from 1 to 2 if external sensor present
5-6 0301 Unknown (also seen 0201), sw version?
7 58 Battery % 0-100
8-9 A221 Device id, always the same for a sensor but each sensor is different
10-11 D600 Temperature in °C * 10, little endian, so 0xD200 is 210, 21.0°C or 69.8°F
12-13 F400 Temperature °C * 10 for the external sensor, 0x1405 if not connected
14-15 D301 Relative humidity % * 10, little endian, so 0xC501 is 453 or 45.3%
16-17 38FB CRC16
18 0 Unknown 3 bits (seen 0 and 2)
CRC16 (bytes 0-15), without sync word):
poly=0x8005 init=0x2f61 refin=true refout=true xorout=0x0000 check=0x3583 residue=0x0000
```
And the full set of changes to get this thing to work are here:
https://github.com/ehagan/rtl_433/tree/feat-inkbird_ith20r
I ran ` rtl_433 -F json -M utc -R 40 ` under memusage with and without the changes.
feat-inkbird_ith20r branch:
```
Memory usage summary: heap total: 40818814, heap peak: 38142376, stack peak: 92400
total calls total memory failed calls
malloc| 9285 2055942 0
realloc| 1110 461800 0 (nomove:483, dec:0, free:0)
calloc| 3232 38301072 0
free| 19512 40809762
```
Baseline:
```
Memory usage summary: heap total: 40429260, heap peak: 37873576, stack peak: 47440
total calls total memory failed calls
malloc| 6867 2035428 0
realloc| 1110 461800 0 (nomove:480, dec:0, free:0)
calloc| 1442 37932032 0
free| 14680 40420208
```
Then I ran `rtl_433 -F json -M utc`
feat-inkbird_ith20r branch:
```
Memory usage summary: heap total: 40756790, heap peak: 38167432, stack peak: 92400
total calls total memory failed calls
malloc| 7538 2064590 0
realloc| 1117 470480 0 (nomove:512, dec:0, free:0)
calloc| 1815 38221720 0
free| 15862 40747738
```
Baseline:
```
Memory usage summary: heap total: 40465143, heap peak: 37898448, stack peak: 47440
total calls total memory failed calls
malloc| 7093 2060671 0
realloc| 1117 470480 0 (nomove:509, dec:0, free:0)
calloc| 1477 37933992 0
free| 14965 40456091
```
So about double the peak stack usage and about 1% increase in heap usage.
merbanan:master ← ehagan:master
opened 08:40PM - 09 Aug 20 UTC
Test captures and decoded JSON for Inkbird ITH-20R
These captures cover a range… of temperatures and humidities and include the secondary external temperature probe in one sample.
https://groups.google.com/g/rtl_433/c/oeExmwoBI0w?pli=1
https://wiki.jmehan.com/display/KNOW/Reverse+Engineering+the+Inkbird
1 Like