Преглед изворни кода

Inkbird BBQ4T v2: decode probe temperatures correctly.

- all probes on dp 107 need to be base64 type (not integer)
- mask is reversed due to little-endian encoding, and has 4 bytes peer
  probe; it seems 3 bytes temperature, and 1 byte of flags.

DP 106 masks also appear to be incorrect based on the one sample of
logged data in the original report, but there seem to be 28 bytes
total, so the actual breakdown is unclear - is it 7 bytes per probe,
or maybe some is shared config?

Issue #1439
Jason Rumney пре 2 година
родитељ
комит
d87eb864b9
1 измењених фајлова са 11 додато и 7 уклоњено
  1. 11 7
      custom_components/tuya_local/devices/inkbird_bbq4t_thermometerv2.yaml

+ 11 - 7
custom_components/tuya_local/devices/inkbird_bbq4t_thermometerv2.yaml

@@ -13,7 +13,7 @@ primary_entity:
       class: measurement
       optional: true
       mapping:
-        - mask: FFFF000000000000
+        - mask: FFFFFF
           endianness: little
           scale: 100
       unit: F
@@ -26,13 +26,13 @@ secondary_entities:
     class: temperature
     dps:
       - id: 107
-        type: integer
+        type: base64
         name: sensor
         class: measurement
         optional: true
         mapping:
           - scale: 100
-            mask: 0000FFFF00000000
+            mask: FFFFFF00000000
             endianness: little
         unit: F
   - entity: sensor
@@ -40,13 +40,13 @@ secondary_entities:
     class: temperature
     dps:
       - id: 107
-        type: integer
+        type: base64
         name: sensor
         class: measurement
         optional: true
         mapping:
           - scale: 100
-            mask: 00000000FFFF0000
+            mask: FFFFFF0000000000000000
             endianness: little
         unit: F
   - entity: sensor
@@ -54,13 +54,13 @@ secondary_entities:
     class: temperature
     dps:
       - id: 107
-        type: integer
+        type: base64
         name: sensor
         class: measurement
         optional: true
         mapping:
           - scale: 100
-            mask: 000000000000FFFF
+            mask: FFFFFF000000000000000000000000
             endianness: little
         unit: F
   - entity: binary_sensor
@@ -146,6 +146,10 @@ secondary_entities:
           min: 0
           max: 50000
         mapping:
+          # mask seems to be wrong, only data available has 40 A characters,
+          # presumably base64 encoded 28 bytes of 00, but could also be
+          # 20 hex bytes. Not sure of the meaning, whether it is 7 (or 5)
+          # bytes per probe or some of the bytes are general settings.
           - mask: FFFF000000000000
             endianness: little
             scale: 100