ESPHome  2024.12.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::nextion::Nextion Class Reference

#include <nextion.h>

Inheritance diagram for esphome::nextion::Nextion:
esphome::nextion::NextionBase esphome::PollingComponent esphome::uart::UARTDevice esphome::Component

Public Member Functions

void set_component_text (const char *component, const char *text)
 Set the text of a component to a static string. More...
 
void set_component_text_printf (const char *component, const char *format,...) __attribute__((format(printf
 Set the text of a component to a formatted string. More...
 
void void set_component_value (const char *component, int32_t value)
 Set the integer value of a component. More...
 
void set_component_picture (const char *component, uint8_t picture_id)
 Set the picture of an image component. More...
 
void set_component_background_color (const char *component, uint16_t color)
 Set the background color of a component. More...
 
void set_component_background_color (const char *component, const char *color)
 Set the background color of a component. More...
 
void set_component_background_color (const char *component, Color color) override
 Set the background color of a component. More...
 
void set_component_pressed_background_color (const char *component, uint16_t color)
 Set the pressed background color of a component. More...
 
void set_component_pressed_background_color (const char *component, const char *color)
 Set the pressed background color of a component. More...
 
void set_component_pressed_background_color (const char *component, Color color) override
 Set the pressed background color of a component. More...
 
void set_component_foreground_color (const char *component, uint16_t color)
 Set the foreground color of a component. More...
 
void set_component_foreground_color (const char *component, const char *color)
 Set the foreground color of a component. More...
 
void set_component_foreground_color (const char *component, Color color) override
 Set the foreground color of a component. More...
 
void set_component_pressed_foreground_color (const char *component, uint16_t color)
 Set the pressed foreground color of a component. More...
 
void set_component_pressed_foreground_color (const char *component, const char *color)
 Set the pressed foreground color of a component. More...
 
void set_component_pressed_foreground_color (const char *component, Color color) override
 Set the pressed foreground color of a component. More...
 
void set_component_pic (const char *component, uint8_t pic_id)
 Set the picture id of a component. More...
 
void set_component_picc (const char *component, uint8_t pic_id)
 Set the background picture id of component. More...
 
void set_component_font_color (const char *component, uint16_t color)
 Set the font color of a component. More...
 
void set_component_font_color (const char *component, const char *color)
 Set the font color of a component. More...
 
void set_component_font_color (const char *component, Color color) override
 Set the font color of a component. More...
 
void set_component_pressed_font_color (const char *component, uint16_t color)
 Set the pressed font color of a component. More...
 
void set_component_pressed_font_color (const char *component, const char *color)
 Set the pressed font color of a component. More...
 
void set_component_pressed_font_color (const char *component, Color color) override
 Set the pressed font color of a component. More...
 
void set_component_coordinates (const char *component, uint16_t x, uint16_t y)
 Set the coordinates of a component on screen. More...
 
void set_component_font (const char *component, uint8_t font_id) override
 Set the font id for a component. More...
 
void set_nextion_rtc_time (ESPTime time)
 Send the current time to the nextion display. More...
 
void goto_page (const char *page)
 Show the page with a given name. More...
 
void goto_page (uint8_t page)
 Show the page with a given id. More...
 
void hide_component (const char *component) override
 Hide a component. More...
 
void show_component (const char *component) override
 Show a component. More...
 
void enable_component_touch (const char *component)
 Enable touch for a component. More...
 
void disable_component_touch (const char *component)
 Disable touch for a component. More...
 
void add_waveform_data (uint8_t component_id, uint8_t channel_number, uint8_t value)
 Add waveform data to a waveform component. More...
 
void open_waveform_channel (uint8_t component_id, uint8_t channel_number, uint8_t value)
 
void display_picture (uint16_t picture_id, uint16_t x_start, uint16_t y_start)
 Display a picture at coordinates. More...
 
void fill_area (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, uint16_t color)
 Fill a rectangle with a color. More...
 
void fill_area (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, const char *color)
 Fill a rectangle with a color. More...
 
void fill_area (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, Color color)
 Fill a rectangle with a color. More...
 
void line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
 Draw a line on the screen. More...
 
void line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, const char *color)
 Draw a line on the screen. More...
 
void line (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, Color color)
 Draw a line on the screen. More...
 
void rectangle (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, uint16_t color)
 Draw a rectangle outline. More...
 
void rectangle (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, const char *color)
 Draw a rectangle outline. More...
 
void rectangle (uint16_t x1, uint16_t y1, uint16_t width, uint16_t height, Color color)
 Draw a rectangle outline. More...
 
void circle (uint16_t center_x, uint16_t center_y, uint16_t radius, uint16_t color)
 Draw a circle outline. More...
 
void circle (uint16_t center_x, uint16_t center_y, uint16_t radius, const char *color)
 Draw a circle outline. More...
 
void circle (uint16_t center_x, uint16_t center_y, uint16_t radius, Color color)
 Draw a circle outline. More...
 
void filled_circle (uint16_t center_x, uint16_t center_y, uint16_t radius, uint16_t color)
 Draw a filled circled. More...
 
void filled_circle (uint16_t center_x, uint16_t center_y, uint16_t radius, const char *color)
 Draw a filled circled. More...
 
void filled_circle (uint16_t center_x, uint16_t center_y, uint16_t radius, Color color)
 Draw a filled circled. More...
 
void qrcode (uint16_t x1, uint16_t y1, const char *content, uint16_t size=200, uint16_t background_color=65535, uint16_t foreground_color=0, uint8_t logo_pic=-1, uint8_t border_width=8)
 Draws a QR code in the screen. More...
 
void qrcode (uint16_t x1, uint16_t y1, const char *content, uint16_t size, Color background_color=Color(255, 255, 255), Color foreground_color=Color(0, 0, 0), uint8_t logo_pic=-1, uint8_t border_width=8)
 Draws a QR code in the screen. More...
 
void set_backlight_brightness (float brightness)
 Set the brightness of the backlight. More...
 
void set_touch_sleep_timeout (uint16_t timeout)
 Set the touch sleep timeout of the display. More...
 
void set_wake_up_page (uint8_t page_id=255)
 Sets which page Nextion loads when exiting sleep mode. More...
 
void set_start_up_page (uint8_t page_id=255)
 Sets which page Nextion loads when connecting to ESPHome. More...
 
void set_auto_wake_on_touch (bool auto_wake)
 Sets if Nextion should auto-wake from sleep when touch press occurs. More...
 
void set_exit_reparse_on_start (bool exit_reparse)
 Sets if Nextion should exit the active reparse mode before the "connect" command is sent. More...
 
void set_skip_connection_handshake (bool skip_handshake)
 Sets whether the Nextion display should skip the connection handshake process. More...
 
void sleep (bool sleep)
 Sets Nextion mode between sleep and awake. More...
 
bool set_protocol_reparse_mode (bool active_mode)
 Sets the Nextion display's protocol reparse mode. More...
 
void set_component_vid (const char *component, uint8_t vid_id)
 Set the video id of a component. More...
 
void set_component_drag (const char *component, bool drag)
 Set the drag availability of a component. More...
 
void set_component_aph (const char *component, uint8_t aph)
 Set the opaqueness (fading) of a component. More...
 
void set_component_position (const char *component, uint32_t x, uint32_t y)
 Set the position of a component. More...
 
void register_touch_component (NextionComponentBase *obj)
 
void register_switch_component (NextionComponentBase *obj)
 
void register_binarysensor_component (NextionComponentBase *obj)
 
void register_sensor_component (NextionComponentBase *obj)
 
void register_textsensor_component (NextionComponentBase *obj)
 
void setup () override
 
void set_brightness (float brightness)
 
float get_setup_priority () const override
 
void update () override
 
void loop () override
 
void set_writer (const nextion_writer_t &writer)
 
void set_wait_for_ack (bool wait_for_ack)
 
bool send_command (const char *command)
 Manually send a raw command to the display. More...
 
bool send_command_printf (const char *format,...) __attribute__((format(printf
 Manually send a raw formatted command to the display. More...
 
bool void set_tft_url (const std::string &tft_url)
 Set the tft file URL. More...
 
bool upload_tft (uint32_t baud_rate=0, bool exit_reparse=true)
 Uploads the TFT file to the Nextion display. More...
 
void dump_config () override
 
void soft_reset ()
 Softreset the Nextion. More...
 
void add_sleep_state_callback (std::function< void()> &&callback)
 Add a callback to be notified of sleep state changes. More...
 
void add_wake_state_callback (std::function< void()> &&callback)
 Add a callback to be notified of wake state changes. More...
 
void add_setup_state_callback (std::function< void()> &&callback)
 Add a callback to be notified when the nextion completes its initialize setup. More...
 
void add_new_page_callback (std::function< void(uint8_t)> &&callback)
 Add a callback to be notified when the nextion changes pages. More...
 
void add_touch_event_callback (std::function< void(uint8_t, uint8_t, bool)> &&callback)
 Add a callback to be notified when Nextion has a touch event. More...
 
void add_buffer_overflow_event_callback (std::function< void()> &&callback)
 Add a callback to be notified when the nextion reports a buffer overflow. More...
 
void update_all_components ()
 
void set_nextion_sensor_state (int queue_type, const std::string &name, float state)
 Set the nextion sensor state object. More...
 
void set_nextion_sensor_state (NextionQueueType queue_type, const std::string &name, float state)
 
void set_nextion_text_state (const std::string &name, const std::string &state)
 
void add_no_result_to_queue_with_set (NextionComponentBase *component, int32_t state_value) override
 
void add_no_result_to_queue_with_set (const std::string &variable_name, const std::string &variable_name_to_send, int32_t state_value) override
 
void add_no_result_to_queue_with_set (NextionComponentBase *component, const std::string &state_value) override
 
void add_no_result_to_queue_with_set (const std::string &variable_name, const std::string &variable_name_to_send, const std::string &state_value) override
 
void add_to_get_queue (NextionComponentBase *component) override
 
void add_addt_command_to_queue (NextionComponentBase *component) override
 Add addt command to the queue. More...
 
void update_components_by_prefix (const std::string &prefix)
 
void set_touch_sleep_timeout_internal (uint32_t touch_sleep_timeout)
 
void set_wake_up_page_internal (uint8_t wake_up_page)
 
void set_start_up_page_internal (uint8_t start_up_page)
 
void set_auto_wake_on_touch_internal (bool auto_wake_on_touch)
 
void set_exit_reparse_on_start_internal (bool exit_reparse_on_start)
 
size_t queue_size ()
 Retrieves the number of commands pending in the Nextion command queue. More...
 
bool is_updating () override
 Check if the TFT update process is currently running. More...
 
- Public Member Functions inherited from esphome::nextion::NextionBase
bool is_sleeping ()
 
bool is_setup ()
 
bool is_detected ()
 
- 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...
 
void start_poller ()
 
void stop_poller ()
 
- Public Member Functions inherited from esphome::Component
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 () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning (const char *message="unspecified")
 
void status_set_error (const char *message="unspecified")
 
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

uint16_t recv_ret_string_ (std::string &response, uint32_t timeout, bool recv_flag)
 
void all_components_send_state_ (bool force_update=false)
 
bool remove_from_q_ (bool report_empty=true)
 
void process_nextion_commands_ ()
 
void process_serial_ ()
 
bool send_command_ (const std::string &command)
 Manually send a raw command to the display and don't wait for an acknowledgement packet. More...
 
void add_no_result_to_queue_ (const std::string &variable_name)
 
bool add_no_result_to_queue_with_ignore_sleep_printf_ (const std::string &variable_name, const char *format,...) __attribute__((format(printf
 
bool void add_no_result_to_queue_with_command_ (const std::string &variable_name, const std::string &command)
 
bool add_no_result_to_queue_with_printf_ (const std::string &variable_name, const char *format,...) __attribute__((format(printf
 Sends a formatted command to the nextion. More...
 
bool void add_no_result_to_queue_with_set_internal_ (const std::string &variable_name, const std::string &variable_name_to_send, int32_t state_value, bool is_sleep_safe=false)
 
void add_no_result_to_queue_with_set_internal_ (const std::string &variable_name, const std::string &variable_name_to_send, const std::string &state_value, bool is_sleep_safe=false)
 
void check_pending_waveform_ ()
 
WiFiClient * get_wifi_client_ ()
 
int upload_by_chunks_ (HTTPClient &http_client, uint32_t &range_start)
 will request chunk_size chunks from the web server and send each to the nextion More...
 
int upload_by_chunks_ (esp_http_client_handle_t http_client, uint32_t &range_start)
 will request 4096 bytes chunks from the web server and send each to Nextion More...
 
bool upload_end_ (bool successful)
 Ends the upload process, restart Nextion and, if successful, restarts ESP. More...
 
uint32_t get_free_heap_ ()
 Returns the ESP Free Heap memory. More...
 
bool get_is_connected_ ()
 
bool check_connect_ ()
 
void remove_front_no_sensors_ ()
 
void print_queue_members_ ()
 
void reset_ (bool reset_nextion=true)
 
- 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(uint8_t)> &&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(uint8_t)> &&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::deque< NextionQueue * > nextion_queue_
 
std::deque< NextionQueue * > waveform_queue_
 
uint64_t comok_sent_ = 0
 
bool ignore_is_setup_ = false
 Sends commands ignoring of the Nextion has been setup. More...
 
bool nextion_reports_is_setup_ = false
 
uint8_t nextion_event_
 
bool is_updating_ = false
 
uint32_t touch_sleep_timeout_ = 0
 
int16_t wake_up_page_ = -1
 
int16_t start_up_page_ = -1
 
bool auto_wake_on_touch_ = true
 
bool exit_reparse_on_start_ = false
 
bool skip_connection_handshake_ = false
 
WiFiClient * wifi_client_ {nullptr}
 
BearSSL::WiFiClientSecure * wifi_client_secure_ {nullptr}
 
std::string tft_url_
 
uint32_t content_length_ = 0
 
int tft_size_ = 0
 
uint32_t original_baud_rate_ = 0
 
bool upload_first_chunk_sent_ = false
 
std::vector< NextionComponentBase * > touch_
 
std::vector< NextionComponentBase * > switchtype_
 
std::vector< NextionComponentBase * > sensortype_
 
std::vector< NextionComponentBase * > textsensortype_
 
std::vector< NextionComponentBase * > binarysensortype_
 
CallbackManager< void()> setup_callback_ {}
 
CallbackManager< void()> sleep_callback_ {}
 
CallbackManager< void()> wake_callback_ {}
 
CallbackManager< void(uint8_t)> page_callback_ {}
 
CallbackManager< void(uint8_t, uint8_t, bool)> touch_callback_ {}
 
CallbackManager< void()> buffer_overflow_callback_ {}
 
optional< nextion_writer_twriter_
 
float brightness_ {1.0}
 
std::string device_model_
 
std::string firmware_version_
 
std::string serial_number_
 
std::string flash_size_
 
std::string command_data_
 
bool is_connected_ = false
 
const uint16_t startup_override_ms_ = 8000
 
const uint16_t max_q_age_ms_ = 8000
 
uint32_t started_ms_ = 0
 
bool sent_setup_commands_ = false
 
- Protected Attributes inherited from esphome::nextion::NextionBase
bool is_setup_ = false
 
bool is_sleeping_ = false
 
bool is_detected_ = false
 
- 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 38 of file nextion.h.

Member Function Documentation

◆ add_addt_command_to_queue()

void esphome::nextion::Nextion::add_addt_command_to_queue ( NextionComponentBase component)
overridevirtual

Add addt command to the queue.

Parameters
component_idThe waveform component id
wave_chan_idThe waveform channel to send it to
buffer_to_sendThe buffer size
buffer_sizeThe buffer data

Implements esphome::nextion::NextionBase.

Definition at line 1132 of file nextion.cpp.

◆ add_buffer_overflow_event_callback()

void esphome::nextion::Nextion::add_buffer_overflow_event_callback ( std::function< void()> &&  callback)

Add a callback to be notified when the nextion reports a buffer overflow.

Parameters
callbackThe void() callback.

Definition at line 193 of file nextion.cpp.

◆ add_new_page_callback()

void esphome::nextion::Nextion::add_new_page_callback ( std::function< void(uint8_t)> &&  callback)

Add a callback to be notified when the nextion changes pages.

Parameters
callbackThe void(std::string) callback.

Definition at line 185 of file nextion.cpp.

◆ add_no_result_to_queue_()

void esphome::nextion::Nextion::add_no_result_to_queue_ ( const std::string &  variable_name)
protected
Parameters
variable_nameName for the queue

Definition at line 973 of file nextion.cpp.

◆ add_no_result_to_queue_with_command_()

void esphome::nextion::Nextion::add_no_result_to_queue_with_command_ ( const std::string &  variable_name,
const std::string &  command 
)
protected
Parameters
variable_nameVariable name for the queue
command

Definition at line 994 of file nextion.cpp.

◆ add_no_result_to_queue_with_ignore_sleep_printf_()

bool esphome::nextion::Nextion::add_no_result_to_queue_with_ignore_sleep_printf_ ( const std::string &  variable_name,
const char *  format,
  ... 
)
protected

Definition at line 1003 of file nextion.cpp.

◆ add_no_result_to_queue_with_printf_()

bool esphome::nextion::Nextion::add_no_result_to_queue_with_printf_ ( const std::string &  variable_name,
const char *  format,
  ... 
)
protected

Sends a formatted command to the nextion.

Parameters
variable_nameVariable name for the queue
formatThe printf-style command format, like "vis %s,0"
...The format arguments

Definition at line 1029 of file nextion.cpp.

◆ add_no_result_to_queue_with_set() [1/4]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set ( NextionComponentBase component,
int32_t  state_value 
)
overridevirtual
Parameters
variable_nameVariable name for the queue
variable_name_to_sendVariable name for the left of the command
state_valueValue to set
is_sleep_safeThe command is safe to send when the Nextion is sleeping

Implements esphome::nextion::NextionBase.

Definition at line 1056 of file nextion.cpp.

◆ add_no_result_to_queue_with_set() [2/4]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set ( const std::string &  variable_name,
const std::string &  variable_name_to_send,
int32_t  state_value 
)
overridevirtual

Implements esphome::nextion::NextionBase.

Definition at line 1061 of file nextion.cpp.

◆ add_no_result_to_queue_with_set() [3/4]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set ( NextionComponentBase component,
const std::string &  state_value 
)
overridevirtual
Parameters
variable_nameVariable name for the queue
variable_name_to_sendVariable name for the left of the command
state_valueString value to set
is_sleep_safeThe command is safe to send when the Nextion is sleeping

Implements esphome::nextion::NextionBase.

Definition at line 1084 of file nextion.cpp.

◆ add_no_result_to_queue_with_set() [4/4]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set ( const std::string &  variable_name,
const std::string &  variable_name_to_send,
const std::string &  state_value 
)
overridevirtual

Implements esphome::nextion::NextionBase.

Definition at line 1088 of file nextion.cpp.

◆ add_no_result_to_queue_with_set_internal_() [1/2]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set_internal_ ( const std::string &  variable_name,
const std::string &  variable_name_to_send,
int32_t  state_value,
bool  is_sleep_safe = false 
)
protected

Definition at line 1066 of file nextion.cpp.

◆ add_no_result_to_queue_with_set_internal_() [2/2]

void esphome::nextion::Nextion::add_no_result_to_queue_with_set_internal_ ( const std::string &  variable_name,
const std::string &  variable_name_to_send,
const std::string &  state_value,
bool  is_sleep_safe = false 
)
protected

Definition at line 1094 of file nextion.cpp.

◆ add_setup_state_callback()

void esphome::nextion::Nextion::add_setup_state_callback ( std::function< void()> &&  callback)

Add a callback to be notified when the nextion completes its initialize setup.

Parameters
callbackThe void() callback.

Definition at line 181 of file nextion.cpp.

◆ add_sleep_state_callback()

void esphome::nextion::Nextion::add_sleep_state_callback ( std::function< void()> &&  callback)

Add a callback to be notified of sleep state changes.

Parameters
callbackThe void() callback.

Definition at line 173 of file nextion.cpp.

◆ add_to_get_queue()

void esphome::nextion::Nextion::add_to_get_queue ( NextionComponentBase component)
overridevirtual

Implements esphome::nextion::NextionBase.

Definition at line 1104 of file nextion.cpp.

◆ add_touch_event_callback()

void esphome::nextion::Nextion::add_touch_event_callback ( std::function< void(uint8_t, uint8_t, bool)> &&  callback)

Add a callback to be notified when Nextion has a touch event.

Parameters
callbackThe void() callback.

Definition at line 189 of file nextion.cpp.

◆ add_wake_state_callback()

void esphome::nextion::Nextion::add_wake_state_callback ( std::function< void()> &&  callback)

Add a callback to be notified of wake state changes.

Parameters
callbackThe void() callback.

Definition at line 177 of file nextion.cpp.

◆ add_waveform_data()

void esphome::nextion::Nextion::add_waveform_data ( uint8_t  component_id,
uint8_t  channel_number,
uint8_t  value 
)

Add waveform data to a waveform component.

Parameters
component_idThe integer component id.
channel_numberThe channel number to write to.
valueThe value to write.

Definition at line 231 of file nextion_commands.cpp.

◆ all_components_send_state_()

void esphome::nextion::Nextion::all_components_send_state_ ( bool  force_update = false)
protected

Definition at line 880 of file nextion.cpp.

◆ check_connect_()

bool esphome::nextion::Nextion::check_connect_ ( )
protected

Definition at line 42 of file nextion.cpp.

◆ check_pending_waveform_()

void esphome::nextion::Nextion::check_pending_waveform_ ( )
protected

Definition at line 1147 of file nextion.cpp.

◆ circle() [1/3]

void esphome::nextion::Nextion::circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
uint16_t  color 
)

Draw a circle outline.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (number). Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 301 of file nextion_commands.cpp.

◆ circle() [2/3]

void esphome::nextion::Nextion::circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
const char *  color 
)

Draw a circle outline.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (as a string). Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 306 of file nextion_commands.cpp.

◆ circle() [3/3]

void esphome::nextion::Nextion::circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
Color  color 
)

Draw a circle outline.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (as Color).

Definition at line 311 of file nextion_commands.cpp.

◆ disable_component_touch()

void esphome::nextion::Nextion::disable_component_touch ( const char *  component)

Disable touch for a component.

Parameters
componentThe component name.

Example:

Disables touch for component named button.

Definition at line 215 of file nextion_commands.cpp.

◆ display_picture()

void esphome::nextion::Nextion::display_picture ( uint16_t  picture_id,
uint16_t  x_start,
uint16_t  y_start 
)

Display a picture at coordinates.

Parameters
picture_idThe picture id.
x1The x coordinate.
y1The y coordniate.

Example:

display_picture(2, 15, 25);

Displays the picture who has the id 2 at the x coordinates 15 and y coordinates 25.

Definition at line 247 of file nextion_commands.cpp.

◆ dump_config()

void esphome::nextion::Nextion::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 137 of file nextion.cpp.

◆ enable_component_touch()

void esphome::nextion::Nextion::enable_component_touch ( const char *  component)

Enable touch for a component.

Parameters
componentThe component name.

Example:

Enables touch for component named button.

Definition at line 211 of file nextion_commands.cpp.

◆ fill_area() [1/3]

void esphome::nextion::Nextion::fill_area ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
uint16_t  color 
)

Fill a rectangle with a color.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width to draw.
heightThe height to draw.
colorThe color to draw with (number).

Example:

fill_area(50, 50, 100, 100, 63488);

Fills an area that starts at x coordinate 50 and y coordinate 50 with a height of 100 and width of 100 with the red color. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 252 of file nextion_commands.cpp.

◆ fill_area() [2/3]

void esphome::nextion::Nextion::fill_area ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
const char *  color 
)

Fill a rectangle with a color.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width to draw.
heightThe height to draw.
colorThe color to draw with (as a string).

Example:

fill_area(50, 50, 100, 100, "RED");

Fills an area that starts at x coordinate 50 and y coordinate 50 with a height of 100 and width of 100 with the red color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 257 of file nextion_commands.cpp.

◆ fill_area() [3/3]

void esphome::nextion::Nextion::fill_area ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
Color  color 
)

Fill a rectangle with a color.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width to draw.
heightThe height to draw.
colorThe color to draw with (as Color).

Example:

auto blue = Color(0, 0, 255);
fill_area(50, 50, 100, 100, blue);

Fills an area that starts at x coordinate 50 and y coordinate 50 with a height of 100 and width of 100 with blue color.

Definition at line 262 of file nextion_commands.cpp.

◆ filled_circle() [1/3]

void esphome::nextion::Nextion::filled_circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
uint16_t  color 
)

Draw a filled circled.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (number).

Example:

it.filled_cricle(25, 25, 10, 63488);

Makes a filled circle at the x coordinate 25 and y coordinate 25 with a radius of 10 with the red color. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 316 of file nextion_commands.cpp.

◆ filled_circle() [2/3]

void esphome::nextion::Nextion::filled_circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
const char *  color 
)

Draw a filled circled.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (as a string).

Example:

it.filled_cricle(25, 25, 10, "BLUE");

Makes a filled circle at the x coordinate 25 and y coordinate 25 with a radius of 10 with the blue color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 321 of file nextion_commands.cpp.

◆ filled_circle() [3/3]

void esphome::nextion::Nextion::filled_circle ( uint16_t  center_x,
uint16_t  center_y,
uint16_t  radius,
Color  color 
)

Draw a filled circled.

Parameters
center_xThe center x coordinate.
center_yThe center y coordinate.
radiusThe circle radius.
colorThe color to draw with (as Color).

Example:

auto blue = Color(0, 0, 255);
it.filled_cricle(25, 25, 10, blue);

Makes a filled circle at the x coordinate 25 and y coordinate 25 with a radius of 10 with blue color.

Definition at line 326 of file nextion_commands.cpp.

◆ get_free_heap_()

uint32_t esphome::nextion::Nextion::get_free_heap_ ( )
inlineprotected

Returns the ESP Free Heap memory.

This is framework independent.

Returns
Free Heap in bytes.

Definition at line 24 of file nextion_upload_arduino.cpp.

◆ get_is_connected_()

bool esphome::nextion::Nextion::get_is_connected_ ( )
inlineprotected

Definition at line 1318 of file nextion.h.

◆ get_setup_priority()

float esphome::nextion::Nextion::get_setup_priority ( ) const
overridevirtual

Reimplemented from esphome::Component.

Definition at line 163 of file nextion.cpp.

◆ get_wifi_client_()

WiFiClient * esphome::nextion::Nextion::get_wifi_client_ ( )
protected

Definition at line 364 of file nextion_upload_arduino.cpp.

◆ goto_page() [1/2]

void esphome::nextion::Nextion::goto_page ( const char *  page)

Show the page with a given name.

Parameters
pageThe name of the page.

Example:

it.goto_page("main");

Switches to the page named main. Pages are named in the Nextion Editor.

Definition at line 183 of file nextion_commands.cpp.

◆ goto_page() [2/2]

void esphome::nextion::Nextion::goto_page ( uint8_t  page)

Show the page with a given id.

Parameters
pageThe id of the page.

Example:

it.goto_page(2);

Switches to the page named main. Pages are named in the Nextion Editor.

Definition at line 184 of file nextion_commands.cpp.

◆ hide_component()

void esphome::nextion::Nextion::hide_component ( const char *  component)
overridevirtual

Hide a component.

Parameters
componentThe component name.

Example:

hide_component("button");

Hides the component named button.

Implements esphome::nextion::NextionBase.

Definition at line 203 of file nextion_commands.cpp.

◆ is_updating()

bool esphome::nextion::Nextion::is_updating ( )
overridevirtual

Check if the TFT update process is currently running.

This method provides a way to determine if the Nextion display is in the process of updating its TFT firmware. When a TFT update is in progress, certain operations or commands may be restricted or could interfere with the update process. By checking the state of the update process, the system can make informed decisions about performing actions that involve communication with the Nextion display.

Returns
true if the TFT update process is active, indicating that the Nextion display is currently updating its firmware. This implies that caution should be taken with commands sent to the display to avoid interrupting the update process.
false if the TFT update process is not active, indicating that the Nextion display is not currently updating its firmware and is in a normal operational state, ready to receive and process commands as usual.

Reimplemented from esphome::nextion::NextionBase.

Definition at line 1169 of file nextion.cpp.

◆ line() [1/3]

void esphome::nextion::Nextion::line ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2,
uint16_t  color 
)

Draw a line on the screen.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
x2The ending x coordinate.
y2The ending y coordinate.
colorThe color to draw with (number).

Example:

it.line(50, 50, 75, 75, 63488);

Makes a line that starts at x coordinate 50 and y coordinate 50 and ends at x coordinate 75 and y coordinate 75 with the red color. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 268 of file nextion_commands.cpp.

◆ line() [2/3]

void esphome::nextion::Nextion::line ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2,
const char *  color 
)

Draw a line on the screen.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
x2The ending x coordinate.
y2The ending y coordinate.
colorThe color to draw with (as a string).

Example:

it.line(50, 50, 75, 75, "BLUE");

Makes a line that starts at x coordinate 50 and y coordinate 50 and ends at x coordinate 75 and y coordinate 75 with the blue color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 273 of file nextion_commands.cpp.

◆ line() [3/3]

void esphome::nextion::Nextion::line ( uint16_t  x1,
uint16_t  y1,
uint16_t  x2,
uint16_t  y2,
Color  color 
)

Draw a line on the screen.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
x2The ending x coordinate.
y2The ending y coordinate.
colorThe color to draw with (as Color).

Example:

auto blue = Color(0, 0, 255);
it.line(50, 50, 75, 75, blue);

Makes a line that starts at x coordinate 50 and y coordinate 50 and ends at x coordinate 75 and y coordinate 75 with blue color.

Definition at line 278 of file nextion_commands.cpp.

◆ loop()

void esphome::nextion::Nextion::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 267 of file nextion.cpp.

◆ open_waveform_channel()

void esphome::nextion::Nextion::open_waveform_channel ( uint8_t  component_id,
uint8_t  channel_number,
uint8_t  value 
)

Definition at line 236 of file nextion_commands.cpp.

◆ print_queue_members_()

void esphome::nextion::Nextion::print_queue_members_ ( )
protected

Definition at line 248 of file nextion.cpp.

◆ process_nextion_commands_()

void esphome::nextion::Nextion::process_nextion_commands_ ( )
protected

Definition at line 345 of file nextion.cpp.

◆ process_serial_()

void esphome::nextion::Nextion::process_serial_ ( )
protected

Definition at line 336 of file nextion.cpp.

◆ qrcode() [1/2]

void esphome::nextion::Nextion::qrcode ( uint16_t  x1,
uint16_t  y1,
const char *  content,
uint16_t  size = 200,
uint16_t  background_color = 65535,
uint16_t  foreground_color = 0,
uint8_t  logo_pic = -1,
uint8_t  border_width = 8 
)

Draws a QR code in the screen.

Parameters
x1The top left x coordinate to start the QR code.
y1The top left y coordinate to start the QR code.
contentThe content of the QR code (as a plain text - Nextion will generate the QR code).
sizeThe size (in pixels) for the QR code. Defaults to 200px.
background_colorThe background color to draw with (as rgb565 integer). Defaults to 65535 (white).
foreground_colorThe foreground color to draw with (as rgb565 integer). Defaults to 0 (black).
logo_picThe picture id for the logo in the center of the QR code. Defaults to -1 (no logo).
border_widthThe border width (in pixels) for the QR code. Defaults to 8px.

Example:

it.qrcode(25, 25, "WIFI:S:MySSID;T:WPA;P:MyPassW0rd;;");

Draws a QR code with a Wi-Fi network credentials starting at the given coordinates (25,25).

Definition at line 331 of file nextion_commands.cpp.

◆ qrcode() [2/2]

void esphome::nextion::Nextion::qrcode ( uint16_t  x1,
uint16_t  y1,
const char *  content,
uint16_t  size,
Color  background_color = Color(255, 255, 255),
Color  foreground_color = Color(0, 0, 0),
uint8_t  logo_pic = -1,
uint8_t  border_width = 8 
)

Draws a QR code in the screen.

Parameters
x1The top left x coordinate to start the QR code.
y1The top left y coordinate to start the QR code.
contentThe content of the QR code (as a plain text - Nextion will generate the QR code).
sizeThe size (in pixels) for the QR code. Defaults to 200px.
background_colorThe background color to draw with (as Color). Defaults to 65535 (white).
foreground_colorThe foreground color to draw with (as Color). Defaults to 0 (black).
logo_picThe picture id for the logo in the center of the QR code. Defaults to -1 (no logo).
border_widthThe border width (in pixels) for the QR code. Defaults to 8px.

Example:

auto blue = Color(0, 0, 255);
auto red = Color(255, 0, 0);
it.qrcode(25, 25, "WIFI:S:MySSID;T:WPA;P:MyPassW0rd;;", 150, blue, red);

Draws a QR code with a Wi-Fi network credentials starting at the given coordinates (25,25) with size of 150px in red on a blue background.

Definition at line 338 of file nextion_commands.cpp.

◆ queue_size()

size_t esphome::nextion::Nextion::queue_size ( )
inline

Retrieves the number of commands pending in the Nextion command queue.

This function returns the current count of commands that have been queued but not yet processed for the Nextion display. The Nextion command queue is used to store commands that are sent to the Nextion display for various operations like updating the display, changing interface elements, or other interactive features. A larger queue size might indicate a higher processing time or potential delays in command execution. This function is useful for monitoring the command flow and managing the execution efficiency of the Nextion display interface.

Returns
size_t The number of commands currently in the Nextion queue. This count includes all commands that have been added to the queue and are awaiting processing.

Definition at line 1198 of file nextion.h.

◆ rectangle() [1/3]

void esphome::nextion::Nextion::rectangle ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
uint16_t  color 
)

Draw a rectangle outline.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width of the rectangle.
heightThe height of the rectangle.
colorThe color to draw with (number).

Example:

it.rectangle(25, 35, 40, 50, 63488);

Makes a outline of a rectangle that starts at x coordinate 25 and y coordinate 35 and has a width of 40 and a length of 50 with the red color. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 283 of file nextion_commands.cpp.

◆ rectangle() [2/3]

void esphome::nextion::Nextion::rectangle ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
const char *  color 
)

Draw a rectangle outline.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width of the rectangle.
heightThe height of the rectangle.
colorThe color to draw with (as a string).

Example:

it.rectangle(25, 35, 40, 50, "BLUE");

Makes a outline of a rectangle that starts at x coordinate 25 and y coordinate 35 and has a width of 40 and a length of 50 with the blue color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 289 of file nextion_commands.cpp.

◆ rectangle() [3/3]

void esphome::nextion::Nextion::rectangle ( uint16_t  x1,
uint16_t  y1,
uint16_t  width,
uint16_t  height,
Color  color 
)

Draw a rectangle outline.

Parameters
x1The starting x coordinate.
y1The starting y coordinate.
widthThe width of the rectangle.
heightThe height of the rectangle.
colorThe color to draw with (as Color).

Example:

auto blue = Color(0, 0, 255);
it.rectangle(25, 35, 40, 50, blue);

