Closed hadjedjvincent closed 2 years ago
Hi Vincent,
if the model is defined as "not in list, try anyway", the CRC checking is generally disabled. So no wonder you don't get CRC errors then... The questions is, why you get them on TH1 modell. Maybe your sensor has a different way of CRC calculation:
The rest is then a lot of calculating and guess work ;-) Send me the data and let's try to solve this riddle....
Hi @hadjedjvincent, are you still interested in solving this?
Hi @SteidlD, yes of course, sorry !
I've enabled debug mode in order to retrieve the data you need.
I've managed to get same temperature+humidity with different battery level and compiled them into a table regarding all the data i've collected from the debug log.
ManufacturerData | Temperature (°C) | Humidity (%) | Battery Level (%) | Calculated CRC | Expected CRC |
---|---|---|---|---|---|
8a051c250104062408 |
14.18 | 95 | 36 | 604 | 85a7 |
8a051c250108063008 |
14.18 | 95 | 48 | 608 | 85a7 |
8a051c250104062a08 |
14.18 | 95 | 42 | 604 | 85a7 |
8a051c25010b063008 |
14.18 | 95 | 48 | 60b | 85a7 |
9e051c250103062f08 |
14.38 | 95 | 47 | 8697 | 8697 |
9e051c2501d5052f08 |
14.38 | 95 | 47 | 5d5 | 8697 |
9e051c2501c4053008 |
14.38 | 95 | 48 | 5c4 | 8697 |
9e051c2501b9053008 |
14.38 | 95 | 48 | 5b9 | 8697 |
9e051c2501b3052708 |
14.38 | 95 | 39 | 5b3 | 8697 |
a706b82401bd042b08 |
17.03 | 94 | 43 | 4bd | b44b |
bb06b8240164041f08 |
17.23 | 94 | 31 | 464 | 769a |
It looks like the battery level is not included into the CRC calculation. Here are some of the logs if that helps you more.
Tell me if you need some more data or if i've to patch the package on my homebridge instance to test things.
[12/11/2021, 16:37:53] [Piscine] Initializing InkbirdBtTHSensor accessory...
[12/11/2021, 16:37:53] [Piscine] Start Initialization
[12/11/2021, 16:37:53] [Piscine] Info - Update Intervall 600s.
[12/11/2021, 16:37:53] [Piscine] Warning - Waiting for bluetooth low energy hardware to power on
[12/11/2021, 16:37:53] [Piscine] Debug - End Initialization
[12/11/2021, 16:37:53] [Piscine] Debug - Getting available services
[12/11/2021, 16:37:55] [Piscine] Debug - Start getting temperature
[12/11/2021, 16:37:55] [Piscine] Debug - Bluetooth low energy hardware powered on
[12/11/2021, 16:37:55] [Piscine] Debug - Start scanning for bluetooth sensor
[12/11/2021, 16:37:55] [Piscine] Debug - Start getting external sensor flag
[12/11/2021, 16:37:55] [Piscine] Debug - Start getting humidity
[12/11/2021, 16:37:55] [Piscine] Debug - Start getting battery low status
[12/11/2021, 16:37:55] [Piscine] Debug - Start getting battery level
[12/11/2021, 16:37:55] [Piscine] Info - Peripheral with MAC 49:42:06:00:41:90 found - stop scanning
[12/11/2021, 16:37:55] [Piscine] Debug - ManufacturerData is 8a051c250104062408
[12/11/2021, 16:37:55] [Piscine] Warning - CRC Error (expected 85a7, found 604). Ignoring data!!
{
datalength: 9,
localName: 'sps',
serviceDat: undefined,
serviceUuids: 'fff0'
}
<Buffer 8a 05 1c 25 01 04 06 24 08>
34215
[12/11/2021, 16:37:55] [Piscine] Debug - CRC Ok (85a7), temperature 14.18°C, relative humidity 95%, external sensor
[12/11/2021, 16:37:55] [Piscine] Debug - battery level 36%, battery ok
[12/11/2021, 16:37:55] [Piscine] Info - Sending temperature 14.18°C
[12/11/2021, 16:37:55] [Piscine] Info - Sending relative humidity 95%
[12/11/2021, 16:37:55] [Piscine] Info - Sending external sensor
[12/11/2021, 16:37:55] [Piscine] Info - Sending battery level 36%
[12/11/2021, 16:37:55] [Piscine] Info - Sending battery ok
[12/11/2021, 17:08:06] [Piscine] Debug - ManufacturerData is 8a051c25010b063008
[12/11/2021, 17:08:06] [Piscine] Warning - CRC Error (expected 85a7, found 60b). Ignoring data!!
{
datalength: 9,
localName: 'sps',
serviceDat: undefined,
serviceUuids: 'fff0'
}
<Buffer 8a 05 1c 25 01 0b 06 30 08>
34215
[12/11/2021, 17:08:06] [Piscine] Debug - CRC Ok (85a7), temperature 14.18°C, relative humidity 95%, external sensor
[12/11/2021, 17:08:06] [Piscine] Debug - battery level 48%, battery ok
[12/11/2021, 17:08:06] [Piscine] Info - Sending temperature 14.18°C
[12/11/2021, 17:08:06] [Piscine] Info - Sending relative humidity 95%
[12/11/2021, 17:08:06] [Piscine] Info - Sending external sensor
[12/11/2021, 17:08:06] [Piscine] Info - Sending battery level 48%
[12/11/2021, 17:08:06] [Piscine] Info - Sending battery ok
[12/11/2021, 16:57:59] [Piscine] Debug - ManufacturerData is 8a051c250104062a08
[12/11/2021, 16:57:59] [Piscine] Warning - CRC Error (expected 85a7, found 604). Ignoring data!!
{
datalength: 9,
localName: 'sps',
serviceDat: undefined,
serviceUuids: 'fff0'
}
<Buffer 8a 05 1c 25 01 04 06 2a 08>
34215
[12/11/2021, 16:57:59] [Piscine] Debug - CRC Ok (85a7), temperature 14.18°C, relative humidity 95%, external sensor
[12/11/2021, 16:57:59] [Piscine] Debug - battery level 42%, battery ok
[12/11/2021, 16:57:59] [Piscine] Info - Sending temperature 14.18°C
[12/11/2021, 16:57:59] [Piscine] Info - Sending relative humidity 95%
[12/11/2021, 16:57:59] [Piscine] Info - Sending external sensor
[12/11/2021, 16:57:59] [Piscine] Info - Sending battery level 42%
[12/11/2021, 16:57:59] [Piscine] Info - Sending battery ok
[12/11/2021, 17:18:14] [Piscine] Debug - ManufacturerData is 9e051c250103062f08
[12/11/2021, 17:18:14] [Piscine] Warning - CRC Error (expected 8697, found 603). Ignoring data!!
{
datalength: 9,
localName: 'sps',
serviceDat: undefined,
serviceUuids: 'fff0'
}
<Buffer 9e 05 1c 25 01 03 06 2f 08>
34455
[12/11/2021, 17:18:14] [Piscine] Debug - CRC Ok (8697), temperature 14.38°C, relative humidity 95%, external sensor
[12/11/2021, 17:18:14] [Piscine] Debug - battery level 47%, battery ok
[12/11/2021, 17:18:14] [Piscine] Info - Sending temperature 14.38°C
[12/11/2021, 17:18:14] [Piscine] Info - Sending relative humidity 95%
[12/11/2021, 17:18:14] [Piscine] Info - Sending external sensor
[12/11/2021, 17:18:14] [Piscine] Info - Sending battery level 47%
[12/11/2021, 17:18:14] [Piscine] Info - Sending battery ok
[12/11/2021, 17:38:24] [Piscine] Debug - ManufacturerData is 9e051c2501c4053008
[12/11/2021, 17:38:24] [Piscine] Warning - CRC Error (expected 8697, found 5c4). Ignoring data!!
{
datalength: 9,
localName: 'sps',
serviceDat: undefined,
serviceUuids: 'fff0'
}
<Buffer 9e 05 1c 25 01 c4 05 30 08>
34455
[12/11/2021, 17:38:24] [Piscine] Debug - CRC Ok (8697), temperature 14.38°C, relative humidity 95%, external sensor
[12/11/2021, 17:38:24] [Piscine] Debug - battery level 48%, battery ok
[12/11/2021, 17:38:24] [Piscine] Info - Sending temperature 14.38°C
[12/11/2021, 17:38:24] [Piscine] Info - Sending relative humidity 95%
[12/11/2021, 17:38:24] [Piscine] Info - Sending external sensor
[12/11/2021, 17:38:24] [Piscine] Info - Sending battery level 48%
[12/11/2021, 17:38:24] [Piscine] Info - Sending battery ok
Hi @hadjedjvincent,
thanks a lot for the good data. Here is what I think:
ManufacturerData | Temperature (°C) | Humidity (%) | Battery Level (%) | External temperature?? | Expected CRC |
---|---|---|---|---|---|
8a051c250104062408 |
14.18 | 95 | 36 | 604 = 15.40°C | 85a7 |
8a051c250108063008 |
14.18 | 95 | 48 | 608 = 15.44°C | 85a7 |
8a051c250104062a08 |
14.18 | 95 | 42 | 604 = 15.40°C | 85a7 |
8a051c25010b063008 |
14.18 | 95 | 48 | 60b = 15.47°C | 85a7 |
9e051c250103062f08 |
14.38 | 95 | 47 | 603 = 15.39°C | 8697 |
9e051c2501d5052f08 |
14.38 | 95 | 47 | 5d5 = 14.93°C | 8697 |
9e051c2501c4053008 |
14.38 | 95 | 48 | 5c4 = 14.76°C | 8697 |
9e051c2501b9053008 |
14.38 | 95 | 48 | 5b9 = 14.65°C | 8697 |
9e051c2501b3052708 |
14.38 | 95 | 39 | 5b3 = 14.59°C | 8697 |
a706b82401bd042b08 |
17.03 | 94 | 43 | 4bd = 12.13°C | b44b |
bb06b8240164041f08 |
17.23 | 94 | 31 | 464 = 11.24°C | 769a |
Thanks Dietmar
Hi @SteidlD
You are right regarding the external temperature. It's not displayed into the app, or the device itself, but the values are corresponding to the internal sensor.
So, the device is returning both temperature when external sensor is plugged in. Good catch!
I can confirm that without the external sensor, there is no CRC error. Tell me how can i help ;-)
Hi @hadjedjvincent,
Just to be sure, could you please verify which temperature is which one, if the external sensor is connected. I would guess, that the first two bytes (The temperature that the plug-in shows) is always the internal sensor and that the external is in the place of the CRC. Heat the external sensor up a bit with your fingers or with a lighter and check which values go up.
That would be great! Thanks.
@SteidlD The current temperature reported into Homebridge is the one from the external sensor, i'm 100% sure because it's the pool temperature and i was monitoring it during summer :) The other value is the one of the internal sensors, i've an outdoor Hue IR detector that includes a temperature sensor too, and the values were almost the same at the same time. I can check again if you want, tomorrow ;)
Hi @SteidlD
So, here are the data you asked ;)
ManufacturerData | Temperature (°C) | Humidity (%) | Battery Level (%) | Calculated CRC | Expected CRC |
---|---|---|---|---|---|
2105802501cf042d08 |
13.13 | 96 | 45 | 4cf | 7342 |
2105e42501af042d08 |
13.13 | 97 | 45 | 4af | ac03 |
2105e4250188042d08 |
13.13 | 97 | 45 | 488 | ac03 |
ManufacturerData | Temperature (°C) | Humidity (%) | Battery Level (%) | Calculated CRC | Expected CRC |
---|---|---|---|---|---|
21055424014e0a2d08 |
13.13 | 93 | 45 | a4e | db03 |
2105542401bc0b2d08 |
13.13 | 93 | 45 | bbc | db03 |
So, the temperature went from (11.60 °C to 26.38 °C & 30.04 °C) Looks OK and confirm that this is the internal temperature at this position.
Hi. Will there be an updated version of this plugin, as I am unable to get the external sensor of the IBS TH1 Plus to work within Homebridge. Many Thanks
The IBS-TH1-Plus model is supported in the newest version 0.5.0 (along with the IBS-TH2 models)
@hadjedjvincent: Could you test this on the IBS-TH1-Plus. I got myself an IBS-TH2-Plus. I guess they're compatible... Thanks
Hi @SteidlD , thank you for this plugin :-)
I've noticed a little issue while connecting the external probe (TH1 Plus model) and if the sensor model is defined as TH1. There is no CRC issues if external sensor is disconnected.
This error does not occurs if the model is defined as "not in list, try anyway", and all the values are correct. Internal / External sensor are both correctly detected.
What kind of information do you need to add the TH1-Plus model into the list ? I've dumped some variables, if it helps, thank you!
Warning - CRC Error (expected 22bb, found a23). Ignoring data!!
self.dSensorCfg :
self.cRawStatus:
<Buffer 0c 0a 24 13 01 23 0a 64 08>
self.iCRC:8891