11static const char *
const TAG =
"nextion";
32#ifdef USE_NEXTION_COMMAND_SPACING
33 if (!this->
connection_state_.ignore_is_setup_ && !this->command_pacer_.can_send()) {
34 ESP_LOGN(TAG,
"Command spacing: delaying command '%s'", command.c_str());
39 ESP_LOGN(TAG,
"cmd: %s", command.c_str());
42 const uint8_t to_send[3] = {0xFF, 0xFF, 0xFF};
52#ifdef USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
53 ESP_LOGW(TAG,
"Connected (no handshake)");
62#ifdef USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
79 if (!response.empty() && response[0] == 0x1A) {
81 ESP_LOGV(TAG,
"0x1A error ignored (setup)");
84 if (response.empty() || response.find(
"comok") == std::string::npos) {
85#ifdef NEXTION_PROTOCOL_LOG
86 ESP_LOGN(TAG,
"Bad connect: %s", response.c_str());
87 for (
size_t i = 0; i < response.length(); i++) {
88 ESP_LOGN(TAG,
"resp: %s %d %d %c", response.c_str(), i, response[i], response[i]);
92 ESP_LOGW(TAG,
"Not connected");
98 ESP_LOGI(TAG,
"Connected");
101 ESP_LOGN(TAG,
"connect: %s", response.c_str());
105 std::vector<std::string> connect_info;
106 while ((start = response.find_first_not_of(
',',
end)) != std::string::npos) {
107 end = response.find(
',', start);
108 connect_info.push_back(response.substr(start,
end - start));
113 ESP_LOGN(TAG,
"Connect info: %zu", connect_info.size());
114#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
121 " Device Model: %s\n"
123 " Serial Number: %s\n"
125 connect_info[2].c_str(), connect_info[3].c_str(), connect_info[5].c_str(), connect_info[6].c_str());
128 ESP_LOGE(TAG,
"Bad connect value: '%s'", response.c_str());
148 ESP_LOGCONFIG(TAG,
"Nextion:");
150#ifdef USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
151 ESP_LOGCONFIG(TAG,
" Skip handshake: YES");
153#ifdef USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
155 " Device Model: %s\n"
157 " Serial Number: %s\n"
159 " Max queue age: %u ms\n"
160 " Startup override: %u ms\n",
161 this->
device_model_.c_str(), this->firmware_version_.c_str(), this->serial_number_.c_str(),
162 this->flash_size_.c_str(), this->max_q_age_ms_, this->startup_override_ms_);
164#ifdef USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
165 ESP_LOGCONFIG(TAG,
" Exit reparse: YES\n");
168 " Wake On Touch: %s\n"
169 " Touch Timeout: %" PRIu16,
173#ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP
178 ESP_LOGCONFIG(TAG,
" Wake Up Page: %u", this->
wake_up_page_);
181#ifdef USE_NEXTION_CONF_START_UP_PAGE
187#ifdef USE_NEXTION_COMMAND_SPACING
191#ifdef USE_NEXTION_MAX_QUEUE_SIZE
234 binarysensortype->update_component();
237 sensortype->update_component();
240 switchtype->update_component();
243 textsensortype->update_component();
265 int ret = vsnprintf(buffer,
sizeof(buffer), format, arg);
268 ESP_LOGW(TAG,
"Bad cmd format: '%s'", format);
279#ifdef NEXTION_PROTOCOL_LOG
281 ESP_LOGN(TAG,
"print_queue_members_ (top 10) size %zu", this->
nextion_queue_.size());
282 ESP_LOGN(TAG,
"*******************************************");
289 ESP_LOGN(TAG,
"Queue null");
291 ESP_LOGN(TAG,
"Queue type: %d:%s, name: %s", i->component->get_queue_type(),
292 i->component->get_queue_type_string().c_str(), i->component->get_variable_name().c_str());
295 ESP_LOGN(TAG,
"*******************************************");
303 if (this->
connection_state_.nextion_reports_is_setup_ && !this->connection_state_.sent_setup_commands_) {
312#ifdef USE_NEXTION_CONF_START_UP_PAGE
341 ESP_LOGV(TAG,
"Manual ready set");
346#ifdef USE_NEXTION_COMMAND_SPACING
352#ifdef USE_NEXTION_COMMAND_SPACING
354 if (this->
nextion_queue_.empty() || !this->command_pacer_.can_send()) {
360 if (front_item && !front_item->pending_command.empty()) {
363 front_item->pending_command.clear();
364 ESP_LOGVV(TAG,
"Pending command sent: %s", front_item->component->get_variable_name().c_str());
373 ESP_LOGE(TAG,
"Queue empty");
380 ESP_LOGE(TAG,
"Invalid queue");
386 ESP_LOGN(TAG,
"Removed: %s",
component->get_variable_name().c_str());
389 if (
component->get_variable_name() ==
"sleep_wake") {
404 size_t to_read = std::min(avail,
sizeof(buf));
410 this->
command_data_.append(
reinterpret_cast<const char *
>(buf), to_read);
419#ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP
420 size_t commands_processed = 0;
423 size_t to_process_length = 0;
424 std::string to_process;
426 ESP_LOGN(TAG,
"command_data_ %s len %d", this->
command_data_.c_str(), this->command_data_.length());
427#ifdef NEXTION_PROTOCOL_LOG
430 while ((to_process_length = this->
command_data_.find(COMMAND_DELIMITER)) != std::string::npos) {
431#ifdef USE_NEXTION_MAX_COMMANDS_PER_LOOP
433 ESP_LOGW(TAG,
"Command processing limit exceeded");
438 while (to_process_length + COMMAND_DELIMITER.length() < this->command_data_.length() &&
439 static_cast<uint8_t
>(this->command_data_[to_process_length + COMMAND_DELIMITER.length()]) == 0xFF) {
441 ESP_LOGN(TAG,
"Add 0xFF");
446 to_process_length -= 1;
447 to_process = this->
command_data_.substr(1, to_process_length);
449 switch (nextion_event) {
451 ESP_LOGW(TAG,
"Invalid instruction");
457 ESP_LOGVV(TAG,
"Cmd OK");
458 ESP_LOGN(TAG,
"this->nextion_queue_.empty() %s", YESNO(this->
nextion_queue_.empty()));
467#ifdef USE_NEXTION_COMMAND_SPACING
469 ESP_LOGN(TAG,
"Command spacing: marked command sent");
473 ESP_LOGW(TAG,
"Invalid component ID/name");
477 ESP_LOGW(TAG,
"Invalid page ID");
481 ESP_LOGW(TAG,
"Invalid picture ID");
485 ESP_LOGW(TAG,
"Invalid font ID");
489 ESP_LOGW(TAG,
"File operation failed");
492 ESP_LOGW(TAG,
"CRC validation failed");
495 ESP_LOGW(TAG,
"Invalid baud rate");
499 ESP_LOGW(TAG,
"Waveform ID/ch used but no sensor queued");
504 ESP_LOGW(TAG,
"Invalid waveform ID %d/ch %d",
component->get_component_id(),
507 ESP_LOGN(TAG,
"Remove waveform ID %d/ch %d",
component->get_component_id(),
component->get_wave_channel_id());
514 ESP_LOGW(TAG,
"Invalid variable name");
518 ESP_LOGW(TAG,
"Invalid variable operation");
522 ESP_LOGW(TAG,
"Variable assign failed");
526 ESP_LOGW(TAG,
"EEPROM operation failed");
529 ESP_LOGW(TAG,
"Invalid parameter count");
533 ESP_LOGW(TAG,
"Invalid component I/O");
536 ESP_LOGW(TAG,
"Undefined escape chars");
540 ESP_LOGW(TAG,
"Variable name too long");
545 ESP_LOGE(TAG,
"Serial buffer overflow");
549 if (to_process_length != 3) {
550 ESP_LOGW(TAG,
"Incorrect touch len: %zu (need 3)", to_process_length);
554 uint8_t page_id = to_process[0];
555 uint8_t component_id = to_process[1];
556 uint8_t touch_event = to_process[2];
557 ESP_LOGV(TAG,
"Touch %s: page %u comp %u", touch_event ?
"PRESS" :
"RELEASE", page_id, component_id);
558 for (
auto *touch : this->
touch_) {
559 touch->process_touch(page_id, component_id, touch_event != 0);
566 if (to_process_length != 1) {
567 ESP_LOGW(TAG,
"Page event: expect 1, got %zu", to_process_length);
571 uint8_t page_id = to_process[0];
572 ESP_LOGV(TAG,
"New page: %u", page_id);
581 if (to_process_length != 5) {
582 ESP_LOGW(TAG,
"Touch coordinate: expect 5, got %zu", to_process_length);
583 ESP_LOGW(TAG,
"%s", to_process.c_str());
587 const uint16_t
x = (uint16_t(to_process[0]) << 8) | to_process[1];
588 const uint16_t
y = (uint16_t(to_process[2]) << 8) | to_process[3];
589 const uint8_t touch_event = to_process[4];
590 ESP_LOGV(TAG,
"Touch %s at %u,%u", touch_event ?
"PRESS" :
"RELEASE",
x,
y);
601 ESP_LOGW(TAG,
"String return but queue is empty");
607 ESP_LOGE(TAG,
"Invalid queue entry");
614 ESP_LOGE(TAG,
"String return but '%s' not text sensor",
component->get_variable_name().c_str());
616 ESP_LOGN(TAG,
"String resp: '%s' id: %s type: %s", to_process.c_str(),
component->get_variable_name().c_str(),
617 component->get_queue_type_string().c_str());
633 ESP_LOGE(TAG,
"Numeric return but queue empty");
637 if (to_process_length == 0) {
638 ESP_LOGE(TAG,
"Numeric return but no data");
644 for (
int i = 0; i < 4; ++i) {
645 value += to_process[i] << (8 * i);
650 ESP_LOGE(TAG,
"Invalid queue");
659 ESP_LOGE(TAG,
"Numeric return but '%s' invalid type %d",
component->get_variable_name().c_str(),
662 ESP_LOGN(TAG,
"Numeric: %s type %d:%s val %d",
component->get_variable_name().c_str(),
664 component->set_state_from_int(value,
true,
false);
674 ESP_LOGVV(TAG,
"Auto sleep");
681 ESP_LOGVV(TAG,
"Auto wake");
689 ESP_LOGV(TAG,
"System start: %zu", to_process_length);
703 std::string variable_name;
706 auto index = to_process.find(
'\0');
707 if (index == std::string::npos || (to_process_length - index - 1) < 1) {
708 ESP_LOGE(TAG,
"Bad switch data (0x90)");
709 ESP_LOGN(TAG,
"proc: %s %zu %d", to_process.c_str(), to_process_length, index);
713 variable_name = to_process.substr(0, index);
716 ESP_LOGN(TAG,
"Switch %s: %s", ONOFF(to_process[index] != 0), variable_name.c_str());
719 switchtype->process_bool(variable_name, to_process[index] != 0);
730 std::string variable_name;
732 auto index = to_process.find(
'\0');
733 if (index == std::string::npos || (to_process_length - index - 1) != 4) {
734 ESP_LOGE(TAG,
"Bad sensor data (0x91)");
735 ESP_LOGN(TAG,
"proc: %s %zu %d", to_process.c_str(), to_process_length, index);
739 index = to_process.find(
'\0');
740 variable_name = to_process.substr(0, index);
743 for (
int i = 0; i < 4; ++i) {
744 value += to_process[i + index + 1] << (8 * i);
747 ESP_LOGN(TAG,
"Sensor: %s=%d", variable_name.c_str(), value);
750 sensor->process_sensor(variable_name, value);
763 std::string variable_name;
764 std::string text_value;
767 auto index = to_process.find(
'\0');
768 if (index == std::string::npos || (to_process_length - index - 1) < 1) {
769 ESP_LOGE(TAG,
"Bad text data (0x92)");
770 ESP_LOGN(TAG,
"proc: %s %zu %d", to_process.c_str(), to_process_length, index);
774 variable_name = to_process.substr(0, index);
778 text_value = to_process.substr(index, to_process_length - index - 1);
780 ESP_LOGN(TAG,
"Text sensor: %s='%s'", variable_name.c_str(), text_value.c_str());
787 textsensortype->process_text(variable_name, text_value);
798 std::string variable_name;
801 auto index = to_process.find(
'\0');
802 if (index == std::string::npos || (to_process_length - index - 1) < 1) {
803 ESP_LOGE(TAG,
"Bad binary data (0x92)");
804 ESP_LOGN(TAG,
"proc: %s %zu %d", to_process.c_str(), to_process_length, index);
808 variable_name = to_process.substr(0, index);
811 ESP_LOGN(TAG,
"Binary sensor: %s=%s", variable_name.c_str(), ONOFF(to_process[index] != 0));
814 binarysensortype->process_bool(&variable_name[0], to_process[index] != 0);
819 ESP_LOGVV(TAG,
"Data transmit done");
824 ESP_LOGVV(TAG,
"Ready for transmit");
826 ESP_LOGE(TAG,
"No waveforms queued");
832 size_t buffer_to_send =
component->get_wave_buffer_size() < 255 ?
component->get_wave_buffer_size()
837 ESP_LOGN(TAG,
"Send waveform: component id %d, waveform id %d, size %zu",
component->get_component_id(),
838 component->get_wave_channel_id(), buffer_to_send);
840 component->clear_wave_buffer(buffer_to_send);
846 ESP_LOGW(TAG,
"Unknown event: 0x%02X", nextion_event);
850 this->
command_data_.erase(0, to_process_length + COMMAND_DELIMITER.length() + 1);
856 this->nextion_queue_.front()->queue_time + this->max_q_age_ms_ < ms) {
861 ESP_LOGD(TAG,
"Remove old queue '%s':'%s' (t=0)",
component->get_queue_type_string().c_str(),
865 if (
component->get_variable_name() ==
"sleep_wake") {
869 ESP_LOGD(TAG,
"Remove old queue '%s':'%s'",
component->get_queue_type_string().c_str(),
873 if (
component->get_variable_name() ==
"sleep_wake") {
889 ESP_LOGN(TAG,
"Loop end");
899 ESP_LOGN(TAG,
"State: %s=%lf (type %d)", name.c_str(),
state, queue_type);
901 switch (queue_type) {
904 if (name == sensor->get_variable_name()) {
905 sensor->set_state(
state,
true,
true);
913 if (name == sensor->get_variable_name()) {
914 sensor->set_state(
state != 0,
true,
true);
922 if (name == sensor->get_variable_name()) {
923 sensor->set_state(
state != 0,
true,
true);
930 ESP_LOGW(TAG,
"set_sensor_state: bad type %d", queue_type);
936 ESP_LOGV(TAG,
"State: %s='%s'", name.c_str(),
state.c_str());
939 if (name == sensor->get_variable_name()) {
940 sensor->set_state(
state,
true,
true);
947 ESP_LOGV(TAG,
"Send states");
949 if (force_update || binarysensortype->get_needs_to_send_update())
950 binarysensortype->send_state_to_nextion();
953 if ((force_update || sensortype->get_needs_to_send_update()) && sensortype->get_wave_chan_id() == 0)
954 sensortype->send_state_to_nextion();
957 if (force_update || switchtype->get_needs_to_send_update())
958 switchtype->send_state_to_nextion();
961 if (force_update || textsensortype->get_needs_to_send_update())
962 textsensortype->send_state_to_nextion();
968 if (binarysensortype->get_variable_name().find(prefix, 0) != std::string::npos)
969 binarysensortype->update_component_settings(
true);
972 if (sensortype->get_variable_name().find(prefix, 0) != std::string::npos)
973 sensortype->update_component_settings(
true);
976 if (switchtype->get_variable_name().find(prefix, 0) != std::string::npos)
977 switchtype->update_component_settings(
true);
980 if (textsensortype->get_variable_name().find(prefix, 0) != std::string::npos)
981 textsensortype->update_component_settings(
true);
987 uint8_t nr_of_ff_bytes = 0;
988 bool exit_flag =
false;
989 bool ff_flag =
false;
991 const uint32_t start =
millis();
993 while ((timeout == 0 && this->
available()) ||
millis() - start <= timeout) {
1008 if (nr_of_ff_bytes >= 3)
1011 response += (char) c;
1013 if (response.find(0x05) != std::string::npos) {
1020 if (exit_flag || ff_flag) {
1026 response = response.substr(0, response.length() - 3);
1028 return response.length();
1042#ifdef USE_NEXTION_MAX_QUEUE_SIZE
1044 ESP_LOGW(TAG,
"Queue full (%zu), drop: %s", this->
nextion_queue_.size(), variable_name.c_str());
1051 if (nextion_queue ==
nullptr) {
1052 ESP_LOGW(TAG,
"Queue alloc failed");
1080#ifdef USE_NEXTION_COMMAND_SPACING
1088#ifdef USE_NEXTION_COMMAND_SPACING
1090 const std::string &command) {
1091#ifdef USE_NEXTION_MAX_QUEUE_SIZE
1093 ESP_LOGW(TAG,
"Queue full (%zu), drop: %s", this->
nextion_queue_.size(), variable_name.c_str());
1100 if (nextion_queue ==
nullptr) {
1101 ESP_LOGW(TAG,
"Queue alloc failed");
1112 ESP_LOGVV(TAG,
"Queue with pending command: %s", variable_name.c_str());
1124 int ret = vsnprintf(buffer,
sizeof(buffer), format, arg);
1127 ESP_LOGW(TAG,
"Bad cmd format: '%s'", format);
1149 int ret = vsnprintf(buffer,
sizeof(buffer), format, arg);
1152 ESP_LOGW(TAG,
"Bad cmd format: '%s'", format);
1175 const std::string &variable_name_to_send, int32_t state_value) {
1180 const std::string &variable_name_to_send, int32_t state_value,
1181 bool is_sleep_safe) {
1202 const std::string &variable_name_to_send,
1203 const std::string &state_value) {
1208 const std::string &variable_name_to_send,
1209 const std::string &state_value,
bool is_sleep_safe) {
1214 state_value.c_str());
1230#ifdef USE_NEXTION_MAX_QUEUE_SIZE
1232 ESP_LOGW(TAG,
"Queue full (%zu), drop GET: %s", this->
nextion_queue_.size(),
1240 if (nextion_queue ==
nullptr) {
1241 ESP_LOGW(TAG,
"Queue alloc failed");
1249 ESP_LOGN(TAG,
"Queue %s: %s",
component->get_queue_type_string().c_str(),
component->get_variable_name().c_str());
1251 std::string command =
"get " +
component->get_variable_name_to_send();
1272 if (nextion_queue ==
nullptr) {
1273 ESP_LOGW(TAG,
"Queue alloc failed");
1292 size_t buffer_to_send =
component->get_wave_buffer_size() < 255 ?
component->get_wave_buffer_size()
1296 buf_append_printf(command,
sizeof(command), 0,
"addt %u,%u,%zu",
component->get_component_id(),
1297 component->get_wave_channel_id(), buffer_to_send);
void feed_wdt(uint32_t time=0)
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
An STL allocator that uses SPI or internal RAM.
uint8_t get_spacing() const
Get current command spacing.
void mark_sent()
Mark a command as sent, updating the timing.
std::string get_variable_name()
void set_variable_name(const std::string &variable_name, const std::string &variable_name_to_send="")
void add_setup_state_callback(std::function< void()> &&callback)
Add a callback to be notified when the nextion completes its initialize setup.
std::vector< NextionComponentBase * > touch_
std::vector< NextionComponentBase * > switchtype_
void add_buffer_overflow_event_callback(std::function< void()> &&callback)
Add a callback to be notified when the nextion reports a buffer overflow.
std::vector< NextionComponentBase * > binarysensortype_
uint16_t max_q_age_ms_
Maximum age for queue items in ms.
bool send_command_(const std::string &command)
Manually send a raw command to the display and don't wait for an acknowledgement packet.
std::vector< NextionComponentBase * > textsensortype_
CallbackManager< void(uint8_t)> page_callback_
void check_pending_waveform_()
struct esphome::nextion::Nextion::@144 connection_state_
Status flags for Nextion display state management.
void set_wake_up_page(uint8_t wake_up_page=255)
Sets which page Nextion loads when exiting sleep mode.
std::string device_model_
void all_components_send_state_(bool force_update=false)
std::string firmware_version_
void set_nextion_sensor_state(int queue_type, const std::string &name, float state)
Set the nextion sensor state object.
void add_addt_command_to_queue(NextionComponentBase *component) override
Add addt command to the queue.
void add_new_page_callback(std::function< void(uint8_t)> &&callback)
Add a callback to be notified when the nextion changes pages.
uint16_t max_commands_per_loop_
uint16_t startup_override_ms_
Timeout before forcing setup complete.
void process_nextion_commands_()
void add_to_get_queue(NextionComponentBase *component) override
Queue a GET command for a component that expects a response from the Nextion display.
bool send_command_printf(const char *format,...) __attribute__((format(printf
Manually send a raw formatted command to the display.
std::deque< NextionQueue * > nextion_queue_
void set_auto_wake_on_touch(bool auto_wake_on_touch)
Sets if Nextion should auto-wake from sleep when touch press occurs.
bool remove_from_q_(bool report_empty=true)
std::vector< NextionComponentBase * > sensortype_
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)
uint16_t touch_sleep_timeout_
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.
void set_touch_sleep_timeout(uint16_t touch_sleep_timeout=0)
Set the touch sleep timeout of the display using the thsp command.
CallbackManager< void()> setup_callback_
std::string command_data_
optional< float > brightness_
CallbackManager< void()> wake_callback_
void add_sleep_state_callback(std::function< void()> &&callback)
Add a callback to be notified of sleep state changes.
bool is_updating() override
Check if the TFT update process is currently running.
uint16_t recv_ret_string_(std::string &response, uint32_t timeout, bool recv_flag)
void goto_page(const char *page)
Show the page with a given name.
bool send_command(const char *command)
Manually send a raw command to the display.
std::string serial_number_
CallbackManager< void()> sleep_callback_
bool void add_no_result_to_queue_with_command_(const std::string &variable_name, const std::string &command)
void reset_(bool reset_nextion=true)
void update_all_components()
void process_pending_in_queue_()
Process any commands in the queue that are pending due to command spacing.
void add_no_result_to_queue_(const std::string &variable_name)
Add a command to the Nextion queue that expects no response.
CallbackManager< void(uint8_t, uint8_t, bool)> touch_callback_
void print_queue_members_()
void dump_config() override
NextionCommandPacer command_pacer_
void set_nextion_text_state(const std::string &name, const std::string &state)
std::deque< NextionQueue * > waveform_queue_
bool add_no_result_to_queue_with_ignore_sleep_printf_(const std::string &variable_name, const char *format,...) __attribute__((format(printf
uint8_t is_connected_
Connection established with Nextion display.
void add_wake_state_callback(std::function< void()> &&callback)
Add a callback to be notified of wake state changes.
CallbackManager< void()> buffer_overflow_callback_
void set_writer(const nextion_writer_t &writer)
void add_no_result_to_queue_with_pending_command_(const std::string &variable_name, const std::string &command)
Add a command to the Nextion queue with a pending command for retry.
void add_no_result_to_queue_with_set(NextionComponentBase *component, int32_t state_value) override
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.
void update_components_by_prefix(const std::string &prefix)
void set_backlight_brightness(float brightness)
Set the brightness of the backlight.
NextionComponentBase * component
std::string pending_command
value_type const & value() const
optional< std::array< uint8_t, N > > read_array()
void write_str(const char *str)
bool read_byte(uint8_t *data)
void write_array(const uint8_t *data, size_t len)
const Component * component
Providing packet encoding functions for exchanging data with a remote host.
size_t size_t const char va_start(args, fmt)
void IRAM_ATTR HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.