Makes a outline of a rectangle that starts at x coordinate 25 and y coordinate 35 and has a width of 40 and a length of 50 with blue color.

Definition at line 295 of file nextion_commands.cpp.

◆ recv_ret_string_()

uint16_t esphome::nextion::Nextion::recv_ret_string_ ( std::string &  response,
uint32_t  timeout,
bool  recv_flag 
)
protected

Definition at line 919 of file nextion.cpp.

◆ register_binarysensor_component()

void esphome::nextion::Nextion::register_binarysensor_component ( NextionComponentBase obj)
inline

Definition at line 1041 of file nextion.h.

◆ register_sensor_component()

void esphome::nextion::Nextion::register_sensor_component ( NextionComponentBase obj)
inline

Definition at line 1042 of file nextion.h.

◆ register_switch_component()

void esphome::nextion::Nextion::register_switch_component ( NextionComponentBase obj)
inline

Definition at line 1040 of file nextion.h.

◆ register_textsensor_component()

void esphome::nextion::Nextion::register_textsensor_component ( NextionComponentBase obj)
inline

Definition at line 1043 of file nextion.h.

◆ register_touch_component()

void esphome::nextion::Nextion::register_touch_component ( NextionComponentBase obj)
inline

Definition at line 1039 of file nextion.h.

◆ remove_from_q_()

bool esphome::nextion::Nextion::remove_from_q_ ( bool  report_empty = true)
protected

Definition at line 312 of file nextion.cpp.

◆ remove_front_no_sensors_()

void esphome::nextion::Nextion::remove_front_no_sensors_ ( )
protected

◆ reset_()

void esphome::nextion::Nextion::reset_ ( bool  reset_nextion = true)
protected

Definition at line 127 of file nextion.cpp.

◆ send_command()

bool esphome::nextion::Nextion::send_command ( const char *  command)

Manually send a raw command to the display.

Parameters
commandThe pcommand, like "page 0"
Returns
Whether the send was successful.

Definition at line 215 of file nextion.cpp.

◆ send_command_()

bool esphome::nextion::Nextion::send_command_ ( const std::string &  command)
protected

Manually send a raw command to the display and don't wait for an acknowledgement packet.

Parameters
commandThe command to write, for example "vis b0,0".

Definition at line 29 of file nextion.cpp.

◆ send_command_printf()

bool esphome::nextion::Nextion::send_command_printf ( const char *  format,
  ... 
)

Manually send a raw formatted command to the display.

Parameters
formatThe printf-style command format, like "vis %s,0"
...The format arguments
Returns
Whether the send was successful.

Definition at line 226 of file nextion.cpp.

