diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 38e225aa..8de0cd09 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -69,6 +69,11 @@ between ESPHome and Nextion. Visit the updated [API documentation](docs/api.md) The baud rate selector has been removed as full support for all baud rates used by Nextion makes it redundant. Communication now adapts automatically to the required baud rate, simplifying configuration. +5. **New "Display delay" control** + A new control called **Display delay** has been introduced to manage the delay between commands sent to the Nextion display. + This helps avoid buffer overflows, which can lead to a device restart if not managed properly. + You can find more details in the [Performance Settings for NSPanel Project](docs/performance.md#2-esphome-performance-setting-display-delay). + ### Customizations Updated scripts require adjustments to these customizations: - [Sleep & Wake-up buttons](docs/customization.md#sleep--wake-up-buttons) diff --git a/docs/README.md b/docs/README.md index cfbaa0ba..ad70a339 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,6 +3,7 @@ - [First Steps | Installation and Setup](install.md) - [Blueprint | Setup and explanation of the Blueprint](blueprint.md) - [HowTo | All important things you should know](howto.md) +- [Performance Guide](performance.md) - [Version compatibility matrix](version_compatibility.md) ## Common issues diff --git a/docs/performance.md b/docs/performance.md new file mode 100644 index 00000000..c8574d12 --- /dev/null +++ b/docs/performance.md @@ -0,0 +1,49 @@ +# Performance Settings for NSPanel Project + +This document provides an overview of the performance settings available in the NSPanel project. +Proper tuning of these settings can enhance the responsiveness of the system while avoiding issues like WLAN overload or +buffer overflow in the Nextion display. +Below, we'll discuss the two primary performance settings: one on the blueprint side and another on the ESPHome side. + +## 1. Blueprint Performance Setting: Command Delay to Prevent Overload + +On the blueprint side, the performance setting is used to define a delay before each service call is sent to the display. +This delay helps prevent consecutive calls from overloading both the WLAN and the NSPanel. + +### Where to Find It +- **Location:** This setting is found in the automation created with the Blueprint to control your panel. +- **Advanced Settings:** Scroll down to the "Advanced Settings" section of the configuration list. +- **Name:** The setting is named **"Command Delay to Prevent Overload"**. + +Adjusting this delay can help manage the network load and ensure that the commands are spaced out properly, +allowing the NSPanel and WLAN to process them without being overwhelmed. + +## 2. ESPHome Performance Setting: Display Delay + +On the ESPHome side, the performance setting involves configuring a delay when sending commands to the Nextion display. +This delay is critical in preventing the "Buffer overload" issue that can occur on the Nextion display. + +### Where to Find It +- **Location:** This setting can be found on the ESPHome device's page under `Settings > Devices & Services > ESPHome`. +- **Configuration Group:** Look for the setting under the "Configuration" group. +- **Name:** The setting is named **"Display delay"**. + +Note that this setting may be hidden or disabled in some systems. You may need to enable it before you can adjust its value. + +### Purpose +The **Display Delay** setting prevents buffer overload on the Nextion display, +which occurs when too many commands are received and cannot be processed in time. If the buffer overloads, +the Nextion queue will fall out of sync, leading to a device restart. +Each time this restart occurs, the delay will automatically increase one step in the delay interval (measured in milliseconds). + +## Combining Delays: Impact on Responsiveness +The two delay settings (Blueprint and ESPHome) are combined, which can lead to a slower response time on the panel. +You can reduce these intervals to improve the panel's responsiveness. +However, it's important to note that reducing the **Display Delay** on the ESPHome side too much can lead to buffer overflows, causing instability. + +### Recommendations +- **Fine-Tune the Blueprint Delay** to manage WLAN and command pacing effectively. +- **Adjust ESPHome Display Delay Carefully**: Lowering it too much can lead to buffer issues. + Start with a conservative value and decrease it slowly while monitoring performance. + +Maintaining a balance between the two settings is essential to ensure a responsive and stable NSPanel experience. diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index ed88dd66..99867869 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3732,12 +3732,12 @@ blueprint: Adjusts the delay between sequential commands to the Nextion display, preventing overload and synchronization issues. While increasing delay enhances stability, it may slow down page rendering. - default: 10 + default: 5 selector: number: min: 0 max: 250 - step: 1 + step: 5 unit_of_measurement: milliseconds mode: box tft_path: