19static constexpr size_t MAX_FRAME_LEN = 260;
42 esp_ble_gattc_cb_param_t *param)
override;
43 void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
override;
60 SUB_TEXT_SENSOR(fw_version)
61 SUB_TEXT_SENSOR(bt_fw_version)
62 SUB_TEXT_SENSOR(model_name)
63 SUB_TEXT_SENSOR(error_code)
64 void set_charging_state(
bool state);
83 void halt_(
const LogString *reason);
This class simplifies creating components that periodically check a state.
StringRef is a reference to a string owned by something else.
espbt::ClientState node_state
void write_frame_(const uint8_t *frame, size_t len)
void halt_(const LogString *reason)
void set_time_id(time::RealTimeClock *time_id)
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
void dump_config() override
void set_pin(uint32_t pin)
void advance_to_(DeltaState next)
void send_next_state_command_()
void handle_frame_(const uint8_t *frame, size_t len)
bool pairing_in_progress_
std::array< uint8_t, MAX_FRAME_LEN > rx_buffer_
void drop_rx_bytes_(size_t count)
uint8_t pairing_attempts_
void send_frame_(const uint8_t *body, size_t len)
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
SUB_SENSOR(power) SUB_SENSOR(energy) SUB_SENSOR(charging_time) SUB_SENSOR(charger_state) SUB_SENSOR(max_current) SUB_TEXT_SENSOR(serial_number) SUB_TEXT_SENSOR(fw_version) SUB_TEXT_SENSOR(bt_fw_version) SUB_TEXT_SENSOR(model_name) SUB_TEXT_SENSOR(error_code) void set_charging_state(bool state)
time::RealTimeClock * time_id_
DeltaWallbox(const char *user, const char *password)
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
@ DELTA_STATE_GET_LOGIN_RESULT
@ DELTA_STATE_GET_BT_FW_VERSION
@ DELTA_STATE_GET_CHARGER_FW_VERSION
@ DELTA_STATE_GET_LOGIN_USER
@ DELTA_STATE_CHECK_PAIRING
@ DELTA_STATE_GET_SERIAL_NUMBER
@ DELTA_STATE_GET_LOGIN_RESULT0
@ DELTA_STATE_SEND_LOGIN_CREDENTIALS
@ DELTA_STATE_GET_LOGIN_ROLE