◆ set_auto_wake_on_touch()

void esphome::nextion::Nextion::set_auto_wake_on_touch ( bool  auto_wake)

Sets if Nextion should auto-wake from sleep when touch press occurs.

Parameters
auto_wakeTrue or false. When auto_wake is true and Nextion is in sleep mode, the first touch will only trigger the auto wake mode and not trigger a Touch Event.

Example:

it.set_auto_wake_on_touch(true);

The display will wake up by touch.

Definition at line 194 of file nextion_commands.cpp.

◆ set_auto_wake_on_touch_internal()

void esphome::nextion::Nextion::set_auto_wake_on_touch_internal ( bool  auto_wake_on_touch)
inline

Definition at line 1180 of file nextion.h.

◆ set_backlight_brightness()

void esphome::nextion::Nextion::set_backlight_brightness ( float  brightness)

Set the brightness of the backlight.

Parameters
brightnessThe brightness percentage from 0 to 1.0.

Example:

it.set_backlight_brightness(.3);

Changes the brightness of the display to 30%.

Definition at line 186 of file nextion_commands.cpp.

◆ set_brightness()

void esphome::nextion::Nextion::set_brightness ( float  brightness)
inline

Definition at line 1046 of file nextion.h.

◆ set_component_aph()

void esphome::nextion::Nextion::set_component_aph ( const char *  component,
uint8_t  aph 
)

Set the opaqueness (fading) of a component.

Parameters
componentThe component name.
aphAn integer between 0 and 127 related to the opaqueness/fading level.

Example:

it.set_component_aph("textview", 64);

This will set the opaqueness level of the component textview to 64.

Note: Requires Nextion Intelligent series display.

Definition at line 163 of file nextion_commands.cpp.

◆ set_component_background_color() [1/3]

void esphome::nextion::Nextion::set_component_background_color ( const char *  component,
uint16_t  color 
)

Set the background color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_background_color("button", 63488);

This will change the background color of the component button to red. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 60 of file nextion_commands.cpp.

◆ set_component_background_color() [2/3]

void esphome::nextion::Nextion::set_component_background_color ( const char *  component,
const char *  color 
)

Set the background color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_background_color("button", "RED");

This will change the background color of the component button to red. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 64 of file nextion_commands.cpp.

◆ set_component_background_color() [3/3]

void esphome::nextion::Nextion::set_component_background_color ( const char *  component,
Color  color 
)
overridevirtual

Set the background color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

auto blue = Color(0, 0, 255);
it.set_component_background_color("button", blue);

This will change the background color of the component button to blue.

Implements esphome::nextion::NextionBase.

Definition at line 68 of file nextion_commands.cpp.

◆ set_component_coordinates()

void esphome::nextion::Nextion::set_component_coordinates ( const char *  component,
uint16_t  x,
uint16_t  y 
)

Set the coordinates of a component on screen.

Parameters
componentThe component name.
xThe x coordinate.
yThe y coordinate.

Example:

it.set_component_coordinates("pic", 55, 100);

This will move the position of the component pic to the x coordinate 55 and y coordinate 100.

Definition at line 241 of file nextion_commands.cpp.

◆ set_component_drag()

void esphome::nextion::Nextion::set_component_drag ( const char *  component,
bool  drag 
)

Set the drag availability of a component.

Parameters
componentThe component name.
dragFalse: Drag not available, True: Drag available.

Example:

it.set_component_drag("textview", true);

This will enable drag to the component textview.

Note: Requires Nextion Intelligent series display.

Definition at line 159 of file nextion_commands.cpp.

◆ set_component_font()

void esphome::nextion::Nextion::set_component_font ( const char *  component,
uint8_t  font_id 
)
overridevirtual

Set the font id for a component.

Parameters
componentThe component name.
font_idThe ID of the font (number).

Example:

it.set_component_font("textview", "3");

Changes the font of the component named textveiw. Font IDs are set in the Nextion Editor.

Implements esphome::nextion::NextionBase.

Definition at line 199 of file nextion_commands.cpp.

◆ set_component_font_color() [1/3]

void esphome::nextion::Nextion::set_component_font_color ( const char *  component,
uint16_t  color 
)

Set the font color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_font_color("textview", 63488);

This will change the font color of the component textview to a red color. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 118 of file nextion_commands.cpp.

◆ set_component_font_color() [2/3]

void esphome::nextion::Nextion::set_component_font_color ( const char *  component,
const char *  color 
)

Set the font color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_font_color("textview", "RED");

This will change the font color of the component textview to a red color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 122 of file nextion_commands.cpp.

◆ set_component_font_color() [3/3]

void esphome::nextion::Nextion::set_component_font_color ( const char *  component,
Color  color 
)
overridevirtual

Set the font color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

it.set_component_font_color("textview", Color::BLACK);

This will change the font color of the component textview to black.

Implements esphome::nextion::NextionBase.

Definition at line 126 of file nextion_commands.cpp.

◆ set_component_foreground_color() [1/3]

void esphome::nextion::Nextion::set_component_foreground_color ( const char *  component,
uint16_t  color 
)

Set the foreground color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_foreground_color("button", 63488);

This will change the foreground color of the component button to red. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 89 of file nextion_commands.cpp.

◆ set_component_foreground_color() [2/3]

void esphome::nextion::Nextion::set_component_foreground_color ( const char *  component,
const char *  color 
)

Set the foreground color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_foreground_color("button", "RED");

This will change the foreground color of the component button to red. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 93 of file nextion_commands.cpp.

◆ set_component_foreground_color() [3/3]

void esphome::nextion::Nextion::set_component_foreground_color ( const char *  component,
Color  color 
)
overridevirtual

Set the foreground color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

it.set_component_foreground_color("button", Color::BLACK);

This will change the foreground color of the component button to black.

Implements esphome::nextion::NextionBase.

Definition at line 97 of file nextion_commands.cpp.

◆ set_component_pic()

void esphome::nextion::Nextion::set_component_pic ( const char *  component,
uint8_t  pic_id 
)

Set the picture id of a component.

Parameters
componentThe component name.
pic_idThe picture ID.

Example:

it.set_component_pic("textview", 1);

This will change the picture id of the component textview.

Definition at line 146 of file nextion_commands.cpp.

◆ set_component_picc()

void esphome::nextion::Nextion::set_component_picc ( const char *  component,
uint8_t  pic_id 
)

Set the background picture id of component.

Parameters
componentThe component name.
pic_idThe picture ID.

Example:

it.set_component_picc("textview", 1);

This will change the background picture id of the component textview.

Definition at line 150 of file nextion_commands.cpp.

◆ set_component_picture()

void esphome::nextion::Nextion::set_component_picture ( const char *  component,
uint8_t  picture_id 
)

Set the picture of an image component.

Parameters
componentThe component name.
valueThe picture id.

Example:

it.set_component_picture("pic", 4);

This will change the image of the component pic to the image with ID 4.

Definition at line 219 of file nextion_commands.cpp.

◆ set_component_position()

void esphome::nextion::Nextion::set_component_position ( const char *  component,
uint32_t  x,
uint32_t  y 
)

Set the position of a component.

Parameters
componentThe component name.
xThe new X (horizontal) coordinate for the component.
yThe new Y (vertical) coordinate for the component.

Example:

it.set_component_aph("textview", 64, 35);

This will move the component textview to the column 64 of row 35 of the display.

Note: Requires Nextion Intelligent series display.

Definition at line 167 of file nextion_commands.cpp.

◆ set_component_pressed_background_color() [1/3]

void esphome::nextion::Nextion::set_component_pressed_background_color ( const char *  component,
uint16_t  color 
)

Set the pressed background color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_pressed_background_color("button", 63488);

This will change the pressed background color of the component button to red. This is the background color that is shown when the component is pressed. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 74 of file nextion_commands.cpp.

◆ set_component_pressed_background_color() [2/3]

void esphome::nextion::Nextion::set_component_pressed_background_color ( const char *  component,
const char *  color 
)

Set the pressed background color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_pressed_background_color("button", "RED");

This will change the pressed background color of the component button to red. This is the background color that is shown when the component is pressed. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 79 of file nextion_commands.cpp.

◆ set_component_pressed_background_color() [3/3]

void esphome::nextion::Nextion::set_component_pressed_background_color ( const char *  component,
Color  color 
)
overridevirtual

Set the pressed background color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

auto red = Color(255, 0, 0);
it.set_component_pressed_background_color("button", red);

This will change the pressed background color of the component button to red. This is the background color that is shown when the component is pressed.

Implements esphome::nextion::NextionBase.

Definition at line 83 of file nextion_commands.cpp.

◆ set_component_pressed_font_color() [1/3]

void esphome::nextion::Nextion::set_component_pressed_font_color ( const char *  component,
uint16_t  color 
)

Set the pressed font color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_pressed_font_color("button", 63488);

This will change the pressed font color of the component button to a red. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 132 of file nextion_commands.cpp.

◆ set_component_pressed_font_color() [2/3]

void esphome::nextion::Nextion::set_component_pressed_font_color ( const char *  component,
const char *  color 
)

Set the pressed font color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_pressed_font_color("button", "RED");

This will change the pressed font color of the component button to a red color. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 136 of file nextion_commands.cpp.

◆ set_component_pressed_font_color() [3/3]

void esphome::nextion::Nextion::set_component_pressed_font_color ( const char *  component,
Color  color 
)
overridevirtual

Set the pressed font color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

it.set_component_pressed_font_color("button", Color::BLACK);

This will change the pressed font color of the component button to black.

Implements esphome::nextion::NextionBase.

Definition at line 140 of file nextion_commands.cpp.

◆ set_component_pressed_foreground_color() [1/3]

void esphome::nextion::Nextion::set_component_pressed_foreground_color ( const char *  component,
uint16_t  color 
)

Set the pressed foreground color of a component.

Parameters
componentThe component name.
colorThe color (as a uint16_t).

Example:

it.set_component_pressed_foreground_color("button", 63488 );

This will change the pressed foreground color of the component button to red. This is the foreground color that is shown when the component is pressed. Use this color picker to convert color codes to Nextion HMI colors.

Definition at line 103 of file nextion_commands.cpp.

◆ set_component_pressed_foreground_color() [2/3]

void esphome::nextion::Nextion::set_component_pressed_foreground_color ( const char *  component,
const char *  color 
)

Set the pressed foreground color of a component.

Parameters
componentThe component name.
colorThe color (as a string).

Example:

it.set_component_pressed_foreground_color("button", "RED");

This will change the pressed foreground color of the component button to red. This is the foreground color that is shown when the component is pressed. Use Nextion Instruction Set for a list of Nextion HMI colors constants.

Definition at line 108 of file nextion_commands.cpp.

◆ set_component_pressed_foreground_color() [3/3]

void esphome::nextion::Nextion::set_component_pressed_foreground_color ( const char *  component,
Color  color 
)
overridevirtual

Set the pressed foreground color of a component.

Parameters
componentThe component name.
colorThe color (as Color).

Example:

auto blue = Color(0, 0, 255);
it.set_component_pressed_foreground_color("button", blue);

This will change the pressed foreground color of the component button to blue. This is the foreground color that is shown when the component is pressed.

Implements esphome::nextion::NextionBase.

Definition at line 112 of file nextion_commands.cpp.

◆ set_component_text()

void esphome::nextion::Nextion::set_component_text ( const char *  component,
const char *  text 
)

Set the text of a component to a static string.

Parameters
componentThe component name.
textThe static text to set.

Example:

it.set_component_text("textview", "Hello World!");

This will set the txt property of the component textview to Hello World.

Definition at line 223 of file nextion_commands.cpp.

◆ set_component_text_printf()

void esphome::nextion::Nextion::set_component_text_printf ( const char *  component,
const char *  format,
  ... 
)

Set the text of a component to a formatted string.

Parameters
componentThe component name.
formatThe printf-style format string.
...The arguments to the format.

Example:

it.set_component_text_printf("textview", "The uptime is: %.0f", id(uptime_sensor).state);

This will change the text on the component named textview to The uptime is: Then the value of uptime_sensor. with zero decimals of accuracy (whole number). For example when uptime_sensor = 506, then, The uptime is: 506 will be displayed.

Definition at line 172 of file nextion_commands.cpp.

◆ set_component_value()

void esphome::nextion::Nextion::set_component_value ( const char *  component,
int32_t  value 
)

Set the integer value of a component.

Parameters
componentThe component name.
valueThe value to set.

Example:

it.set_component_value("gauge", 50);

