Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: meater
- friendly_name: MEATER
- esp32:
- #board: esp32dev
- board: esp32-c3-devkitm-1
- framework:
- #type: esp-idf
- type: arduino
- # Enable logging
- logger:
- #level: VERBOSE
- #level: VERY_VERBOSE
- # Enable Home Assistant API
- api:
- ota:
- password: "3e657a40432cc48a6b1b22d566b9eed8"
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Meater Fallback Hotspot"
- password: "1JX0qX8Co7KL"
- # Example configuration entry for finding
- # Service UUIDs and iBeacon UUIDs and identifiers
- #esp32_ble_tracker:
- ble_client:
- - mac_address: B8:1F:5E:1C:42:95
- id: meater
- text_sensor:
- - platform: template
- name: "MEATER firmware"
- id: meater_firmware
- sensor:
- - platform: ble_client
- type: characteristic
- ble_client_id: meater
- name: "MEATER tip temperature"
- service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
- characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
- icon: 'mdi:thermometer'
- unit_of_measurement: '°C'
- accuracy_decimals: 2
- notify: true
- lambda: |-
- uint16_t tip_temp = (x[0] + (x[1] << 8) + 8.0) / 16.0;
- return (float)tip_temp;
- - platform: ble_client
- type: characteristic
- ble_client_id: meater
- name: "MEATER ambient temperature"
- service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
- characteristic_uuid: '7edda774-045e-4bbf-909b-45d1991a2876'
- icon: 'mdi:thermometer'
- unit_of_measurement: '°C'
- accuracy_decimals: 2
- notify: true
- lambda: |-
- uint16_t tip = x[0] + (x[1] << 8);
- uint16_t ra = x[2] + (x[3] << 8);
- uint16_t oa = x[4] + (x[5] << 8);
- uint16_t min_val = 48;
- uint16_t ambient = (tip + std::max(0, (((ra - std::min(min_val, oa)) * 16 * 589) / 1487)) + 8.0) / 16;
- return (float)ambient;
- - platform: ble_client
- type: characteristic
- ble_client_id: meater
- name: "MEATER battery level"
- service_uuid: 'a75cc7fc-c956-488f-ac2a-2dbc08b63a04'
- characteristic_uuid: '2adb4877-68d8-4884-bd3c-d83853bf27b8'
- icon: 'mdi:battery'
- unit_of_measurement: '%'
- notify: true
- lambda: |-
- uint16_t battery = (x[0] + x[1]) * 10;
- return (float)battery;
- - platform: ble_client
- type: characteristic
- ble_client_id: meater
- id: firmware
- service_uuid: '180A'
- characteristic_uuid: '00002a26-0000-1000-8000-00805f9b34fb'
- lambda: |-
- std::string data_string(x.begin(), x.end());
- id(meater_firmware).publish_state(data_string.c_str());
- return (float)x.size();
- - platform: ble_client
- type: rssi
- ble_client_id: meater
- name: "MEATER RSSI"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement