Merge pull request #1 from Blackymas/main

update to 4.3.2
This commit is contained in:
MichaelHeimann
2024-04-03 18:49:50 +02:00
committed by GitHub
120 changed files with 5642 additions and 5094 deletions

View File

@@ -28,7 +28,7 @@ body:
attributes:
label: TFT Version
description: Enter the TFT version number.
placeholder: e.g., 4.3.1
placeholder: e.g., 4.3.2
validations:
required: false
@@ -36,7 +36,7 @@ body:
attributes:
label: ESPHome Version
description: Enter the ESPHome version number.
placeholder: e.g., 4.3.1
placeholder: e.g., 4.3.2
validations:
required: false
@@ -44,7 +44,7 @@ body:
attributes:
label: Blueprint Version
description: Enter the Blueprint version number.
placeholder: e.g., 4.3.1
placeholder: e.g., 4.3.2
validations:
required: false

View File

@@ -359,6 +359,216 @@ improving accuracy and reliability for users monitoring their environment.
- **Affected Components:** ESPHome and TFT
- **Description:** Updated the Boot page to offer clearer visual feedback on version information and system status, with a new progress bar.
## v4.3.2 - Enhancements and Critical Fixes for a Seamless Experience
In this patch, we focus on enhancing the NSPanel experience by introducing critical fixes and requested enhancements to improve overall system stability and user interaction.
This update addresses key issues, such as the incorrect display of the "boot" page upon wake-up, and optimizes the performance of the Utilities Dashboard to prevent potential overload states.
With updates across firmware, user interface, and documentation, v4.3.2 underscores our dedication to delivering a seamless and robust smart home control solution.
### Device Reboot Issue on Wake Up Resolved (#1947 and #1976)
- **Criticality:** Medium
- **Affected Components:** Blueprint
- **Issue Number:** #1947 and #1976
- **Description:** Resolved a critical issue causing the NSPanel to boot to the "boot" page rather than the "home" page under certain conditions, such as upon waking.
This correction ensures the panel directly accesses the "home" page, streamlining user interaction by promptly presenting the main interface.
Effective implementation of this fix necessitates clearing the build files before updating.
The procedure below guides you through cleaning build files in the ESPHome Dashboard, an essential step to actualize this update.
### Utilities Dashboard Performance Bug Resolved (#1949 and #1964)
- **Criticality:** Medium
- **Affected Components:** Blueprint and ESPHome
- **Issue Number:** #1949 and #1964
- **Description:** Fixed a significant performance bug in the "Utilities Dashboard" related to sensors with high update frequencies.
Previously, sensors updating frequently could overload the Home Assistant host, causing the blueprint execution to delay.
As updates persisted, this led to multiple instances of the blueprint being triggered, eventually hitting the limit of 50 concurrent instances.
This update minimizes the issue, ensuring smooth operation and reducing the chances of a overload state, thereby maintaining efficient and reliable dashboard performance.
#### How to Clean-up Build Files
1. Navigate to your ESPHome Dashboard.
2. Select the 3-dot menu adjacent to your device's listing.
3. Choose "**Clean Build Files**".
![Clean Build Files Instruction](https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/dev/docs/pics/esphome_dashboard_clean_build_files.png)
> [!IMPORTANT]
> Cleaning build files is a mandatory step for this update to apply successfully.
> It ensures your NSPanel operates smoothly with the new improvements post-update.
### Fix for Inverted Chip Icon Color Issue (#1928)
- **Criticality:** Minor
- **Affected Components:** Blueprint, TFT
- **Issue Number:** #1928
- **Description:** Resolved an issue where the color of icons on inverted chips did not display correctly on the home page, affecting the visual distinction and readability of these elements.
This fix ensures that icons on inverted chips are now properly rendered, maintaining consistency and enhancing the overall aesthetic of the user interface.
This correction contributes to a more intuitive and visually appealing experience for users, reinforcing the clarity of information presented on the NSPanel.
### Fix for Numeric Button Page Labels Not Displaying (#1961)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1961
- **Description:** Resolved an issue where button page labels consisting solely of numbers were not being displayed, ensuring that numeric titles are now properly shown.
This fix enhances interface clarity by allowing users to utilize numerical identifiers for their button pages, thereby improving navigation and usability within the NSPanel environment.
### Automatic Update for Weather Icon at Sunrise and Sunset (#1971)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1971
- **Description:** Addressed a bug where the weather icon on the home page did not automatically update to reflect changes at sunrise and sunset, necessitating a manual page reload.
With this fix, the icon now refreshes automatically to provide an accurate representation of the weather conditions in relation to the day and night cycle.
This improvement ensures a more dynamic and responsive user interface, enhancing the visual experience by seamlessly integrating natural environmental changes.
### Fix for Missing Titles and Icons on Detailed Entities Pages (#1978)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #1978
- **Description:** Resolved an issue on detailed entities pages where page titles and icons were not being displayed, leading to a lack of clarity and navigation challenges for users.
This fix ensures that each detailed page now correctly showcases its respective title and icon,
enhancing the overall user interface by providing immediate context and visual cues for better usability and navigation within the NSPanel environment.
### Swipe Functionality Restored on Button and Home Pages (#1980 and #1994)
- **Criticality:** Minor
- **Affected Components:** TFT
- **Issue Number:** #1980 and #1994
- **Description:** Addressed issues impacting swipe functionality on button pages and the home page, which previously hindered smooth navigation through swipe gestures.
This update restores proper swipe operation, allowing users to effortlessly switch between pages with a simple gesture.
Enhancing swipe responsiveness contributes to a more fluid and intuitive user experience, reinforcing the ease of navigating the NSPanel's interface.
### Typo Correction in Blueprint Inputs (#2003)
- **Criticality:** Minor
- **Affected Components:** Blueprint
- **Issue Number:** #2003
- **Description:** Corrected a minor typo in the blueprint inputs to ensure accuracy and clarity in the configuration options.
This adjustment, made in the description for the `hw_buttons_bar_color_off` input, showcases our commitment to detail and high-quality documentation,
enhancing user experience by providing clear and precise instructions.
- **Special Thanks:** Our thanks go to @colincachia for this attentive correction.
This action highlights the importance of community involvement and the collective effort to maintain the project's high standards, even in the smallest details.
### Immediate Brightness Adjustment from Home Assistant Fixed
- **Criticality:** Minor
- **Affected Components:** ESPHome
- **Issue Number:** #2006
- **Description:** Resolved a minor issue affecting brightness adjustments made from Home Assistant.
Previously, when the brightness target was reduced via Home Assistant, the change was not immediately reflected on the NSPanel.
This update ensures that any adjustments to brightness settings are promptly applied,
maintaining consistency between the Home Assistant interface and the NSPanel's display for a more synchronized and responsive user experience.
### Custom Binary State Entities for Hardware Button Status Display Enhancement (#1904, #1933, #1959, #1973)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1904, #1933, #1959, #1973
- **Description:** This update introduces the capability to assign custom binary state entities to the hardware button status display.
This significant enhancement allows for the hardware button bar to reflect the status of a different entity than the one assigned to the button itself,
providing users with greater customization and flexibility in their interface interactions.
This development enriches user feedback mechanisms, enabling more intuitive and dynamic control options within the NSPanel environment.
- **Special Thanks:** Our heartfelt appreciation goes to @lafriks for their invaluable contribution and initiative in developing this feature.
These efforts have notably advanced the customization potential of NSPanel, fostering a more versatile and user-centric experience.
### Enhanced Temperature Measurement Strategy (#1918)
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Issue Number:** #1918
- **Description:** Thanks to the dedicated efforts and thorough testing by our community,
the NSPanel's built-in temperature sensor now employs a more sophisticated measurement strategy for enhanced accuracy and responsiveness.
By integrating a combination of four samples per measurement and employing a `sliding_window_moving_average` filter with a window size of six,
the sensor's reporting frequency has been adjusted to every 10 seconds.
This methodological enhancement, chiefly proposed and tested by community members @andythomas and @grigi,
ensures a smoother temperature curve and faster response to environmental changes such as opening a window.
While the adjusted frequency means data is reported more often, ESPHome's efficient data transmission only when changes occur ensures that the impact on Home Assistant's data processing is minimal.
This significant improvement, sparked by proactive community involvement,
not only enhances the NSPanel's functionality but also broadens the scope for more dynamic and responsive environmental automations.
- **Special Thanks:** To @andythomas and @grigi for their exceptional work in testing and proposing these adjustments, truly embodying the spirit of community-driven development.
Your active participation and contributions have been instrumental in refining this feature.
### Enhanced Version Mismatch Notifications for Comprehensive System Compatibility (#1966 and #1968)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1966 and #1968
- **Description:** The version mismatch notification system has been significantly improved to cover all critical components of the NSPanel project,
including the ESPHome firmware, Home Assistant blueprint, and Nextion TFT file.
This update ensures that notifications are more descriptive, pinpointing which component is out of sync and providing specific instructions for resolution.
This targeted approach helps users quickly identify and rectify compatibility issues, maintaining the system's overall harmony and preventing disruptions in functionality.
### Documentation Improvement for TFT Upload Process (#1969)
- **Criticality:** Enhancement
- **Affected Components:** Documentation
- **Issue Number:** #1969
- **Description:** Enhanced the documentation to clarify the necessity of DNS for downloading TFT files from GitHub during the TFT upload process.
This update addresses confusion encountered when manually setting IP addresses as part of customizations, emphasizing that a DNS server must be specified to enable remote TFT downloads.
For setups lacking DNS configuration, the documentation now highlights the alternative of using local TFT transfer via the `nextion_update_url` substitution.
This clarification aims to streamline the TFT update process, ensuring users have a clear understanding of the requirements for successful TFT file downloads and uploads,
thereby enhancing the overall setup experience.
### Documentation Update for "Folder-Watcher" Engine Use (#1974)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1974
- **Description:** Updated documentation to provide clearer instructions on the "folder-watcher" engine's use within the NSPanel project.
This engine, which triggers TFT updates upon changes in a user-specified folder, may not be widely used but offers valuable functionality for those who do.
The documentation now more accurately describes how to leverage this feature for automated TFT updates, aiming to improve understanding and ease of use for interested users.
### Close Icon Visibility Enhancement (#1984)
- **Criticality:** Enhancement
- **Affected Components:** TFT
- **Issue Number:** #1984
- **Description:** Enhanced the visibility of the "close" icon (represented as an "x" sign) located at the top right corner of various pages.
By slightly increasing the size of this icon, users can now more easily identify and interact with it, improving the overall usability of the NSPanel interface.
This minor yet impactful adjustment ensures a smoother, more intuitive navigation experience for all users.
### Alarm Control with Hardware Button Enhancement (#1995)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1995
- **Description:** Enhanced the functionality of hardware buttons for a more intuitive interaction with alarm control panels.
Now, a short click on a hardware button assigned to an entity from the `alarm_control_panel` domain will open its detailed page, aligning with the behavior for `climate` and `media_player` entities.
This update facilitates quicker access to alarm controls directly from the NSPanel, streamlining user interactions.
Long clicks continue to open the detailed page for these and other domains, maintaining a consistent and user-friendly experience across various controls.
### Documentation Updates for Arduino References (#1997)
- **Criticality:** Enhancement
- **Affected Components:** Documentation
- **Issue Number:** #1997
- **Description:** Comprehensive updates and refinements were made to the project documentation, with a particular focus on correcting and clarifying references related to the Arduino framework.
This effort led to a thorough review and subsequent enhancement of various sections of the documentation, improving clarity, accuracy, and usefulness across the board.
Special thanks to the author of this PR, @andythomas, whose dedicated work went beyond just addressing
Arduino framework references to include minor fixes and overall improvements to the documentation.
These contributions have significantly elevated the quality of information available to users, ensuring that the documentation remains a reliable and up-to-date resource for the community.
### Expanded Wake-Up Sensor Support (#1998)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1998
- **Description:** The range of supported device classes for wake-up sensors on the NSPanel has been significantly expanded.
Now, in addition to the previously supported door, motion, and occupancy sensors, the NSPanel firmware accommodates a wider variety of sensor types.
These enhancements enable the panel to wake up from sleep mode upon detecting various environmental changes, improving responsiveness and user interaction.
The newly supported device classes include:
- door
- garage_door
- lock
- motion
- occupancy
- opening
- smoke
- sound
- vibration
- window
This update broadens the NSPanel's integration capabilities with home automation systems, allowing for a more dynamic and reactive smart home environment.
### Hebrew Translation Text Reversal Fix (#1999)
- **Criticality:** Enhancement
- **Affected Components:** Blueprint
- **Issue Number:** #1999
- **Description:** Addressed a specific issue with the Hebrew translation where text was displayed in reverse order, hindering readability and user experience.
This fix ensures that Hebrew text is correctly aligned and presented, enhancing the interface for Hebrew-speaking users.
The commitment to support diverse languages and correct such localization issues underscores our dedication to providing a user-friendly experience for all NSPanel users,
regardless of their language.
### Enhanced TFT Update Reliability in ESPHome Nextion Component
- **Criticality:** Enhancement
- **Affected Components:** ESPHome
- **Description:** Improved the reliability of TFT updates within the ESPHome Nextion component.
This enhancement optimizes the process of updating the NSPanel's display, ensuring smoother transitions and reducing the potential for update failures.
The upgrade targets the underlying mechanisms of the Nextion component in ESPHome,
refining its functionality to offer a more dependable and efficient update experience for users implementing TFT changes.
## Support
For support or more information about this update,
visit our [GitHub repository](https://github.com/Blackymas/NSPanel_HA_Blueprint)
@@ -375,6 +585,7 @@ Your efforts have significantly improved its functionality and reliability (#183
Your contributions have made our guides more informative and accessible, enriching the user experience for everyone (#1865).
## Previous releases
- [v4.3.1 - Ensuring Compatibility with ESPHome v2024.3.0 and Enhancing Stability](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.1)
- [v4.3 - Welcome to Framework ESP-IDF, an Utilities Dashboard and Enhanced Localization](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.0)
- [v4.2.6 - Enhancing Stability and User Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.6)
- [v4.2.5 - Celebrating 1000 Stars with Enhanced Functionality and UI Improvements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.5)

View File

@@ -1,51 +1,86 @@
// nextion_components.h
#pragma once
#include <array>
#include <cstdint>
#include <string>
#include <vector>
namespace nspanel_ha_blueprint {
struct NextionComponent {
std::string page;
std::string component_id;
char page[15]; // 14 characters + null terminator
char component_id[15]; // 14 characters + null terminator
bool is_current_page;
};
/**
* Extracts the page name and component ID from a given input string.
* Handles a special case where "alarm_control_panel" should be shortened to "alarm".
* If the input string omits the page, uses defaultPage.
* Special case: "alarm_control_panel" is shortened to "alarm".
*
* @param input The input string containing either the combined page and component ID or just the component ID.
* @param defaultPage The default page name to use if the input string does not specify a page.
* @return A NextionComponent struct containing the extracted or default page name, the component ID, and a flag indicating if it's the current page.
* @param input The input string containing the component ID, optionally prefixed by the page name and a dot.
* @param defaultPage The default page name to use if the input string does not specify a page, limited to 14 characters.
* @return A NextionComponent struct with the extracted or default page name, the component ID, and a flag for current page status.
*/
NextionComponent extractNextionComponent(const std::string& input, const std::string& defaultPage) {
NextionComponent result{};
size_t dotPos = input.find(".");
NextionComponent result;
if (dotPos != std::string::npos) {
// Extract page and component_id from the input string
result.page = input.substr(0, dotPos);
result.component_id = input.substr(dotPos + 1);
result.is_current_page = false; // Since there's a dot, it's assumed not to be the current page
// Check for the special case of "alarm_control_panel"
if (result.page == "alarm_control_panel") {
result.page = "alarm";
if (dotPos != std::string::npos) {
if (input.compare(0, 20, "alarm_control_panel.") == 0) {
strncpy(result.page, "alarm", sizeof(result.page) - 1);
result.page[sizeof(result.page) - 1] = '\0';
} else {
// Copy up to the dot or 14 characters, whichever is smaller
size_t lengthToCopy = std::min(dotPos, static_cast<size_t>(14));
strncpy(result.page, input.c_str(), lengthToCopy);
result.page[lengthToCopy] = '\0'; // Ensure null termination
}
// Extract and copy component_id
const char* componentStart = input.c_str() + dotPos + 1;
strncpy(result.component_id, componentStart, std::min(input.length() - dotPos - 1, static_cast<size_t>(14)));
result.component_id[14] = '\0'; // Ensure null termination
result.is_current_page = false;
} else {
// No dot found, the entire input is considered as component_id
result.page = defaultPage;
result.component_id = input;
result.is_current_page = true; // No specific page mentioned, so it's the current page
// No dot found, use defaultPage and assume it's the current page
strncpy(result.page, defaultPage.c_str(), 14);
result.page[14] = '\0'; // Ensure null termination
// Input is the component_id
strncpy(result.component_id, input.c_str(), std::min(input.length(), static_cast<size_t>(14)));
result.component_id[14] = '\0'; // Ensure null termination
result.is_current_page = true;
}
// Check if the resolved page matches the defaultPage indicating it's the current page
if (result.page == defaultPage) {
// Additional check to see if the current page matches defaultPage
if (strncmp(result.page, defaultPage.c_str(), 14) == 0) {
result.is_current_page = true;
}
return result;
}
/**
* Converts an RGB color represented as a vector of integers to the 16-bit 5-6-5 format supported by Nextion displays.
*
* This function takes a vector containing three integer values representing
* the red, green, and blue components of an RGB color, each in the range 0-255.
* It then converts these values into a single uint16_t value in 5-6-5 format,
* commonly used for color displays. The conversion process masks and shifts
* the components to fit into the 5 bits for red, 6 bits for green, and 5 bits for blue.
*
* @param rgb A vector of integers with exactly three elements: [red, green, blue].
* @return The color encoded in 16-bit 5-6-5 format, or UINT16_MAX if the input vector
* does not contain at least three elements.
*/
template <typename Container>
inline uint16_t rgbTo565(const Container& rgb) {
if (rgb.size() != 3) {
return UINT16_MAX; // Use UINT16_MAX as an error indicator
}
return ((rgb[0] & 0xF8) << 8) | ((rgb[1] & 0xFC) << 3) | (rgb[2] >> 3);
}
} // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,51 @@
// utilities.cpp
#include "utilities.h"
#include <cstdint>
#include <cstring>
namespace nspanel_ha_blueprint {
UtilitiesGroupValues UtilitiesGroups[8];
void resetUtilitiesGroups() {
// Temporary structure to hold the initial values
const UtilitiesGroupValues initialUtilitiesGroups[8] = {
{ "grid", "\0", "\0", 0 },
{ "group01", "\0", "\0", 0 },
{ "group02", "\0", "\0", 0 },
{ "group03", "\0", "\0", 0 },
{ "group04", "\0", "\0", 0 },
{ "group05", "\0", "\0", 0 },
{ "group06", "\0", "\0", 0 },
{ "home", "\0", "\0", 0 }
};
for (size_t i = 0; i < 8; ++i) {
std::strcpy(UtilitiesGroups[i].group_id, initialUtilitiesGroups[i].group_id);
std::strcpy(UtilitiesGroups[i].value1, initialUtilitiesGroups[i].value1);
std::strcpy(UtilitiesGroups[i].value2, initialUtilitiesGroups[i].value2);
UtilitiesGroups[i].direction = initialUtilitiesGroups[i].direction;
}
}
uint8_t findUtilitiesGroupIndex(const char* group_id) {
int low = 0;
int high = sizeof(UtilitiesGroups) / sizeof(UtilitiesGroups[0]) - 1;
while (low <= high) {
int mid = low + (high - low) / 2;
int cmp = strcmp(UtilitiesGroups[mid].group_id, group_id);
if (cmp < 0) {
low = mid + 1;
} else if (cmp > 0) {
high = mid - 1;
} else {
return static_cast<uint8_t>(mid); // Found
}
}
return UINT8_MAX; // Not found
}
} // namespace nspanel_ha_blueprint

View File

@@ -0,0 +1,20 @@
// utilities.h
#pragma once
#include <cstdint>
namespace nspanel_ha_blueprint {
struct UtilitiesGroupValues {
char group_id[8]; // 7 characters + null terminator
char value1[11]; // 10 characters + null terminator
char value2[11]; // 11 characters + null terminator
int8_t direction;
};
extern UtilitiesGroupValues UtilitiesGroups[8];
void resetUtilitiesGroups();
uint8_t findUtilitiesGroupIndex(const char* group_id);
} // namespace nspanel_ha_blueprint

View File

@@ -42,4 +42,40 @@ namespace nspanel_ha_blueprint_upload_tft {
return url; // Return the constructed URL
}
/**
* @brief Generates a descriptive text for the NSPanel based on the given display mode and charset.
*
* This function maps numeric codes for the display mode and charset to a human-readable
* description of an NSPanel configuration. It supports different geographic regions and language
* character sets. If the inputs do not match any predefined configuration, the function returns
* an empty string, allowing for easy detection of unexpected or invalid inputs.
*
* @param displayMode An integer representing the display mode of the NSPanel:
* 1 for "EU", 2 for "US", and 3 for "US Landscape".
* @param charset An integer indicating the character set used:
* 1 for "International (original)" and 2 for "CJK languages".
* @return std::string A string describing the NSPanel configuration based on the inputs.
* Returns an empty string if the inputs do not match any known configuration.
*/
std::string getNSPanelText(int displayMode, int charset) {
if (displayMode < 1 or displayMode > 3 or charset < 1 or charset > 2) return "";
std::string text;
// Determine the base text based on the display mode
switch(displayMode) {
case 1: text = "NSPanel EU"; break;
case 2: text = "NSPanel US"; break;
case 3: text = "NSPanel US Landscape"; break;
default: return ""; // Return an empty string for unmatched display modes
}
// Append the charset text if necessary
if (charset == 2) {
text += " (CJK languages)";
}
return text;
}
} // namespace nspanel_ha_blueprint_upload_tft

View File

@@ -19,7 +19,7 @@ Don't use it for directly power your cooler/heater if exceeding the panel specif
## Installation
You will need to add the reference to `addon_climate_heat`, `addon_climate_cool` or `addon_climate_dual` files on your ESPHome settings in the `package` section
and after the `remote_package` (base code), as shown bellow (for `heat` in this example):
and after the `remote_package` (base code), as shown below (for `heat` in this example):
> [!NOTE]
> Occasionally, ESPHome updates may result in the `entity_id` of embedded thermostats being appended with `_2`.
@@ -210,12 +210,12 @@ packages:
### Real Use Case Example: Water Underfloor Heating with NSPanel
The NSPanel works nicely as a replacement for existing water underfloor heating controllers, installed at eye level and often powered by 100-240VAC.
In my specific use case, the control valve is of the 'normally closed' type, meaning that an open relay indicates 'no heating.'
I have utilized relay #1 for this purpose. It's important to note that this setup does not act as a PID controller but operates on a simple on-off mechanism.
I have utilized relay #1 for this purpose. It's important to note that this setup does not act as a PID controller, but operates on a simple on-off mechanism.
The system initiates heating at a preset value below and turns it off at a value above the set point.
I have set these values to `0.3°C` below and `0.1°C` above the target temperature, respectively.
These adjustments, `0.3` and `0.1`, have been effectively maintaining the desired temperature in all of our four rooms.
I have set these values to `0.1°C` below and `0.1°C` above the target temperature, respectively.
These adjustments have been effectively maintaining the desired temperature in all of our four rooms.
The thermostat's settings range from a minimum of `15°C` to a maximum of `22°C`, with a granularity of `0.1°C` for adjustments.
Furthermore, I have selected `21.2°C` as the default target temperature.
Furthermore, I have selected `18.3°C` as the default target temperature.
```yaml
##### addon-configuration #####
@@ -224,21 +224,23 @@ Furthermore, I have selected `21.2°C` as the default target temperature.
temp_min: "15"
temp_max: "22"
temp_step: "0.1"
cold_tolerance: "0.3"
cold_tolerance: "0.1"
hot_tolerance: "0.1"
##### CHANGE ME END #####
climate:
- id: !extend thermostat_embedded
visual:
temperature_step: ${temp_step}
preset:
- name: Home
default_target_temperature_low: 21.2
default_target_temperature_low: 18.3
mode: "heat"
```
Please note that employing any filter to smooth the temperature readings, such as averaging, is discouraged.
Please note that employing any filter to smooth the temperature readings, such as averaging, is discouraged if the relevant timescale exceeds 1min.
Such filtering methods can delay the response times of an already slow underfloor heating system.
Despite this, the temperature stability achieved is quite satisfactory, as illustrated in the graph below.
![Temperature vs Time](pics/addon_underfloor.png)
*On March 5th, around 9:30 PM, a window was opened, and all heaters were set to 'off.'*
*On March 24th (around 9:20 PM) and March 25th (around 7:30AM) a window was opened, and all heaters were set to 'off.' for 30min*

View File

@@ -233,11 +233,11 @@ and provides a structured way to return to either the home page or a specific bu
**Usage:**
Ideal for interfaces requiring detailed entity information across various contexts.
By specifying the `entity_id` and `back_page`, users are offered a seamless navigation experience,
By specifying the `entity` and `back_page`, users are offered a seamless navigation experience,
ensuring they can easily access detailed information and return to their initial navigation point within the interface.
**Parameters:**
- `entity_id` (string): The unique identifier of the entity for which details are displayed.
- `entity` (string): The unique identifier of the entity (`entity_id` in Home Assistant) for which details are displayed.
- `back_page` (string): The page identifier to return to after viewing entity details.
Valid options are `home` for the home page or `buttonpage01` to `buttonpage04` for button pages.
No other pages are supported to maintain navigation consistency.
@@ -246,7 +246,7 @@ No other pages are supported to maintain navigation consistency.
```yaml
service: esphome.<your_panel_name>_entity_details_show
data:
entity_id: "light.living_room"
entity: "light.living_room"
back_page: "buttonpage01"
```
> [!NOTE]

View File

@@ -225,6 +225,9 @@ api:
### Manual IP
Set IP address manually.
> [!ATTENTION]
> At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
```yaml
# Set IP address manually
wifi:
@@ -234,6 +237,8 @@ wifi:
static_ip: 192.168.0.123
gateway: 192.168.0.1
subnet: 255.255.255.0
dns1: 1.1.1.1 # At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
dns2: 8.8.8.8
```
### Hidden Wi-Fi
@@ -536,11 +541,7 @@ time:
### Frameworks
> [!IMPORTANT]
> When switching between frameworks, make sure to update the device with a serial cable as the partition table is different between the two frameworks
as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table.
The `arduino` protocol still more popular and therefore more components are available, but as `esp-idf` is maintained by EspressIF and is kept updated,
more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities,
like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/).
as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table. While it will appear to work, the device will boot the old framework after a reset.
This project currently uses `esp-idf` as default framework.
You can overlap the settings with this customization.
@@ -548,6 +549,13 @@ You can overlap the settings with this customization.
> [!NOTE]
> For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32).
`esp-idf` is maintained by EspressIF and is kept updated,
more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities,
like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/). Consequently, this project uses `esp-idf` as the default framework since `v4.3`.
However, the `arduino` protocol still very popular and, therefore, more components are available and the project allows to switch between the frameworks
by adding the following lines in your panel's yaml file.
#### Framework `arduino`
```yaml
# Change framework to `arduino`
@@ -558,6 +566,7 @@ esp32:
#### Framework `esp-idf`
```yaml
# Change framework to `esp-idf`
# (should not be required)
esp32:
framework:
type: esp-idf

View File

@@ -65,11 +65,11 @@ They're created for each new release, allowing easy access to different project
### For Nextion TFT Component
The instructions to upload TFT will vary depending on the version you are installing and the framework you are using.
#### v4.2 or later (ESP-IDF) or v4.2.5 or later (Arduino)
#### v4.2 or later (if you are using ESP-IDF) or v4.2.5 or later (if you are using Arduino)
1. Go to your device's page under **Settings** > **Devices & Services** > **ESPHome**.
2. On the **Configuration** group, press **Update TFT display** and wait for the upload to complete. The system will automatically find the right TFT file for the ESPHome version you are running.
#### v4.1 or earlier, or v4.2.4 or earlier for Arduino framework
#### v4.1 or earlier (in either case) or v4.2.4 or earlier (if you are using Arduino)
1. On the GitHub repository, click on your chosen version name on the [NSPanel_HA_Blueprint Tags](https://github.com/Blackymas/NSPanel_HA_Blueprint/tags) list, then select the tab **Code**.
2. Double-check that the correct version is shown below the repository name:

View File

@@ -1,11 +1,11 @@
# Panel startup issues
When your panel starts, a number of different things needs to be set and the ESPHome must establish connection to the Nextion display used by your panel
and also to your Home Assistant, which will provide the propper settings required by your panel.
and also to your Home Assistant, which will provide the proper settings required by your panel.
If everything goes right, the boot page will be shown for just a few seconds, then the wake-up page will be shown.
If something happens during this process, your panel may get stuck on this page.
In many cases, restarting your panel can resolve the issue, but if after a reboot it still showing the boot page, this guide may help you.
In many cases, restarting your panel can resolve the issue, but if it is still showing the boot page after a reboot, this guide may help you.
Understanding what is shown on the boot page can be useful to find the cause of the problem or when you are looking for help.
@@ -13,11 +13,11 @@ Understanding what is shown on the boot page can be useful to find the cause of
Your boot page probably looks like this:
**Before ESPHome is connected:**
**Before Home Assistant/ESPHome is connected:**
![Boot page Initializing](pics/eu_boot_initializing.png)
**When ESPHome is connected:**
**When Home Assistant/ESPHome is connected:**
![Boot page with IP](pics/eu_boot_with_ip_address.png)
@@ -49,7 +49,7 @@ If some of those versions are not shown, you can have an indication of where a p
- **TFT** version will always be shown, as that is part of the display itself.
- **ESPHome** version will be shown as soon the ESPHome establishes the communication with the display.
- **Blueprint** version requires both ESPHome and Blueprint to establish communication to be shown.
- **Blueprint** version requires both ESPHome and the Blueprint (in Home Assistant) to establish communication to be shown.
In normal situation, all the versions should be displayed and should be the same. Different patch versions are supported.
@@ -77,6 +77,7 @@ You can use this button to force a reboot of your panel. This button is availabl
![Blueprint icon on red](pics/us_home_blueprint_icon_red.png)
In some cases you can also see duplicate entities on the device's page in Home Assistant, and some of these entities may have the `entity_id` ending with `_2`, `_3`, etc.
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/9100568/51a5fce4-89cc-43e8-9d92-1f83d7ea2ee5)
<!-- markdownlint-disable MD013 MD033 -->
@@ -85,7 +86,7 @@ In some cases you can also see duplicate entities on the device's page in Home A
| You may have an older version of the blueprint installed or the blueprint isn't installed into your Home Assistant. | [Install the blueprint](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml).<br>[Update the blueprint](howto.md#update-blueprint).|
| You don't have an automation created using the blueprint. | On Home Assistant, go to **Settings** --> **Automations & Scenes** --> **Blueprints** --> **NSPanel Configuration** --> **CREATE AUTOMATION** and follow the [instructions to setup your automation](blueprint.md).<br>**Attention!!** You need one automation per panel, if you have more than one panel set. |
| Your panel is not selected in the automation. | Open the automation related to your panel and make sure the right device is set on the **NSPanel device** field. |
| Your panel's connection to Home Assistant may have issues.<br>This could be from an invalid entity Id, or some service missing registration. | Reconnect the Panel's device to Home Assistant:<br>1. Go to **Settings** --> **Devices & Services** --> **ESPHome**<br>2. Delete the device<br>3. Restart Home Assistant host<br>4. Go back to **Settings** --> **Devices & Services**<br>5. Click **Add integration**<br>6. Select **ESPHome**<br>7. Enter your panel's hostname or IP address.|
| Your panel's connection to Home Assistant may have issues.<br>This could be from an invalid entity Id (e.g. ending with `_2`), or some service missing registration. | Reconnect the Panel's device to Home Assistant:<br>1. Go to **Settings** --> **Devices & Services** --> **ESPHome**<br>2. Delete the device<br>3. Restart Home Assistant host<br>4. Go back to **Settings** --> **Devices & Services**<br>5. Click **Add integration**<br>6. Select **ESPHome**<br>7. Enter your panel's hostname or IP address.|
<!-- markdownlint-enable MD013 MD033 -->
## Additional Tips and Resources
@@ -93,8 +94,8 @@ In some cases you can also see duplicate entities on the device's page in Home A
After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance.
Please share as much info as possible, like:
1. Describing (or a picture of) what is in your screen
2. Are updating from a previous version of this same project, or coming from another NSPanel customization (which one?) or customizing for the first time a panel with original Sonoff settings?
1. Describing (or a picture of) what is on your screen
2. Are you updating from a previous version of this project, or you coming from another NSPanel customization (which one?) or are you customizing for the first time a panel with the original Sonoff settings?
3. Please share the ESPHome logs from when your panel starts to the moment the upload fails.
4. Describe what you have already tried.

View File

@@ -12,15 +12,15 @@ You can write a short message with your findings, and we'll include it here.
Below are the topics covered in this document, each with relevant tips and solutions.
1. [How do I create "Issues" when I have a problem ](#how-to-create-issues-when-i-have-a-problem)
1. [Update Blueprint](#update-blueprint)
1. [Update ESPHome](#update-esphome)
1. [Update TFT](#update-tft)
1. [Notification via HA](#notification-via-ha)
1. [Climate control with relays](#climate-control-with-relays)
1. [Call a page directly](#call-a-page-directly)
1. [Play RTTTL Sound](#play-rtttl-sound)
1. [Start automations via Input_Boolean](#start-automations-via-input_boolean)
1. [Updating Wi-Fi and OTA passwords in ESPHome with this project](#updating-wi-fi-settings-and-ota-passwords-in-esphome-with-this-project)
2. [Update Blueprint](#update-blueprint)
3. [Update ESPHome](#update-esphome)
4. [Update TFT](#update-tft)
5. [Notification via HA](#notification-via-ha)
6. [Climate control with relays](#climate-control-with-relays)
7. [Call a page directly](#call-a-page-directly)
8. [Play RTTTL Sound](#play-rtttl-sound)
9. [Start automations via Input_Boolean](#start-automations-via-input_boolean)
10. [Updating Wi-Fi and OTA passwords in ESPHome with this project](#updating-wi-fi-settings-and-ota-passwords-in-esphome-with-this-project)
## How to create "issues" when I have a problem
@@ -138,13 +138,13 @@ The new firmware will be built and then flashed to your panel, which will restar
4. The display starts the update process and then restarts.
## Notification via HA
To show a notification on the NSPAnel, the following service call can be used:
To show a notification on the NSPanel, the following service call can be used:
```yaml
service: esphome.panelname_notification_show
data:
label: Example text
message: Example text
label: Example label text
message: Example message text
```
> [!NOTE]
> For more details about this service call, please refer to our [API documentation](api.md#notification-show-service-notification_show).
@@ -177,7 +177,9 @@ trigger:
## Climate control with Relays
> [!ATTENTION]
> Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md).
> Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays an the [add-on climate](addon_climate.md),
> which will continue to work even if Home Assistant and/or WiFi are not available.
> You probably only want to use this approach, if you are not using the build-in thermometer.
In order to use the NSPanel to control a radiator or underfloor heating, at least one Generic Thermostat must be created in the HA.
More information can be found here: https://www.home-assistant.io/integrations/generic_thermostat/

View File

@@ -80,59 +80,72 @@ Detailed steps for a manual installation can be found in the guide [Installing E
Follow these steps to add a new device in the ESPHome Dashboard:
1. Click the **+ New Device** button.
2. Enter a unique name for your new ESPHome device.
![New Device Name](pics/ha_esphome_dashboard_new_device_01.png)
3. Select **ESP32** as the device type.
![Select ESP32](pics/ha_esphome_dashboard_new_device_02.png)
4. Click **Skip** as we're not starting the installation yet.
![Skip Installation](pics/ha_esphome_dashboard_new_device_03.png)
5. Locate your newly created device in the ESPHome Dashboard and click **Edit**.
![Edit Device](pics/ha_esphome_dashboard_new_device_04.png)
6. (Optional) For enhanced security, consider copying the `api:` section to a temporary file.
6. (Optional) For enhanced security, consider copying the `api:` entry to your panel's yaml file while adding the key itself to the secrets file
![API Section](pics/ha_esphome_dashboard_new_device_05.png)
which can be edited clicking `secrets` at the top right of your ESPHome menu.
![API Section](pics/ha_esphome_dashboard_new_device_05c.png)
7. Note the device name at the beginning of the file under `esphome`.
![Device Name](pics/ha_esphome_dashboard_new_device_05b.png)
8. Clear all existing content and paste the following YAML configuration:
```yaml
substitutions:
# Settings - Editable values
device_name: "YOUR_NSPANEL_NAME"
friendly_name: "Your panel's friendly name"
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" # Optional
# Add-on configuration (if needed)
# heater_relay: "1" # Possible values: "1" or "2"
```yaml
substitutions:
# Settings - Editable values
device_name: "YOUR_NSPANEL_NAME"
friendly_name: "Your panel's friendly name"
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" # Optional
# Add-on configuration (if needed)
# heater_relay: "1" # Possible values: "1" or "2"
# Customization area
##### My customization - Start #####
##### My customization - End #####
# Customization area
##### My customization - Start #####
##### My customization - End #####
# Core and optional configurations
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
files:
- nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml
# - nspanel_esphome_addon_climate_heat.yaml
# - nspanel_esphome_addon_climate_dual.yaml
refresh: 300s
```
# Core and optional configurations
packages:
remote_package:
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
files:
- nspanel_esphome.yaml # Basic package
# Optional advanced and add-on configurations
# - esphome/nspanel_esphome_advanced.yaml
# - nspanel_esphome_addon_climate_cool.yaml
# - nspanel_esphome_addon_climate_heat.yaml
# - nspanel_esphome_addon_climate_dual.yaml
refresh: 300s
```
![YAML Code](pics/ha_esphome_dashboard_new_device_06.png)
9. Modify the **Settings** section with your device name (as noted in step 7) and Wi-Fi details.
![Edit Settings](pics/ha_esphome_dashboard_new_device_06b.png)
10. For Wi-Fi credentials, use `!secret` for added security or input them directly.
Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.youtube.com/watch?v=eW4vKDeHh7Y).
11. (Optional) Adjust `nextion_update_url` to the URL of a TFT file hosted on an HTTP or HTTPS server,
ensuring that the file is accessible to the NSPanel.
This URL will be used by ESPHome to download the TFT file to your panel.
For more information on hosting the TFT file and setting up the URL, see the [Upload TFT](#upload-tft) section.
> [!CAUTION]
> **Prefer HTTP over HTTPS for File Transfer**
> While you might encounter examples using HTTPS in URLs for file transfer,
@@ -141,7 +154,6 @@ Learn about secrets in ESPHome: [Home Assistant Secrets in ESPHome](https://www.
> often leading to issues with file transfers.
12. (Optional) Enhance security with API encryption by adding the copied key from step 6 to the **My Customization** area.
> [!TIP]
> You can get a new randomly generated valid key from [ESPHome Native API Component](https://esphome.io/components/api.html#configuration-variables) page.

View File

@@ -12,7 +12,7 @@ If you are coming from there, you have to chose one of the 3 options:
### Common steps
1. Download the file [`nspanel_blank.tft`](../nspanel_blank.tft) from our GitHub repository.
1. Download the file [`nspanel_blank.tft`](../hmi/nspanel_blank.tft) from our GitHub repository.
2. Upload the same file (`nspanel_blank.tft`) to the folder _**"www"**_ in your Home Assistant
3. Double check if the file is available by trying to download it using your local url (typically [`http://homeassistant.local:8123/local/nspanel_blank.tft`](http://homeassistant.local:8123/local/nspanel_blank.tft)).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 819 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -7,16 +7,13 @@
> See [Common Issues | TFT Upload when NSPanel Lovelace UI has been installed](howto.md)
## Common Issues and Troubleshooting
The following is a list of common issues affecting the TFT upload, along with suggested solutions.
These issues are not specific to the NSPanel HA Blueprint project but are common to Nextion displays and ESPHome.
### Resolving "System data ERROR!" on Display
![System Data ERROR](pics/us_system_data_error_upside_down.jpg)
#### Don't Panic!
The "System data ERROR!" message, sometimes displayed upside-down, appears when a TFT upload is incomplete.
While it may seem alarming, this message simply indicates that the TFT file on the display is invalid.
A successful TFT upload will resolve this issue.
@@ -39,8 +36,11 @@ For troubleshooting, refer to the following sections:
> or use a pin to press the hardware restart button in a small hole behind the device.
> ![Image](pics/eu_reset_button.png)
### Using the `nspanel_blank.tft` File to Assist
### If using manual IP, make sure you have a DNS server configured
At least one DNS server is required to enable TFT transfer direcly from GitHub, otherwise use `nextion_update_url`.
If you are setting up a manual IP as a customization, please remember to add a valid DNS server for your panel.
### Using the `nspanel_blank.tft` File to Assist
Many TFT upload problems are associated with the Nextion Active Reparse Mode,
which is used in some implementations like the original Sonoff firmware or other popular custom firmwares.
Installing any TFT file from this project will disable this mode.
@@ -59,7 +59,6 @@ It should be automatically detected as a new integration, but if this is not hap
click the **Add integration** button, select **ESPHome**, add the device hostname or IP address and follow the steps required.
### Wait a Bit Before Starting the TFT Upload
- **Issue**: The Nextion display might not connect to ESPHome immediately after boot.
- **Solution**: Wait up to 2 minutes for the boot script to complete.
If you are already using a TFT from this project, the display of ESPHome version and the framework used (`arduino` vs `esp-idf`) is an indication that a communication was established.
@@ -68,7 +67,6 @@ If you haven't installed any TFT yet, look for Nextion related messages on ESPHo
Observe any changes in the display or logs indicators to ensure the device is ready.
### Using a Local Source (Home Assistant)
- **Issue**: Problems with downloading the TFT from GitHub.
- **Solution**: Host the TFT file on your Home Assistant and change the `nextion_update_url` accordingly.
- **Step-by-Step Guide**: Here's how you can change your `nextion_update_url`:
@@ -77,34 +75,29 @@ Observe any changes in the display or logs indicators to ensure the device is re
3. Replace the URL with the local address where your TFT file is hosted.
### HTTP Instead of HTTPS
- **Issue**: HTTPS connections may be problematic with ESP, especially when using `arduino` as framework.
- **Solution**: Use HTTP for hosting the TFT file and updating the `nextion_update_url`.
- **Why HTTP?**: HTTP can be more stable for these connections.
To switch, simply replace 'https' with 'http' in your URLs and make sure your http server supports non-secure connections.
### Remove Customizations
- **Issue**: Customizations like `bluetooth_proxy` and `ble_tracker` may interfere with the upload.
- **Solution**: Temporarily remove any customizations to free up memory.
- **How to Remove Customizations**: Identify any additional features you've added and remove them from your configuration file.
Pay special attention to memory-intensive customizations.
### Use IP Address Instead of DNS
- **Issue**: DNS may cause connection problems.
- **Solution**: Use the IP address of your Home Assistant directly.
- **Example**: Replace `http://homeassistant.local:8123/local/nspanel_blank.tft` with `http://192.168.0.100:8123/local/nspanel_blank.tft`.
### Check the File Size by Downloading to Your Computer
- **Issue**: Ensuring the file size matches the GitHub version.
- **Solution**: Use the same URL you provided to ESPHome to download the file on your computer and compare sizes.
- **Verification Steps**: Download the file, then right-click and select 'Properties' to check the size.
Compare this with the size listed on GitHub or from the file you downlodaded directly from GitHub.
### Power Cycle Your Panel
- **Issue**: General troubleshooting.
- **Solution**: Turn off the power supply, wait for a moment, and then power it back on.
If your panel is already installed in the wall, you can often power cycle it by switching the relay connected to your panel in your electricity relay's panel.
@@ -118,7 +111,6 @@ This duration helps ensure that the system resets to a clean state.
> ![Hardware Reset Button](pics/eu_reset_button.png)
### Consider changing the framework
- **Issue**: You might be facing some situation where the transfer engine used by your framework cannot handle it properly.
- **Solution**: Temporarily switch between the frameworks.
- **Additional Guidance**: This project supports both `arduino` (ESPHome default) or `esp-idf` (this project default) frameworks.
@@ -127,7 +119,6 @@ The upload TFT engines have some differences, so changing the framework may solv
You can set the framework you want by adding this to your ESPHome yaml:
#### ESP-IDF
```yaml
esp32:
framework:
@@ -135,7 +126,6 @@ esp32:
```
#### Arduino
```yaml
esp32:
framework:
@@ -143,7 +133,6 @@ esp32:
```
### Flash your panel again
- **Issue**: Your firmware might be missing some important library, you may be using an outdated version or the ESP may be out of memory.
- **Solution**: Remove all add-ons and non-essential customization and flash your panel again.
- **Step-by-Step Guide**:
@@ -153,7 +142,6 @@ esp32:
4. Add the add-ons and removed customization back and then flash it again.
### Try an alternative http service
- **Issue**: Your current http server may be overloaded.
- **Solution**: Try another http server installed in your computer.
There are many options available for free to run under you local Windows, MAC or Linux machine.
@@ -166,7 +154,6 @@ There are many options available for free to run under you local Windows, MAC or
| XAMPP | [apachefriends.org](https://www.apachefriends.org/index.html) | Linux, Windows, macOS | All-in-one package, easy to install, ideal for beginners | Not optimized for high-traffic sites, more suited for development than production |
## Additional Tips and Resources
After troubleshooting, if issues persist, consult the [Issues](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues) and feel free to create a new one asking for more personalized assistance.
Please share as much info as possible, like:
@@ -176,5 +163,4 @@ Please share as much info as possible, like:
4. Describe what you have already tried.
## Important note
Remember, these steps are a guideline and might vary slightly based on your specific setup and previously installed system.

View File

@@ -19,7 +19,7 @@ external_components:
- source:
type: git
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: main
ref: v4.3.2
components:
- nspanel_ha_blueprint_upload_tft
refresh: 300s
@@ -166,6 +166,15 @@ script:
App.feed_wdt();
}
- id: select_tft_file_model
mode: restart
then:
- lambda: |-
if (!isnan(display_mode->state) and !isnan(display_charset->state)) {
std::string PanelModel = getNSPanelText(int(display_mode->state), int(display_charset->state));
if (!PanelModel.empty() and tft_file_model->state != PanelModel) tft_file_model->publish_state(PanelModel);
}
- id: !extend stop_all
then:
- lambda: |-
@@ -413,16 +422,22 @@ select:
icon: mdi:swap-horizontal
sensor:
- id: !extend display_charset
on_value:
then:
- script.execute: select_tft_file_model
- id: !extend display_mode
on_value:
then:
lambda: |-
static const char *const TAG = "addon_upload_tft.sensor.display_mode";
id(tft_is_valid) = (display_mode->state > 0 and display_mode->state < 4);
if (id(tft_is_valid))
ESP_LOGD(TAG, "Valid TFT: True");
else {
ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state));
ESP_LOGW(TAG, "Valid TFT: False");
}
- lambda: |-
static const char *const TAG = "addon_upload_tft.sensor.display_mode";
id(tft_is_valid) = (display_mode->state > 0 and display_mode->state < 4);
if (id(tft_is_valid)) {
ESP_LOGD(TAG, "Valid TFT: True");
select_tft_file_model->execute();
} else {
ESP_LOGW(TAG, "Display mode: %i", int(display_mode->state));
ESP_LOGW(TAG, "Valid TFT: False");
}
...

View File

@@ -96,7 +96,6 @@ time:
- component.update: api_timestamp
- component.update: device_timestamp
##### Web server #####
web_server:
id: web_server_std
port: 80

File diff suppressed because it is too large Load Diff

View File

@@ -15,9 +15,9 @@ framework.txt="esp-idf"
ip_addr.txt="192.168.0.123"
```
![Boot EU](../docs/pics/eu_boot.png)
![Boot EU](../../docs/pics/eu_boot.png)
![Boot US](../docs/pics/us_boot.png)
![Boot US](../../docs/pics/us_boot.png)
## Home page
@@ -59,7 +59,7 @@ value03_state.txt="715 W"
value03_icon.txt=""
```
![Home EU](../docs/pics/eu_home.png)
![Home EU](../../docs/pics/eu_home.png)
**US version:**
@@ -100,7 +100,7 @@ value03_state.txt="715 W"
value03_icon.txt=""
```
![Home US](../docs/pics/us_home.png)
![Home US](../../docs/pics/us_home.png)
## Settings page
@@ -108,8 +108,8 @@ value03_icon.txt=""
page settings
```
![Settings EU](../docs/pics/eu_settings.png)
![Settings US](../docs/pics/us_settings.png)
![Settings EU](../../docs/pics/eu_settings.png)
![Settings US](../../docs/pics/us_settings.png)
## Buttons pages (DRAFT)

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Text esph_version

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -798,15 +802,15 @@ TouchCap swipe
if(swipec>swipedx)
{
// Navigate back based on active status
if(is_entitypage03==1)
if(is_buttonpage03==1)
{
page entitypage03
}else if(is_entitypage02==1)
page buttonpage03
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage01==1)
page buttonpage02
}else if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -826,14 +830,14 @@ TouchCap swipe
// From Up to Down
if(swipec>100)
{
if(is_entitypage03==1&&is_entitypage02==1)
if(is_buttonpage03==1&&is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1||is_entitypage02==1)
page buttonpage02
}else if(is_buttonpage03==1||is_buttonpage02==1)
{
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -844,19 +848,19 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
}else if(is_entitypage02==1)
page buttonpage01
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1)
page buttonpage02
}else if(is_buttonpage03==1)
{
page entitypage03
page buttonpage03
}else
{
page home

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -431,7 +435,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage03==1&&is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -429,7 +433,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -22,7 +22,7 @@ Page home
prints "home",0
printh 00
printh FF FF FF
back_page_id=0
back_page_id=1
if(qrcode.qrcode_value.txt=="")
{
vis bt_qrcode,0
@@ -83,15 +83,6 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text outdoor_temp
Attributes
ID : 5
@@ -326,15 +317,6 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text bt_notific
Attributes
ID : 28
@@ -751,6 +733,10 @@ TouchCap swipe
wakeup_timer.en=1 // Set brightness to saved value (from HA)
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -772,9 +758,6 @@ TouchCap swipe
}else if(is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Right to Left swipe now navigates to home, looping back to the start.
@@ -794,9 +777,6 @@ TouchCap swipe
}else if(is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}
@@ -825,13 +805,10 @@ TouchCap swipe
}else if(is_buttonpage02==1&&is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
@@ -853,9 +830,6 @@ TouchCap swipe
}else if(is_buttonpage03==1&&is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}

View File

@@ -383,7 +383,7 @@ Picture colorwheel
covx b,va3.txt,0,0
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
printh 92
prints "nspanelevent",0
prints "localevent",0
printh 00
prints lightsetting.txt,0
printh 00

View File

@@ -23,7 +23,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page back_page_id
page wakeup_page_id
Text text
Attributes
@@ -69,7 +69,7 @@ TouchCap wakeup
Events
Touch Press Event
page back_page_id
page wakeup_page_id
TouchCap swipe
Attributes

View File

@@ -27,7 +27,7 @@ Page utilities
printh 00
printh FF FF FF
Variable (int32) line_main_d
Variable (int32) home_line_d
Attributes
ID : 46
Scope: local
@@ -419,7 +419,7 @@ Text group06b
Text :
Max. Text Size : 10
Slider line_main
Slider home_line
Attributes
ID : 10
Scope : local
@@ -530,19 +530,19 @@ Timer tm_movement
Attributes
ID : 45
Scope : local
Period (ms): 50
Period (ms): 150
Enabled : yes
Events
Timer Event
//line_main
line_main.val+=line_main_d.val
if(line_main.val>=line_main.maxval)
//home_line
home_line.val+=home_line_d.val
if(home_line.val>=home_line.maxval)
{
line_main.val=line_main.minval
}else if(line_main.val<=line_main.minval)
home_line.val=home_line.minval
}else if(home_line.val<=home_line.minval)
{
line_main.val=line_main.maxval
home_line.val=home_line.maxval
}
//group01_line
group01_line.val+=group01_line_d.val

View File

@@ -1,440 +0,0 @@
Page utilities2
Attributes
ID : 0
Scope : local
Dragging : 0
Send Component ID : on press and release
Locked : no
Swide up page ID : disabled
Swide down page ID : disabled
Swide left page ID : disabled
Swide right page ID: disabled
Events
Preinitialize Event
if(api==0)
{
page home
}
vis unavailable,0
Postinitialize Event
sendme
Text title
Attributes
ID : 1
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : Power Dashboard
Max. Text Size : 100
Text title_icon
Attributes
ID : 2
Scope : local
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 
Max. Text Size : 10
Text unavailable
Attributes
ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 1
Text t1
Attributes
ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 賈
Max. Text Size : 4
Text t2
Attributes
ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 
Max. Text Size : 4
Text t3
Attributes
ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 
Max. Text Size : 4
Text t4
Attributes
ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Green
Max. Text Size : 10
Text t5
Attributes
ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Fossil
Max. Text Size : 10
Text t7
Attributes
ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 全
Max. Text Size : 4
Text t8
Attributes
ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Solar
Max. Text Size : 10
Text t9
Attributes
ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 98%
Max. Text Size : 10
Text t10
Attributes
ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 2%
Max. Text Size : 10
Text t11
Attributes
ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 豈
Max. Text Size : 4
Text t12
Attributes
ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Battery
Max. Text Size : 10
Text t13
Attributes
ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 暑
Max. Text Size : 4
Text t14
Attributes
ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Heating
Max. Text Size : 10
Text t15
Attributes
ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 1.7 kW
Max. Text Size : 10
Text t16
Attributes
ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 21.7°C
Max. Text Size : 10
Text t17
Attributes
ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 1.1 kW
Max. Text Size : 10
Text t18
Attributes
ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : -2.1 kW
Max. Text Size : 10
Text t19
Attributes
ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 0.8 kW
Max. Text Size : 10
Text t20
Attributes
ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 慎
Max. Text Size : 4
Text t21
Attributes
ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Wind
Max. Text Size : 10
Text t22
Attributes
ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 1.1 kW
Max. Text Size : 10
Text t23
Attributes
ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : î—°
Max. Text Size : 4
Text t24
Attributes
ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Car
Max. Text Size : 10
Text t25
Attributes
ID : 36
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 1.1 kW
Max. Text Size : 10
Text t0
Attributes
ID : 37
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : î—°
Max. Text Size : 4
Text t6
Attributes
ID : 38
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Car
Max. Text Size : 10
Text t26
Attributes
ID : 40
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : 1.1 kW
Max. Text Size : 10
Slider h1
Attributes
ID : 11
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h2
Attributes
ID : 12
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h3
Attributes
ID : 15
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h4
Attributes
ID : 20
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h5
Attributes
ID : 23
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h6
Attributes
ID : 31
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h7
Attributes
ID : 35
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Slider h0
Attributes
ID : 39
Scope : local
Dragging : 0
Send Component ID: disabled
Position : 50
Upper range limit: 100
Lower range limit: 0
Button button_back
Attributes
ID : 3
Scope : local
Dragging : 0
Send Component ID: on press and release
State : unpressed
Text : î…˜
Max. Text Size : 3
Events
Touch Press Event
page back_page_id
Timer wakeup_timer
Attributes
ID : 4
Scope : local
Period (ms): 100
Enabled : yes
Events
Timer Event
if(dim<brightness)
{
dimdelta=brightness-dim
dimdelta/=10
if(dimdelta<1)
{
dimdelta=1
}
dim+=dimdelta
}else
{
wakeup_timer.en=0
}

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Events

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -844,7 +848,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -431,7 +435,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage03==1&&is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -429,7 +433,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -22,7 +22,7 @@ Page home
prints "home",0
printh 00
printh FF FF FF
back_page_id=0
back_page_id=1
if(qrcode.qrcode_value.txt=="")
{
vis bt_qrcode,0
@@ -83,15 +83,6 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text outdoor_temp
Attributes
ID : 5
@@ -326,15 +317,6 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text bt_notific
Attributes
ID : 28
@@ -751,6 +733,11 @@ TouchCap swipe
wakeup_timer.en=1 // Set brightness to saved value (from HA)
Touch Release Event
//New swipe
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -772,9 +759,6 @@ TouchCap swipe
}else if(is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Right to Left swipe now navigates to home, looping back to the start.
@@ -794,9 +778,6 @@ TouchCap swipe
}else if(is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}
@@ -825,13 +806,10 @@ TouchCap swipe
}else if(is_buttonpage02==1&&is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
@@ -853,9 +831,6 @@ TouchCap swipe
}else if(is_buttonpage03==1&&is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}

View File

@@ -383,7 +383,7 @@ Picture colorwheel
covx b,va3.txt,0,0
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
printh 92
prints "nspanelevent",0
prints "localevent",0
printh 00
prints lightsetting.txt,0
printh 00

View File

@@ -23,7 +23,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page back_page_id
page wakeup_page_id
Text text
Attributes
@@ -69,7 +69,7 @@ TouchCap wakeup
Events
Touch Press Event
page back_page_id
page wakeup_page_id
TouchCap swipe
Attributes

View File

@@ -27,7 +27,7 @@ Page utilities
printh 00
printh FF FF FF
Variable (int32) line_main_d
Variable (int32) home_line_d
Attributes
ID : 46
Scope: local
@@ -419,7 +419,7 @@ Text group06b
Text :
Max. Text Size : 10
Slider line_main
Slider home_line
Attributes
ID : 10
Scope : local
@@ -530,19 +530,19 @@ Timer tm_movement
Attributes
ID : 45
Scope : local
Period (ms): 50
Period (ms): 150
Enabled : yes
Events
Timer Event
//line_main
line_main.val+=line_main_d.val
if(line_main.val>=line_main.maxval)
home_line.val+=home_line_d.val
if(home_line.val>=home_line.maxval)
{
line_main.val=line_main.minval
}else if(line_main.val<=line_main.minval)
home_line.val=home_line.minval
}else if(home_line.val<=home_line.minval)
{
line_main.val=line_main.maxval
home_line.val=home_line.maxval
}
//group01_line
group01_line.val+=group01_line_d.val

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Text esph_version

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -798,15 +802,15 @@ TouchCap swipe
if(swipec>swipedx)
{
// Navigate back based on active status
if(is_entitypage03==1)
if(is_buttonpage03==1)
{
page entitypage03
}else if(is_entitypage02==1)
page buttonpage03
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage01==1)
page buttonpage02
}else if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -826,14 +830,14 @@ TouchCap swipe
// From Up to Down
if(swipec>100)
{
if(is_entitypage03==1&&is_entitypage02==1)
if(is_buttonpage03==1&&is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1||is_entitypage02==1)
page buttonpage02
}else if(is_buttonpage03==1||is_buttonpage02==1)
{
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -844,19 +848,19 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
}else if(is_entitypage02==1)
page buttonpage01
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1)
page buttonpage02
}else if(is_buttonpage03==1)
{
page entitypage03
page buttonpage03
}else
{
page home

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -431,7 +435,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage03==1&&is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -429,7 +433,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -22,7 +22,7 @@ Page home
prints "home",0
printh 00
printh FF FF FF
back_page_id=0
back_page_id=1
if(qrcode.qrcode_value.txt=="")
{
vis bt_qrcode,0
@@ -83,15 +83,6 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text outdoor_temp
Attributes
ID : 5
@@ -326,15 +317,6 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text bt_notific
Attributes
ID : 28
@@ -751,6 +733,10 @@ TouchCap swipe
wakeup_timer.en=1 // Set brightness to saved value (from HA)
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -772,9 +758,6 @@ TouchCap swipe
}else if(is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Right to Left swipe now navigates to home, looping back to the start.
@@ -794,9 +777,6 @@ TouchCap swipe
}else if(is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}
@@ -825,13 +805,10 @@ TouchCap swipe
}else if(is_buttonpage02==1&&is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
@@ -853,9 +830,6 @@ TouchCap swipe
}else if(is_buttonpage03==1&&is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}

View File

@@ -383,7 +383,7 @@ Picture colorwheel
covx b,va3.txt,0,0
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
printh 92
prints "nspanelevent",0
prints "localevent",0
printh 00
prints lightsetting.txt,0
printh 00

View File

@@ -23,7 +23,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page back_page_id
page wakeup_page_id
Text text
Attributes
@@ -69,7 +69,7 @@ TouchCap wakeup
Events
Touch Press Event
page back_page_id
page wakeup_page_id
TouchCap swipe
Attributes

View File

@@ -27,7 +27,7 @@ Page utilities
printh 00
printh FF FF FF
Variable (int32) line_main_d
Variable (int32) home_line_d
Attributes
ID : 46
Scope: local
@@ -419,7 +419,7 @@ Text group06b
Text :
Max. Text Size : 10
Slider line_main
Slider home_line
Attributes
ID : 10
Scope : local
@@ -530,19 +530,19 @@ Timer tm_movement
Attributes
ID : 45
Scope : local
Period (ms): 50
Period (ms): 150
Enabled : yes
Events
Timer Event
//line_main
line_main.val+=line_main_d.val
if(line_main.val>=line_main.maxval)
//home_line
home_line.val+=home_line_d.val
if(home_line.val>=home_line.maxval)
{
line_main.val=line_main.minval
}else if(line_main.val<=line_main.minval)
home_line.val=home_line.minval
}else if(home_line.val<=home_line.minval)
{
line_main.val=line_main.maxval
home_line.val=home_line.maxval
}
//group01_line
group01_line.val+=group01_line_d.val

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Text esph_version

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -798,15 +802,15 @@ TouchCap swipe
if(swipec>swipedx)
{
// Navigate back based on active status
if(is_entitypage03==1)
if(is_buttonpage03==1)
{
page entitypage03
}else if(is_entitypage02==1)
page buttonpage03
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage01==1)
page buttonpage02
}else if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -826,14 +830,14 @@ TouchCap swipe
// From Up to Down
if(swipec>100)
{
if(is_entitypage03==1&&is_entitypage02==1)
if(is_buttonpage03==1&&is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1||is_entitypage02==1)
page buttonpage02
}else if(is_buttonpage03==1||is_buttonpage02==1)
{
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -844,19 +848,19 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
}else if(is_entitypage02==1)
page buttonpage01
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1)
page buttonpage02
}else if(is_buttonpage03==1)
{
page entitypage03
page buttonpage03
}else
{
page home

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -431,7 +435,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage03==1&&is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -429,7 +433,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -22,7 +22,7 @@ Page home
prints "home",0
printh 00
printh FF FF FF
back_page_id=0
back_page_id=1
if(qrcode.qrcode_value.txt=="")
{
vis bt_qrcode,0
@@ -83,15 +83,6 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text outdoor_temp
Attributes
ID : 5
@@ -326,15 +317,6 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text bt_notific
Attributes
ID : 28
@@ -751,6 +733,10 @@ TouchCap swipe
wakeup_timer.en=1 // Set brightness to saved value (from HA)
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -772,9 +758,6 @@ TouchCap swipe
}else if(is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Right to Left swipe now navigates to home, looping back to the start.
@@ -794,9 +777,6 @@ TouchCap swipe
}else if(is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}
@@ -825,13 +805,10 @@ TouchCap swipe
}else if(is_buttonpage02==1&&is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
@@ -853,9 +830,6 @@ TouchCap swipe
}else if(is_buttonpage03==1&&is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}

View File

@@ -383,7 +383,7 @@ Picture colorwheel
covx b,va3.txt,0,0
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
printh 92
prints "nspanelevent",0
prints "localevent",0
printh 00
prints lightsetting.txt,0
printh 00

View File

@@ -23,7 +23,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page back_page_id
page wakeup_page_id
Text text
Attributes
@@ -69,7 +69,7 @@ TouchCap wakeup
Events
Touch Press Event
page back_page_id
page wakeup_page_id
TouchCap swipe
Attributes

View File

@@ -27,7 +27,7 @@ Page utilities
printh 00
printh FF FF FF
Variable (int32) line_main_d
Variable (int32) home_line_d
Attributes
ID : 46
Scope: local
@@ -419,7 +419,7 @@ Text group06b
Text :
Max. Text Size : 10
Slider line_main
Slider home_line
Attributes
ID : 10
Scope : local
@@ -530,19 +530,19 @@ Timer tm_movement
Attributes
ID : 45
Scope : local
Period (ms): 50
Period (ms): 150
Enabled : yes
Events
Timer Event
//line_main
line_main.val+=line_main_d.val
if(line_main.val>=line_main.maxval)
//home_line
home_line.val+=home_line_d.val
if(home_line.val>=home_line.maxval)
{
line_main.val=line_main.minval
}else if(line_main.val<=line_main.minval)
home_line.val=home_line.minval
}else if(home_line.val<=home_line.minval)
{
line_main.val=line_main.maxval
home_line.val=home_line.maxval
}
//group01_line
group01_line.val+=group01_line_d.val

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Events

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -844,7 +848,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -431,7 +435,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage03==1&&is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage04==1)

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -429,7 +433,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -22,7 +22,7 @@ Page home
prints "home",0
printh 00
printh FF FF FF
back_page_id=0
back_page_id=1
if(qrcode.qrcode_value.txt=="")
{
vis bt_qrcode,0
@@ -83,15 +83,6 @@ Text indr_temp
Text :
Max. Text Size : 8
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text outdoor_temp
Attributes
ID : 5
@@ -326,15 +317,6 @@ Text indr_temp_icon
Text :
Max. Text Size : 3
Events
Touch Release Event
printh 92
prints "localevent",0
printh 00
prints "{\"page\": \"home\", \"component\": \"climate\", \"event\": \"click\"}",0
printh 00
printh FF FF FF
Text bt_notific
Attributes
ID : 28
@@ -751,6 +733,11 @@ TouchCap swipe
wakeup_timer.en=1 // Set brightness to saved value (from HA)
Touch Release Event
//New swipe
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -772,9 +759,6 @@ TouchCap swipe
}else if(is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Right to Left swipe now navigates to home, looping back to the start.
@@ -794,9 +778,6 @@ TouchCap swipe
}else if(is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}
@@ -825,13 +806,10 @@ TouchCap swipe
}else if(is_buttonpage02==1&&is_buttonpage01==1)
{
page buttonpage01
}else
{
// Do nothing
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
@@ -853,9 +831,6 @@ TouchCap swipe
}else if(is_buttonpage03==1&&is_buttonpage04==1)
{
page buttonpage04
}else
{
// Do nothing
}
}
}

View File

@@ -383,7 +383,7 @@ Picture colorwheel
covx b,va3.txt,0,0
lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"]}"
printh 92
prints "nspanelevent",0
prints "localevent",0
printh 00
prints lightsetting.txt,0
printh 00

View File

@@ -23,7 +23,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
page back_page_id
page wakeup_page_id
Text text
Attributes
@@ -69,7 +69,7 @@ TouchCap wakeup
Events
Touch Press Event
page back_page_id
page wakeup_page_id
TouchCap swipe
Attributes

View File

@@ -27,7 +27,7 @@ Page utilities
printh 00
printh FF FF FF
Variable (int32) line_main_d
Variable (int32) home_line_d
Attributes
ID : 46
Scope: local
@@ -419,7 +419,7 @@ Text group06b
Text :
Max. Text Size : 10
Slider line_main
Slider home_line
Attributes
ID : 10
Scope : local
@@ -530,19 +530,19 @@ Timer tm_movement
Attributes
ID : 45
Scope : local
Period (ms): 50
Period (ms): 150
Enabled : yes
Events
Timer Event
//line_main
line_main.val+=line_main_d.val
if(line_main.val>=line_main.maxval)
home_line.val+=home_line_d.val
if(home_line.val>=home_line.maxval)
{
line_main.val=line_main.minval
}else if(line_main.val<=line_main.minval)
home_line.val=home_line.minval
}else if(home_line.val<=home_line.minval)
{
line_main.val=line_main.maxval
home_line.val=home_line.maxval
}
//group01_line
group01_line.val+=group01_line_d.val

View File

@@ -7,6 +7,7 @@ Program.s
int is_buttonpage01=0, is_buttonpage02=0, is_buttonpage03=0, is_buttonpage04=0
int is_entitypage01=0, is_entitypage02=0, is_entitypage03=0, is_entitypage04=0
int back_page_id=1
int wakeup_page_id=1
int dimdelta=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int is_utilities=0

View File

@@ -96,7 +96,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.3.1
Text : 4.3.2
Max. Text Size : 9
Text esph_version

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -840,7 +844,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Assume starting from buttonpage01 and aiming to navigate two pages ahead based on active pages.

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -846,7 +850,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_buttonpage03==1&&is_buttonpage04==1)

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -842,7 +846,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status

View File

@@ -789,6 +789,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -798,15 +802,15 @@ TouchCap swipe
if(swipec>swipedx)
{
// Navigate back based on active status
if(is_entitypage03==1)
if(is_buttonpage03==1)
{
page entitypage03
}else if(is_entitypage02==1)
page buttonpage03
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage01==1)
page buttonpage02
}else if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -826,14 +830,14 @@ TouchCap swipe
// From Up to Down
if(swipec>100)
{
if(is_entitypage03==1&&is_entitypage02==1)
if(is_buttonpage03==1&&is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1||is_entitypage02==1)
page buttonpage02
}else if(is_buttonpage03==1||is_buttonpage02==1)
{
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
page buttonpage01
}else
{
page home
@@ -844,19 +848,19 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
// Navigate back up the sequence based on active status
if(is_entitypage01==1)
if(is_buttonpage01==1)
{
page entitypage01
}else if(is_entitypage02==1)
page buttonpage01
}else if(is_buttonpage02==1)
{
page entitypage02
}else if(is_entitypage03==1)
page buttonpage02
}else if(is_buttonpage03==1)
{
page entitypage03
page buttonpage03
}else
{
page home

View File

@@ -374,6 +374,10 @@ TouchCap swipe
swipestore.en=1 // Start swipestore timer
Touch Release Event
if(api==0)
{
page home
}
swipestore.en=0
// Touch has ended, x
if(tch0==0)
@@ -425,7 +429,7 @@ TouchCap swipe
}
}
// Down to Up
swipec=0-swipedy
swipec2=0-swipedy
if(swipec<-100)
{
if(is_entitypage02==1) // Check if entitypage02 is active

Some files were not shown because too many files have changed in this diff Show More