This will change the property value of the component gauge to 50.

Definition at line 227 of file nextion_commands.cpp.

◆ set_component_vid()

void esphome::nextion::Nextion::set_component_vid ( const char *  component,
uint8_t  vid_id 
)

Set the video id of a component.

Parameters
componentThe component name.
vid_idThe video ID.

Example:

it.set_component_vid("textview", 1);

This will change the video id of the component textview.

Note: Requires Nextion Intelligent series display.

Definition at line 155 of file nextion_commands.cpp.

◆ set_exit_reparse_on_start()

void esphome::nextion::Nextion::set_exit_reparse_on_start ( bool  exit_reparse)

Sets if Nextion should exit the active reparse mode before the "connect" command is sent.

Parameters
exit_reparseTrue or false. When exit_reparse is true, the exit reparse command will be sent before requesting the connection from Nextion.

Example:

it.set_exit_reparse_on_start(true);

The display will be requested to leave active reparse mode before setup.

Definition at line 57 of file nextion_commands.cpp.

◆ set_exit_reparse_on_start_internal()

void esphome::nextion::Nextion::set_exit_reparse_on_start_internal ( bool  exit_reparse_on_start)
inline

Definition at line 1181 of file nextion.h.

◆ set_nextion_rtc_time()

void esphome::nextion::Nextion::set_nextion_rtc_time ( ESPTime  time)

Send the current time to the nextion display.

Parameters
timeThe time instance to send (get this with id(my_time).now() ).

Definition at line 346 of file nextion_commands.cpp.

◆ set_nextion_sensor_state() [1/2]

void esphome::nextion::Nextion::set_nextion_sensor_state ( int  queue_type,
const std::string &  name,
float  state 
)

Set the nextion sensor state object.

Parameters
[in]queue_typeIndex of NextionQueueType.
[in]nameComponent/variable name.
[in]stateState to set.

Definition at line 823 of file nextion.cpp.

◆ set_nextion_sensor_state() [2/2]

void esphome::nextion::Nextion::set_nextion_sensor_state ( NextionQueueType  queue_type,
const std::string &  name,
float  state 
)

Definition at line 827 of file nextion.cpp.

◆ set_nextion_text_state()

void esphome::nextion::Nextion::set_nextion_text_state ( const std::string &  name,
const std::string &  state 
)

Definition at line 867 of file nextion.cpp.

◆ set_protocol_reparse_mode()

bool esphome::nextion::Nextion::set_protocol_reparse_mode ( bool  active_mode)

Sets the Nextion display's protocol reparse mode.

This function toggles the Nextion display's protocol reparse mode between active and passive. In active mode, the display actively parses incoming data. In passive mode, it does not parse data unless specifically instructed to do so. This is useful for managing how the Nextion display interprets incoming commands, especially during initialization or in scenarios where precise control over command processing is needed.

Parameters
active_modeA boolean value indicating the desired reparse mode.
  • true to set the display to active protocol reparse mode, where it actively parses incoming commands.
  • false to set the display to passive protocol reparse mode, where command parsing is done only on explicit instruction.
Returns
bool Returns true if all commands were sent successfully to the Nextion display, indicating that the mode was set as expected. Returns false if any of the commands failed to send, indicating that the desired reparse mode may not be correctly set.

Definition at line 39 of file nextion_commands.cpp.

◆ set_skip_connection_handshake()

void esphome::nextion::Nextion::set_skip_connection_handshake ( bool  skip_handshake)
inline

Sets whether the Nextion display should skip the connection handshake process.

Parameters
skip_handshakeTrue or false. When skip_connection_handshake is true, the connection will be established without performing the handshake. This can be useful when using Nextion Simulator.

Example:

it.set_skip_connection_handshake(true);

When set to true, the display will be marked as connected without performing a handshake.

Definition at line 942 of file nextion.h.

◆ set_start_up_page()

void esphome::nextion::Nextion::set_start_up_page ( uint8_t  page_id = 255)

Sets which page Nextion loads when connecting to ESPHome.

Parameters
page_idThe page id, from 0 to the lage page in Nextion. Set 255 (not set to any existing page) to wakes up to current page.

Example:

it.set_start_up_page(2);

The display will go to page 2 when it establishes a connection to ESPHome.

Definition at line 17 of file nextion_commands.cpp.

◆ set_start_up_page_internal()

void esphome::nextion::Nextion::set_start_up_page_internal ( uint8_t  start_up_page)
inline

Definition at line 1179 of file nextion.h.

◆ set_tft_url()

bool void esphome::nextion::Nextion::set_tft_url ( const std::string &  tft_url)
inline

Set the tft file URL.

https seems problematic with Arduino..

Definition at line 1074 of file nextion.h.

◆ set_touch_sleep_timeout()

void esphome::nextion::Nextion::set_touch_sleep_timeout ( uint16_t  timeout)

Set the touch sleep timeout of the display.

Parameters
timeoutTimeout in seconds.

Example:

it.set_touch_sleep_timeout(30);

After 30 seconds the display will go to sleep. Note: the display will only wakeup by a restart or by setting up thup.

Definition at line 19 of file nextion_commands.cpp.

◆ set_touch_sleep_timeout_internal()

void esphome::nextion::Nextion::set_touch_sleep_timeout_internal ( uint32_t  touch_sleep_timeout)
inline

Definition at line 1175 of file nextion.h.

◆ set_wait_for_ack()

void esphome::nextion::Nextion::set_wait_for_ack ( bool  wait_for_ack)

◆ set_wake_up_page()

void esphome::nextion::Nextion::set_wake_up_page ( uint8_t  page_id = 255)

Sets which page Nextion loads when exiting sleep mode.

Note this can be set even when Nextion is in sleep mode.

Parameters
page_idThe page id, from 0 to the lage page in Nextion. Set 255 (not set to any existing page) to wakes up to current page.

Example:

it.set_wake_up_page(2);

The display will wake up to page 2.

Definition at line 13 of file nextion_commands.cpp.

◆ set_wake_up_page_internal()

void esphome::nextion::Nextion::set_wake_up_page_internal ( uint8_t  wake_up_page)
inline

Definition at line 1178 of file nextion.h.

◆ set_writer()

void esphome::nextion::Nextion::set_writer ( const nextion_writer_t writer)

Definition at line 1164 of file nextion.cpp.

◆ setup()

void esphome::nextion::Nextion::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 12 of file nextion.cpp.

◆ show_component()

void esphome::nextion::Nextion::show_component ( const char *  component)
overridevirtual

Show a component.

Parameters
componentThe component name.

Example:

show_component("button");

Shows the component named button.

Implements esphome::nextion::NextionBase.

Definition at line 207 of file nextion_commands.cpp.

◆ sleep()

void esphome::nextion::Nextion::sleep ( bool  sleep)

Sets Nextion mode between sleep and awake.

Parameters
Trueor false. Sleep=true to enter sleep mode or sleep=false to exit sleep mode.

Definition at line 28 of file nextion_commands.cpp.

◆ soft_reset()

void esphome::nextion::Nextion::soft_reset ( )

Softreset the Nextion.

Definition at line 11 of file nextion_commands.cpp.

◆ update()

void esphome::nextion::Nextion::update ( )
overridevirtual

Implements esphome::PollingComponent.

Definition at line 164 of file nextion.cpp.

◆ update_all_components()

void esphome::nextion::Nextion::update_all_components ( )

Definition at line 197 of file nextion.cpp.

◆ update_components_by_prefix()

void esphome::nextion::Nextion::update_components_by_prefix ( const std::string &  prefix)

Definition at line 900 of file nextion.cpp.

◆ upload_by_chunks_() [1/2]

int esphome::nextion::Nextion::upload_by_chunks_ ( HTTPClient &  http_client,
uint32_t &  range_start 
)
protected

will request chunk_size chunks from the web server and send each to the nextion

Parameters
HTTPClienthttp_client HTTP client handler.
intrange_start Position of next byte to transfer.
Returns
position of last byte transferred, -1 for failure.

Definition at line 32 of file nextion_upload_arduino.cpp.

◆ upload_by_chunks_() [2/2]

int esphome::nextion::Nextion::upload_by_chunks_ ( esp_http_client_handle_t  http_client,
uint32_t &  range_start 
)
protected

will request 4096 bytes chunks from the web server and send each to Nextion

Parameters
esp_http_client_handle_thttp_client HTTP client handler.
intrange_start Position of next byte to transfer.
Returns
position of last byte transferred, -1 for failure.

Definition at line 22 of file nextion_upload_idf.cpp.

