Add support for IBS-TH1 External Sensor (#1289)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Mikko Tervala 2021-07-12 23:55:57 +03:00 committed by GitHub
parent f0f1ec1d34
commit e3e5d9c76a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,16 +1,21 @@
Inkbird IBS-TH1 Mini BLE Sensor Inkbird IBS-TH1 and IBS-TH1 Mini BLE Sensor
=============================== ===========================================
.. seo:: .. seo::
:description: Instructions for setting up Inkbird IBS-TH1 Mini Bluetooth-based temperature and humidity sensors in ESPHome. :description: Instructions for setting up Inkbird IBS-TH1 Bluetooth-based temperature and humidity sensors in ESPHome.
:image: inkbird_isbth1_mini.jpg :image: inkbird_isbth1_mini.jpg
:keywords: Inkbird, BLE, Bluetooth, IBS-TH1 :keywords: Inkbird, BLE, Bluetooth, IBS-TH1
The ``inkbird_ibsth1_mini`` sensor platform lets you track the output of Inkbird IBS-TH1 Mini Bluetooth The ``inkbird_ibsth1_mini`` sensor platform lets you track the output of Inkbird IBS-TH1 and IBS-TH1 Mini Bluetooth
Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track the Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track the
temperature, humidity and the battery level of the IBS-TH1 Mini device every time the temperature, external temperature (non mini only), humidity and the battery level of the IBS-TH1 device every time the
sensor sends out a BLE broadcast. Note that contrary to other implementations, ESPHome can track as sensor sends out a BLE broadcast. Note that contrary to other implementations, ESPHome can track as
many IBS-TH1 Mini devices at once as you want. many IBS-TH1 devices at once as you want.
.. note::
If an external temperature sensor is connected to the IBS-TH1, measurement from the internal sensor is not sent.
Only one sensor will work at a time.
.. figure:: images/inkbird_isbth1_mini-full.jpg .. figure:: images/inkbird_isbth1_mini-full.jpg
:align: center :align: center
@ -31,22 +36,30 @@ many IBS-TH1 Mini devices at once as you want.
- platform: inkbird_ibsth1_mini - platform: inkbird_ibsth1_mini
mac_address: 38:81:D7:0A:9C:11 mac_address: 38:81:D7:0A:9C:11
temperature: temperature:
name: "Inkbird IBS-TH1 Mini Temperature" name: "Inkbird IBS-TH1 Temperature"
external_temperature:
name: "Inkburd IBS-TH1 External Temperature"
humidity: humidity:
name: "Inkbird IBS-TH1 Mini Humidity" name: "Inkbird IBS-TH1 Humidity"
battery_level: battery_level:
name: "Inkbird IBS-TH1 Mini Battery Level" name: "Inkbird IBS-TH1 Battery Level"
Configuration variables: Configuration variables:
------------------------ ------------------------
- **mac_address** (**Required**, MAC Address): The MAC address of the Inkbird IBS-TH1 Mini device. - **mac_address** (**Required**, MAC Address): The MAC address of the Inkbird IBS-TH1 device.
- **temperature** (*Optional*): The information for the temperature sensor. - **temperature** (*Optional*): The information for the temperature sensor.
- **name** (**Required**, string): The name for the temperature sensor. - **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`. - All other options from :ref:`Sensor <config-sensor>`.
- **external_temperature** (*Optional*): The information for the external temperature sensor.
- **name** (**Required**, string): The name for the external temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (*Optional*): The information for the humidity sensor - **humidity** (*Optional*): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor. - **name** (**Required**, string): The name for the humidity sensor.
@ -63,7 +76,7 @@ Configuration variables:
Setting Up Devices Setting Up Devices
------------------ ------------------
To set up Inkbird IBS-TH1 Mini devices you first need to find their MAC Address so that ESPHome can To set up Inkbird IBS-TH1 devices you first need to find their MAC Address so that ESPHome can
identify them. So first, create a simple configuration without any ``inkbird_ibsth1_mini`` entries identify them. So first, create a simple configuration without any ``inkbird_ibsth1_mini`` entries
like so: like so:
@ -71,7 +84,7 @@ like so:
esp32_ble_tracker: esp32_ble_tracker:
After uploading the ESP32 will immediately try to scan for BLE devices such as the Inkbird IBS-TH1 Mini. After uploading the ESP32 will immediately try to scan for BLE devices such as the Inkbird IBS-TH1.
When it detects these sensors, it will automatically parse the BLE message print a When it detects these sensors, it will automatically parse the BLE message print a
message like this one: message like this one:
@ -82,7 +95,7 @@ message like this one:
[13:36:43][D][esp32_ble_tracker:567]: Name: 'sps' [13:36:43][D][esp32_ble_tracker:567]: Name: 'sps'
Note that it can sometimes take some time for the first BLE broadcast to be received. Please note that address type Note that it can sometimes take some time for the first BLE broadcast to be received. Please note that address type
should say 'PUBLIC' and the device name should be 'sps', this is how you find the Inkbird IBS-TH1 Mini among all the should say 'PUBLIC' and the device name should be 'sps', this is how you find the Inkbird IBS-TH1 among all the
other devices. other devices.
Then just copy the address (``38:81:D7:0A:9C:11``) into a new ``sensor.inkbird_ibsth1_mini`` platform Then just copy the address (``38:81:D7:0A:9C:11``) into a new ``sensor.inkbird_ibsth1_mini`` platform
@ -90,7 +103,7 @@ entry like in the configuration example at the top.
.. note:: .. note::
The ESPHome Inkbird IBS-TH1 Mini integration listens passively to packets the device sends by itself. The ESPHome Inkbird IBS-TH1 integration listens passively to packets the device sends by itself.
ESPHome therefore has no impact on the battery life of the device. ESPHome therefore has no impact on the battery life of the device.
See Also See Also