Inkbird BT thermometer iBBQ with ESP32

22 posts were merged into an existing topic: Presence detection, BLE, mi flora, RF gateway with ESP32, OpenMQTTGateway is now compatible

Does this work with any Bluetooth meat probe or only a specific one and if so which one?

You should be able to develop a similar integration for any bluetooth device, but this thread deals with the sensors mentioned by @paddy0174 in the first post.

2 Likes

I have a generic brand thermometer and it uses the same protocol as the original Inkbird one. I use it with the BLE passive monitor but it should work well with anything that supports Inkbird.

This is sold by a swedish company and branded with their “generic” brand:

I believe you will find that several sites selling the same type thermometer with assorted brand names.

Using an Inkbird and OpenMQTTGateway. It throws erroneous values at times which just ruins my chart :frowning: The chart in the inbird BBQ go app looks normal.

Any ideas?
Thanks,
Grey

Nope, no idea, as I’m not using OpenMQTTGateway (as stated above). :wink:

Please feel free to ask in the corresponding thread, here:

We are discussing this issue below :

1 Like

What are your expected measurement/temperature data when you see this ?

I’ll start my own thread since it’s a diff probe…

Hi guys,

Setting up my first ESP32 device to use exclusively with Inkbird BT4 and asking for a little help here.
I basically followed the steps from the first post, copy pasted all the configs.
I can see probes temperature in ESPHome logs:

But in home assistant sensors are not appearing, thought they are created under different names, but cannot find anything that may look like those sensors. To me it feels like ESP32 board not publishing anything to HA, but as it’s my first board I may miss something.

Update:

I think I found where my problem is - had to setup ESPHome integration in order for this to work.

Setup couldn’t be easier so thanks for the detailed setup instructions! I was able to get my BT thermometer into HA pretty quickly without any changes to the setup. Although sadly like a few other posts I also had dropouts which would cause my graphs to have huge spikes to 0 at times, range isn’t the issue as they’re VERY close to each other. The iBBQ app must either not get the connection drops or must smooth the map over as the issue isn’t present there. Given once you connect your phone the BT connection to the ESP also drops so sadly had to resort back to the iBBQ app for last weekends 7 hour smoke and miss out on all that juicy HA data!

1 Like

I’m trying to set this up with an Inkbird ibt-2x.

I had to change iBBQ to xBBQ to get the following result

13:18:50    [I]    [ble_adv:019]    New BLE device
13:18:50    [I]    [ble_adv:020]    address: D3:6D:00:00:11:2C
13:18:50    [I]    [ble_adv:021]    name: xBBQ
13:18:50    [I]    [ble_adv:022]    Advertised service UUIDs:
13:18:50    [I]    [ble_adv:025]      - 0xFFF0
13:18:50    [I]    [ble_adv:028]    Advertised service data:
13:18:50    [I]    [ble_adv:034]    Advertised manufacturer data:

However I don’t get any useful data. Is there anyway to debug this? Can I maybe get all service data and manufacturer data in my log to see if it matches the expected format?

Please post the code from the config you’re using. :slight_smile: It’s hard to say without actually seeing the code. :slight_smile:

This is fixed with the last version of OMG
https://docs.openmqttgateway.com/upload/web-install.html

OMG .9.15 and an inkbird works fine. Cornish hen :slight_smile:

1 Like

It’s basically the same code as above, but with xBBQ instead of iBBQ

This is what I see with VERY_VERBOSE logging

Address: D3:6D:00:00:11:2C (PUBLIC)
RSSI: -20Name: 'xBBQ'
TX Power: 2
Ad Flag: 6
Service UUID: 0xFFF0
Manufacturer data: 00.00.2C.11.00.00.6D.D3.04.01.01.01 (12)
Adv data: 02.01.06.03.02.F0.FF.0F.FF.01.00.00.00.2C.11.00.00.6D.D3.04.01.01.01.05.09.78.42.42.51.05.12.18.00.38.01.02.0A.00 (38)

This is the information the template returns in the log:

[20:01:22][I][ble_adv:021]:   name: xBBQ
[20:01:22][I][ble_adv:022]:   Advertised service UUIDs:
[20:01:22][I][ble_adv:025]:     - 0xFFF0
[20:01:22][I][ble_adv:028]:   Advertised service data:
[20:01:22][I][ble_adv:034]:   Advertised manufacturer data:
[20:01:23][I][ble_adv:037]:     - 0x0001: (00.00.2C.11.00.00.6D.D3.F9.00.F7.00 (12))`

This is my code:

substitutions:
  device_name: Inkbird
  device_type: BLE
  ip: 192.168.2.92
  mac_inkbird: "D3:6D:00:00:11:2C"

esp32:
  board: lolin32_lite
  framework:
    type: arduino

esphome:
  name: inkbird
  on_boot:
    priority: -10
    then:
      - lambda: |-
          {
            id(ble_sensor_1).publish_state(false);
            id(ble_sensor_2).publish_state(false);
          }

packages:
  minimal: !include packages/minimal.yaml
  basic: !include packages/basic.yaml
  inkbird: !include packages/inkbird.yaml

packages/inkbird.yaml

script:
  - id: timer
    then:
      - delay: 60s
      - lambda: |-
          {
            id(ble_sensor_1).publish_state(false);
            id(ble_sensor_2).publish_state(false);
          }

esp32_ble_tracker:
  on_ble_advertise:
    - mac_address: ${mac_inkbird}
      then:
        - script.stop: timer
        - lambda: |-
            if (x.get_name() != "xBBQ") return;

            ESP_LOGI("ble_adv", "New BLE device");
            ESP_LOGI("ble_adv", "  address: %s", x.address_str().c_str());
            ESP_LOGI("ble_adv", "  name: %s", x.get_name().c_str());
            ESP_LOGI("ble_adv", "  Advertised service UUIDs:");

            for (auto uuid : x.get_service_uuids()) {
              ESP_LOGI("ble_adv", "    - %s", uuid.to_string().c_str());
            }

            ESP_LOGI("ble_adv", "  Advertised service data:");

            for (auto data : x.get_service_datas()) {
              ESP_LOGI("ble_adv", "    - %s: (length %i)", data.uuid.to_string().c_str(), data.data.size());
            }

            ESP_LOGI("ble_adv", "  Advertised manufacturer data:");

            for (auto data : x.get_manufacturer_datas()) {
              ESP_LOGI("ble_adv", "    - %s: (%s)", data.uuid.to_string().c_str(), hexencode(data.data).c_str());

              if (data.uuid.contains(0, 0)) {

                int probe0 = (data.data[9] << 8) + data.data[8];
                int probe1 = (data.data[11] << 8) + data.data[10];

                ESP_LOGI("ble_data", "    - %f %f", probe0 / 10.0, probe1 / 10.0);

                if (probe0 < 60000) {
                  id(ble_sensor_1).publish_state(probe0 / 10.0);
                } else {
                  id(ble_sensor_1).publish_state(0);
                }

                if (probe1 < 60000) {
                  id(ble_sensor_2).publish_state(probe1 / 10.0);
                } else {
                  id(ble_sensor_2).publish_state(0);
                }
              }
            }
        - script.execute: timer

sensor:
  - platform: template
    name: "iBBQ Temperature Probe 1"
    id: ble_sensor_1
    unit_of_measurement: "°C"
    accuracy_decimals: 0
  - platform: template
    name: "iBBQ Temperature Probe 2"
    id: ble_sensor_2
    unit_of_measurement: "°C"
    accuracy_decimals: 0

packages/minimal.yaml

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pass
  fast_connect: on
  manual_ip:
    static_ip: ${ip}
    gateway: 192.168.2.100
    subnet: 255.255.255.0
  ap:
    ssid: "${device_name} ${device_type} Hotspot"
    password: !secret hotspot_pass

captive_portal:

# Enable logging
logger:
  level: VERY_VERBOSE

# Enable Home Assistant API
api:

# Enable OTA updates
ota:

packages/basic.yaml

# Enable Web server
web_server:
  port: 80

#Sync time
time:
  - platform: homeassistant
    id: time_homeassistant
    timezone: "Europe/Amsterdam"
    on_time_sync:
      - component.update: sensor_uptime_timestamp

  - platform: sntp
    id: time_sntp
    timezone: "Europe/Amsterdam"

text_sensor:
  - platform: version
    hide_timestamp: true
    name: "${device_name} ${device_type} ESPHome Version"
    entity_category: diagnostic
  - platform: wifi_info
    ip_address:
      name: "${device_name} ${device_type} IP Address"
      icon: mdi:wifi
      entity_category: diagnostic
    ssid:
      name: "${device_name} ${device_type} Connected SSID"
      icon: mdi:wifi-strength-2
      entity_category: diagnostic

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    id: sensor_uptime
    internal: true
  - platform: template
    id: sensor_uptime_timestamp
    name: "${device_name} ${device_type} Uptime"
    device_class: "timestamp"
    accuracy_decimals: 0
    update_interval: never
    lambda: |-
      static float timestamp = (
        id(time_homeassistant).utcnow().timestamp - id(sensor_uptime).state
      );
      return timestamp;
    entity_category: diagnostic

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: ${device_name} ${device_type} WiFi Signal
    icon: mdi:wifi-strength-2
    update_interval: 60s

# restart button
button:
  - platform: restart
    name: "${device_name} ${device_type} Restart"

# safe mode switch
switch:
  - platform: safe_mode
    name: "${device_name} ${device_type} Safe Mode"

binary_sensor:
  - platform: status
    name: ${device_name} ${device_type} Status
    entity_category: diagnostic

@paddy0174 I’ve done some debuggin myself, and the reason it does not work is because of this if-statement: if (data.uuid.contains(0, 0))
If I take that out, it works.
I’m not completely sure what it does, but it seems to retern false.

Why are you fighting using OMG ? :slight_smile:
PapaLanc

1 Like

Not sure if you are referring to me, but I don’t use MQTT and I don’t plan to use it just for this :slight_smile:

Nobody is fighting OMG, it simply is not the correct thread here. :slight_smile: OMG has it’s own thread here in this forum and is profundly supported, especially by @1technophile! :slight_smile: So if questions arise about it, why not ask there? :wink:

@TheFes
On a first glance, I can’t see anything wrong, but I’d like to test some things @home, before I answer. :slight_smile:

I made a reminder, so I won’t forget it tonight, and keep fingers crossed I can find my Inkbirds. We had some painters here, and since then, nothing is, where it should be. :rofl: :rofl:

I added it to my post, but I have it working now, however I had to remove the check for the uuid.
It falls on if (data.uuid.contains(0, 0)) { }

My uuid is 0xFFF0.

I now removed that check, and that made it work. I am curious on why it falls, but no rush, I can fire up my BBQ :fire:

2 Likes