◆ upload_end_()

bool esphome::nextion::Nextion::upload_end_ ( bool  successful)
protected

Ends the upload process, restart Nextion and, if successful, restarts ESP.

Parameters
boolurl successful True: Transfer completed successfuly, False: Transfer failed.
Returns
bool True: Transfer completed successfuly, False: Transfer failed.

Definition at line 341 of file nextion_upload_arduino.cpp.

◆ upload_tft()

bool esphome::nextion::Nextion::upload_tft ( uint32_t  baud_rate = 0,
bool  exit_reparse = true 
)

Uploads the TFT file to the Nextion display.

This function initiates the upload of a TFT file to the Nextion display. Users can specify a target baud rate for the transfer. If the provided baud rate is not supported by Nextion, the function defaults to using the current baud rate set for the display. If no baud rate is specified (or if 0 is passed), the current baud rate is used.

Supported baud rates are: 2400, 4800, 9600, 19200, 31250, 38400, 57600, 115200, 230400, 250000, 256000, 512000 and 921600. Selecting a baud rate supported by both the Nextion display and the host hardware is essential for ensuring a successful upload process.

Parameters
baud_rateThe desired baud rate for the TFT file transfer, specified as an unsigned 32-bit integer. If the specified baud rate is not supported, or if 0 is passed, the function will use the current baud rate. The default value is 0, which implies using the current baud rate.
exit_reparseIf true, the function exits reparse mode before uploading the TFT file. This parameter defaults to true, ensuring that the display is ready to receive and apply the new TFT file without needing to manually reset or reconfigure. Exiting reparse mode is recommended for most upload scenarios to ensure the display properly processes the uploaded file command.
Returns
bool True: Transfer completed successfuly, False: Transfer failed.

Definition at line 153 of file nextion_upload_arduino.cpp.

Field Documentation

◆ auto_wake_on_touch_

bool esphome::nextion::Nextion::auto_wake_on_touch_ = true
protected

Definition at line 1243 of file nextion.h.

◆ binarysensortype_

std::vector<NextionComponentBase *> esphome::nextion::Nextion::binarysensortype_
protected

Definition at line 1326 of file nextion.h.

◆ brightness_

float esphome::nextion::Nextion::brightness_ {1.0}
protected

Definition at line 1335 of file nextion.h.

◆ buffer_overflow_callback_

CallbackManager<void()> esphome::nextion::Nextion::buffer_overflow_callback_ {}
protected

Definition at line 1332 of file nextion.h.

◆ command_data_

std::string esphome::nextion::Nextion::command_data_
protected

Definition at line 1349 of file nextion.h.

◆ comok_sent_

uint64_t esphome::nextion::Nextion::comok_sent_ = 0
protected

Definition at line 1225 of file nextion.h.

◆ content_length_

uint32_t esphome::nextion::Nextion::content_length_ = 0
protected

Definition at line 1277 of file nextion.h.

◆ device_model_

std::string esphome::nextion::Nextion::device_model_
protected

Definition at line 1337 of file nextion.h.

◆ exit_reparse_on_start_

bool esphome::nextion::Nextion::exit_reparse_on_start_ = false
protected

Definition at line 1244 of file nextion.h.

◆ firmware_version_

std::string esphome::nextion::Nextion::firmware_version_
protected

Definition at line 1338 of file nextion.h.

◆ flash_size_

std::string esphome::nextion::Nextion::flash_size_
protected

Definition at line 1340 of file nextion.h.

◆ ignore_is_setup_

bool esphome::nextion::Nextion::ignore_is_setup_ = false
protected

Sends commands ignoring of the Nextion has been setup.

Definition at line 1232 of file nextion.h.

◆ is_connected_

bool esphome::nextion::Nextion::is_connected_ = false
protected

Definition at line 1350 of file nextion.h.

◆ is_updating_

bool esphome::nextion::Nextion::is_updating_ = false
protected

Definition at line 1239 of file nextion.h.

◆ max_q_age_ms_

const uint16_t esphome::nextion::Nextion::max_q_age_ms_ = 8000
protected

Definition at line 1352 of file nextion.h.

◆ nextion_event_

uint8_t esphome::nextion::Nextion::nextion_event_
protected

Definition at line 1235 of file nextion.h.

◆ nextion_queue_

std::deque<NextionQueue *> esphome::nextion::Nextion::nextion_queue_
protected

Definition at line 1221 of file nextion.h.

◆ nextion_reports_is_setup_

bool esphome::nextion::Nextion::nextion_reports_is_setup_ = false
protected

Definition at line 1234 of file nextion.h.

◆ original_baud_rate_

uint32_t esphome::nextion::Nextion::original_baud_rate_ = 0
protected

Definition at line 1279 of file nextion.h.

◆ page_callback_

CallbackManager<void(uint8_t)> esphome::nextion::Nextion::page_callback_ {}
protected

Definition at line 1330 of file nextion.h.

◆ sensortype_

std::vector<NextionComponentBase *> esphome::nextion::Nextion::sensortype_
protected

Definition at line 1324 of file nextion.h.

◆ sent_setup_commands_

bool esphome::nextion::Nextion::sent_setup_commands_ = false
protected

Definition at line 1354 of file nextion.h.

◆ serial_number_

std::string esphome::nextion::Nextion::serial_number_
protected

Definition at line 1339 of file nextion.h.

◆ setup_callback_

CallbackManager<void()> esphome::nextion::Nextion::setup_callback_ {}
protected

Definition at line 1327 of file nextion.h.

◆ skip_connection_handshake_

bool esphome::nextion::Nextion::skip_connection_handshake_ = false
protected

Definition at line 1245 of file nextion.h.

◆ sleep_callback_

CallbackManager<void()> esphome::nextion::Nextion::sleep_callback_ {}
protected

Definition at line 1328 of file nextion.h.

◆ start_up_page_

int16_t esphome::nextion::Nextion::start_up_page_ = -1
protected

Definition at line 1242 of file nextion.h.

◆ started_ms_

uint32_t esphome::nextion::Nextion::started_ms_ = 0
protected

Definition at line 1353 of file nextion.h.

◆ startup_override_ms_

const uint16_t esphome::nextion::Nextion::startup_override_ms_ = 8000
protected

Definition at line 1351 of file nextion.h.

◆ switchtype_

std::vector<NextionComponentBase *> esphome::nextion::Nextion::switchtype_
protected

Definition at line 1323 of file nextion.h.

◆ textsensortype_

std::vector<NextionComponentBase *> esphome::nextion::Nextion::textsensortype_
protected

Definition at line 1325 of file nextion.h.

◆ tft_size_

int esphome::nextion::Nextion::tft_size_ = 0
protected

Definition at line 1278 of file nextion.h.

◆ tft_url_

std::string esphome::nextion::Nextion::tft_url_
protected

Definition at line 1276 of file nextion.h.

◆ touch_

std::vector<NextionComponentBase *> esphome::nextion::Nextion::touch_
protected

Definition at line 1322 of file nextion.h.

◆ touch_callback_

CallbackManager<void(uint8_t, uint8_t, bool)> esphome::nextion::Nextion::touch_callback_ {}
protected

Definition at line 1331 of file nextion.h.

◆ touch_sleep_timeout_

uint32_t esphome::nextion::Nextion::touch_sleep_timeout_ = 0
protected

Definition at line 1240 of file nextion.h.

◆ upload_first_chunk_sent_

bool esphome::nextion::Nextion::upload_first_chunk_sent_ = false
protected

Definition at line 1280 of file nextion.h.

◆ wake_callback_

CallbackManager<void()> esphome::nextion::Nextion::wake_callback_ {}
protected

Definition at line 1329 of file nextion.h.

◆ wake_up_page_

int16_t esphome::nextion::Nextion::wake_up_page_ = -1
protected

Definition at line 1241 of file nextion.h.

◆ waveform_queue_

std::deque<NextionQueue *> esphome::nextion::Nextion::waveform_queue_
protected

Definition at line 1222 of file nextion.h.

◆ wifi_client_

WiFiClient* esphome::nextion::Nextion::wifi_client_ {nullptr}
protected

Definition at line 1272 of file nextion.h.

◆ wifi_client_secure_

BearSSL::WiFiClientSecure* esphome::nextion::Nextion::wifi_client_secure_ {nullptr}
protected

Definition at line 1273 of file nextion.h.

◆ writer_

optional<nextion_writer_t> esphome::nextion::Nextion::writer_
protected

Definition at line 1334 of file nextion.h.


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