ESPHome  2022.1.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::fingerprint_grow::FingerprintGrowComponent Class Reference

#include <fingerprint_grow.h>

Inheritance diagram for esphome::fingerprint_grow::FingerprintGrowComponent:
esphome::PollingComponent esphome::uart::UARTDevice esphome::Component

Public Member Functions

void update () override
 
void setup () override
 
void dump_config () override
 
void set_address (uint32_t address)
 
void set_sensing_pin (GPIOPin *sensing_pin)
 
void set_password (uint32_t password)
 
void set_new_password (uint32_t new_password)
 
void set_fingerprint_count_sensor (sensor::Sensor *fingerprint_count_sensor)
 
void set_status_sensor (sensor::Sensor *status_sensor)
 
void set_capacity_sensor (sensor::Sensor *capacity_sensor)
 
void set_security_level_sensor (sensor::Sensor *security_level_sensor)
 
void set_last_finger_id_sensor (sensor::Sensor *last_finger_id_sensor)
 
void set_last_confidence_sensor (sensor::Sensor *last_confidence_sensor)
 
void set_enrolling_binary_sensor (binary_sensor::BinarySensor *enrolling_binary_sensor)
 
void add_on_finger_scan_matched_callback (std::function< void(uint16_t, uint16_t)> callback)
 
void add_on_finger_scan_unmatched_callback (std::function< void()> callback)
 
void add_on_enrollment_scan_callback (std::function< void(uint8_t, uint16_t)> callback)
 
void add_on_enrollment_done_callback (std::function< void(uint16_t)> callback)
 
void add_on_enrollment_failed_callback (std::function< void(uint16_t)> callback)
 
void enroll_fingerprint (uint16_t finger_id, uint8_t num_buffers)
 
void finish_enrollment (uint8_t result)
 
void delete_fingerprint (uint16_t finger_id)
 
void delete_all_fingerprints ()
 
void led_control (bool state)
 
void aura_led_control (uint8_t state, uint8_t speed, uint8_t color, uint8_t count)
 
- Public Member Functions inherited from esphome::PollingComponent
 PollingComponent ()
 
 PollingComponent (uint32_t update_interval)
 Initialize this polling component with the given update interval in ms. More...
 
virtual void set_update_interval (uint32_t update_interval)
 Manually set the update interval in ms for this polling object. More...
 
void call_setup () override
 
virtual uint32_t get_update_interval () const
 Get the update interval in ms of this sensor. More...
 
- Public Member Functions inherited from esphome::Component
virtual void loop ()
 This method will be called repeatedly. More...
 
virtual float get_setup_priority () const
 priority of setup(). More...
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed ()
 
virtual bool can_proceed ()
 
bool status_has_warning ()
 
bool status_has_error ()
 
void status_set_warning ()
 
void status_set_error ()
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 
- Public Member Functions inherited from esphome::uart::UARTDevice
 UARTDevice ()=default
 
 UARTDevice (UARTComponent *parent)
 
void set_uart_parent (UARTComponent *parent)
 
void write_byte (uint8_t data)
 
void write_array (const uint8_t *data, size_t len)
 
void write_array (const std::vector< uint8_t > &data)
 
template<size_t N>
void write_array (const std::array< uint8_t, N > &data)
 
void write_str (const char *str)
 
bool read_byte (uint8_t *data)
 
bool peek_byte (uint8_t *data)
 
bool read_array (uint8_t *data, size_t len)
 
template<size_t N>
optional< std::array< uint8_t, N > > read_array ()
 
int available ()
 
void flush ()
 
int read ()
 
size_t write (uint8_t data)
 
int peek ()
 
void check_uart_settings (uint32_t baud_rate, uint8_t stop_bits=1, UARTParityOptions parity=UART_CONFIG_PARITY_NONE, uint8_t data_bits=8)
 Check that the configuration of the UART bus matches the provided values and otherwise print a warning. More...
 

Protected Member Functions

void scan_and_match_ ()
 
uint8_t scan_image_ (uint8_t buffer)
 
uint8_t save_fingerprint_ ()
 
bool check_password_ ()
 
bool set_password_ ()
 
bool get_parameters_ ()
 
void get_fingerprint_count_ ()
 
uint8_t send_command_ ()
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name. More...
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult()> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function. More...
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 

Protected Attributes

std::vector< uint8_t > data_ = {}
 
uint8_t address_ [4] = {0xFF, 0xFF, 0xFF, 0xFF}
 
uint16_t capacity_ = 64
 
uint32_t password_ = 0x0
 
uint32_t * new_password_ {nullptr}
 
GPIOPinsensing_pin_ {nullptr}
 
uint8_t enrollment_image_ = 0
 
uint16_t enrollment_slot_ = 0
 
uint8_t enrollment_buffers_ = 5
 
bool waiting_removal_ = false
 
uint32_t last_aura_led_control_ = 0
 
uint16_t last_aura_led_duration_ = 0
 
sensor::Sensorfingerprint_count_sensor_ {nullptr}
 
sensor::Sensorstatus_sensor_ {nullptr}
 
sensor::Sensorcapacity_sensor_ {nullptr}
 
sensor::Sensorsecurity_level_sensor_ {nullptr}
 
sensor::Sensorlast_finger_id_sensor_ {nullptr}
 
sensor::Sensorlast_confidence_sensor_ {nullptr}
 
binary_sensor::BinarySensorenrolling_binary_sensor_ {nullptr}
 
CallbackManager< void(uint16_t, uint16_t)> finger_scan_matched_callback_
 
CallbackManager< void()> finger_scan_unmatched_callback_
 
CallbackManager< void(uint8_t, uint16_t)> enrollment_scan_callback_
 
CallbackManager< void(uint16_t)> enrollment_done_callback_
 
CallbackManager< void(uint16_t)> enrollment_failed_callback_
 
- Protected Attributes inherited from esphome::PollingComponent
uint32_t update_interval_
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ = nullptr
 
- Protected Attributes inherited from esphome::uart::UARTDevice
UARTComponentparent_ {nullptr}
 

Detailed Description

Definition at line 81 of file fingerprint_grow.h.

Member Function Documentation

◆ add_on_enrollment_done_callback()

void esphome::fingerprint_grow::FingerprintGrowComponent::add_on_enrollment_done_callback ( std::function< void(uint16_t)>  callback)
inline

Definition at line 122 of file fingerprint_grow.h.

◆ add_on_enrollment_failed_callback()

void esphome::fingerprint_grow::FingerprintGrowComponent::add_on_enrollment_failed_callback ( std::function< void(uint16_t)>  callback)
inline

Definition at line 126 of file fingerprint_grow.h.

◆ add_on_enrollment_scan_callback()

void esphome::fingerprint_grow::FingerprintGrowComponent::add_on_enrollment_scan_callback ( std::function< void(uint8_t, uint16_t)>  callback)
inline

Definition at line 119 of file fingerprint_grow.h.

◆ add_on_finger_scan_matched_callback()

void esphome::fingerprint_grow::FingerprintGrowComponent::add_on_finger_scan_matched_callback ( std::function< void(uint16_t, uint16_t)>  callback)
inline

Definition at line 113 of file fingerprint_grow.h.

◆ add_on_finger_scan_unmatched_callback()

void esphome::fingerprint_grow::FingerprintGrowComponent::add_on_finger_scan_unmatched_callback ( std::function< void()>  callback)
inline

Definition at line 116 of file fingerprint_grow.h.

◆ aura_led_control()

void esphome::fingerprint_grow::FingerprintGrowComponent::aura_led_control ( uint8_t  state,
uint8_t  speed,
uint8_t  color,
uint8_t  count 
)

Definition at line 298 of file fingerprint_grow.cpp.

◆ check_password_()

bool esphome::fingerprint_grow::FingerprintGrowComponent::check_password_ ( )
protected

Definition at line 189 of file fingerprint_grow.cpp.

◆ delete_all_fingerprints()

void esphome::fingerprint_grow::FingerprintGrowComponent::delete_all_fingerprints ( )

Definition at line 265 of file fingerprint_grow.cpp.

◆ delete_fingerprint()

void esphome::fingerprint_grow::FingerprintGrowComponent::delete_fingerprint ( uint16_t  finger_id)

Definition at line 251 of file fingerprint_grow.cpp.

