ESPHome  2024.4.0
Public Member Functions | Protected Attributes
esphome::mopeka_ble::MopekaListener Class Reference

#include <mopeka_ble.h>

Inheritance diagram for esphome::mopeka_ble::MopekaListener:
esphome::esp32_ble_tracker::ESPBTDeviceListener

Public Member Functions

bool parse_device (const esp32_ble_tracker::ESPBTDevice &device) override
 Parse all incoming BLE payloads to see if it is a Mopeka BLE advertisement. More...
 
void set_show_sensors_without_sync (bool show_sensors_without_sync)
 
- Public Member Functions inherited from esphome::esp32_ble_tracker::ESPBTDeviceListener
virtual void on_scan_end ()
 
virtual bool parse_devices (esp_ble_gap_cb_param_t::ble_scan_result_evt_param *advertisements, size_t count)
 
virtual AdvertisementParserType get_advertisement_parser_type ()
 
void set_parent (ESP32BLETracker *parent)
 

Protected Attributes

bool show_sensors_without_sync_
 
- Protected Attributes inherited from esphome::esp32_ble_tracker::ESPBTDeviceListener
ESP32BLETrackerparent_ {nullptr}
 

Detailed Description

Definition at line 13 of file mopeka_ble.h.

Member Function Documentation

◆ parse_device()

bool esphome::mopeka_ble::MopekaListener::parse_device ( const esp32_ble_tracker::ESPBTDevice device)
overridevirtual

Parse all incoming BLE payloads to see if it is a Mopeka BLE advertisement.

Currently this supports the following products:

  • Mopeka Std Check - uses the chip CC2540 by Texas Instruments (TI)
  • Mopeka Pro Check - uses the chip NRF52 by Nordic

    If the sync button is pressed, report the MAC so a user can add this as a sensor. Or if user has configured show_sensors_without_sync_ than report all visible sensors. Three points are used to identify a sensor:

Bluetooth service uuid

  • Bluetooth manufacturer id
  • Bluetooth data frame size

Implements esphome::esp32_ble_tracker::ESPBTDeviceListener.

Definition at line 38 of file mopeka_ble.cpp.

◆ set_show_sensors_without_sync()

void esphome::mopeka_ble::MopekaListener::set_show_sensors_without_sync ( bool  show_sensors_without_sync)
inline

Definition at line 16 of file mopeka_ble.h.

Field Documentation

◆ show_sensors_without_sync_

bool esphome::mopeka_ble::MopekaListener::show_sensors_without_sync_
protected

Definition at line 21 of file mopeka_ble.h.


The documentation for this class was generated from the following files: