Sonoff BMT01

Sonoff seems to have a meat thermometer that is viewable in Ewelink app.
I acnnot find out what communication it has, but since they promise >180*2h on 2 AAA batteries, I would assume BLE.

Has anyone tried to connect it to HA yet?

1 Like

I just received one. The eWeLink add-on says it is an unsupported device. It is BLE and I can see it if I scan, but not connect to it.

Actually, after stopping the eWeLink app (duh,) I was able to connect to it with LightBlue and got some information. Now if I can figure out what to do with it…

Fri Dec 06 12:34:20 CST 2024: LightBlue® app launched

Fri Dec 06 12:34:20 CST 2024: App foregrounded

Fri Dec 06 12:34:33 CST 2024: Connecting to 12:F1:0A:04:27:D0 (ck_10024a18a0)

Fri Dec 06 12:34:34 CST 2024: Connected to 12:F1:0A:04:27:D0 (ck_10024a18a0)

Fri Dec 06 12:34:34 CST 2024: Discovering services for 12:F1:0A:04:27:D0 (ck_10024a18a0)

Fri Dec 06 12:34:35 CST 2024: Discovered 3 services for 12:F1:0A:04:27:D0.

Fri Dec 06 12:34:35 CST 2024: 
                Service 00001800-0000-1000-8000-00805f9b34fb
                Characteristics: 
                |--00002a04-0000-1000-8000-00805f9b34fb: Properties: Read
            

Fri Dec 06 12:34:35 CST 2024: 
                Service 00001801-0000-1000-8000-00805f9b34fb
                Characteristics: 
                |--00002a05-0000-1000-8000-00805f9b34fb: Properties: Indicate
|------00002902-0000-1000-8000-00805f9b34fb: <EMPTY>
            

Fri Dec 06 12:34:35 CST 2024: 
                Service 0000aaaa-0000-1000-8000-00805f9b34fb
                Characteristics: 
                |--0000bbb1-0000-1000-8000-00805f9b34fb: Properties: Read, Notify
|------00002902-0000-1000-8000-00805f9b34fb: <EMPTY>
|--0000bbb0-0000-1000-8000-00805f9b34fb: Properties: Write
|--0000bbb3-0000-1000-8000-00805f9b34fb: Properties: Read, Notify
|------00002902-0000-1000-8000-00805f9b34fb: <EMPTY>
|--0000bbb2-0000-1000-8000-00805f9b34fb: Properties: Write

Hey, look at me replying over and over :slight_smile:

I’m thinking building upon the Bluetooth Trash Day Beacon will be the easiest way to get this working:

I have this set up successfully, and then added the MAC address for my thermometer (above 12:F1:0A:04:27:D0)

So I now receive MQTT messages from the thermometer.

bluecharm/publish/BC57290B0DA0 {"msg":"advData","gmac":"BC57290B0DA0","obj":[{"type":4,"dmac":"DD34020A41C8","uuid":"1B6295D54F744C58A2D8CD83CA26BDF4","majorID":3838,"minorID":4949,"refpower":-59,"rssi":-52,"time":"2024-12-07 00:03:06.272"},{"type":32,"dmac":"12F10A0427D0","data1":"0201050E09636B5F31303032346131386130","rssi":-24,"time":"2024-12-07 00:03:06.552"}]}

Using this, and copying the trash bin beacon template, so far I get the RSSI. Battery shows up as unknown, but here are my sensors:

  - state_topic: "bluecharm/publish/BC57290B0DA0"
    name: "BMT01 RSSI"
    unique_id: "bmt01_rssi"
    device_class: signal_strength
    # Assume the sensor is too far away after 300 seconds of no updates
    expire_after: 300
    unit_of_measurement: "dBm"
    # Home Assistant ignores an empty value ('') and will not update the state of the entity.
    value_template: >-
      {% set targetUuidFound = namespace(found=False) %}
          {% for i in range(value_json.obj|count) -%}
              {% if value_json.obj[i].uuid == "1B6295D54F744C58A2D8CD83CA26BDF6" and targetUuidFound.found == False %}
                  {{ value_json.obj[i].rssi }}
                  {% set targetUuidFound.found = True %}
              {%- endif %}
          {%- endfor %}
      {% set targetUuidFound = namespace(found=False) %}

  - state_topic: "bluecharm/publish/BC57290B0DA0"
    name: "BMT01 battery"
    unique_id: "bmt01_battery"
    device_class: battery
    state_class: measurement
    unit_of_measurement: "%"
    # Home Assistant ignores an empty value ('') and will not update the state of the entity.
    # Sensor with CR2477 stops operating around is 2450 mV
    # Battery starts at 3.3V. Anything over 3.0V is considered 100%.
    # Assumes discharge curve is linear
    # Type 8 message is (Eddystone) TLM, which contains the battery information as mV
    value_template: >-
      {% set targetDmacFound = namespace(found=False) %}
          {% for i in range(value_json.obj|count) -%}
              {% if value_json.obj[i].dmac == "DD34020A491D" and value_json.obj[i].type == 8 and targetDmacFound.found == False %}
                  {% set stock_voltage = 3000 %}
                  {% set voltage_range = 550 %}
                  {% set current_voltage = value_json.obj[i].vbatt %}
                  {% set remaining_life = 0 %}

                  {% if current_voltage >= stock_voltage %}
                    {% set remaining_life = 100 %}
                  {% elif current_voltage > (stock_voltage - voltage_range) %}
                    {% set remaining_life = int((current_voltage - (stock_voltage - voltage_range)) / voltage_range * 100) %}
                  {% else %}
                    {% set remaining_life = 0 %}
                  {% endif %}
                  {{ remaining_life | int }}
                  {% set targetDmacFound.found = True %}
              {%- endif %}
          {%- endfor %}
      {% set targetDmacFound = namespace(found=False) %}

Since the BMT01 uses two AAA this will need to be adjusted once the measurement is figured out.

Hopefully someone else with one of these can pitch in and help decode the messages

Thank you for replying to yourself! We really appreciate it.

I’ve messed around some more, but not made any progress. I set up a Bluetooth sniffer and see it advertising, but I guess it switches to full bluetooth after connecting?

I did get the battery voltage working; I used the wrong DMAC in the sensor.

I just wanted to drop a note and say “Thank You” for looking into getting the BMT01 hooked up to Home Assistant. I just got one myself and would love to see it working in Home Assistant! I’ve done no BLE hacking so I don’t know that I’ll be any help getting it working, but if you need a tester, let me know.

Happy Holidays!

I started on an ESPhome project, but have not gotten too far. I’ve put what I have so far up on Github:

I welcome anyone that wants to work on it :slight_smile:

1 Like