◆ dump_config()

void esphome::fingerprint_grow::FingerprintGrowComponent::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 423 of file fingerprint_grow.cpp.

◆ enroll_fingerprint()

void esphome::fingerprint_grow::FingerprintGrowComponent::enroll_fingerprint ( uint16_t  finger_id,
uint8_t  num_buffers 
)

Definition at line 65 of file fingerprint_grow.cpp.

◆ finish_enrollment()

void esphome::fingerprint_grow::FingerprintGrowComponent::finish_enrollment ( uint8_t  result)

Definition at line 75 of file fingerprint_grow.cpp.

◆ get_fingerprint_count_()

void esphome::fingerprint_grow::FingerprintGrowComponent::get_fingerprint_count_ ( )
protected

Definition at line 241 of file fingerprint_grow.cpp.

◆ get_parameters_()

bool esphome::fingerprint_grow::FingerprintGrowComponent::get_parameters_ ( )
protected

Definition at line 217 of file fingerprint_grow.cpp.

◆ led_control()

void esphome::fingerprint_grow::FingerprintGrowComponent::led_control ( bool  state)

Definition at line 279 of file fingerprint_grow.cpp.

◆ save_fingerprint_()

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::save_fingerprint_ ( )
protected

Definition at line 161 of file fingerprint_grow.cpp.

◆ scan_and_match_()

void esphome::fingerprint_grow::FingerprintGrowComponent::scan_and_match_ ( )
protected

Definition at line 90 of file fingerprint_grow.cpp.

◆ scan_image_()

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::scan_image_ ( uint8_t  buffer)
protected

Definition at line 121 of file fingerprint_grow.cpp.

◆ send_command_()

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::send_command_ ( )
protected

Definition at line 321 of file fingerprint_grow.cpp.

◆ set_address()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_address ( uint32_t  address)
inline

Definition at line 87 of file fingerprint_grow.h.

◆ set_capacity_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_capacity_sensor ( sensor::Sensor capacity_sensor)
inline

Definition at line 100 of file fingerprint_grow.h.

◆ set_enrolling_binary_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_enrolling_binary_sensor ( binary_sensor::BinarySensor enrolling_binary_sensor)
inline

Definition at line 110 of file fingerprint_grow.h.

◆ set_fingerprint_count_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_fingerprint_count_sensor ( sensor::Sensor fingerprint_count_sensor)
inline

Definition at line 96 of file fingerprint_grow.h.

◆ set_last_confidence_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_last_confidence_sensor ( sensor::Sensor last_confidence_sensor)
inline

Definition at line 107 of file fingerprint_grow.h.

◆ set_last_finger_id_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_last_finger_id_sensor ( sensor::Sensor last_finger_id_sensor)
inline

Definition at line 104 of file fingerprint_grow.h.

◆ set_new_password()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_new_password ( uint32_t  new_password)
inline

Definition at line 95 of file fingerprint_grow.h.

◆ set_password()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_password ( uint32_t  password)
inline

Definition at line 94 of file fingerprint_grow.h.

◆ set_password_()

bool esphome::fingerprint_grow::FingerprintGrowComponent::set_password_ ( )
protected

Definition at line 204 of file fingerprint_grow.cpp.

◆ set_security_level_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_security_level_sensor ( sensor::Sensor security_level_sensor)
inline

Definition at line 101 of file fingerprint_grow.h.

◆ set_sensing_pin()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_sensing_pin ( GPIOPin sensing_pin)
inline

Definition at line 93 of file fingerprint_grow.h.

◆ set_status_sensor()

void esphome::fingerprint_grow::FingerprintGrowComponent::set_status_sensor ( sensor::Sensor status_sensor)
inline

Definition at line 99 of file fingerprint_grow.h.

◆ setup()

void esphome::fingerprint_grow::FingerprintGrowComponent::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 51 of file fingerprint_grow.cpp.

◆ update()

void esphome::fingerprint_grow::FingerprintGrowComponent::update ( )
overridevirtual

Implements esphome::PollingComponent.

Definition at line 11 of file fingerprint_grow.cpp.

Field Documentation

◆ address_

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::address_[4] = {0xFF, 0xFF, 0xFF, 0xFF}
protected

Definition at line 149 of file fingerprint_grow.h.

◆ capacity_

uint16_t esphome::fingerprint_grow::FingerprintGrowComponent::capacity_ = 64
protected

Definition at line 150 of file fingerprint_grow.h.

◆ capacity_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::capacity_sensor_ {nullptr}
protected

Definition at line 162 of file fingerprint_grow.h.

◆ data_

std::vector<uint8_t> esphome::fingerprint_grow::FingerprintGrowComponent::data_ = {}
protected

Definition at line 148 of file fingerprint_grow.h.

◆ enrolling_binary_sensor_

binary_sensor::BinarySensor* esphome::fingerprint_grow::FingerprintGrowComponent::enrolling_binary_sensor_ {nullptr}
protected

Definition at line 166 of file fingerprint_grow.h.

◆ enrollment_buffers_

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_buffers_ = 5
protected

Definition at line 156 of file fingerprint_grow.h.

◆ enrollment_done_callback_

CallbackManager<void(uint16_t)> esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_done_callback_
protected

Definition at line 170 of file fingerprint_grow.h.

◆ enrollment_failed_callback_

CallbackManager<void(uint16_t)> esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_failed_callback_
protected

Definition at line 171 of file fingerprint_grow.h.

◆ enrollment_image_

uint8_t esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_image_ = 0
protected

Definition at line 154 of file fingerprint_grow.h.

◆ enrollment_scan_callback_

CallbackManager<void(uint8_t, uint16_t)> esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_scan_callback_
protected

Definition at line 169 of file fingerprint_grow.h.

◆ enrollment_slot_

uint16_t esphome::fingerprint_grow::FingerprintGrowComponent::enrollment_slot_ = 0
protected

Definition at line 155 of file fingerprint_grow.h.

◆ finger_scan_matched_callback_

CallbackManager<void(uint16_t, uint16_t)> esphome::fingerprint_grow::FingerprintGrowComponent::finger_scan_matched_callback_
protected

Definition at line 167 of file fingerprint_grow.h.

◆ finger_scan_unmatched_callback_

CallbackManager<void()> esphome::fingerprint_grow::FingerprintGrowComponent::finger_scan_unmatched_callback_
protected

Definition at line 168 of file fingerprint_grow.h.

◆ fingerprint_count_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::fingerprint_count_sensor_ {nullptr}
protected

Definition at line 160 of file fingerprint_grow.h.

◆ last_aura_led_control_

uint32_t esphome::fingerprint_grow::FingerprintGrowComponent::last_aura_led_control_ = 0
protected

Definition at line 158 of file fingerprint_grow.h.

◆ last_aura_led_duration_

uint16_t esphome::fingerprint_grow::FingerprintGrowComponent::last_aura_led_duration_ = 0
protected

Definition at line 159 of file fingerprint_grow.h.

◆ last_confidence_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::last_confidence_sensor_ {nullptr}
protected

Definition at line 165 of file fingerprint_grow.h.

◆ last_finger_id_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::last_finger_id_sensor_ {nullptr}
protected

Definition at line 164 of file fingerprint_grow.h.

◆ new_password_

uint32_t* esphome::fingerprint_grow::FingerprintGrowComponent::new_password_ {nullptr}
protected

Definition at line 152 of file fingerprint_grow.h.

◆ password_

uint32_t esphome::fingerprint_grow::FingerprintGrowComponent::password_ = 0x0
protected

Definition at line 151 of file fingerprint_grow.h.

◆ security_level_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::security_level_sensor_ {nullptr}
protected

Definition at line 163 of file fingerprint_grow.h.

◆ sensing_pin_

GPIOPin* esphome::fingerprint_grow::FingerprintGrowComponent::sensing_pin_ {nullptr}
protected

Definition at line 153 of file fingerprint_grow.h.

◆ status_sensor_

sensor::Sensor* esphome::fingerprint_grow::FingerprintGrowComponent::status_sensor_ {nullptr}
protected

Definition at line 161 of file fingerprint_grow.h.

◆ waiting_removal_

bool esphome::fingerprint_grow::FingerprintGrowComponent::waiting_removal_ = false
protected

Definition at line 157 of file fingerprint_grow.h.


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