custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.9k stars 243 forks source link

[New Sensor]: Inkbird IAM-T1 #1371

Open mariustt opened 3 months ago

mariustt commented 3 months ago

Sensor Description

Inkbird IAM-T1 Air Quality Meter, CO2 Meter, Temperature, Humidity, Air Pressure

Additional information

I think the following technical details may be useful - https://smarthomescene.com/reviews/inkbird-e-ink-air-quality-sensor-iam-t1-review/

ble_client:
  # INKBIRD IAM-T1 MAC Address
  - mac_address: 00:00:AA:00:00:AA #CHANGE MAC ADDRESS
    id: inkbird_iam_t1

sensor:
  # Temperature
  - platform: ble_client
    ble_client_id: inkbird_iam_t1
    name: "IAM-T1 Temperature"
    device_class: temperature
    icon: 'mdi:temperature-celsius'
    unit_of_measurement: '°C'
    accuracy_decimals: 1  
    service_uuid: 'ffe0'
    characteristic_uuid: 'ffe4'
    notify: true
    type: characteristic
    lambda: |-
      uint8_t is_negative = x[4] & 0xF;
      uint16_t temp = (x[5] << 8) | x[6];
      if (is_negative == 1) {
        return -((float)temp) / 10.0;
      } else {
        return ((float)temp) / 10.0;
      }
  # Humidity    
  - platform: ble_client
    ble_client_id: inkbird_iam_t1
    name: "IAM-T1 Humidity"
    device_class: humidity
    icon: 'mdi:water-percent'    
    unit_of_measurement: '%'
    accuracy_decimals: 1
    service_uuid: 'ffe0'
    characteristic_uuid: 'ffe4'
    notify: true
    type: characteristic
    lambda: |-
      uint16_t humidity = (x[7] << 8) | x[8];
      return ((float)humidity) / 10.0;
  # Carbon Dioxide CO2
  - platform: ble_client
    ble_client_id: inkbird_iam_t1
    name: "IAM-T1 CO2"
    device_class: carbon_dioxide
    icon: 'mdi:molecule-co2'    
    unit_of_measurement: 'ppm'
    accuracy_decimals: 0
    service_uuid: 'ffe0'
    characteristic_uuid: 'ffe4'
    notify: true
    type: characteristic
    lambda: |-
      uint16_t co2 = (x[9] << 8) | x[10];
      return (float)co2;
  # Air Pressure hPa    
  - platform: ble_client
    ble_client_id: inkbird_iam_t1
    name: "IAM-T1 Air Pressure"
    device_class: atmospheric_pressure
    unit_of_measurement: 'hPa'
    accuracy_decimals: 0
    icon: 'mdi:gauge'
    service_uuid: 'ffe0'
    characteristic_uuid: 'ffe4'
    notify: true
    type: characteristic
    lambda: |-
      uint16_t pressure = (x[11] << 8) | x[12];
      return (float)pressure;

Currently the device is successfully integrated using the above information, but it does create a bit of an inconvenience that entities are attached to the BLE proxy device itself as its entities. It would be very useful and convenient to have this device as a separate device.

BLE advertisements

2024-06-29 16:25:10.557 INFO (Thread-2) [custom_components.ble_monitor.ble_parser] Unknown advertisement received for mac: 62:00:A1:34:34:ADservice data: []manufacturer specific data: [b'\x12\xffT1IA-6200a13434ad']local name: UUID16: None,UUID128: None