diff --git a/.gitignore b/.gitignore
index 92f2840..071293d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,9 @@
.DS_Store
**/.DS_Store
+Nextion2Text.*
+*.cmd
+*.bat
+
# Ignore IntelliJ IDEA project directory
.idea
diff --git a/README.md b/README.md
index d36ad96..79024b5 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
đ WE ARE LOOKING FOR YOU! _**We are always looking for people who would like to support this project. We are looking for help with "programming new features, writing documentation or translating documentation to EN. If you are interested then please contact us :)**_
+
## NSPanel:

@@ -35,46 +36,46 @@ The goal was to create a version that allows everyone to use the NSpanel fully l


-(Home and Buttonpage)
+(Home and Button page)


-(Lightsettings - Brightness and TEMP Color)
+(Light settings - Brightness and TEMP Color)


-(Colorwheel and Thermostat)
+(Light color wheel and Thermostat)


-(Coversetting and Weather Forecast)
+(Cover settings and Weather forecast)


-(NSPanel Settings and Boot Screen)
+(NSPanel settings and Boot screen)


-(HA Device Setting for Example temperature correction)
-
+(HA device settings - Temperature correction)
+
## Blueprint:


-
+
## Features:
- Easy to use and simple configuration via Blueprint - no change in the code is necessary
- 32 buttons on 4 button pages with long press function for settings (more buttons are also possible)
@@ -82,9 +83,9 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
- Buttons show current brightness and cover position in the button itself
- Buttons label can be assigned via blueprint
- Weather + 5 days weather forecast
-- Thermostat + Touch + Relay control for floor heating
-- Light control (brightness-slider, colorwheel, TempColor-slider) - via long Press
-- Cover control (open, close, position-slider) - via long press
+- Thermostat + Touch + [Relay control for floor heating](/docs/en/addon_climate.md)
+- Light control (brightness, color and temperature) - via long Press
+- Cover control (open, close and position) - via long press
- Settings page (display brightness, display dim brightness, sleep mode, reboot NSPanel)
- Swipe between pages
- Top menu with 10 icons for specific states
@@ -93,10 +94,10 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
- 2 physical switches with optional fallback mode
- and much more ;)
+
+## Pages
-# Pages
-
-## Home
+### Home
- Current weather with button to Weather Forcast page
- Hardware buttons can be freely assigned
- Hardware button label (optional)
@@ -107,63 +108,75 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
- Room humidity
- Up to 3 user's selectable entities
-
-## Button Page
-- 32 Button
+
+### Button Page
+- Up to 32 buttons
- 4 Button pages
- Button design is automatically generated based on the selected entity
- Buttons show current brightness and cover position in the button itself
- Buttons label can be assigned via blueprint
-- all buttons with long press function
-- automatic detection by long press if it is a light or cover for submenu
-- swipe between all pages
-- swipe also down and up for fast access to certain pages
+- All buttons with long press function
+- Automatic detection by long press if it is a light, cover or climate for submenu
+- Swipe between all pages
+- Swipe also down and up for fast access to certain pages
-
-## Light Settings
+
+### Light Settings
- Light current state
-- Brightness Slider
-- Colorwheel
-- TempColor slider
+- Brightness slider
+- RGB color wheel
+- Color temperature slider
- Jump back to the right button page
-
-## Cover Settings
+
+### Cover Settings
- Open and close cover
- Cover position via slider
-- Cover battery value if available (I use Ikea roller blind)
+- Cover battery value (when available)
- jump back to the right button page
+
+### Thermostat / Climate
+- Target temperature control slider
+- Current temperature
+- 4 user's selectable values (for water and external temperatures, etc.)
+- All the standard climate controls from Home Assistant (`heat`, `fan`, `cool`, `auto`, `dry`)
+- 2 user's selectable buttons
+- [Can be used for local control (even when Wi-Fi is unavailable) when your panel's relays are used to control your cooler/heater](/docs/en/addon_climate.md)
-## Thermostat
-- Touch Temp control
-- Outside temperature
-- Hot water
-- heating on, off and idle
-- Hot water button
+
+### Fan speed
+- Turn-on and turn-off fan
+- Set speed via slider or buttons
+- jump back to the right button page
+
+
+### Alarm
+- Arm/disarm an alarm (standard modes supported by Home Assistant)
+- Support to numeric pin for arming or disarming
-## Weather Forecast
-- 5 days Weather Forecast via swipe (Integration Accuweather - but should also go with other integrations)
-- Lowest and highest temperature outside
+
+### Weather Forecast
+- 5 days weather forecast via swipe (supports most used weather integrations)
+- Min and max outside temperatures
- Date
-- Rain probability
-- Sunshine hours
-- UV index
-- Thunderstorm probability
-- Wind speed
+- Other weather parameters (when provided by your integration):
+ - Rain probability
+ - Sunshine hours
+ - UV index
+ - Thunderstorm probability
+ - Wind speed
-
-## Display Settings
+
+### Display Settings
- Restart NSPanel
-- Sleep mode - display off after time X
+- Sleep mode - Turn off display after given time (seconds)
- Display brightness slider
- Display dim brightness slider
-- Status Brightness in %
-
-
+
## Thanks to:
SmartHome Yourself: https://www.youtube.com/c/SmarthomeyourselfDe_DIY
diff --git a/custom_configuration/nspanel_blank_code/Program.s.txt b/custom_configuration/nspanel_blank_code/Program.s.txt
new file mode 100644
index 0000000..c007e76
--- /dev/null
+++ b/custom_configuration/nspanel_blank_code/Program.s.txt
@@ -0,0 +1,8 @@
+Program.s
+ //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
+ int sys0=0,sys1=0,sys2=0 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
+ bauds=115200//Configure baudrate
+ dim=100//Configure backlight
+ recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
+ printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
+ page 0 //Power on start page 0
diff --git a/custom_configuration/nspanel_blank_code/page0.txt b/custom_configuration/nspanel_blank_code/page0.txt
new file mode 100644
index 0000000..e6969bb
--- /dev/null
+++ b/custom_configuration/nspanel_blank_code/page0.txt
@@ -0,0 +1,21 @@
+Page page0
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Locked : no
+ Swide up page ID : disabled
+ Swide down page ID : disabled
+ Swide left page ID : disabled
+ Swide right page ID: disabled
+
+QR Code qr0
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Text : https://github.com/Blackymas/NSPanel_HA_Blueprint
+ Max. Text Size : 50
+
diff --git a/docs/en/addon_climate.md b/docs/en/addon_climate.md
new file mode 100644
index 0000000..95b61d5
--- /dev/null
+++ b/docs/en/addon_climate.md
@@ -0,0 +1,137 @@
+# Add-on: Climate
+
+## Description
+This add-on enables the use of your panel's relays to act as a thermostat (either cooler or heater) using the internal temperature sensor and independent of the network availability.
+
+### Attention
+1. The NSPanel is limited to 2A per relay. Don't use it for directly power your cooler/heater if exceeding the panel specifications:
+ - 150W/110V/Gang, 300W/110V/Total
+ - 300W/220V/Gang, 600W/220V/Total
+ - More details on the [Sonoff NSPanel's page](https://sonoff.tech/product/central-control-panel/nspanel/) and the [product specifications document](https://sonoff.tech/wp-content/uploads/2021/11/%E4%BA%A7%E5%93%81%E5%8F%82%E6%95%B0%E8%A1%A8-NSPanel-20210831.pdf).
+
+2. At this moment you have to choose between `heat` or `cool`. The dual/simultaneous operation is not supported at this moment.
+3. A target temperature must be set on the climate entity in Home Assistant or the page Climate in your panel.
+
+
+## Installation
+You will need to add the reference to `addon_climate_heat` or `addon_climate_cool` files on your ESPHome settings in the `package` section and after te `remote_package` (base code), as shown bellow (for `heat` in this example):
+
+```yaml
+substitutions:
+ ###### CHANGE ME START ######
+ device_name: "YOUR_NSPANEL_NAME"
+ wifi_ssid: !secret wifi_ssid
+ wifi_password: !secret wifi_password
+
+ nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft"
+
+ ##### addon-configuration #####
+ ## addon_climate ##
+ heater_relay: "1" # possible values: 1/2
+
+ ##### CHANGE ME END #####
+
+
+packages:
+ remote_package:
+ url: https://github.com/Blackymas/NSPanel_HA_Blueprint
+ ref: main
+ files:
+ - nspanel_esphome.yaml # Core package
+ # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
+ - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
+
+ refresh: 300s
+```
+
+## Configuration
+
+The following keys are available to be used in your `substitutions`:
+
+Key|Required|Supported values|Default|Description
+:-|:-:|:-:|:-:|:-
+cooler_relay|Mandatory for `cool`|`1` or `2`|`0` (disabled)|Relay used for control the cooler. User `1` for "Relay 1" or `2` for "Relay 2".
+heater_relay|Mandatory for `heat`|`1` or `2`|`0` (disabled)|Relay used for control the heater. User `1` for "Relay 1" or `2` for "Relay 2".
+temp_units|Optional|`°C` or `°F`|`°C`|Temperature unit.
+min_off_time|Optional|Positive integer representing the number of seconds|`300`|Minimum duration (in seconds) the cooling/heating action must be disengaged before it may be engaged.
+min_run_time|Optional|Positive integer representing the number of seconds|`300`|Minimum duration (in seconds) the cooling/heating action must be engaged before it may be disengaged.
+min_idle_time|Optional|Positive integer representing the number of seconds|`30`|Minimum duration (in seconds) the idle action must be active before calling another climate action.
+temp_min|Optional|Number representing a temperature in the selected unit|`15` for `cool`, `5` for `heat`|The minimum temperature the climate device can reach. Used to set the range of the frontend gauge.
+temp_max|Optional|Number representing a temperature in the selected unit|`45` for `cool`, `25` for `heat`|The maximum temperature the climate device can reach. Used to set the range of the frontend gauge.
+temp_step|Optional|Number representing a temperature in the selected unit|`0.5`|The granularity with which the target temperature can be controlled.
+
+- All values must be delimited with `""`
+- For more details on the keys, please take a look at [ESPHome Base Climate Configurations](https://esphome.io/components/climate/index.html#base-climate-configuration) and [ESPHome Climate Thermostat - Additional actions behavior](https://esphome.io/components/climate/thermostat.html#additional-actions-behavior).
+
+
+### Examples:
+
+#### Cooler:
+
+```yaml
+substitutions:
+ ###### CHANGE ME START ######
+ device_name: "YOUR_NSPANEL_NAME"
+ wifi_ssid: !secret wifi_ssid
+ wifi_password: !secret wifi_password
+
+ nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft"
+
+
+ ##### addon-configuration #####
+ ## addon_climate ##
+ cooler_relay: "1" #Use relay 1
+ temp_units: "°F" #Temperatures in Fahrenheit
+ temp_min: "40" #Min supported temperature is 40°F
+ temp_max: "80" #Max supported temperature is 80°F
+ temp_step: "1" #Temperature granularity is 1°F
+
+ ##### CHANGE ME END #####
+
+
+packages:
+ remote_package:
+ url: https://github.com/Blackymas/NSPanel_HA_Blueprint
+ ref: main
+ files:
+ - nspanel_esphome.yaml # Core package
+ - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
+ # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
+ refresh: 300s
+```
+
+
+#### Heater:
+
+```yaml
+substitutions:
+ ###### CHANGE ME START ######
+ device_name: "YOUR_NSPANEL_NAME"
+ wifi_ssid: !secret wifi_ssid
+ wifi_password: !secret wifi_password
+
+ nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft"
+
+
+ ##### addon-configuration #####
+ ## addon_climate ##
+ heater_relay: "1" #Use relay 1
+ temp_units: "°F" #Temperatures in Fahrenheit
+ temp_min: "40" #Min supported temperature is 40°F
+ temp_max: "80" #Max supported temperature is 80°F
+ temp_step: "1" #Temperature granularity is 1°F
+
+ ##### CHANGE ME END #####
+
+
+packages:
+ remote_package:
+ url: https://github.com/Blackymas/NSPanel_HA_Blueprint
+ ref: main
+ files:
+ - nspanel_esphome.yaml # Core package
+ # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
+ - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
+ refresh: 300s
+```
+
diff --git a/docs/en/alarm.md b/docs/en/alarm.md
new file mode 100644
index 0000000..ee4a4d6
--- /dev/null
+++ b/docs/en/alarm.md
@@ -0,0 +1,52 @@
+# Alarm Control Panel
+
+You can control an Alarm Control Panel from your NSPanel, which will allow you to set the alarm mode between the standard modes supported by Home Assistant (Home, Away, Night, Vacation or Custom bypass) or disarm the alarm.
+
+Currently, only alarms without a code or alarms with a numeric code will be supported. If your alarm requires a text code, you will still be able to display it on your NSPanel, however, when you click in any button it will send services calls to Home Assistant without the code and it will fail for the calls where a code is required.
+
+
+### Security advisory
+
+By default, the communication between your NSPanel (ESPHome) and Home Assistant (HA) is not encrypted, which means a person with access to your network could potentially monitor the communication between your panel and HA and replicate the service calls. Although this is not a big issue for most of the service calls (turn-on a light, close a curtain, etc.), it can be a problem when controlling your alarm system.
+Based on that, we hardly reccoment the use of API encryption for all users controlling an Alarm system via a NSPanel. You can easily enable this by following the ["API encryption" example available here](customization.md#api-encryption).
+
+
+## Configuration
+### Allow the device to make Home Assistant service calls
+First, you have to configure your Home Assistant to allow your panel to make service calls. All other services are called from the Blueprint, however this requires the ESPHome to send an event containing in plain text all the information needed to the service call, which could be a security issue, so all the alarm calls will be driven by the panel to ensure a safer environment.
+To enable this option, go to your ESPHome integrations panel (Settings > Devices and Services > ESPHome) and click "Configure" next to the entry related to your panel:
+
+
+Then check the option "Allow the device to make Home Assistant service calls":
+
+
+### Blueprint settings
+Open the automation based on the NSPanel Blueprint and look for a section related to "Alarm Control Panel".
+Select your alarm control panel entity, click "Save", and your are done. :sunglasses:
+
+
+
+
+## Controlling your alarm from your panel
+When an alarm control panel is set in your Blueprint automation, you will see the alarm icon on your panel's Home page. This icon will change following the alarm state as described in the table below.
+
+A click on that icon will show the Alarm Control Panel page:
+
+
+You can change your alarm settings with a single click on the button related to the new state you want to set your alarm to, or close the page to go back to Home page.
+
+### Description of states shown with the alarm icon
+
+State | Color | Icon | Icon name | Description
+-- | -- | -- | -- | --
+disarmed | White ||mdi:shield-off-outline | The alarm is disarmed (off).
+armed_home | Green || mdi:shield-home-outline | The alarm is armed in home mode.
+armed_away | Green || mdi:shield-lock-outline | The alarm is armed in away mode.
+armed_night | Green || mdi:shield-moon-outline | The alarm is armed in night mode.
+armed_vacation | Green || mdi:shield-airplane-outline | The alarm is armed in vacation mode.
+armed_custom_bypass | Green || mdi:shield-half-full | The alarm is armed in bypass mode.
+pending | Amber || mdi:shield-outline | The alarm is pending (towards triggered).
+arming | Amber || mdi:shield-outline | The alarm is arming.
+disarming | Amber || mdi:shield-off-outline | The alarm is disarming.
+triggered | Red || mdi:shield-alert-outline | The alarm is triggered.
+unknown / unavailable | White || mdi:shield-alert-outline | The alarm state is unknown or unavailable
diff --git a/docs/en/customization.md b/docs/en/customization.md
new file mode 100644
index 0000000..3f79f83
--- /dev/null
+++ b/docs/en/customization.md
@@ -0,0 +1,166 @@
+# Customization
+
+## Description
+This project adds lots of functionalities to your NSPanel and we are constantly adding new features based on user's feedback. However, you might have some specific case that are not included on the current implementation or is not a common case for other users.
+
+You can take advantage of [ESPHome Configuration Types](https://esphome.io/guides/configuration-types.html) to add your custom functionality or even to customize an existing functionality with minimum effort and this document intents to clarify how to use this and give some examples of customization.
+
+Please feel free to add your own customation to this document by creating a PR in the `dev` branch.
+
+***IMPORTANT:** Use customization at your own risk. Custom/advanced systems won't be supported by this project's team.*
+
+
+## Instructions
+There's nothing particular for this project, so you can just use any of the [ESPHome Configuration Types](https://esphome.io/guides/configuration-types.html) and only edit your local ESPHome yaml settings.
+
+Most of the ESPHome components in this project contains an `Id`, which can be used together with the `!extend` key to add or replace existing code.
+
+You should add your customizations at the end of your ESPHome yaml, as in the example bellow:
+
+```yaml
+substitutions:
+ ###### CHANGE ME START ######
+ device_name: "YOUR_NSPANEL_NAME"
+ wifi_ssid: !secret wifi_ssid
+ wifi_password: !secret wifi_password
+
+ nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft"
+
+ ##### addon-configuration #####
+ ## addon_climate ##
+ # addon_climate_heater_relay: "1" # possible values: 1/2
+
+ ##### CHANGE ME END #####
+
+packages:
+ remote_package:
+ url: https://github.com/Blackymas/NSPanel_HA_Blueprint
+ ref: main
+ files:
+ - nspanel_esphome.yaml
+ #- nspanel_esphome_addon_climate.yaml # activate local climate-control
+ refresh: 300s
+
+##### My customization - Start #####
+# Encrypt the communication between ESPHome and Home Assistant
+api:
+ encryption:
+ key: !secret api_encryption_key
+# More detailed log (for troubleshooting only)
+logger:
+ level: VERBOSE
+##### My customization - End #####
+```
+
+
+## Examples
+### API encryption
+This is highly recommended when you are transfer sensitive information between your panel and Home Assistant, as when you use your panel to enter the PIN for an Alarm Control Panel.
+
+```yaml
+# Encrypt the communication between ESPHome and Home Assistant
+api:
+ encryption:
+ key: !secret api_encryption_key
+```
+
+### Custom OTA password
+By default, the Wi-Fi password will be used as your OTA password, but you can replace it.
+First, you need to change the default password using this code.
+```yaml
+# change OTA password, remove after flashing
+esphome:
+ on_boot:
+ - lambda: |-
+ id(my_ota).set_auth_password("New password");
+ota:
+ password: !secret wifi_password
+ id: my_ota
+```
+After flashing the device, you must remove the code above and replace it with the code below to start using this customization.
+```yaml
+# Use my global OTA password
+ota:
+ password: !secret ota_password
+```
+
+### Web server credentials
+By default, the web server credentials are defined by this project using `admin` as `username` and your `Wi-Fi password` as `password`, but you can replace it using this customization:
+```yaml
+# Custom web server credentials
+web_server:
+ auth:
+ username: !secret web_server_username
+ password: !secret web_server_password
+```
+
+### Reboot when API fails
+Reboot your panel if it loses it's connection to Home Assistant for more than a certain time (15 minutes in this example).
+Sometimes the low level ESP functions could report that the ESP is connected to the network, when in fact it is not and only a full reboot fixes it.
+To support long times without Wi-Fi, this is disabled by default in this project, but you can set a reasonable interval to restart, based on your network reliability.
+```yaml
+# Reboot if HA is not connected for 15 minutes
+api:
+ reboot_timeout: 15min
+```
+
+### Change uart's baud rate
+Use this to change the baud rate on the communication between ESPHome and Nextion display.
+Important: Use only when troubleshooting as your display should be set to always communicate at 115200 bps.
+```yaml
+# Set Nextion comm's baud rate to 9600 bps
+uart:
+ baud_rate: 9600
+```
+
+### Manual IP
+Set IP address manually.
+```yaml
+# Set IP address manually
+wifi:
+ networks:
+ - id: !extend wifi_default
+ manual_ip:
+ static_ip: 192.168.0.123
+ gateway: 192.168.0.1
+ subnet: 255.255.255.0
+```
+
+### Hidden Wi-Fi
+Connect to a hidden Wi-Fi network.
+```yaml
+# Connect to a hidden Wi-Fi network.
+wifi:
+ networks:
+ - id: !extend wifi_default
+ hidden: true
+ fast_connect: true
+```
+
+### Connect to multiple networks
+NSPanel will attempt to connect to the one with the highest signal strength or, if you set a priority, it will try to connect to the highest priority. After failing it will connect to the second network.
+```yaml
+# Set dual network
+wifi:
+ networks:
+ - id: !extend wifi_default
+ priority: 10
+ - ssid: !secret wifi_ssid_backup
+ password: !secret wifi_password_backup
+ priority: 0
+```
+
+### SNTP (time) server
+ESPHome takes it's time from Home Assistant, however you can configure it to use a Network Time Server instead.
+```yaml
+# Use my own local network time server
+time:
+ - id: !extend time_provider
+ platform: sntp
+ timezone: Europe/Stockholm
+ servers:
+ - !secret mysntpserver
+ - europe.pool.ntp.org
+ - 0.pool.ntp.org
+```
+
diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml
index 6454b81..b1c70a1 100644
--- a/nspanel_blueprint.yaml
+++ b/nspanel_blueprint.yaml
@@ -18,27 +18,27 @@ blueprint:
The goal was to create a version that allows everyone to use the NSpanel fully local without having to deal with programming or reading hours of documentation - *AND YES WE DID IT!!!!* ;)
- đ Full documentation and installation video is available here [NSPanel Configuration, Setup and HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
+ đ Full documentation and installation video is available here: [NSPanel Configuration, Setup and HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
đ Step by Step - [Setup Video](https://www.youtube.com/watch?v=3afPFg6kUdc)
- đ How to create "Issues" when I have a problem [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki)
+ đ How to create "Issues" when I have a problem: [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki)
- â All Feature Requests can be found here [All Feature Request](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/new%20feature%20request)
+ â All Feature Requests can be found here: [All Feature Request](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/new%20feature%20request)
- đ Roadmap Roadmap can be found here [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap)
+ đ Roadmap can be found here: [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap)
- âčïž Version: v.3.4
+ âčïž Version: v4.0
source_url: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/nspanel_blueprint.yaml
domain: automation
homeassistant:
- min_version: 2022.11.1
+ min_version: 2023.5.0
# yamllint disable rule:line-length
input:
@@ -52,9 +52,9 @@ blueprint:
default: []
selector:
device:
- #filter: # requires 2023.4, so will be implemented later
- # - integration: esphome
- # model: esp32dev
+ filter:
+ - integration: esphome
+ model: esp32dev
multiple: false
##### SYSTEM SETTINGS #####
@@ -64,67 +64,10 @@ blueprint:
*SYSTEM settings*
*Select the language for your NSPanel*
- default: 'ENG'
+ default: en
selector:
- select:
- mode: dropdown
- options:
- - label: 'Bulgarian'
- value: BGR
- - label: 'Croatian'
- value: HRV
- - label: 'Czech'
- value: CZE
- - label: 'Danish'
- value: DNK
- - label: 'Dutch'
- value: NLD
- - label: 'English'
- value: ENG
- - label: 'Estonian'
- value: EST
- - label: 'Finnish'
- value: FIN
- - label: 'French'
- value: FRA
- - label: 'German'
- value: DEU
- - label: 'Greek'
- value: GRC
- - label: 'Hebrew'
- value: HEB
- - label: 'Hungarian'
- value: HUN
- - label: 'Indonesian'
- value: IDN
- - label: 'Italian'
- value: ITA
- - label: 'Latvian'
- value: LVA
- - label: 'Lithuanian'
- value: LTU
- - label: 'Norwegian'
- value: NOR
- - label: 'Polish'
- value: POL
- - label: 'Portuguese'
- value: PRT
- - label: 'Romanian'
- value: ROU
- - label: 'Russian'
- value: RUS
- - label: 'Slovak'
- value: SVK
- - label: 'Slovene'
- value: SVN
- - label: 'Spanish'
- value: ESP
- - label: 'Swedish'
- value: SWE
- - label: 'Turkish'
- value: TUR
- - label: 'Ukrainian'
- value: UKR
+ language:
+ languages: [en, bg, hr, cs, da, nl, et, fi, fr, de, el, he, hu, id, it, lv, lt, nb, pl, pt, ro, ru, sk, sl, es, sv, tr, uk]
date_format:
name: Date Format
description: >
@@ -163,7 +106,7 @@ blueprint:
- label: 'HH:MM (ex. 08:30 and 20:30)'
value: '%H:%M'
- label: 'H:MM AM/PM (ex. 8:30AM and 8:30PM)'
- value: '%-I:%M'
+ value: '%-I:%M %p'
- label: 'H:MM 24H (ex. 8:30 and 20:30)'
value: '%-H:%M'
@@ -179,6 +122,38 @@ blueprint:
min: 0
max: 100
+ wakeup_page:
+ name: Wake-up page
+ description: >
+ *SYSTEM settings*
+
+ *Select the page to show when the system wakes up with a touch in the screen.*
+ default: '0'
+ selector:
+ select:
+ multiple: false
+ options:
+ - label: 'Home page (default)'
+ value: '0'
+ - label: 'Buttons page 01'
+ value: '12'
+ - label: 'Buttons page 02'
+ value: '13'
+ - label: 'Buttons page 03'
+ value: '14'
+ - label: 'Buttons page 04'
+ value: '15'
+ - label: 'Entities page 01'
+ value: '18'
+ - label: 'Entities page 02'
+ value: '19'
+ - label: 'Entities page 03'
+ value: '20'
+ - label: 'Entities page 04'
+ value: '21'
+ - label: 'QR code page'
+ value: '17'
+
##### WEATHER - Page Home / Weather 01-04 #####
##### PLACEHOLDER ######################################################################
placeholder01:
@@ -199,8 +174,9 @@ blueprint:
default: []
selector:
entity:
- domain:
- - weather
+ filter:
+ domain:
+ - weather
##### Page Home #####
##### Temperature - Page Home #####
@@ -211,10 +187,13 @@ blueprint:
*If no outdoor sensor is available, leave the field empty and the value from your selected weather integration will be used automatically*
default: []
- selector:
+ selector: &entity_temp_sensor-selector
entity:
- domain:
- - sensor
+ filter:
+ domain:
+ - sensor
+ device_class:
+ - temperature
home_outdoor_temp_label_color:
name: Outdoor Temperature Sensor - LABEL COLOR (Optional)
description: >
@@ -231,10 +210,7 @@ blueprint:
*An indoor temperature sensor is not necessary. Leave the field empty if you want to use the temperature sensor of the NSPanel. Additionally a temperature correction for the NSPanel sensor is possible under HA Devices. So everyone can adjust the sensor exactly*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_temp_sensor-selector
home_indoor_temp_icon:
name: Indoor Temperature Sensor - ICON (Optional)
description: >
@@ -275,10 +251,11 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
+ selector: &entity_sensor-selector
entity:
- domain:
- - sensor
+ filter:
+ domain:
+ - sensor
home_value01_icon:
name: Sensor 01 - ICON (Optional)
description: >
@@ -310,10 +287,7 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
home_value02_icon:
name: Sensor 02 - ICON (Optional)
description: >
@@ -345,10 +319,7 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
home_value03_icon:
name: Sensor 03 - ICON (Optional)
description: >
@@ -390,12 +361,13 @@ blueprint:
default: []
selector: &chip-entity-selector
entity:
- domain:
- - binary_sensor
- - input_boolean
- - light
- - sensor
- - switch
+ filter:
+ domain:
+ - binary_sensor
+ - input_boolean
+ - light
+ - sensor
+ - switch
chip01_icon:
name: Chip 01 - ICON (Optional)
description: >
@@ -557,6 +529,26 @@ blueprint:
default: [128, 128, 128] #33808 Grey light
selector: *color-selector
+ ##### Alarm Control Panel - Page Alarm
+ ##### PLACEHOLDER ######################################################################
+ placeholder17:
+ name: ' '
+ description: '# â
ALARM CONTROL PANEL â
'
+ default: ' '
+ selector: *placeholder-selector
+ ##### PLACEHOLDER ######################################################################
+ alarm:
+ name: Alarm Control Panel to control from Home page - ENTITY (Optional)
+ description: >
+ *ALARM page*
+
+ *If an entity is selected, the **"Alarm page"** is activated and enabled.
+ default: []
+ selector:
+ entity:
+ filter:
+ domain: alarm_control_panel
+
##### Climate - Page Climate #####
##### PLACEHOLDER ######################################################################
placeholder04:
@@ -574,7 +566,8 @@ blueprint:
default: []
selector:
entity:
- domain: climate
+ filter:
+ domain: climate
## Climate page - Custom buttons
## Climate page - Custom button 01
climate_button08:
@@ -586,20 +579,21 @@ blueprint:
default: []
selector: &climate-custom-button-entity-selector
entity:
- domain:
- - light
- - switch
- - cover
- - input_boolean
- - automation
- - button
- - input_button
- - scene
- - person
- - script
- - binary_sensor
- - fan
- #- climate
+ filter:
+ domain:
+ - light
+ - switch
+ - cover
+ - input_boolean
+ - automation
+ - button
+ - input_button
+ - scene
+ - person
+ - script
+ - binary_sensor
+ - fan
+ #- climate
climate_button08_icon:
name: Custom button 01 - ICON (Optional)
description: >
@@ -669,10 +663,7 @@ blueprint:
*Entity which should be controlled*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
climate_value01_icon:
name: Sensor 01 - ICON (Optional)
description: >
@@ -705,10 +696,7 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
climate_value02_icon:
name: Sensor 02 - ICON (Optional)
description: >
@@ -741,10 +729,7 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
climate_value03_icon:
name: Sensor 03 - ICON (Optional)
description: >
@@ -777,10 +762,7 @@ blueprint:
*Entity which should be displayed*
default: []
- selector:
- entity:
- domain:
- - sensor
+ selector: *entity_sensor-selector
climate_value04_icon:
name: Sensor 04 - ICON (Optional)
description: >
@@ -820,7 +802,7 @@ blueprint:
description: >
*HOME page*
- *activate QR Code page and QR Code Button on the home page* '
+ *activate QR Code page and QR Code Button on the home page*
selector:
boolean:
qrcode_label:
@@ -866,28 +848,6 @@ blueprint:
default: ' '
selector: *placeholder-selector
##### PLACEHOLDER ######################################################################
- hold_delay:
- name: Delay for HW-Button hold in seconds - VALUE
- description: >
- *SYSTEM settings*
-
- *Time in seconds to detect a hold*'
- default: 1.0
- selector:
- number:
- min: 1.0
- max: 10.0
- step: 1.0
- unit_of_measurement: seconds
- relay_1_local_fallback:
- name: Activate relay 1 local fallback - TRUE/FALSE (Optional)
- default: false
- description: >
- *SYSTEM settings*
-
- *activate this to use left button to toggle relay 1 if display is offline*
- selector:
- boolean:
left_button_entity:
name: Left hardware button - ENTITY (Optional)
description: >
@@ -897,23 +857,26 @@ blueprint:
default: []
selector: &hardware-button-selector
entity:
- domain:
- - light
- - switch
- - input_boolean
- - cover
- - automation
- - button
- - input_button
- - scene
- - script
- - fan
+ filter:
+ domain:
+ - light
+ - switch
+ - input_boolean
+ - cover
+ - automation
+ - button
+ - input_button
+ - scene
+ - script
+ - fan
left_button_name:
name: Left hardware button name - LABEL (Optional)
description: >
*HOME page*
*Label which should be displayed (10 characters are supported)*
+
+ Note: This label is not visible on the US landscape model.
default: []
selector:
text: {}
@@ -946,15 +909,6 @@ blueprint:
*LABEL color which should be displayed*
default: [200, 204, 200] #52857 Grey super light
selector: *color-selector
- relay_2_local_fallback:
- name: Activate relay 2 local fallback - TRUE/FALSE (Optional)
- default: false
- description: >
- *SYSTEM settings*
-
- *activate this to use right button to toggle relay 2 if display is offline* '
- selector:
- boolean:
right_button_entity:
name: Right hardware button - ENTITY (Optional)
description: >
@@ -969,6 +923,8 @@ blueprint:
*HOME page*
*Label which should be displayed (10 characters are supported)*
+
+ Note: This label is not visible on the US landscape model.
default: []
selector:
text: {}
@@ -1025,20 +981,21 @@ blueprint:
default: []
selector: &button-entity-selector
entity:
- domain:
- - light
- - switch
- - cover
- - input_boolean
- - automation
- - button
- - input_button
- - scene
- - person
- - script
- - binary_sensor
- - fan
- - climate
+ filter:
+ domain:
+ - light
+ - switch
+ - cover
+ - input_boolean
+ - automation
+ - button
+ - input_button
+ - scene
+ - person
+ - script
+ - binary_sensor
+ - fan
+ - climate
entity01_name:
name: Button 01 name - LABEL (Optional)
description: >
@@ -3503,22 +3460,22 @@ trace:
#############################################################
trigger_variables:
- nspanel_name_temp: !input 'nspanel_name'
- nspanel_entities: '{{ device_entities(nspanel_name_temp) }}'
+ nspanel_deviceid: !input 'nspanel_name'
+ nspanel_entities: '{{ device_entities(nspanel_deviceid) }}'
nspanel_name: >
{% if nspanel_entities | count > 0 %}{{ (nspanel_entities | selectattr(None, "search", "_nextion_display") | list | first).split(".")[1].split("_nextion_display")[0] }}
- {% elif nspanel_name_temp is string %}{{ nspanel_name_temp | replace("-","_") | replace(" ","_") | replace("___","_") | replace("__","_") }}
+ {% elif nspanel_deviceid is string %}{{ nspanel_deviceid | replace("-","_") | replace(" ","_") | replace("___","_") | replace("__","_") }}
{% endif %}
left_button: 'binary_sensor.{{ nspanel_name }}_left_button'
right_button: 'binary_sensor.{{ nspanel_name }}_right_button'
nextion_inited: 'binary_sensor.{{ nspanel_name }}_nextion_display'
nspanelevent: 'sensor.{{ nspanel_name }}_nspanel_event'
+ currentpage: 'sensor.{{ nspanel_name }}_current_page'
relay01_entity: 'switch.{{ nspanel_name }}_relay_1'
relay02_entity: 'switch.{{ nspanel_name }}_relay_2'
nspaneltemp: 'sensor.{{ nspanel_name }}_temperature'
- settings_entity: 'sensor.{{ nspanel_name }}_settings_entity'
- reboot_button: 'button.{{ nspanel_name }}_restart'
switch_sleep_mode: 'switch.{{ nspanel_name }}_sleep_mode'
+ thermostat_embedded: 'climate.{{ nspanel_name }}_thermostat'
##### notification Trigger #####
notification_unread: 'switch.{{ nspanel_name }}_notification_unread'
@@ -3527,8 +3484,7 @@ trigger_variables:
variables:
##### GENERAL #####
- blueprint_version: '3.4'
- language: !input 'language'
+ blueprint_version: '4.0'
date_format_temp: !input 'date_format'
#Avoid breaking change for existing users with legacy type format
date_format: >
@@ -3538,9 +3494,6 @@ variables:
else "%A, " ~ date_format_temp
}}
- time_format: !input 'time_format'
- time: '{{ as_timestamp(now()) | timestamp_custom(time_format) }}'
- meridiem: '{{ as_timestamp(now()) | timestamp_custom("%p") if time_format == "%-I:%M" }}'
sun_is_up: '{{ is_state("sun.sun", "above_horizon") }}'
notification_sound: 'switch.{{ nspanel_name }}_notification_sound'
@@ -3549,7 +3502,7 @@ variables:
nspanel_event: >
{{
states(nspanelevent)
- if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", "", None]
+ if nspanelevent is string and has_value(nspanelevent)
else { "page": "unknown", "component": "unknown", "value": "unknown" }
}}
@@ -3559,38 +3512,47 @@ variables:
##### Nextion dict ####
nextion:
color:
- blue: '1055' # rgb(0, 128, 248)
- grey_dark: '10597' # rgb(40, 44, 40)
- grey_light: '33808' # rgb(128, 128, 128)
- grey_super_light: '52857' # rgb(200, 204, 200)
- red: '63488' # rgb(248, 0, 0)
- white: '65535' # rgb(255, 255, 255)
- yellow: '65472' # rgb(248, 248, 0)
+ blue: [1055] #'1055' # rgb(0, 128, 248)
+ grey_dark: [10597] #'10597' # rgb(40, 44, 40)
+ grey_light: [33808] #'33808' # rgb(128, 128, 128)
+ grey_super_light: [52857] #'52857' # rgb(200, 204, 200)
+ grey_white: [59164] #'59164' # rgb(225, 225, 225)
+ red: [63488] #'63488' # rgb(248, 0, 0)
+ white: [65535] #'65535' # rgb(255, 255, 255)
+ yellow: [65472] #'65472' # rgb(248, 248, 0)
#### Colors from HA Style:
- green: '19818' # rgb(76, 175, 80)
- orange: '64704' # rgb(255, 152, 0)
- cyan: '1530' # rgb(0, 188, 212)
- deep-orange: '64164' # rgb(255, 87, 34)
- amber: '65024' # rgb(255, 193, 7)
- "off": '35921' #8a8a8a
- disabled: '48631' # rgb(189, 189, 189)
+ green: [19818] #'19818' # rgb(76, 175, 80)
+ orange: [64704] #'64704' # rgb(255, 152, 0)
+ cyan: [1530] #'1530' # rgb(0, 188, 212)
+ deep-orange: [64164] #'64164' # rgb(255, 87, 34)
+ amber: [65024] #'65024' # rgb(255, 193, 7)
+ "off": [35921] #'35921' #8a8a8a
+ disabled: [48631] #'48631' # rgb(189, 189, 189)
+ unavailable: [6339] #'6339'
command:
- text_printf: 'esphome.{{ nspanel_name }}_send_command_text_printf'
- value: 'esphome.{{ nspanel_name }}_send_command_value'
- printf: 'esphome.{{ nspanel_name }}_send_command_printf'
- font_color: 'esphome.{{ nspanel_name }}_send_command_font_color'
- background_color: 'esphome.{{ nspanel_name }}_send_command_background_color'
- notification_show: 'esphome.{{ nspanel_name }}_notification_show'
- notification_clear: 'esphome.{{ nspanel_name }}_notification_clear'
- play_rtttl: 'esphome.{{ nspanel_name }}_play_rtttl'
- set_settings_entity: 'esphome.{{ nspanel_name }}_set_settings_entity'
+ alarm_settings: 'esphome.{{ nspanel_name }}_alarm_settings'
+ #background_color: 'esphome.{{ nspanel_name }}_send_command_background_color'
+ #font_color: 'esphome.{{ nspanel_name }}_send_command_font_color'
+ global_settings: 'esphome.{{ nspanel_name }}_global_settings'
hide: 'esphome.{{ nspanel_name }}_send_command_hide'
+ notification_clear: 'esphome.{{ nspanel_name }}_notification_clear'
+ #notification_show: 'esphome.{{ nspanel_name }}_notification_show'
+ open_entity_settings_page: 'esphome.{{ nspanel_name }}_open_entity_settings_page'
+ page_home: 'esphome.{{ nspanel_name }}_page_home'
+ page_settings: 'esphome.{{ nspanel_name }}_page_settings'
+ #play_rtttl: 'esphome.{{ nspanel_name }}_play_rtttl'
+ printf: 'esphome.{{ nspanel_name }}_send_command_printf'
+ qrcode: 'esphome.{{ nspanel_name }}_qrcode'
+ set_button: 'esphome.{{ nspanel_name }}_set_button'
+ set_climate: 'esphome.{{ nspanel_name }}_set_climate'
+ set_component_color: 'esphome.{{ nspanel_name }}_set_component_color'
+ set_entity: 'esphome.{{ nspanel_name }}_set_entity'
show: 'esphome.{{ nspanel_name }}_send_command_show'
show_all: 'esphome.{{ nspanel_name }}_send_command_show_all'
+ text_printf: 'esphome.{{ nspanel_name }}_send_command_text_printf'
tft_upload: 'esphome.{{ nspanel_name }}_upload_tft'
- set_button: 'esphome.{{ nspanel_name }}_set_button'
- set_entity: 'esphome.{{ nspanel_name }}_set_entity'
- set_climate: 'esphome.{{ nspanel_name }}_set_climate'
+ value: 'esphome.{{ nspanel_name }}_send_command_value'
+ wake_up: 'esphome.{{ nspanel_name }}_wake_up'
icon:
domain:
automation: "\uF6FC" #F6FC
@@ -3616,29 +3578,9 @@ variables:
gauge: "\uE299" #E299
unknown: '{{ all_icons.unknown }}' #"\uE2D5"
pic:
- hvac:
- button:
- blank: "79"
- "off": "80"
- "on": "81"
- unknown: "79"
- hardware:
- button:
- "off": "77"
- closed: "77"
- closing: "77"
- "false": "77"
- "on": "78"
- open: "78"
- opened: "78"
- "true": "78"
button:
- "off": "101"
- "on": "102"
- heating:
- button:
- "off": "82"
- "on": "83"
+ "off": "35"
+ "on": "36"
weather:
sunny: '{{ "2" if sun_is_up else "15"}}' #some weather providers returns "sunny" for "clear-night"
cloudy: "3"
@@ -3654,6 +3596,7 @@ variables:
lightning: "10"
partlycloudy: '{{ "11" if sun_is_up else "12"}}'
lightning_rainy: '{{ "13" if sun_is_up else "14"}}'
+ lightning-rainy: '{{ "13" if sun_is_up else "14"}}'
execptional: '{{ "13" if sun_is_up else "14"}}'
clear_night: "15"
clear-night: "15"
@@ -3661,6 +3604,7 @@ variables:
unavailable: ""
page:
+ current: '{{ states(currentpage) }}'
home: "home"
weatherpages:
- "weather01"
@@ -3672,8 +3616,9 @@ variables:
settings: "settings"
boot: "boot"
screensaver: "screensaver"
- light: "lightsettings"
- cover: "coversettings"
+ light: "light"
+ cover: "cover"
+ fan: "fan"
buttonpages:
- "buttonpage01"
- "buttonpage02"
@@ -3686,10 +3631,15 @@ variables:
- "entitypage02"
- "entitypage03"
- "entitypage04"
+ alarm: "alarm"
+ keyb_num: "keyb_num"
##### MUI Multilingual User Interface #####
+ language_tmp: !input 'language'
+ language: '{{ language_tmp if language_tmp is string and language_tmp in ["bg", "hr", "cs", "da", "nl", "et", "fi", "fr", "de", "el", "he", "hu", "id", "it", "lv", "lt", "nb", "pl", "pt", "ro", "ru", "sk", "sl", "es", "sv", "tr", "uk"] else "en" }}'
+
mui:
- BGR:
+ bg: #Bulgarian
weekdays:
mon: ĐĐŸĐœĐ”ĐŽĐ”Đ»ĐœĐžĐș
tue: ĐŃĐŸŃĐœĐžĐș
@@ -3746,7 +3696,21 @@ variables:
please_confirm: ĐĐŸĐ»Ń, ĐżĐŸŃĐČŃŃĐŽĐ”ŃĐ”
unavailable: ĐĐ”ĐŽĐŸŃŃŃĐżĐ”Đœ
no_name: ĐŃĐŒĐ° ĐžĐŒĐ”
- CZE:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ cs: #Czech
weekdays:
mon: PondÄlĂ
tue: ĂterĂœ
@@ -3803,64 +3767,21 @@ variables:
please_confirm: PotvrÄte prosĂm
unavailable: Unavailable
no_name: No name
- DEU: #German
- weekdays:
- mon: Montag
- tue: Dienstag
- wed: Mittwoch
- thu: Donnerstag
- fri: Freitag
- sat: Samstag
- sun: Sonntag
- weekdays_short:
- mon: Mo.
- tue: Di.
- wed: Mi.
- thu: Do.
- fri: Fr.
- sat: Sa.
- sun: So.
- months:
- jan: Januar
- feb: Februar
- mar: MĂ€rz
- apr: April
- may: Mai
- jun: Juni
- jul: Juli
- aug: August
- sep: September
- oct: Oktober
- nov: November
- dec: Dezember
- months_short:
- jan: Jan.
- feb: Feb.
- mar: MĂ€rz
- apr: Apr.
- may: Mai
- jun: Jun.
- jul: Jul.
- aug: Aug.
- sep: Sept.
- oct: Okt.
- nov: Nov.
- dec: Dez.
- relative_day:
- today: Heute
- tomorrow: Morgen
- in_2_days: in 2 Tagen
- in_3_days: in 3 Tagen
- in_4_days: in 4 Tagen
- climate:
- states:
- "on": ein
- "off": aus
- heat: heizen
- please_confirm: Bitte bestÀtigen
- unavailable: Unavailable
- no_name: No name
- DNK:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ da: #Danish
weekdays:
mon: Mandag
tue: Tirsdag
@@ -3917,292 +3838,92 @@ variables:
please_confirm: BekrĂŠft venligst
unavailable: Unavailable
no_name: No name
- ENG: #English
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ de: #German
weekdays:
- mon: Monday
- tue: Tuesday
- wed: Wednesday
- thu: Thursday
- fri: Friday
- sat: Saturday
- sun: Sunday
+ mon: Montag
+ tue: Dienstag
+ wed: Mittwoch
+ thu: Donnerstag
+ fri: Freitag
+ sat: Samstag
+ sun: Sonntag
weekdays_short:
- mon: Mon
- tue: Tue
- wed: Wed
- thu: Thu
- fri: Fri
- sat: Sat
- sun: Sun
+ mon: Mo.
+ tue: Di.
+ wed: Mi.
+ thu: Do.
+ fri: Fr.
+ sat: Sa.
+ sun: So.
months:
- jan: January
- feb: February
- mar: March
+ jan: Januar
+ feb: Februar
+ mar: MĂ€rz
apr: April
- may: May
- jun: June
- jul: July
+ may: Mai
+ jun: Juni
+ jul: Juli
aug: August
sep: September
- oct: October
+ oct: Oktober
nov: November
- dec: December
+ dec: Dezember
months_short:
- jan: Jan
- feb: Feb
- mar: Mar
- apr: Apr
- may: May
- jun: Jun
- jul: Jul
- aug: Aug
- sep: Sep
- oct: Oct
- nov: Nov
- dec: Dec
- relative_day:
- today: Today
- tomorrow: Tomorrow
- in_2_days: In 2 days
- in_3_days: In 3 days
- in_4_days: In 4 days
- climate:
- states:
- "on": on
- "off": off
- heat: heat
- please_confirm: Please confirm
- unavailable: Unavailable
- no_name: No name
- ESP: #Spanish
- weekdays:
- mon: Lunes
- tue: Martes
- wed: Miércoles
- thu: Jueves
- fri: Viernes
- sat: SĂĄbado
- sun: Domingo
- weekdays_short:
- mon: Lun
- tue: Mar
- wed: Mie
- thu: Jue
- fri: Vie
- sat: Sab
- sun: Dom
- months:
- jan: Enero
- feb: Febrero
- mar: Marzo
- apr: Abril
- may: Mayo
- jun: Junio
- jul: Julio
- aug: Agosto
- sep: Septiembre
- oct: Octubre
- nov: Noviembre
- dec: Diciembre
- months_short:
- jan: Ene
- feb: Feb
- mar: Mar
- apr: Abr
- may: May
- jun: Jun
- jul: Jul
- aug: Ago
- sep: Sep
- oct: Oct
- nov: Nov
- dec: Dic
- relative_day:
- today: Hoy
- tomorrow: Mañana
- in_2_days: En 2 dĂas
- in_3_days: En 3 dĂas
- in_4_days: En 4 dĂas
- climate:
- states:
- "on": Encendido
- "off": Apagado
- heat: calor
- please_confirm: Por favor, confirme
- unavailable: No disponible
- no_name: Sin nombre
- EST:
- weekdays:
- mon: EsmaspÀev
- tue: TeisipÀev
- wed: KolmapÀev
- thu: NeljapÀev
- fri: Reede
- sat: LaupÀev
- sun: PĂŒhapĂ€ev
- weekdays_short:
- mon: Mon
- tue: Tue
- wed: Wed
- thu: Thu
- fri: Fri
- sat: Sat
- sun: Sun
- months:
- jan: January
- feb: February
- mar: March
- apr: April
- may: May
- jun: June
- jul: July
- aug: August
- sep: September
- oct: October
- nov: November
- dec: December
- months_short:
- jan: Jan
- feb: Feb
- mar: Mar
- apr: Apr
- may: May
- jun: Jun
- jul: Jul
- aug: Aug
- sep: Sep
- oct: Oct
- nov: Nov
- dec: Dec
- relative_day:
- today: TĂ€na
- tomorrow: Homme
- in_2_days: 2 pÀeva pÀrast
- in_3_days: 3 pÀeva pÀrast
- in_4_days: 4 pÀeva pÀrast
- climate:
- states:
- "on": aadressil
- "off": vÀlja
- heat: soojus
- please_confirm: Palun kinnitage
- unavailable: Unavailable
- no_name: No name
- FIN: #Finnish
- weekdays:
- mon: Maanantai
- tue: Tiistai
- wed: Keskiviikko
- thu: Torstai
- fri: Perjantai
- sat: Lauantai
- sun: Sunnuntai
- weekdays_short:
- mon: Ma
- tue: Ti
- wed: Ke
- thu: To
- fri: Pe
- sat: La
- sun: Su
- months:
- jan: Tammikuu
- feb: Helmikuu
- mar: Maaliskuu
- apr: Huhtikuu
- may: Toukokuu
- jun: KesÀkuu
- jul: HeinÀkuu
- aug: Elokuu
- sep: Syyskuu
- oct: Lokakuu
- nov: Marraskuu
- dec: Joulukuu
- months_short:
- jan: Tammi
- feb: Helmi
- mar: Maalis
- apr: Huhti
- may: Touko
- jun: KesÀ
- jul: HeinÀ
- aug: Elo
- sep: Syys
- oct: Loka
- nov: Marras
- dec: Joulu
- relative_day:
- today: TÀnÀÀn
- tomorrow: Huomenna
- in_2_days: 2 pÀivÀn pÀÀstÀ
- in_3_days: 3 pÀivÀn pÀÀstÀ
- in_4_days: 4 pÀivÀn pÀÀstÀ
- climate:
- states:
- "on": "On"
- "off": "Off"
- heat: lÀmpö
- please_confirm: Vahvista
- unavailable: Unavailable
- no_name: No name
- FRA: #French
- weekdays:
- mon: Lundi
- tue: Mardi
- wed: Mercredi
- thu: Jeudi
- fri: Vendredi
- sat: Samedi
- sun: Dimanche
- weekdays_short:
- mon: Lun
- tue: Mar
- wed: Mer
- thu: Jeu
- fri: Ven
- sat: Sam
- sun: Dim
- months:
- jan: Janvier
- feb: Février
- mar: Mars
- apr: Avril
+ jan: Jan.
+ feb: Feb.
+ mar: MĂ€rz
+ apr: Apr.
may: Mai
- jun: Juin
- jul: Juillet
- aug: Août
- sep: Septembre
- oct: Octobre
- nov: Novembre
- dec: Decembre
- months_short:
- jan: Jan
- feb: Feb
- mar: Mar
- apr: Apr
- may: Mai
- jun: Jun
- jul: Jul
- aug: AoĂ»
- sep: Sep
- oct: Oct
- nov: Nov
- dec: Dec
+ jun: Jun.
+ jul: Jul.
+ aug: Aug.
+ sep: Sept.
+ oct: Okt.
+ nov: Nov.
+ dec: Dez.
relative_day:
- today: Aujourd hui
- tomorrow: Demain
- in_2_days: Dans 2 jours
- in_3_days: Dans 3 jours
- in_4_days: Dans 4 jours
+ today: Heute
+ tomorrow: Morgen
+ in_2_days: in 2 Tagen
+ in_3_days: in 3 Tagen
+ in_4_days: in 4 Tagen
climate:
states:
- "on": on
- "off": off
- heat: Chaleur
- please_confirm: Veuillez confirmer
- unavailable: Indisponible
- no_name: Sans nom
- GRC: #Greek
+ "on": ein
+ "off": aus
+ heat: heizen
+ please_confirm: Bitte bestÀtigen
+ unavailable: Unavailable
+ no_name: No name
+ alarm:
+ home: Zuhause
+ away: Abwesend
+ night: Nacht
+ vacation: Urlaub
+ bypass: Bypass
+ disarm: Deaktiviert
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ el: #Greek
weekdays:
mon: ÎΔÏ
ÏÎÏα
tue: ΀ÏÎŻÏη
@@ -4259,7 +3980,376 @@ variables:
please_confirm: ΠαÏαÎșÎ±Î»Ï Î”ÏÎčÎČΔÎČαÎčÏÏÏΔ
unavailable: Îη ÎŽÎčαΞÎÏÎčÎŒÎż
no_name: ΧÏÏÎŻÏ ÏÎœÎżÎŒÎ±
- HEB: #Hebrew
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ en: #English
+ weekdays:
+ mon: Monday
+ tue: Tuesday
+ wed: Wednesday
+ thu: Thursday
+ fri: Friday
+ sat: Saturday
+ sun: Sunday
+ weekdays_short:
+ mon: Mon
+ tue: Tue
+ wed: Wed
+ thu: Thu
+ fri: Fri
+ sat: Sat
+ sun: Sun
+ months:
+ jan: January
+ feb: February
+ mar: March
+ apr: April
+ may: May
+ jun: June
+ jul: July
+ aug: August
+ sep: September
+ oct: October
+ nov: November
+ dec: December
+ months_short:
+ jan: Jan
+ feb: Feb
+ mar: Mar
+ apr: Apr
+ may: May
+ jun: Jun
+ jul: Jul
+ aug: Aug
+ sep: Sep
+ oct: Oct
+ nov: Nov
+ dec: Dec
+ relative_day:
+ today: Today
+ tomorrow: Tomorrow
+ in_2_days: In 2 days
+ in_3_days: In 3 days
+ in_4_days: In 4 days
+ climate:
+ states:
+ "on": on
+ "off": off
+ heat: heat
+ please_confirm: Please confirm
+ unavailable: Unavailable
+ no_name: No name
+ alarm:
+ home: Home
+ away: Away
+ night: Night
+ vacation: Holiday
+ bypass: Custom bypass
+ disarm: Disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep mode
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ es: #Spanish
+ weekdays:
+ mon: Lunes
+ tue: Martes
+ wed: Miércoles
+ thu: Jueves
+ fri: Viernes
+ sat: SĂĄbado
+ sun: Domingo
+ weekdays_short:
+ mon: Lun
+ tue: Mar
+ wed: Mie
+ thu: Jue
+ fri: Vie
+ sat: Sab
+ sun: Dom
+ months:
+ jan: Enero
+ feb: Febrero
+ mar: Marzo
+ apr: Abril
+ may: Mayo
+ jun: Junio
+ jul: Julio
+ aug: Agosto
+ sep: Septiembre
+ oct: Octubre
+ nov: Noviembre
+ dec: Diciembre
+ months_short:
+ jan: Ene
+ feb: Feb
+ mar: Mar
+ apr: Abr
+ may: May
+ jun: Jun
+ jul: Jul
+ aug: Ago
+ sep: Sep
+ oct: Oct
+ nov: Nov
+ dec: Dic
+ relative_day:
+ today: Hoy
+ tomorrow: Mañana
+ in_2_days: En 2 dĂas
+ in_3_days: En 3 dĂas
+ in_4_days: En 4 dĂas
+ climate:
+ states:
+ "on": Encendido
+ "off": Apagado
+ heat: calor
+ please_confirm: Por favor, confirme
+ unavailable: No disponible
+ no_name: Sin nombre
+ alarm:
+ home: Casa
+ away: Fuera
+ night: Noche
+ vacation: Vacaciones
+ bypass: Bypass
+ disarm: Desarmar
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ et: #Estonian
+ weekdays:
+ mon: EsmaspÀev
+ tue: TeisipÀev
+ wed: KolmapÀev
+ thu: NeljapÀev
+ fri: Reede
+ sat: LaupÀev
+ sun: PĂŒhapĂ€ev
+ weekdays_short:
+ mon: Mon
+ tue: Tue
+ wed: Wed
+ thu: Thu
+ fri: Fri
+ sat: Sat
+ sun: Sun
+ months:
+ jan: January
+ feb: February
+ mar: March
+ apr: April
+ may: May
+ jun: June
+ jul: July
+ aug: August
+ sep: September
+ oct: October
+ nov: November
+ dec: December
+ months_short:
+ jan: Jan
+ feb: Feb
+ mar: Mar
+ apr: Apr
+ may: May
+ jun: Jun
+ jul: Jul
+ aug: Aug
+ sep: Sep
+ oct: Oct
+ nov: Nov
+ dec: Dec
+ relative_day:
+ today: TĂ€na
+ tomorrow: Homme
+ in_2_days: 2 pÀeva pÀrast
+ in_3_days: 3 pÀeva pÀrast
+ in_4_days: 4 pÀeva pÀrast
+ climate:
+ states:
+ "on": aadressil
+ "off": vÀlja
+ heat: soojus
+ please_confirm: Palun kinnitage
+ unavailable: Unavailable
+ no_name: No name
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ fi: #Finnish
+ weekdays:
+ mon: Maanantai
+ tue: Tiistai
+ wed: Keskiviikko
+ thu: Torstai
+ fri: Perjantai
+ sat: Lauantai
+ sun: Sunnuntai
+ weekdays_short:
+ mon: Ma
+ tue: Ti
+ wed: Ke
+ thu: To
+ fri: Pe
+ sat: La
+ sun: Su
+ months:
+ jan: Tammikuu
+ feb: Helmikuu
+ mar: Maaliskuu
+ apr: Huhtikuu
+ may: Toukokuu
+ jun: KesÀkuu
+ jul: HeinÀkuu
+ aug: Elokuu
+ sep: Syyskuu
+ oct: Lokakuu
+ nov: Marraskuu
+ dec: Joulukuu
+ months_short:
+ jan: Tammi
+ feb: Helmi
+ mar: Maalis
+ apr: Huhti
+ may: Touko
+ jun: KesÀ
+ jul: HeinÀ
+ aug: Elo
+ sep: Syys
+ oct: Loka
+ nov: Marras
+ dec: Joulu
+ relative_day:
+ today: TÀnÀÀn
+ tomorrow: Huomenna
+ in_2_days: 2 pÀivÀn pÀÀstÀ
+ in_3_days: 3 pÀivÀn pÀÀstÀ
+ in_4_days: 4 pÀivÀn pÀÀstÀ
+ climate:
+ states:
+ "on": "On"
+ "off": "Off"
+ heat: lÀmpö
+ please_confirm: Vahvista
+ unavailable: Unavailable
+ no_name: No name
+ alarm:
+ home: Kotona
+ away: Poissa
+ night: Yö
+ vacation: Loma
+ bypass: Ohitus
+ disarm: Pois
+ settings:
+ reboot: UudelleenkÀynnistys
+ sleep: Lepotila
+ brightness: Kirkkaus
+ bright: Kirkas
+ dimming: Himmennys
+ dim: HimmeÀ
+ fr: #French
+ weekdays:
+ mon: Lundi
+ tue: Mardi
+ wed: Mercredi
+ thu: Jeudi
+ fri: Vendredi
+ sat: Samedi
+ sun: Dimanche
+ weekdays_short:
+ mon: Lun
+ tue: Mar
+ wed: Mer
+ thu: Jeu
+ fri: Ven
+ sat: Sam
+ sun: Dim
+ months:
+ jan: Janvier
+ feb: Février
+ mar: Mars
+ apr: Avril
+ may: Mai
+ jun: Juin
+ jul: Juillet
+ aug: Août
+ sep: Septembre
+ oct: Octobre
+ nov: Novembre
+ dec: Decembre
+ months_short:
+ jan: Jan
+ feb: Feb
+ mar: Mar
+ apr: Apr
+ may: Mai
+ jun: Jun
+ jul: Jul
+ aug: AoĂ»
+ sep: Sep
+ oct: Oct
+ nov: Nov
+ dec: Dec
+ relative_day:
+ today: Aujourd hui
+ tomorrow: Demain
+ in_2_days: Dans 2 jours
+ in_3_days: Dans 3 jours
+ in_4_days: Dans 4 jours
+ climate:
+ states:
+ "on": on
+ "off": off
+ heat: Chaleur
+ please_confirm: Veuillez confirmer
+ unavailable: Indisponible
+ no_name: Sans nom
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ he: #Hebrew
weekdays:
mon: ŚŚ Ś©
tue: ŚŚ©ŚŚŚ©
@@ -4316,7 +4406,21 @@ variables:
please_confirm: ŚšŚ©Ś ŚŚ©Ś§ŚŚ
unavailable: Unavailable
no_name: No name
- HRV: #Croatian
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ hr: #Croatian
weekdays:
mon: Ponedjeljak
tue: Utorak
@@ -4373,7 +4477,21 @@ variables:
please_confirm: Molim potvrdite
unavailable: Nedostupno
no_name: Bez imena
- HUN:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ hu: #Hungarian
weekdays:
mon: HĂ©tfĆ
tue: Kedd
@@ -4430,7 +4548,21 @@ variables:
please_confirm: KĂ©rjĂŒk, erĆsĂtse meg
unavailable: Unavailable
no_name: No name
- IDN:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ id: #Indonesian
weekdays:
mon: Senin
tue: Selasa
@@ -4487,7 +4619,21 @@ variables:
please_confirm: Mohon konfirmasi
unavailable: Unavailable
no_name: No name
- ITA: #Italian
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ it: #Italian
weekdays:
mon: LunedĂŹ
tue: MartedĂŹ
@@ -4533,18 +4679,32 @@ variables:
relative_day:
today: Oggi
tomorrow: Domani
- in_2_days: in 2 giorni
- in_3_days: in 3 giorni
- in_4_days: in 4 giorni
+ in_2_days: Dopodomani
+ in_3_days: In 3 giorni
+ in_4_days: In 4 giorni
climate:
states:
"on": on
"off": off
- heat: caldo
+ heat: Riscaldamento
please_confirm: Confermare
unavailable: Unavailable
no_name: No name
- LTU:
+ alarm:
+ home: Casa
+ away: Fuori di Casa
+ night: Notte
+ vacation: Vacanza
+ bypass: Bypass
+ disarm: Disarmato
+ settings:
+ reboot: Riavvio
+ sleep: ModalitĂ ECO
+ brightness: "In uso:" #LuminositĂ
+ bright: "In uso:" #( If the meaning is "Bright Mode" you can also say "ModalitĂ Luminosa)
+ dimming: Regolazione
+ dim: Reg.
+ lt: #Lithuanian
weekdays:
mon: Pirmadienis
tue: Antradienis
@@ -4601,7 +4761,21 @@ variables:
please_confirm: PraĆĄome patvirtinti
unavailable: Unavailable
no_name: No name
- LVA:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ lv: #Latvian
weekdays:
mon: Pirmdiena
tue: Otrdiena
@@ -4658,64 +4832,21 @@ variables:
please_confirm: Lƫdzu, apstipriniet
unavailable: Unavailable
no_name: No name
- NLD:
- weekdays:
- mon: Maandag
- tue: Dinsdag
- wed: Woensdag
- thu: Donderdag
- fri: Vrijdag
- sat: Zaterdag
- sun: Zondag
- weekdays_short:
- mon: Mon
- tue: Tue
- wed: Wed
- thu: Thu
- fri: Fri
- sat: Sat
- sun: Sun
- months:
- jan: January
- feb: February
- mar: March
- apr: April
- may: May
- jun: June
- jul: July
- aug: August
- sep: September
- oct: October
- nov: November
- dec: December
- months_short:
- jan: Jan
- feb: Feb
- mar: Mar
- apr: Apr
- may: May
- jun: Jun
- jul: Jul
- aug: Aug
- sep: Sep
- oct: Oct
- nov: Nov
- dec: Dec
- relative_day:
- today: Vandaag
- tomorrow: Morgen
- in_2_days: in 2 dagen
- in_3_days: in 3 dagen
- in_4_days: in 4 dagen
- climate:
- states:
- "on": aan
- "off": uit
- heat: verwarm
- please_confirm: Bevestig alstublieft
- unavailable: Unavailable
- no_name: No name
- NOR: #Norwegian
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ nb: #Norwegian
weekdays:
mon: Mandag
tue: Tirsdag
@@ -4772,7 +4903,92 @@ variables:
please_confirm: Vennligst bekreft
unavailable: Unavailable
no_name: No name
- POL: #Polish
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ nl: #Dutch
+ weekdays:
+ mon: Maandag
+ tue: Dinsdag
+ wed: Woensdag
+ thu: Donderdag
+ fri: Vrijdag
+ sat: Zaterdag
+ sun: Zondag
+ weekdays_short:
+ mon: Ma
+ tue: Di
+ wed: Wo
+ thu: Do
+ fri: Vr
+ sat: Za
+ sun: Zo
+ months:
+ jan: Januari
+ feb: Februari
+ mar: Maart
+ apr: April
+ may: Mei
+ jun: Juni
+ jul: Juli
+ aug: Augustus
+ sep: September
+ oct: Oktober
+ nov: November
+ dec: December
+ months_short:
+ jan: Jan
+ feb: Feb
+ mar: Mar
+ apr: Apr
+ may: Mei
+ jun: Jun
+ jul: Jul
+ aug: Aug
+ sep: Sep
+ oct: Okt
+ nov: Nov
+ dec: Dec
+ relative_day:
+ today: Vandaag
+ tomorrow: Morgen
+ in_2_days: Overmorgen
+ in_3_days: Over 3 dagen
+ in_4_days: Over 4 dagen
+ climate:
+ states:
+ "on": aan
+ "off": uit
+ heat: verwarm
+ please_confirm: Bevestig
+ unavailable: Niet beschikbaar
+ no_name: Geen naam
+ alarm:
+ home: Thuis
+ away: Weg
+ night: Nacht
+ vacation: Vakantie
+ bypass: Omzeil
+ disarm: Ontgrendel
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ pl: #Polish
weekdays:
mon: PoniedziaĆek
tue: Wtorek
@@ -4829,7 +5045,21 @@ variables:
please_confirm: ProszÄ o potwierdzenie
unavailable: NiedostÄpny
no_name: Bez nazwy
- PRT: #Portuguese
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ pt: #Portuguese
weekdays:
mon: Segunda-feira
tue: Terça-feira
@@ -4886,7 +5116,21 @@ variables:
please_confirm: Confirme, por favor
unavailable: IndisponĂvel
no_name: Sem nome
- ROU:
+ alarm:
+ home: Em casa
+ away: Ausente
+ night: Noturno
+ vacation: Férias
+ bypass: Personalizado
+ disarm: Desarmar
+ settings:
+ reboot: Reiniciar
+ sleep: Dormir
+ brightness: Brilho
+ bright: Normal
+ dimming: Escuro
+ dim: Escuro
+ ro: #Romanian
weekdays:
mon: Luni
tue: MarÈi
@@ -4943,7 +5187,21 @@ variables:
please_confirm: VÄ rugÄm sÄ confirmaÈi
unavailable: Unavailable
no_name: No name
- RUS:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ ru: #Russian
weekdays:
mon: ĐĐŸĐœĐ”ĐŽĐ”Đ»ŃĐœĐžĐș
tue: ĐŃĐŸŃĐœĐžĐș
@@ -5000,7 +5258,21 @@ variables:
please_confirm: ĐĐŸĐ¶Đ°Đ»ŃĐčŃŃа, ĐżĐŸĐŽŃĐČĐ”ŃĐŽĐžŃĐ”
unavailable: Unavailable
no_name: No name
- SVK:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ sk: #Slovak
weekdays:
mon: Pondelok
tue: Utorok
@@ -5057,7 +5329,21 @@ variables:
please_confirm: PotvrÄte, prosĂm
unavailable: Unavailable
no_name: No name
- SVN:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ sl: #Slovenian
weekdays:
mon: Ponedeljek
tue: Torek
@@ -5067,24 +5353,24 @@ variables:
sat: Sobota
sun: Nedelja
weekdays_short:
- mon: Mon
- tue: Tue
- wed: Wed
- thu: Thu
- fri: Fri
- sat: Sat
- sun: Sun
+ mon: Pon
+ tue: Tor
+ wed: Sre
+ thu: Äet
+ fri: Pet
+ sat: Sob
+ sun: Ned
months:
- jan: January
- feb: February
- mar: March
+ jan: Januar
+ feb: Februar
+ mar: Marec
apr: April
- may: May
- jun: June
- jul: July
- aug: August
+ may: Maj
+ jun: Junij
+ jul: Julij
+ aug: Avgust
sep: September
- oct: October
+ oct: Oktober
nov: November
dec: December
months_short:
@@ -5092,12 +5378,12 @@ variables:
feb: Feb
mar: Mar
apr: Apr
- may: May
+ may: Maj
jun: Jun
jul: Jul
- aug: Aug
+ aug: Avg
sep: Sep
- oct: Oct
+ oct: Okt
nov: Nov
dec: Dec
relative_day:
@@ -5114,7 +5400,21 @@ variables:
please_confirm: Prosimo, potrdite
unavailable: Unavailable
no_name: No name
- SWE: #Swedish
+ alarm:
+ home: Doma
+ away: Odsoten
+ night: NoÄ
+ vacation: Dopust
+ bypass: ObmoÄje izlopljeno
+ disarm: Izklop
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ sv: #Swedish
weekdays:
mon: MÄndag
tue: Tisdag
@@ -5171,7 +5471,21 @@ variables:
please_confirm: VÀnligen bekrÀfta
unavailable: OtillgÀnglig
no_name: Inget namn
- TUR:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ tr: #Turkish
weekdays:
mon: Pazartesi
tue: Salı
@@ -5228,7 +5542,21 @@ variables:
please_confirm: LĂŒtfen onaylayın
unavailable: Unavailable
no_name: No name
- UKR:
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
+ uk: #Ukrainian
weekdays:
mon: ĐĐŸĐœĐ”ĐŽŃĐ»ĐŸĐș
tue: ĐŃĐČŃĐŸŃĐŸĐș
@@ -5285,6 +5613,20 @@ variables:
please_confirm: ĐŃĐŽŃ Đ»Đ°ŃĐșа, ĐżŃĐŽŃĐČĐ”ŃĐŽŃŃŃ
unavailable: Unavailable
no_name: No name
+ alarm:
+ home: home
+ away: away
+ night: night
+ vacation: vacation
+ bypass: bypass
+ disarm: disarm
+ settings:
+ reboot: Reboot
+ sleep: Sleep
+ brightness: Brightness
+ bright: Bright
+ dimming: Dimming
+ dim: Dim
##### WEATHER ####
weather_entity_tmp: !input 'weather_entity' # used only during the creation of weather in variables
@@ -5294,113 +5636,61 @@ variables:
{% endif %}
temperature_units: "°"
- ##### Home page #####
- page_home:
- buttons: ### Feature Buttons ###
- - icon: "" # NOT IN USE
- color_rgb:
- "on": "" # NOT IN USE
- "off": "" # NOT IN USE
- - icon: "" # NOT IN USE
- color_rgb:
- "on": "" # NOT IN USE
- "off": "" # NOT IN USE
- - icon: "" # NOT IN USE
- color_rgb:
- "on": "" # NOT IN USE
- "off": "" # NOT IN USE
- - icon: !input 'home_button04_icon' #E1ED
- color_rgb:
- "on": !input 'home_button04_icon_color01'
- "off": !input 'home_button04_icon_color02'
- - icon: !input 'home_button05_icon' #E432
- color_rgb:
- "on": !input 'home_button05_icon_color'
- "off": "" # NOT IN USE
- - icon: !input 'home_button06_icon' #EDCF
- color_rgb:
- "on": !input 'home_button06_icon_color'
- "off": "" # NOT IN USE
- - icon: "" # NOT IN USE
- color_rgb:
- "on": "" # NOT IN USE
- "off": "" # NOT IN USE
- general:
- outdoor_temp:
- label:
- color_rgb: !input 'home_outdoor_temp_label_color'
- indoor_temp:
- icon:
- icon: !input 'home_indoor_temp_icon' #E50E
- color_rgb: !input 'home_indoor_temp_icon_color'
- label:
- color_rgb: !input 'home_indoor_temp_label_color'
- time:
- label:
- color_rgb: !input 'time_label_color'
- date:
- label:
- color_rgb: !input 'date_label_color'
- hardware:
- buttons: #### HARDWARE BUTTONS #####
- left:
- entity: !input 'left_button_entity'
- name: !input 'left_button_name'
- color_rgb: !input 'left_button_color'
- hold_select: !input 'left_button_hold_select'
- #custom_action: !input 'left_button_hold_custom_action'
- right:
- entity: !input 'right_button_entity'
- name: !input 'right_button_name'
- color_rgb: !input 'right_button_color'
- hold_select: !input 'right_button_hold_select'
- #custom_action: !input 'right_button_hold_custom_action'
##### Climate page #####
page_climate:
buttons:
hvac_mode:
- mode: auto
- icon: calendar-sync
- color: green
+ icon: calendar-sync #ee8d
+ color: green #'19818'
component: button01
- mode: heat_cool
- icon: autorenew
- color: amber
+ icon: autorenew #e069
+ color: amber #'65024'
component: button02
- mode: heat
- icon: fire
- color: deep-orange
+ icon: fire #e237
+ color: deep-orange #'64164'
component: button03
- mode: cool
- icon: snowflake
- color: blue
+ icon: snowflake #e716
+ color: blue #'1055'
component: button04
- mode: dry
- icon: water-percent
- color: orange
+ icon: water-percent #e58d
+ color: orange #'64704'
component: button05
- mode: fan_only
- icon: fan
- color: cyan
+ icon: fan #e20f
+ color: cyan #'1530'
component: button06
- mode: "off"
- icon: power
- color: "off"
+ icon: power #e424
+ color: "off" #'35921'
component: button07
- qrcode_enabled: !input 'qrcode_enabled'
###### SYNC SETTINGS #####
delay_value: !input 'delay'
##### GENERAL ENTITYS #####
- outdoortemp: !input 'outdoortemp'
- indoortemp: !input 'indoortemp'
climate: !input 'climate'
- relay_1_local_fallback: !input 'relay_1_local_fallback'
- relay_2_local_fallback: !input 'relay_2_local_fallback'
+ embedded_climate: '{{ climate == thermostat_embedded }}'
+ indoor_temperature_sensor: !input 'indoortemp'
+ embedded_indoor_temperature: '{{ indoor_temperature_sensor == nspaneltemp or not (indoor_temperature_sensor is string and indoor_temperature_sensor is match "sensor.")}}'
+ alarm: !input 'alarm'
- ##### ENTITIES #####
- entitypages_enabled: !input 'entitypages_enabled'
+ enum:
+ color_mode: # Possible light color modes. - https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/__init__.py
+ unknown: "[]"
+ onoff: "[]"
+ brightness: "[]"
+ color_temp: "[]"
+ hs: "[]"
+ xy: "[]"
+ rgb: "[]"
+ rgbw: "[]"
+ rgbww: "[]"
+ white: "[]"
#############################################################
##### CLOSE - Variables #####
@@ -5414,12 +5704,13 @@ variables:
trigger:
##### Trigger - General #################################################################################################################
- ##### settings_entity - Trigger 'settings_entity' #####
- - platform: event
- event_type: state_changed
+
+ ##### Panel Event - This is the new main event handler introduced on v4.0 to get info from the panel #####
+ - id: nspanel_event
+ platform: event
+ event_type: esphome.nspanel_ha_blueprint
event_data:
- entity_id: '{{ settings_entity }}'
- id: settings_entity
+ device_id: !input 'nspanel_name'
##### Reboot - Trigger 'nspanel_boot_init' #####
- platform: template
@@ -5435,10 +5726,13 @@ trigger:
entity_id: '{{ nspanelevent }}'
id: nspanelevent_changed
- ##### Automation reload
+ ##### Automation reload or HA started
- platform: event
event_type: automation_reloaded
id: automation_reloaded
+ - platform: homeassistant
+ event: start
+ id: ha_started
##### Trigger - Buttons - State change #################################################################################################################
##### Button01 Sync - Trigger 'current_state_entity01' #####
@@ -5854,6 +6148,14 @@ trigger:
entity_id: '{{ relay02_entity }}'
id: relay02_state
+ ##### Trigger - Alarm Control Panel - State change #################################################################################################################
+ ##### Alarm - Trigger 'alarm_state' #####
+ - platform: event
+ event_type: state_changed
+ event_data:
+ entity_id: !input 'alarm'
+ id: alarm_state
+
##### Trigger - Climate - State change #################################################################################################################
##### Climate - Trigger 'climate_state' #####
- platform: event
@@ -5908,34 +6210,8 @@ trigger:
- unavailable
id: climate_button09_state
- ##### Trigger - Notifications #################################################################################################################
-
- ##### Notification Text - Trigger 'notification_text_state' #####
- - platform: event
- event_type: state_changed
- event_data:
- entity_id: '{{ notification_text }}'
- id: notification_text_state
-
- ##### Notification Text - Trigger 'notification_text_state' #####
- - platform: event
- event_type: state_changed
- event_data:
- entity_id: '{{ notification_unread }}'
- id: notification_unread_state
-
##### Trigger - Hardware buttons #################################################################################################################
- ##### Left Button - Trigger 'left_button_press' #####
- - platform: template
- value_template: '{{ is_state(left_button, "on") | default(false) if left_button is string else false }}'
- id: left_button_press
-
- ##### Right Button - Trigger 'right_button_press' #####
- - platform: template
- value_template: '{{ is_state(right_button, "on") | default(false) if right_button is string else false }}'
- id: right_button_press
-
##### Left Button - State 'left_button_state' #####
- platform: state
entity_id: !input 'left_button_entity'
@@ -5975,13 +6251,6 @@ trigger:
entity_id: !input 'indoortemp'
id: indoortemp_state
- ##### NSPAnel Temp Sensor - Trigger 'nspaneltemp_state' #####
- - platform: event
- event_type: state_changed
- event_data:
- entity_id: '{{ nspaneltemp }}'
- id: nspaneltemp_state
-
##### Trigger - Weather #################################################################################################################
#### Weather state changed #######
- platform: event
@@ -6013,7 +6282,17 @@ trigger:
condition:
- '{{ is_state(nextion_inited, "on") | default(false) if nextion_inited is string else false }}'
- - condition: or
+ - condition: or # Do not update values when page home is not visible
+ conditions:
+ - condition: not
+ conditions:
+ - condition: trigger
+ id:
+ - home_value01_state
+ - home_value02_state
+ - home_value03_state
+ - '{{ page.current == page.home }}'
+ - condition: or # Do not update values when page entities is not visible
conditions:
- condition: not
conditions:
@@ -6023,11 +6302,8 @@ condition:
- trigger_entitypage02
- trigger_entitypage03
- trigger_entitypage04
- - '{{ page.entitypages[0] in states(nspanelevent) }}'
- - '{{ page.entitypages[1] in states(nspanelevent) }}'
- - '{{ page.entitypages[2] in states(nspanelevent) }}'
- - '{{ page.entitypages[3] in states(nspanelevent) }}'
- - condition: or
+ - '{{ page.current in page.entitypages }}'
+ - condition: or # Do not update values when page climate is not visible
conditions:
- condition: not
conditions:
@@ -6039,7 +6315,14 @@ condition:
- climate_value04_state
- climate_button08_state
- climate_button09_state
- - '{{ page.climate in states(nspanelevent) }}'
+ - '{{ page.current == page.climate }}'
+ - condition: or
+ conditions:
+ - condition: not
+ conditions:
+ - condition: trigger
+ id: indoortemp_state
+ - '{{ not embedded_indoor_temperature }}'
#############################################################
##### START - Action #####
@@ -6047,202 +6330,266 @@ condition:
action:
- alias: Main choices
choose:
- ##### JUMP TO - settings page lightsettings /coversettings / climate (SETTINGS ENTITY CHANGED) #####
- - alias: 'Jump to light/cover/climate settings page'
- conditions:
- - condition: trigger
- id: settings_entity
- - '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
- sequence:
- - &variables-settings_entity
- variables:
- settings_entity_state: >
- {{
- states(settings_entity)
- if settings_entity is string
- else "unknown"
- }}
- settings_entity_dict: >
- {{
- settings_entity_state
- if settings_entity_state is mapping
- else { "page": "home", "entity": "unknown" }
- }}
- settings_entity_domain: >
- {{
- settings_entity_dict.entity.split(".")[0]
- if
- settings_entity_dict.entity is defined and
- settings_entity_dict.entity is string and
- settings_entity_dict.entity.split(".") | count > 0
- else "unknown"
- }}
- - if: '{{ settings_entity_domain in ["light", "cover", "climate"] }}'
- then:
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page[settings_entity_domain] }}'
- continue_on_error: true
- - &delay-default
- delay:
- milliseconds: '{{ delay_value }}'
- - service: '{{ nextion.command.printf }}' # This can be moved to TFT on the 3 settings pages (and why not all pages?) and reduce the load from Blueprint comms
- data:
- cmd: 'dim=home.brightness.val'
- continue_on_error: true
-
- ##### DATE AND TIME #####
- - alias: 'Date & Time'
+ ##### DATE #####
+ - alias: 'Date'
conditions:
- condition: trigger
id: time_state
sequence:
- - &refresh-datetime
- if: '{{ true }}'
- then:
- ##### NSPanel Date #####
- ### DATE Font Color ###
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.date
- message: >
- {{
- page_home.general.date.label.color_rgb
- if is_number(page_home.general.date.label.color_rgb)
- else ((page_home.general.date.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.date.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.date.label.color_rgb[2] //(2**3))
- }}
- continue_on_error: true
- - *delay-default
- ### DATE Font ###
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.date
- message: >
- {{
- as_timestamp(now())
- | timestamp_custom
- (
- date_format
- | replace("%A", (dict.values(mui[language].weekdays) | list)[now().weekday()])
- | replace("%a", (dict.values(mui[language].weekdays_short) | list)[now().weekday()])
- | replace("%B", (dict.values(mui[language].months) | list)[now().month-1])
- | replace("%b", (dict.values(mui[language].months_short) | list)[now().month-1])
- )
- }}
- continue_on_error: true
- ##### NSPanel Time #####
- ### TIME Font Color ###
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.time
- message: >
- {{
- page_home.general.time.label.color_rgb
- if is_number(page_home.general.time.label.color_rgb)
- else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3))
- }}
- continue_on_error: true
- ### TIME Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.time
- message: '{{ time }}'
- continue_on_error: true
- - if: '{{ meridiem }}'
- then:
- ### TIME Meridiem Font Color ###
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.meridiem
- message: >
- {{
- page_home.general.time.label.color_rgb
- if is_number(page_home.general.time.label.color_rgb)
- else ((page_home.general.time.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.time.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.time.label.color_rgb[2] //(2**3))
- }}
- continue_on_error: true
- ### TIME Meridiem Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.meridiem
- message: '{{ meridiem }}'
- continue_on_error: true
+ ##### NSPanel Date #####
+ - &refresh-date
+ service: '{{ nextion.command.text_printf }}'
+ data:
+ component: home.date
+ message: >
+ {{
+ as_timestamp(now())
+ | timestamp_custom
+ (
+ date_format
+ | replace("%A", (dict.values(mui[language].weekdays) | list)[now().weekday()])
+ | replace("%a", (dict.values(mui[language].weekdays_short) | list)[now().weekday()])
+ | replace("%B", (dict.values(mui[language].months) | list)[now().month-1])
+ | replace("%b", (dict.values(mui[language].months_short) | list)[now().month-1])
+ )
+ }}
+ continue_on_error: true
- ##### BOOT NSPANEL - boot init #####
+ ##### Boot detected #####
- alias: Boot init
conditions:
- condition: trigger
id: nspanel_boot_init
- - '{{ nspanel_event.page != page.home or (is_state(settings_entity, ["unavailable", "unknown", "", None]) | default(False) if settings_entity is string else False) }}'
sequence:
- ##### NSPanel boot init only #####
- - delay:
- milliseconds: 100
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: boot.bluep_version
- message: '{{ blueprint_version }}'
- continue_on_error: true
-
- ###### Set local fallback ######
- - service: 'switch.turn_{{ "on" if relay_1_local_fallback else "off" }}'
- data:
- entity_id: "switch.{{ nspanel_name }}_relay_1_local_fallback"
- continue_on_error: true
- - service: 'switch.turn_{{ "on" if relay_2_local_fallback else "off" }}'
- data:
- entity_id: "switch.{{ nspanel_name }}_relay_2_local_fallback"
- continue_on_error: true
-
- ##### clear notification icon #####
- - service: '{{ nextion.command.notification_clear }}'
- data: {}
- continue_on_error: true
-
- ###### NSPanel beep ######
- - delay:
- milliseconds: 2000
- - if: '{{ is_state(notification_sound, "on") }}'
+ - &global_settings
+ if: '{{ true }}'
then:
- - service: '{{ nextion.command.play_rtttl }}'
+ - &variables_wakeup_page
+ variables:
+ wakeup_page_input: !input wakeup_page
+ wakeup_page: '{{ wakeup_page_input if is_number(wakeup_page_input) else 0 }}'
+ - &variables_hardware
+ variables:
+ hardware:
+ buttons:
+ left:
+ entity: !input 'left_button_entity'
+ name: !input 'left_button_name'
+ color_rgb: !input 'left_button_color'
+ hold_select: !input 'left_button_hold_select'
+ #custom_action: !input 'left_button_hold_custom_action'
+ right:
+ entity: !input 'right_button_entity'
+ name: !input 'right_button_name'
+ color_rgb: !input 'right_button_color'
+ hold_select: !input 'right_button_hold_select'
+ #custom_action: !input 'right_button_hold_custom_action'
+ relays:
+ relay1:
+ icon: !input 'relay01_icon' #E3A5
+ icon_color_rgb: !input 'relay01_icon_color'
+ relay2:
+ icon: !input 'relay02_icon' #E3A8
+ icon_color_rgb: !input 'relay02_icon_color'
+
+ - &variables-home_buttons
+ variables:
+ bt_notific:
+ icon: !input 'home_button04_icon' #E1ED
+ color_normal: !input 'home_button04_icon_color01'
+ color_unread: !input 'home_button04_icon_color02'
+ bt_entities:
+ enabled: !input 'entitypages_enabled'
+ icon: !input 'home_button06_icon' #EDCF
+ color_rgb: !input 'home_button06_icon_color'
+ bt_qrcode:
+ enabled: !input 'qrcode_enabled'
+ icon: !input 'home_button05_icon' #E432
+ color_rgb: !input 'home_button05_icon_color'
+ title: !input 'qrcode_label'
+ qrcode: !input 'qrcode_value'
+
+ - &variables-date_time
+ variables:
+ display:
+ date:
+ format:
+ color_rgb: !input 'date_label_color'
+ time:
+ format: !input 'time_format'
+ color_rgb: !input 'time_label_color'
+
+ - service: '{{ nextion.command.page_home }}'
data:
- song_str: 'two short:d=4,o=5,b=100:16e6,16e6'
+ notification_icon: >
+ {{
+ all_icons[bt_notific.icon.split(":")[1]] | default(bt_notific.icon
+ if bt_notific.icon is string
+ else all_icons["email"])
+ }}
+ notification_icon_color_normal: '{{ [ bt_notific.color_normal ] if is_number(bt_notific.color_normal) else bt_notific.color_normal }}'
+ notification_icon_color_unread: '{{ [ bt_notific.color_unread ] if is_number(bt_notific.color_unread) else bt_notific.color_unread }}'
+ qrcode: '{{ bt_qrcode.enabled }}'
+ qrcode_icon: >
+ {{
+ all_icons[bt_qrcode.icon.split(":")[1]] | default(bt_qrcode.icon
+ if bt_qrcode.icon is string
+ else all_icons["format-list-bulleted-square"])
+ }}
+ qrcode_icon_color: '{{ [ bt_qrcode.color_rgb ] if is_number(bt_qrcode.color_rgb) else bt_qrcode.color_rgb }}'
+ entities_pages: '{{ bt_entities.enabled }}'
+ entities_pages_icon: >
+ {{
+ all_icons[bt_entities.icon.split(":")[1]] | default(bt_entities.icon
+ if bt_entities.icon is string
+ else all_icons["format-list-bulleted-square"])
+ }}
+ entities_pages_icon_color: '{{ [ bt_entities.color_rgb ] if is_number(bt_entities.color_rgb) else bt_entities.color_rgb }}'
+ alarm_state: >
+ {{
+ states(alarm) | default("")
+ if alarm is string and alarm | length > 0
+ else ""
+ }}
continue_on_error: true
+ - &delay-default
+ delay:
+ milliseconds: '{{ delay_value }}'
- ##### Update Date & Time before showing the Home page #####
- - *refresh-datetime
+ - service: '{{ nextion.command.qrcode }}'
+ data:
+ title: '{{ bt_qrcode.title }}'
+ qrcode: '{{ bt_qrcode.qrcode }}'
+ show: false
+ continue_on_error: true
+ - *delay-default
- ##### NSPanel boot init finished and jump to Home Page#####
- - *delay-default
- - &jump_page_home
- service: '{{ nextion.command.printf }}'
- data:
- cmd: "page {{ page.home }}"
- continue_on_error: true
+ - service: '{{ nextion.command.page_settings}}'
+ data:
+ reboot: '{{ mui[language].settings.reboot }}'
+ sleep_mode: '{{ mui[language].settings.sleep }}'
+ brightness: '{{ mui[language].settings.brightness }}'
+ dimming: '{{ mui[language].settings.dimming }}'
+ continue_on_error: true
+ - *delay-default
+
+ - service: '{{ nextion.command.global_settings }}'
+ data:
+ blueprint_version: '{{ blueprint_version }}'
+ relay1_local_control: '{{ hardware.buttons.left.entity == relay01_entity }}'
+ relay1_icon: >
+ {{
+ all_icons[hardware.relays.relay1.icon.split(":")[1]] | default("\uE3A5")
+ if hardware.relays.relay1.icon.split(":") | count > 0
+ else
+ (
+ hardware.relays.relay1.icon
+ if hardware.relays.relay1.icon is string
+ else "\uE3A5"
+ )
+ }}
+ relay1_icon_color: >
+ {{
+ hardware.relays.relay1.icon_color_rgb
+ if is_number(hardware.relays.relay1.icon_color_rgb)
+ else ((hardware.relays.relay1.icon_color_rgb[0] //(2**3)) *(2**11))+((hardware.relays.relay1.icon_color_rgb[1] //(2**2)) *(2**5))+(hardware.relays.relay1.icon_color_rgb[2] //(2**3))
+ }}
+ relay2_local_control: '{{ hardware.buttons.right.entity == relay02_entity }}'
+ relay2_icon: >
+ {{
+ all_icons[hardware.relays.relay2.icon.split(":")[1]] | default("\uE3A8")
+ if hardware.relays.relay2.icon.split(":") | count > 0
+ else
+ (
+ hardware.relays.relay2.icon
+ if hardware.relays.relay2.icon is string
+ else "\uE3A8"
+ )
+ }}
+ relay2_icon_color: >
+ {{
+ hardware.relays.relay2.icon_color_rgb
+ if is_number(hardware.relays.relay2.icon_color_rgb)
+ else ((hardware.relays.relay2.icon_color_rgb[0] //(2**3)) *(2**11))+((hardware.relays.relay2.icon_color_rgb[1] //(2**2)) *(2**5))+(hardware.relays.relay2.icon_color_rgb[2] //(2**3))
+ }}
+ date_color: >
+ {{
+ display.date.color_rgb
+ if is_number(display.date.color_rgb)
+ else ((display.date.color_rgb[0] //(2**3)) *(2**11))+((display.date.color_rgb[1] //(2**2)) *(2**5))+(display.date.color_rgb[2] //(2**3))
+ }}
+ time_format: '{{ display.time.format }}'
+ time_color: >
+ {{
+ display.time.color_rgb
+ if is_number(display.time.color_rgb)
+ else ((display.time.color_rgb[0] //(2**3)) *(2**11))+((display.time.color_rgb[1] //(2**2)) *(2**5))+(display.time.color_rgb[2] //(2**3))
+ }}
+ embedded_climate: '{{ embedded_climate }}'
+ embedded_indoor_temperature: '{{ embedded_indoor_temperature }}'
+ temperature_unit_is_fahrenheit: '{{ state_attr((nspaneltemp if embedded_indoor_temperature else indoor_temperature_sensor), "unit_of_measurement") | default("") in ["°F", "F"]}}'
+ wakeup_page: '{{ wakeup_page }}'
+ continue_on_error: true
+ - *delay-default
+
+ ##### Update Date & Time before showing the Home page #####
+ - *refresh-date
##### NSPanel event #####
- - alias: NSPanel Event
+ - alias: NSPanel event
conditions:
- condition: trigger
- id: nspanelevent_changed
+ id: nspanel_event
sequence:
- - alias: NSPanel Event component changed
- choose:
+ - &variable_nspanel_event
+ variables:
+ nspanel_event: '{{ trigger.event.data }}'
+ - choose:
+ ##### BOOT NSPANEL - boot init #####
+ - alias: Boot init
+ conditions:
+ - '{{ nspanel_event.type == "boot"}}'
+ - '{{ nspanel_event.step is defined and nspanel_event.step in ["nextion_init", "timeout"]}}'
+ sequence:
+ - *global_settings
+
+ ##### Service call #####
+ - alias: NSPanel service call
+ conditions:
+ - '{{ nspanel_event.type == "service_call"}}'
+ - '{{ nspanel_event.service is defined and nspanel_event.service is string and nspanel_event.service | length > 0 }}'
+ - '{{ nspanel_event.service is not match "alarm_control_panel." }}' # Prevent the use of this call for alarm control due to safety reasons
+ - '{{ nspanel_event.entity is defined and nspanel_event.entity is string and nspanel_event.entity | length > 0 }}'
+ sequence:
+ - if: '{{ nspanel_event.key is defined and nspanel_event.key is string and nspanel_event.key | length > 0 }}'
+ then:
+ - service: '{{ nspanel_event.service }}'
+ data: { "{{ nspanel_event.key }}": "{{ nspanel_event.value }}" }
+ target:
+ entity_id: '{{ nspanel_event.entity }}'
+ continue_on_error: true
+ else:
+ - service: '{{ nspanel_event.service }}'
+ target:
+ entity_id: '{{ nspanel_event.entity }}'
+ continue_on_error: true
+
+ ##### Page changed #####
- alias: Page changed
- conditions: '{{ nspanel_event.component == "currentpage" }}'
+ conditions:
+ - '{{ nspanel_event.type == "page_changed"}}'
sequence:
- choose:
## PAGE HOME ##
- alias: Home page
conditions: '{{ nspanel_event.page == page.home }}'
sequence: &refresh_page_home
- - service: '{{ nextion.command.set_settings_entity }}'
+ ##### Set entity variable #####
+ - &set_entity_variable
+ service: '{{ nextion.command.text_printf }}'
data:
- entity: '{{ nspanel_event }}'
+ component: home.entity
+ message: '{{ "embedded_climate" if climate == thermostat_embedded else climate }}'
continue_on_error: true
##### Weather Icon Home Page #####
@@ -6250,7 +6597,7 @@ action:
- &refresh-page_home-weather_pic
service: '{{ nextion.command.printf }}'
data:
- cmd: home.weather.pic={{ nextion.pic.weather[states(weather_entity) | default("unavailable") if weather_entity is string else "unavailable"] | default(None) }}
+ cmd: home.weather.pic={{ nextion.pic.weather[states(weather_entity) | default("unavailable") if weather_entity is string and has_value(weather_entity) else "unavailable"] | default(None) }}
continue_on_error: true
- &refresh-page_home-outdoor_temp
@@ -6258,10 +6605,11 @@ action:
then:
##### NSPanel Outdoor Temp #####
- variables:
+ outdoor_temp_entity: !input 'outdoortemp'
outdoor_temp_state: >
{{
- states(outdoortemp) | default("unavailable")
- if outdoortemp is string and outdoortemp is match "sensor."
+ states(outdoor_temp_entity, rounded=true) | default("unavailable")
+ if outdoor_temp_entity is string and outdoor_temp_entity is match "sensor." and has_value(outdoor_temp_entity)
else "unavailable"
}}
outdoor_temp: >
@@ -6272,17 +6620,15 @@ action:
}}
- if: '{{ is_number(outdoor_temp) }}'
then:
+ - variables:
+ outdoor_temp_color_rgb: !input 'home_outdoor_temp_label_color'
### LABEL Outdoor Temp Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: home.outdoor_temp
- message: >
- {{
- page_home.general.outdoor_temp.label.color_rgb
- if is_number(page_home.general.outdoor_temp.label.color_rgb)
- else ((page_home.general.outdoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.outdoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.outdoor_temp.label.color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ outdoor_temp_color_rgb ] if is_number(outdoor_temp_color_rgb) else outdoor_temp_color_rgb }}'
+ background: []
continue_on_error: true
### LABEL Outdoor Temp Font ###
- *delay-default
@@ -6293,41 +6639,44 @@ action:
continue_on_error: true
- &refresh-page_home-indoor_temp
- if: '{{ true }}'
+ if: '{{ not embedded_indoor_temperature }}'
then:
##### NSPanel Indoor Temp #####
- variables:
- indoor_temp_state: '{{ states(indoortemp) | default("unavailable") if indoortemp is string and indoortemp is match "sensor." else states(nspaneltemp) }}'
- indoor_temp_units: >
- {{
- state_attr(indoortemp, "unit_of_measurement") | default(temperature_units)
- if
- indoortemp is string and
- indoortemp is match "sensor." and
- state_attr(indoortemp, "unit_of_measurement") is string and
- state_attr(indoortemp, "unit_of_measurement") | length > 0
- else
- (
- state_attr(nspaneltemp, "unit_of_measurement") | default(temperature_units)
- if
- state_attr(nspaneltemp, "unit_of_measurement") is string and
- state_attr(nspaneltemp, "unit_of_measurement") | length > 0
- else temperature_units
- )
- }}
- - if: '{{ is_number(indoor_temp_state) }}'
+ indoor_temp:
+ state: '{{ states(indoor_temperature_sensor, rounded=true) | default("unavailable") if indoor_temperature_sensor is string and indoor_temperature_sensor is match "sensor." else states(nspaneltemp, rounded=true) }}'
+ units: >
+ {{
+ state_attr(indoor_temperature_sensor, "unit_of_measurement") | default(temperature_units)
+ if
+ indoor_temperature_sensor is string and
+ indoor_temperature_sensor is match "sensor." and
+ state_attr(indoor_temperature_sensor, "unit_of_measurement") is string and
+ state_attr(indoor_temperature_sensor, "unit_of_measurement") | length > 0
+ else
+ (
+ state_attr(nspaneltemp, "unit_of_measurement") | default(temperature_units)
+ if
+ state_attr(nspaneltemp, "unit_of_measurement") is string and
+ state_attr(nspaneltemp, "unit_of_measurement") | length > 0
+ else temperature_units
+ )
+ }}
+ icon:
+ icon: !input 'home_indoor_temp_icon' #E50E
+ color_rgb: !input 'home_indoor_temp_icon_color'
+ label:
+ color_rgb: !input 'home_indoor_temp_label_color'
+
+ - if: '{{ is_number(indoor_temp.state) }}'
then:
### ICON Indoor Temp Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: home.indoortempicon
- message: >
- {{
- page_home.general.indoor_temp.icon.color_rgb
- if is_number(page_home.general.indoor_temp.icon.color_rgb)
- else ((page_home.general.indoor_temp.icon.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.icon.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.icon.color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ indoor_temp.icon.color_rgb ] if is_number(indoor_temp.icon.color_rgb) else indoor_temp.icon.color_rgb }}'
+ background: []
continue_on_error: true
### ICON Indoor Temp Font ###
- *delay-default
@@ -6336,187 +6685,184 @@ action:
component: home.indoortempicon
message: >
{{
- all_icons[page_home.general.indoor_temp.icon.icon.split(":")[1]] | default(all_icons.unknown)
- if page_home.general.indoor_temp.icon.icon.split(":") | count > 0
+ all_icons[indoor_temp.icon.icon.split(":")[1]] | default(all_icons.unknown)
+ if indoor_temp.icon.icon.split(":") | count > 0
else
(
- page_home.general.indoor_temp.icon.icon
- if page_home.general.indoor_temp.icon.icon is string
+ indoor_temp.icon.icon
+ if indoor_temp.icon.icon is string
else all_icons.unknown
)
}}
continue_on_error: true
### LABEL Indoor Temp Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: home.current_temp
- message: >
- {{
- page_home.general.indoor_temp.label.color_rgb
- if is_number(page_home.general.indoor_temp.label.color_rgb)
- else ((page_home.general.indoor_temp.label.color_rgb[0] //(2**3)) *(2**11))+((page_home.general.indoor_temp.label.color_rgb[1] //(2**2)) *(2**5))+(page_home.general.indoor_temp.label.color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ indoor_temp.label.color_rgb ] if is_number(indoor_temp.label.color_rgb) else indoor_temp.label.color_rgb }}'
+ background: []
continue_on_error: true
### LABEL Indoor Temp Font ###
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
component: home.current_temp
- message: '{{ indoor_temp_state | round(1) ~ indoor_temp_units }}'
+ message: '{{ indoor_temp.state | round(1) ~ indoor_temp.units }}'
continue_on_error: true
##### NSPanel Buttons #####
+ - *variables_hardware
- variables:
- left_button_state: '{{ states(page_home.hardware.buttons.left.entity) | default("unavailable") if page_home.hardware.buttons.left.entity is string else "unavailable" }}'
- right_button_state: '{{ states(page_home.hardware.buttons.right.entity) | default("unavailable") if page_home.hardware.buttons.right.entity is string else "unavailable" }}'
+ left_button_state: '{{ states(hardware.buttons.left.entity) | default("unavailable") if hardware.buttons.left.entity is string else "unavailable" }}'
+ right_button_state: '{{ states(hardware.buttons.right.entity) | default("unavailable") if hardware.buttons.right.entity is string else "unavailable" }}'
##### NSPanel Left Button Name #####
- - if: '{{ page_home.hardware.buttons.left.name | length > 0 }}'
+ - if: '{{ hardware.buttons.left.name | length > 0 }}'
then:
### LABEL Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: home.left_bt_text
- message: >
- {{
- page_home.hardware.buttons.left.color_rgb
- if is_number(page_home.hardware.buttons.left.color_rgb)
- else ((page_home.hardware.buttons.left.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.left.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.left.color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ hardware.buttons.left.color_rgb ] if is_number(hardware.buttons.left.color_rgb) else hardware.buttons.left.color_rgb }}'
+ background: []
continue_on_error: true
### LABEL Font ###
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
component: home.left_bt_text
- message: '{{ page_home.hardware.buttons.left.name }}'
+ message: '{{ hardware.buttons.left.name }}'
continue_on_error: true
##### SET Left Hardware Button PIC on Home Page ####
- if: '{{ left_button_state not in ["unavailable", "unknown", "", None] }}'
then:
- - variables:
# Hardware Button PIC
- left_hardware_button_state: '{{ nextion.pic.hardware.button[left_button_state] | default(nextion.pic.hardware.button.off) }}'
- *delay-default
- service: '{{ nextion.command.printf }}'
data:
- cmd: home.left_bt_pic.pic={{ left_hardware_button_state }}
+ cmd: home.left_bt_pic.val={{ 1 if left_button_state in ["on", "open", "opened", "opening", "true", true, 1] else 0 }}
continue_on_error: true
##### NSPanel Right Button Name #####
- - if: '{{ page_home.hardware.buttons.right.name | length > 0 }}'
+ - if: '{{ hardware.buttons.right.name | length > 0 }}'
then:
### LABEL Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: home.right_bt_text
- message: >
- {{
- page_home.hardware.buttons.right.color_rgb
- if is_number(page_home.hardware.buttons.right.color_rgb)
- else ((page_home.hardware.buttons.right.color_rgb[0] //(2**3)) *(2**11))+((page_home.hardware.buttons.right.color_rgb[1] //(2**2)) *(2**5))+(page_home.hardware.buttons.right.color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ hardware.buttons.right.color_rgb ] if is_number(hardware.buttons.right.color_rgb) else hardware.buttons.right.color_rgb }}'
+ background: []
continue_on_error: true
### LABEL Font ###
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
component: home.right_bt_text
- message: '{{ page_home.hardware.buttons.right.name }}'
+ message: '{{ hardware.buttons.right.name }}'
continue_on_error: true
##### SET Right Hardware Button PIC on Home Page #####
- if: '{{ right_button_state not in ["unavailable", "unknown", "", None] }}'
then:
- - variables:
# Hardware Button PIC
- right_hardware_button_state: '{{ nextion.pic.hardware.button[right_button_state] | default(nextion.pic.hardware.button.off) }}'
- *delay-default
- service: '{{ nextion.command.printf }}'
data:
- cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
+ cmd: home.right_bt_pic.val={{ 1 if right_button_state in ["on", "open", "opened", "opening", "true", true, 1] else 0 }}
continue_on_error: true
+ ###### Climate chip ######
+ - &update-home_page-climate_chip
+ if: '{{ (not embedded_climate) and climate is string and climate is match "climate." }}'
+ then:
+ - if: '{{ has_value(climate) }}'
+ then:
+ - variables:
+ climate_state: '{{ states(climate) | default("unavailable") if climate is string else "unavailable" }}'
+ hvac_action: '{{ state_attr(climate, "hvac_action") | default("unavailable") if climate is string else "unavailable" }}'
+ climate_action: '{{ hvac_action if hvac_action not in ["unavailable", "unknown", "", None] else climate_state }}'
+ - *delay-default
+ - if: '{{ climate_action in ["off", "heating", "heat", "cooling", "cool", "dry", "fan", "fan_only", "heat_cool", "auto", "idle"] }}'
+ then:
+ ### ICON Font Color ###
+ - service: '{{ nextion.command.set_component_color }}'
+ data:
+ component: home.icon_top_03
+ foreground: >
+ {% if "off" in climate_action %}{{ nextion.color["off"] }}
+ {% elif "heating" in climate_action or "heat" in climate_action %}{{ nextion.color["deep-orange"]}}
+ {% elif "cooling" in climate_action or "cool" in climate_action %}{{ nextion.color["blue"] }}
+ {% elif "drying" in climate_action or "dry" in climate_action %}{{ nextion.color["orange"] }}
+ {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ nextion.color["cyan"] }}
+ {% elif "heat_cool" in climate_action %}{{ nextion.color["amber"] }}
+ {% elif "auto" in climate_action %}{{ nextion.color["green"] }}
+ {% elif "idle" in climate_action %}{{ nextion.color["off"] }}
+ {% else %}{{ nextion.color["off"] }}
+ {% endif %}
+ background: []
+ continue_on_error: true
+ ### ICON Font ###
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: home.icon_top_03
+ message: >
+ {% if "off" in climate_action %}{{ all_icons.blank }}
+ {% elif "heating" in climate_action or "heat" in climate_action %}{{ all_icons["thermometer-lines"] }}
+ {% elif "cooling" in climate_action or "cool" in climate_action %}{{ all_icons.snowflake }}
+ {% elif "drying" in climate_action or "dry" in climate_action %}{{ all_icons["water-percent"] }}
+ {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ all_icons.fan }}
+ {% elif "heat_cool" in climate_action %}{{ all_icons.autorenew }}
+ {% elif "auto" in climate_action %}{{ all_icons["calendar-sync"] }}
+ {% elif "idle" in climate_action %}{{ all_icons.thermometer }}
+ {% else %}{{ all_icons.blank }}
+ {% endif %}
+ continue_on_error: true
+ else:
+ - &hide-home_page-climate_chip
+ service: '{{ nextion.command.text_printf }}'
+ data:
+ component: home.icon_top_03
+ message: '{{ all_icons.blank }}'
+ continue_on_error: true
+ else:
+ - *hide-home_page-climate_chip
+
###### Status bar ######
- &variables-home_page_status_bar
variables:
- climate_state: '{{ states(climate) | default("unavailable") if climate is string else "unavailable" }}'
- hvac_action: '{{ state_attr(climate, "hvac_action") | default("unavailable") if climate is string else "unavailable" }}'
- climate_action: '{{ hvac_action if hvac_action not in ["unavailable", "unknown", "", None] else climate_state }}'
home_page_status_bar:
- - entity: '{{ relay01_entity }}'
- icon: !input 'relay01_icon' #E3A5
- icon_color_rgb: !input 'relay01_icon_color'
- page: home
- component: icon_top_01
- - entity: '{{ relay02_entity }}'
- icon: !input 'relay02_icon' #E3A8
- icon_color_rgb: !input 'relay02_icon_color'
- page: home
- component: icon_top_02
- - entity: '{{ climate }}'
- icon: >
- {% if "off" in climate_action %}{{ all_icons.blank }}
- {% elif "heating" in climate_action or "heat" in climate_action %}{{ all_icons["thermometer-lines"] }}
- {% elif "cooling" in climate_action or "cool" in climate_action %}{{ all_icons.snowflake }}
- {% elif "drying" in climate_action or "dry" in climate_action %}{{ all_icons["water-percent"] }}
- {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ all_icons.fan }}
- {% elif "heat_cool" in climate_action %}{{ all_icons.autorenew }}
- {% elif "auto" in climate_action %}{{ all_icons["calendar-sync"] }}
- {% elif "idle" in climate_action %}{{ all_icons.thermometer }}
- {% else %}{{ all_icons.blank }}
- {% endif %}
- icon_color_rgb: >
- {% if "off" in climate_action %}{{ nextion.color["off"] }}
- {% elif "heating" in climate_action or "heat" in climate_action %}{{ nextion.color["deep-orange"]}}
- {% elif "cooling" in climate_action or "cool" in climate_action %}{{ nextion.color["blue"] }}
- {% elif "drying" in climate_action or "dry" in climate_action %}{{ nextion.color["orange"] }}
- {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ nextion.color["cyan"] }}
- {% elif "heat_cool" in climate_action %}{{ nextion.color["amber"] }}
- {% elif "auto" in climate_action %}{{ nextion.color["green"] }}
- {% elif "idle" in climate_action %}{{ nextion.color["off"] }}
- {% else %}{{ nextion.color["off"] }}
- {% endif %}
- page: home
- component: icon_top_03
- entity: !input 'chip01'
icon: !input 'chip01_icon'
icon_color_rgb: !input 'chip01_icon_color'
- page: home
component: icon_top_04
- entity: !input 'chip02'
icon: !input 'chip02_icon'
icon_color_rgb: !input 'chip02_icon_color'
- page: home
component: icon_top_05
- entity: !input 'chip03'
icon: !input 'chip03_icon'
icon_color_rgb: !input 'chip03_icon_color'
- page: home
component: icon_top_06
- entity: !input 'chip04'
icon: !input 'chip04_icon'
icon_color_rgb: !input 'chip04_icon_color'
- page: home
component: icon_top_07
- entity: !input 'chip05'
icon: !input 'chip05_icon'
icon_color_rgb: !input 'chip05_icon_color'
- page: home
component: icon_top_08
- entity: !input 'chip06'
icon: !input 'chip06_icon'
icon_color_rgb: !input 'chip06_icon_color'
- page: home
component: icon_top_09
- entity: !input 'chip07'
icon: !input 'chip07_icon'
icon_color_rgb: !input 'chip07_icon_color'
- page: home
component: icon_top_10
- repeat:
for_each: '{{ home_page_status_bar }}'
@@ -6528,7 +6874,6 @@ action:
repeat_item_state: '{{ states(repeat.item.entity) | default("unavailable") }}'
repeat_item_state_is_on: >
{{
- (repeat.item.component == "icon_top_03") or
(repeat_item_state is string and repeat_item_state in ["on", "open", "opening", "true", "True"]) or
(repeat_item_state is boolean and repeat_item_state)
}}
@@ -6538,33 +6883,34 @@ action:
{% elif repeat_item_state_is_on and state_attr(repeat.item.entity, "icon") | default("") not in ["unavailable", "unknown", "", None] %}
{{ all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] | default(all_icons.blank) }}
{% else %}
- {{ all_icons.blank }}
+ {{ all_icons.unknown }}
{% endif %}
+ - *delay-default
- if: '{{ repeat_item_state_is_on }}'
then:
### ICON Font Color ###
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
- component: '{{ repeat.item.page }}.{{ repeat.item.component }}'
- message: >
- {{
- repeat.item.icon_color_rgb
- if is_number(repeat.item.icon_color_rgb)
- else
- ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+
- ((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.icon_color_rgb[2] //(2**3))
- }}
+ component: 'home.{{ repeat.item.component }}'
+ foreground: '{{ [ repeat.item.icon_color_rgb ] if is_number(repeat.item.icon_color_rgb) else repeat.item.icon_color_rgb }}'
+ background: []
continue_on_error: true
- ### ICON Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: '{{ repeat.item.page }}.{{ repeat.item.component }}'
- message: '{{ repeat_item_icon }}'
- continue_on_error: true
- # {{ is_state(repeat.item.entity, "on") | default(False) if repeat.item.entity is string else "unavailable" }}
+ ### ICON Font ###
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: 'home.{{ repeat.item.component }}'
+ message: '{{ repeat_item_icon }}'
+ continue_on_error: true
+ else:
+ - &hide-home_page-status_bar_chip
+ service: '{{ nextion.command.text_printf }}'
+ data:
+ component: 'home.{{ repeat.item.component }}'
+ message: '{{ all_icons.blank }}'
+ continue_on_error: true
+ else:
+ - *hide-home_page-status_bar_chip
##### HOME VALUE 01 - 03
- *delay-default
@@ -6593,24 +6939,17 @@ action:
for_each: '{{ home_page_values }}'
sequence:
- &display_value
- if: '{{ repeat.item.entity is string and repeat.item.entity is match "sensor." and states(repeat.item.entity) not in ["unavailable", "unknown", "", None] }}'
+ if: '{{ repeat.item.entity is string and repeat.item.entity is match "sensor." and has_value(repeat.item.entity) }}'
then:
- if: '{{ repeat.item.icon | length > 0 }}'
then:
### ICON Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: '{{ repeat.item.page }}.{{ repeat.item.component }}_icon'
- message: >
- {{
- repeat.item.icon_color_rgb
- if is_number(repeat.item.icon_color_rgb)
- else
- ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+
- ((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.icon_color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ repeat.item.icon_color_rgb ] if is_number(repeat.item.icon_color_rgb) else repeat.item.icon_color_rgb }}'
+ background: []
continue_on_error: true
### ICON Font ###
- *delay-default
@@ -6618,33 +6957,28 @@ action:
data:
component: '{{ repeat.item.page }}.{{ repeat.item.component }}_icon'
message: >
- {% if repeat.item.icon is string %}
+ {% if repeat.item.icon is string and repeat.item.icon | length > 0 %}
{{
all_icons[repeat.item.icon.split(":")[1]] | default(all_icons.unknown)
if repeat.item.icon.split(":") | count > 0
else repeat.item.icon
}}
- {% else %}{{ all_icons.unknown }}
+ {% elif state_attr(repeat.item.entity, "icon") | default("") not in ["unavailable", "unknown", "", None] %}
+ {{ all_icons[state_attr(repeat.item.entity, "icon").split(":")[1]] | default(all_icons.unknown) }}
+ {% else %}{{ all_icons.blank }}
{% endif %}
continue_on_error: true
- variables:
- repeat_item_state: '{{ states(repeat.item.entity) | default("unavailable") }}'
+ repeat_item_state: '{{ states(repeat.item.entity, rounded=true) | default("unavailable") }}'
repeat_item_state_available: '{{ repeat_item_state not in ["unavailable", "unknown", "", None] }}'
- condition: '{{ repeat_item_state_available }}'
### LABEL Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: '{{ repeat.item.page }}.{{ repeat.item.component }}{{ "_state" if repeat.item.page == page.home }}'
- message: >
- {{
- repeat.item.label_color_rgb
- if is_number(repeat.item.label_color_rgb)
- else
- ((repeat.item.label_color_rgb[0] //(2**3)) *(2**11))+
- ((repeat.item.label_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.label_color_rgb[2] //(2**3))
- }}
+ foreground: '{{ [ repeat.item.label_color_rgb ] if is_number(repeat.item.label_color_rgb) else repeat.item.label_color_rgb }}'
+ background: []
continue_on_error: true
### LABEL Font ###
- *delay-default
@@ -6653,130 +6987,12 @@ action:
component: '{{ repeat.item.page }}.{{ repeat.item.component }}{{ "_state" if repeat.item.page == page.home }}'
message: >
{{
- (repeat_item_state | round(1) ~ (state_attr(repeat.item.entity, "unit_of_measurement") | default("") if state_attr(repeat.item.entity, "unit_of_measurement") is string else ""))
+ (repeat_item_state ~ (state_attr(repeat.item.entity, "unit_of_measurement") | default("") if state_attr(repeat.item.entity, "unit_of_measurement") is string else ""))
if is_number(repeat_item_state)
else repeat_item_state
}}
continue_on_error: true
- ##### Set notify icon #####
- - &refresh-page_home-notifications_icon
- if: '{{ true }}'
- then:
- - variables:
- notification_unread_state: '{{ states(notification_unread) | default("unavailable") if notification_unread is string else "unavailable" }}'
- - condition: '{{ notification_unread_state in ["on", "off"] }}'
- - variables:
- notification_text_state: '{{ states(notification_text) | default(None) if notification_text is string else None }}'
- set_button04_icon: >
- {{
- all_icons[page_home.buttons[3].icon.split(":")[1]] | default(page_home.buttons[3].icon if page_home.buttons[3].icon is string else all_icons.unknown)
- if notification_unread_state == "on" and notification_text_state | length > 0
- else all_icons.blank
- }}
- set_button04_icon_font: >
- {{
- (
- page_home.buttons[3].color_rgb[notification_unread_state]
- if is_number(page_home.buttons[3].color_rgb[notification_unread_state])
- else
- ((page_home.buttons[3].color_rgb[notification_unread_state][0] //(2**3)) *(2**11))+
- ((page_home.buttons[3].color_rgb[notification_unread_state][1] //(2**2)) *(2**5))+
- (page_home.buttons[3].color_rgb[notification_unread_state][2] //(2**3))
- )
- if notification_unread_state in ["on", "off"] and notification_text_state | length > 0
- else nextion.color.grey_light
- }}
- ##### SET ICON Font - Notify #####
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.button04_icon
- message: '{{ set_button04_icon }}'
- continue_on_error: true
-
- ##### SET ICON Font Color - Notify #####
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.button04_icon
- message: '{{ set_button04_icon_font }}'
- continue_on_error: true
-
- ###### QR Code - Icon ######
- - *delay-default
- - if: '{{ qrcode_enabled == true }}'
- then: # Display QR code icon
- ### ICON Font Color ###
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.button05_icon
- message: >
- {{
- page_home.buttons[4].color_rgb.on
- if is_number(page_home.buttons[4].color_rgb.on)
- else
- ((page_home.buttons[4].color_rgb.on[0] //(2**3)) *(2**11))+
- ((page_home.buttons[4].color_rgb.on[1] //(2**2)) *(2**5))+
- (page_home.buttons[4].color_rgb.on[2] //(2**3))
- }}
- continue_on_error: true
- ### ICON Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.button05_icon
- message: >
- {{
- all_icons[page_home.buttons[4].icon.split(":")[1]] | default(page_home.buttons[4].icon
- if page_home.buttons[4].icon is string
- else all_icons.unknown)
- }}
- continue_on_error: true
- else: # Display blank icon
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.button05_icon
- message: '{{ all_icons.blank }}'
- continue_on_error: true
-
- ###### ENTITIES - Icon ######
- - *delay-default
- - if: '{{ entitypages_enabled }}'
- then: # Display entities icon
- ### ICON Font Color ###
- - service: '{{ nextion.command.font_color }}'
- data:
- component: home.button06_icon
- message: >
- {{
- page_home.buttons[5].color_rgb.on
- if is_number(page_home.buttons[5].color_rgb.on)
- else
- ((page_home.buttons[5].color_rgb.on[0] //(2**3)) *(2**11))+
- ((page_home.buttons[5].color_rgb.on[1] //(2**2)) *(2**5))+
- (page_home.buttons[5].color_rgb.on[2] //(2**3))
- }}
- continue_on_error: true
- ### ICON Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.button06_icon
- message: >
- {{
- all_icons[page_home.buttons[5].icon.split(":")[1]] | default(page_home.buttons[5].icon
- if page_home.buttons[5].icon is string
- else all_icons.unknown)
- }}
- continue_on_error: true
- else: # Display blank icon
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: home.button06_icon
- message: '{{ all_icons.blank }}'
- continue_on_error: true
-
## BUTTON PAGES 01 - 04 ##
- alias: Button pages
conditions: '{{ nspanel_event.page in page.buttonpages }}'
@@ -7020,10 +7236,6 @@ action:
component: button08
- if: '{{ button_page_index >= 0 and button_page_index <= 3 }}'
then:
- - service: '{{ nextion.command.set_settings_entity }}'
- data:
- entity: '{{ nspanel_event }}'
- continue_on_error: true
##### Button Page Label #####
- if: '{{ button_pages_labels[button_page_index].label | length > 0 }}'
then:
@@ -7055,7 +7267,6 @@ action:
then:
- variables:
item_domain: '{{ repeat.item.entity.split(".")[0] | default("unknown") }}'
- # {{ states(entity_id) | default("unavailable") if entity_id is string else "unavailable" }}
current_entity_state: '{{ states(repeat.item.entity) | default("unavailable") }}'
current_entity_state_available: '{{ current_entity_state not in ["unavailable"] }}'
# Button PIC GRAY/WHITE
@@ -7088,7 +7299,7 @@ action:
else
((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+
((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.icon_color_rgb[2] //(2**3))
+ (repeat.item.icon_color_rgb[2] //(2**3))
}}
{% elif item_domain in ["button", "input_button", "scene"] %}{{ nextion.color.grey_light }}
{% elif current_entity_state in ["on", "open", "opening", "home"] or (item_domain == "climate" and current_entity_state != "off") %}
@@ -7098,7 +7309,7 @@ action:
else
((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+
((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.icon_color_rgb[2] //(2**3))
+ (repeat.item.icon_color_rgb[2] //(2**3))
}}
{% else %}{{ nextion.color.red }}
{% endif %}
@@ -7138,6 +7349,8 @@ action:
{% if not current_entity_state_available %} 0
{% elif item_domain == "light" and current_entity_state == "on" and state_attr(repeat.item.entity, "brightness") != None %}
{{ (state_attr(repeat.item.entity, "brightness") | int * 100 /255) | round(0) }}%
+ {% elif item_domain == "fan" and current_entity_state == "on" and state_attr(repeat.item.entity, "percentage") != None %}
+ {{ state_attr(repeat.item.entity, "percentage") | round(0, default=0) }}%
{% elif item_domain == "cover" and current_entity_state in ["open", "opening", "closing"] and state_attr(repeat.item.entity, "current_position") != None %}
{{ (state_attr(repeat.item.entity, "current_position") | int(100)) | round(0) }}%
{% elif item_domain == "climate" and current_entity_state != "off" and state_attr(repeat.item.entity, 'current_temperature') != None %}
@@ -7149,10 +7362,10 @@ action:
data:
btn_id: '{{ repeat.item.page }}.{{ repeat.item.component }}'
btn_pic: '{{ btn_pic }}'
- btn_bg: '{{ btn_bg }}'
- btn_icon_font: '{{ btn_icon_font }}'
- btn_txt_font: '{{ btn_txt_font }}'
- btn_bri_font: '{{ btn_bri_font }}'
+ btn_bg: '{{ [ btn_bg ] if is_number(btn_bg) else btn_bg }}'
+ btn_icon_font: '{{ [ btn_icon_font ] if is_number(btn_icon_font) else btn_icon_font }}'
+ btn_txt_font: '{{ [ btn_txt_font ] if is_number(btn_txt_font) else btn_txt_font }}'
+ btn_bri_font: '{{ [ btn_bri_font ] if is_number(btn_bri_font) else btn_bri_font }}'
btn_icon: '{{ btn_icon }}'
btn_label: '{{ btn_label }}'
btn_bri_txt: '{{ btn_bri_txt }}'
@@ -7173,7 +7386,7 @@ action:
else
((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+
((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+
- (repeat.item.icon_color_rgb[2] //(2**3))
+ (repeat.item.icon_color_rgb[2] //(2**3))
}}
btn_txt_font: '{{ nextion.color.white }}'
btn_bri_font: '{{ btn_bri_font }}'
@@ -7193,251 +7406,279 @@ action:
- service: '{{ nextion.command.show_all }}'
continue_on_error: true
- ## PAGE LIGHTSETTINGS ##
+ ## PAGE LIGHT ##
- alias: Light settings page
conditions: '{{ nspanel_event.page == page.light }}'
- sequence: &refresh_page_lightsettings
- - *variables-settings_entity
- - if: '{{ settings_entity_domain == "light" }}'
- then:
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: lightsettings.light_name
- message: >
- {{
- settings_entity_dict.name
- if settings_entity_dict.name is defined and settings_entity_dict.name is string and settings_entity_dict.name | length > 0
- else
- (
- state_attr(settings_entity_dict.entity, "friendly_name")
- if state_attr(settings_entity_dict.entity, "friendly_name") | length > 0
- else
- (
- "Light" ~ (": " ~ settings_entity_dict.component)
- if settings_entity_dict.component is string and settings_entity_dict.component | length > 0
- )
- )
- }}
- continue_on_error: true
- ##### LIGHT ICON - ON / OFF #####
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: lightsettings.icon_state
- message: >
- {{
- all_icons[settings_entity_dict.icon.split(":")[1]] | default(settings_entity_dict.icon if settings_entity_dict.icon is defined and settings_entity_dict.icon is string else nextion.icon.domain.light)
- if settings_entity_dict.icon not in ["unavailable", "unknown", "", None] and settings_entity_dict.icon | length > 0
- else nextion.icon.domain.light
- }}
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
- data:
- component: lightsettings.icon_state
- message: >
- {{
- (
- settings_entity_dict.icon_color_rgb
- if is_number(settings_entity_dict.icon_color_rgb)
- else
- ((settings_entity_dict.icon_color_rgb[0] //(2**3)) *(2**11))+
- ((settings_entity_dict.icon_color_rgb[1] //(2**2)) *(2**5))+
- (settings_entity_dict.icon_color_rgb[2] //(2**3))
- )
- if is_state(settings_entity_dict.entity, "on")
- else nextion.color.grey_light
- }}
- continue_on_error: true
- ##### LIGHT State #####
- - variables:
- curr_brightness: '{{ (state_attr(settings_entity_dict.entity, "brightness") | int(0) * 100 / 255) | round(0) }}'
- - *delay-default
- - service: '{{ nextion.command.value }}'
- data:
- component: lightsettings.lightslider
- message: '{{ curr_brightness }}'
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: lightsettings.light_value
- message: '{{ curr_brightness }}%'
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: lightsettings.light_value_2
- message: '{{ curr_brightness }}%'
- continue_on_error: true
+ sequence: &refresh_page_light
+ - variables:
+ supported_color_modes: '{{ state_attr(nspanel_event.entity, "supported_color_modes") | default("unknown") }}'
+ color_mode_color: >
+ {{
+ "hs" in supported_color_modes
+ or "xy" in supported_color_modes
+ or "rgb" in supported_color_modes
+ or "rgbw" in supported_color_modes
+ or "rgbww" in supported_color_modes
+ }}
+ color_mode_color_temp: '{{ "color_temp" in supported_color_modes }}'
+ #color_mode_brightness: >
+ # {{
+ # "brightness" in supported_color_modes
+ # or "white" in supported_color_modes
+ # or color_mode_color
+ # or color_mode_color_temp
+ # }}
+ ##### LIGHT State #####
+ - variables:
+ curr_brightness: '{{ (state_attr(nspanel_event.entity, "brightness") | int(0) * 100 / 255) | round(0) }}'
+ - *delay-default
+ - service: '{{ nextion.command.value }}'
+ data:
+ component: light.lightslider
+ message: '{{ curr_brightness }}'
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: light.light_value
+ message: '{{ curr_brightness }}%'
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: light.light_value_2
+ message: '{{ curr_brightness }}%'
+ continue_on_error: true
- ##### LIGHT Check Color_Temp Value is available when yes send some current Values #####
+ ##### LIGHT Check Color_Temp Value is available when yes send some current Values #####
+ - if: '{{ color_mode_color_temp }}'
+ then:
- variables:
- curr_color_temp: '{{ state_attr(settings_entity_dict.entity, "color_temp") }}'
+ curr_color_temp: '{{ state_attr(nspanel_event.entity, "color_temp") | int(-1) }}'
+ min_mireds: '{{ state_attr(nspanel_event.entity, "min_mireds") | int(153) }}'
+ max_mireds: '{{ state_attr(nspanel_event.entity, "max_mireds") | int(500) }}'
+ - variables:
+ curr_color_temp: >
+ {{
+ curr_color_temp
+ if curr_color_temp >= min_mireds and curr_color_temp <= max_mireds
+ else ((min_mireds+max_mireds)/2) | int(327)
+ }}
- condition: '{{ is_number(curr_color_temp) }}'
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
- component: lightsettings.temp_value
- message: '{{ curr_color_temp | round(0) }}'
+ component: light.temp_value
+ message: '{{ curr_color_temp }}'
continue_on_error: true
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
- component: lightsettings.temp_value_2
- message: '{{ curr_color_temp | round(0) }}'
+ component: light.temp_value_2
+ message: '{{ curr_color_temp }}'
continue_on_error: true
- *delay-default
- service: '{{ nextion.command.value }}'
data:
- component: lightsettings.tempslider
- message: '{{ curr_color_temp | round(0) }}'
+ component: light.tempslider
+ message: '{{ curr_color_temp }}'
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: tempslider.minval={{ min_mireds }}
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: tempslider.maxval={{ max_mireds }}
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: temp_button
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: temp_value_2
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: temp_touch
continue_on_error: true
- ## PAGE COVERSETTINGS ##
+ ##### Hide color button when not supported #####
+ - if: '{{ color_mode_color }}'
+ then:
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: color_button
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: color_touch
+ continue_on_error: true
+
+ ## PAGE COVER ##
- alias: Cover settings page
conditions: '{{ nspanel_event.page == page.cover }}'
- sequence: &refresh_page_coversettings
- ##### COVER - OPEN / CLOSE #####
- - *variables-settings_entity
- - if: '{{ settings_entity_domain == "cover" }}'
+ sequence: &refresh_page_cover
+ ##### COVER State
+ - service: '{{ nextion.command.value }}'
+ data:
+ component: cover.coverslider
+ message: '{{ (state_attr(nspanel_event.entity, "current_position") | int ) | round(0) }}'
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: cover.cover_value
+ message: '{{ (state_attr(nspanel_event.entity, "current_position") | int ) | round(0) }} %'
+ continue_on_error: true
+
+ ##### COVER Battery ICON Yes / NO #####
+ - variables:
+ battery_level: >
+ {% if state_attr(nspanel_event.entity, "battery") | default("unavailable") not in ["unavailable", "unknown", "", None] %}
+ {{ state_attr(nspanel_event.entity, "battery") | default("unavailable") }}
+ {% elif expand(device_entities(device_id(nspanel_event.entity)))
+ | selectattr("attributes.device_class", "defined")
+ | selectattr("attributes.device_class", "eq", "battery")
+ | map(attribute="state")
+ | map("float")
+ | list
+ | count > 0 %}
+ {{
+ expand(device_entities(device_id(nspanel_event.entity)))
+ | selectattr("attributes.device_class", "defined")
+ | selectattr("attributes.device_class", "eq", "battery")
+ | map(attribute="state") | map("float")
+ | list
+ | first
+ | round(0)
+ }}
+ {% elif has_value(nspanel_event.entity | replace("cover.","sensor.") ~ "_battery") %}
+ {{ states(nspanel_event.entity | replace("cover.","sensor.") ~ "_battery", rounded=true) | default("unavailable") }}
+ {% elif has_value(nspanel_event.entity | replace("cover.","sensor.") | replace("cover", "battery")) %}
+ {{ states(nspanel_event.entity | replace("cover.","sensor.") | replace("cover", "battery"), rounded=true) | default("unavailable") }}
+ {% else %} unavailable
+ {% endif %}
+ - if: '{{ is_number(battery_level) }}'
then:
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
- component: coversettings.icon_state
- message: >
- {{
- all_icons[settings_entity_dict.icon.split(":")[1]] | default(settings_entity_dict.icon if settings_entity_dict.icon is defined and settings_entity_dict.icon is string else nextion.icon.domain.cover)
- if settings_entity_dict.icon not in ["unavailable", "unknown", "", None] and settings_entity_dict.icon | length > 0
- else nextion.icon.domain.cover
- }}
+ component: cover.battery_value
+ message: '{{ battery_level }} %'
continue_on_error: true
+ ### ICON Battery Font Color ###
- *delay-default
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
- component: coversettings.icon_state
- message: >
- {{
- (
- settings_entity_dict.icon_color_rgb
- if is_number(settings_entity_dict.icon_color_rgb)
- else
- ((settings_entity_dict.icon_color_rgb[0] //(2**3)) *(2**11))+
- ((settings_entity_dict.icon_color_rgb[1] //(2**2)) *(2**5))+
- (settings_entity_dict.icon_color_rgb[2] //(2**3))
- )
- if states(settings_entity_dict.entity) in ["open", "opening"]
- else nextion.color.grey_light
- }}
+ component: cover.battery_icon
+ foreground: '{{ nextion.color.grey_super_light }}'
+ background: []
continue_on_error: true
+ ### ICON Battery Font ###
- *delay-default
- service: '{{ nextion.command.text_printf }}'
data:
- component: coversettings.cover_name
- message: >
- {{
- settings_entity_dict.name
- if
- settings_entity_dict.name is defined
- and settings_entity_dict.name is string
- and settings_entity_dict.name | length > 0
- else
- (
- state_attr(settings_entity_dict.entity, "friendly_name")
- if state_attr(settings_entity_dict.entity, "friendly_name") | length > 0
- else settings_entity_dict.entity
- )
- }}
+ component: cover.battery_icon
+ message: '{{ all_icons["battery-medium"] }}'
continue_on_error: true
- ##### COVER State
- - service: '{{ nextion.command.value }}'
- data:
- component: coversettings.coverslider
- message: '{{ (state_attr(settings_entity_dict.entity, "current_position") | int ) | round(0) }}'
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: coversettings.cover_value
- message: '{{ (state_attr(settings_entity_dict.entity, "current_position") | int ) | round(0) }} %'
- continue_on_error: true
+ ## PAGE FAN ##
+ - alias: Fan settings page
+ conditions: '{{ nspanel_event.page == page.fan }}'
+ sequence: &refresh_page_fan
+ - variables:
+ fan:
+ supported_features: '{{ state_attr(nspanel_event.entity, "supported_features") | int(0) }}'
+ percentage: >
+ {{
+ state_attr(nspanel_event.entity, "percentage") | int(0)
+ if is_state(nspanel_event.entity, 'on')
+ else 0
+ }}
+ steps: >
+ {% set percentage_step = state_attr(nspanel_event.entity, "percentage_step") | float(0) %}
+ {{
+ (100/percentage_step) | round(0) | int(0)
+ if percentage_step > 0
+ else 0
+ }}
+ - condition: '{{ fan.steps > 0 and fan.supported_features | bitwise_and(1) > 0 }}'
+ - service: '{{ nextion.command.value }}'
+ data:
+ component: fanslider
+ message: '{{ ((fan.percentage / 100) * fan.steps) | round(0) | int(0) }}'
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: fanslider.maxval={{ fan.steps }}
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: fan_value
+ message: '{{ fan.percentage }}%'
+ continue_on_error: true
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: button_up.pco={{ nextion.color.grey_white if fan.percentage < 100 else nextion.color.grey_dark }}
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: button_down.pco={{ nextion.color.grey_white if fan.percentage > 0 else nextion.color.grey_dark }}
+ continue_on_error: true
+ - *delay-default
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: button_off.pco={{ nextion.color.grey_white if fan.percentage > 0 else nextion.color.grey_dark }}
+ continue_on_error: true
+ - *delay-default
- ##### COVER Battery ICON Yes / NO #####
- - variables:
- battery_level: >
- {% if state_attr(settings_entity_dict.entity, "battery") | default("unavailable") not in ["unavailable", "unknown", "", None] %}
- {{ state_attr(settings_entity_dict.entity, "battery") | default("unavailable") }}
- {% elif expand(device_entities(device_id(settings_entity_dict.entity)))
- | selectattr("attributes.device_class", "defined")
- | selectattr("attributes.device_class", "eq", "battery")
- | map(attribute="state")
- | map("float")
- | list
- | count > 0 %}
- {{
- expand(device_entities(device_id(settings_entity_dict.entity)))
- | selectattr("attributes.device_class", "defined")
- | selectattr("attributes.device_class", "eq", "battery")
- | map(attribute="state") | map("float")
- | list
- | first
- }}
- {% elif states(settings_entity_dict.entity | replace("cover.","sensor.") ~ "_battery") | default("unavailable") not in ["unavailable", "unknown", "", None] %}
- {{ states(settings_entity_dict.entity | replace("cover.","sensor.") ~ "_battery") | default("unavailable") }}
- {% elif states(settings_entity_dict.entity | replace("cover.","sensor.") | replace("cover", "battery")) | default("unavailable") not in ["unavailable", "unknown", "", None] %}
- {{ states(settings_entity_dict.entity | replace("cover.","sensor.") | replace("cover", "battery")) | default("unavailable") }}
- {% else %} unavailable
- {% endif %}
- - if: '{{ is_number(battery_level) }}'
- then:
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: coversettings.battery_value
- message: '{{ battery_level | round(0) }} %'
- continue_on_error: true
- ### ICON Battery Font Color ###
- - *delay-default
- - service: '{{ nextion.command.font_color }}'
- data:
- component: coversettings.battery_icon
- message: '{{ nextion.color.grey_super_light }}'
- continue_on_error: true
- ### ICON Battery Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: coversettings.battery_icon
- message: '{{ all_icons["battery-medium"] }}'
- continue_on_error: true
+ ## PAGE ALARM ##
+ - alias: Alarm settings page
+ conditions: '{{ nspanel_event.page == page.alarm }}'
+ sequence: &refresh-page_alarm
+ - variables:
+ alarm_entity: !input alarm
+ - if: '{{ alarm_entity is string and alarm_entity is match "alarm_control_panel." }}'
+ then:
+ - variables: #https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/const.py
+ alarm:
+ state: '{{ states(alarm_entity) | default("unavailable") }}'
+ friendly_name: '{{ state_attr(alarm_entity, "friendly_name") }}'
+ supported_features: '{{ state_attr(alarm_entity, "supported_features") | int(0) }}'
+ code_format: '{{ state_attr(alarm_entity, "code_format") }}'
+ code_arm_required: '{{ state_attr(alarm_entity, "code_arm_required") }}'
+ - condition: '{{ alarm.supported_features > 0 }}'
+ - service: '{{ nextion.command.alarm_settings }}'
+ data:
+ page_title: '{{ alarm.friendly_name }}'
+ state: '{{ alarm.state }}'
+ supported_features: '{{ alarm.supported_features }}'
+ code_format: '{{ alarm.code_format if alarm.code_format else "none" }}'
+ code_arm_required: '{{ alarm.code_arm_required if alarm.code_arm_required else false }}'
+ entity: '{{ alarm_entity }}'
+ mui_alarm: '{{ dict.values(mui[language].alarm) | list }}'
+ continue_on_error: true
## PAGE CLIMATE ##
- alias: Climate page
conditions: '{{ nspanel_event.page == page.climate }}'
sequence: &refresh_page_climate
- - *variables-settings_entity
- &variables-climate_entity
variables:
- settings_entity_dict: >
- {% if settings_entity_dict.entity is not defined and settings_entity_dict.page == page.home and settings_entity_dict.component == 'climate' %}
- {
- 'page': '{{ settings_entity_dict.page }}',
- 'entity': '{{ climate }}',
- 'name': >
- {{
- state_attr(climate, "friendly_name") | default(mui[language].no_name)
- if
- climate is string and
- state_attr(climate, "friendly_name") is string and
- state_attr(climate, "friendly_name") | length > 0
- else climate
- }}
- }
- {% else %}{{ settings_entity_dict }}
- {% endif %}
- climate_entity: '{{ settings_entity_dict.entity if settings_entity_dict.entity is defined }}'
+ climate_entity_temp: '{{ nspanel_event.entity if nspanel_event.entity is defined }}'
+ climate_entity: '{{ thermostat_embedded if climate_entity_temp == "embedded_climate" else climate_entity_temp }}'
settings_entity_domain: >
{{
climate_entity.split(".")[0]
@@ -7449,112 +7690,113 @@ action:
}}
hvac_modes: '{{ state_attr(climate_entity, "hvac_modes") if settings_entity_domain == "climate" }}'
- - if: '{{ settings_entity_domain == "climate" }}'
+ - condition: '{{ settings_entity_domain == "climate" }}'
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: page_label
+ message: '{{ state_attr(climate_entity, "friendly_name") }}'
+ continue_on_error: true
+
+ ##### Values #####
+ - &variables-climate_page
+ variables:
+ climate_page_entities:
+ - entity: !input 'climate_value01'
+ icon: !input 'climate_value01_icon'
+ icon_color_rgb: !input 'climate_value01_icon_color'
+ label_color_rgb: !input 'climate_value01_label_color'
+ page: climate
+ component: value01
+ - entity: !input 'climate_value02'
+ icon: !input 'climate_value02_icon'
+ icon_color_rgb: !input 'climate_value02_icon_color'
+ label_color_rgb: !input 'climate_value02_label_color'
+ page: climate
+ component: value02
+ - entity: !input 'climate_value03'
+ icon: !input 'climate_value03_icon'
+ icon_color_rgb: !input 'climate_value03_icon_color'
+ label_color_rgb: !input 'climate_value03_label_color'
+ page: climate
+ component: value03
+ - entity: !input 'climate_value04'
+ icon: !input 'climate_value04_icon'
+ icon_color_rgb: !input 'climate_value04_icon_color'
+ label_color_rgb: !input 'climate_value04_label_color'
+ page: climate
+ component: value04
+ - repeat:
+ for_each: '{{ climate_page_entities }}'
+ sequence: *display_value
+
+ ##### Slider & climate values #####
+ - &climate-update_slider
+ if: '{{ not (climate_entity == climate and embedded_climate) }}'
then:
- ##### Page title #####
- - service: '{{ nextion.command.text_printf }}'
+ - variables:
+ current_temp: '{{ state_attr(climate_entity, "current_temperature") | float(-999) | round(1) }}'
+ target_temp: >
+ {{
+ state_attr(climate_entity, "temperature") | float(-999) | round(1)
+ if has_value(climate_entity)
+ else -999
+ }}
+ temp_offset: '{{ (state_attr(climate_entity, "min_temp") | float(5) * 10) | round(0) | int }}'
+ max_temp: '{{ (state_attr(climate_entity, "max_temp") | float(25) * 10) | round(0) | int }}'
+ temp_step: >
+ {% set target_temp_step = state_attr(climate_entity, "target_temp_step") %}
+ {% if not is_number(target_temp_step) %}
+ {% set target_temp_step = state_attr(climate_entity, "target_temperature_step") %}
+ {% endif %}
+ {% set target_temp_step = target_temp_step | float(0.5) | abs %}
+ {{ ((10 * target_temp_step) | round(0) | int) if is_number(target_temp_step) and target_temp_step > 0 else 10 }}
+ total_steps: '{{ ((max_temp-temp_offset)/temp_step) | round(0) | int }}'
+ climate_state: '{{ states(climate_entity) | default("unavailable") if climate_entity is string else "unavailable" }}'
+ hvac_action: '{{ state_attr(climate_entity, "hvac_action") }}'
+ climate_action: '{{ hvac_action if hvac_action not in ["unavailable", "unknown", "", None] else climate_state }}'
+ climate_icon: >
+ {% if "off" in climate_action %}{{ all_icons.blank }}
+ {% elif "heating" in climate_action or "heat" in climate_action %}{{ all_icons["thermometer-lines"] }}
+ {% elif "cooling" in climate_action or "cool" in climate_action %}{{ all_icons.snowflake }}
+ {% elif "drying" in climate_action or "dry" in climate_action %}{{ all_icons["water-percent"] }}
+ {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ all_icons.fan }}
+ {% elif "heat_cool" in climate_action %}{{ all_icons.autorenew }}
+ {% elif "auto" in climate_action %}{{ all_icons["calendar-sync"] }}
+ {% elif "idle" in climate_action %}{{ all_icons.thermometer }}
+ {% else %}{{ all_icons.blank }}
+ {% endif %}
+ - *delay-default
+ - service: '{{ nextion.command.set_climate }}'
data:
- component: climate.climate_label
- message: '{{ settings_entity_dict.name }}'
+ current_temp: '{{ current_temp }}'
+ target_temp: '{{ target_temp }}'
+ temp_step: '{{ temp_step }}'
+ total_steps: '{{ total_steps }}'
+ temp_offset: '{{ temp_offset }}'
+ climate_icon: '{{ climate_icon }}'
+ embedded_climate: '{{ embedded_climate }}'
continue_on_error: true
- ##### Values #####
- - &variables-climate_page
- variables:
- climate_page_entities:
- - entity: !input 'climate_value01'
- icon: !input 'climate_value01_icon'
- icon_color_rgb: !input 'climate_value01_icon_color'
- label_color_rgb: !input 'climate_value01_label_color'
- page: climate
- component: value01
- - entity: !input 'climate_value02'
- icon: !input 'climate_value02_icon'
- icon_color_rgb: !input 'climate_value02_icon_color'
- label_color_rgb: !input 'climate_value02_label_color'
- page: climate
- component: value02
- - entity: !input 'climate_value03'
- icon: !input 'climate_value03_icon'
- icon_color_rgb: !input 'climate_value03_icon_color'
- label_color_rgb: !input 'climate_value03_label_color'
- page: climate
- component: value03
- - entity: !input 'climate_value04'
- icon: !input 'climate_value04_icon'
- icon_color_rgb: !input 'climate_value04_icon_color'
- label_color_rgb: !input 'climate_value04_label_color'
- page: climate
- component: value04
+ ##### Climate buttons #####
+ - &climate-update_buttons
+ if: '{{ not (climate_entity == climate and embedded_climate) }}'
+ then:
- repeat:
- for_each: '{{ climate_page_entities }}'
- sequence: *display_value
-
- ##### Slider & climate values #####
- - &climate-update_slider
- if: '{{ true }}'
- then:
- - variables:
- current_temp: '{{ state_attr(climate_entity, "current_temperature") | float(-999) | round(1) }}'
- target_temp: >
- {{
- state_attr(climate_entity, "temperature") | float(-999) | round(1)
- if states(climate_entity) not in ["unavailable", "unknown", "", None, "off"]
- else -999
- }}
- temp_offset: '{{ (state_attr(climate_entity, "min_temp") | float(5) * 10) | round(0) | int }}'
- max_temp: '{{ (state_attr(climate_entity, "max_temp") | float(25) * 10) | round(0) | int }}'
- temp_step: >
- {% set target_temp_step = state_attr(climate_entity, "target_temp_step") %}
- {% if not is_number(target_temp_step) %}
- {% set target_temp_step = state_attr(climate_entity, "target_temperature_step") %}
- {% endif %}
- {% set target_temp_step = target_temp_step | float(0.5) | abs %}
- {{ ((10 * target_temp_step) | round(0) | int) if is_number(target_temp_step) and target_temp_step > 0 else 10 }}
- total_steps: '{{ ((max_temp-temp_offset)/temp_step) | round(0) | int }}'
- climate_state: '{{ states(climate_entity) | default("unavailable") if climate_entity is string else "unavailable" }}'
- hvac_action: '{{ state_attr(climate_entity, "hvac_action") }}'
- climate_action: '{{ hvac_action if hvac_action not in ["unavailable", "unknown", "", None] else climate_state }}'
- climate_icon: >
- {% if "off" in climate_action %}{{ all_icons.blank }}
- {% elif "heating" in climate_action or "heat" in climate_action %}{{ all_icons["thermometer-lines"] }}
- {% elif "cooling" in climate_action or "cool" in climate_action %}{{ all_icons.snowflake }}
- {% elif "drying" in climate_action or "dry" in climate_action %}{{ all_icons["water-percent"] }}
- {% elif "fan" in climate_action or "fan_only" in climate_action %}{{ all_icons.fan }}
- {% elif "heat_cool" in climate_action %}{{ all_icons.autorenew }}
- {% elif "auto" in climate_action %}{{ all_icons["calendar-sync"] }}
- {% elif "idle" in climate_action %}{{ all_icons.thermometer }}
- {% else %}{{ all_icons.blank }}
- {% endif %}
- - *delay-default
- - service: '{{ nextion.command.set_climate }}'
- data:
- current_temp: '{{ current_temp }}'
- target_temp: '{{ target_temp }}'
- temp_step: '{{ temp_step }}'
- total_steps: '{{ total_steps }}'
- slider_val: '{{ ((10*target_temp - temp_offset) / temp_step) | round(0) | int }}'
- temp_offset: '{{ temp_offset }}'
- climate_icon: '{{ climate_icon }}'
- continue_on_error: true
-
- ##### Climate buttons #####
- - &climate-update_buttons
- repeat:
for_each: '{{ page_climate.buttons.hvac_mode }}'
sequence:
- condition: '{{ repeat.item.mode in hvac_modes }}'
- *delay-default
### ICON Font Color ###
- - service: '{{ nextion.command.font_color }}'
+ - service: '{{ nextion.command.set_component_color }}'
data:
component: 'climate.{{ repeat.item.component }}_icon'
- message: >
+ foreground: >
{{
nextion.color[repeat.item.color]
if states(climate_entity) == repeat.item.mode
else nextion.color.disabled
}}
+ background: []
continue_on_error: true
### ICON Font ###
- *delay-default
@@ -7570,70 +7812,68 @@ action:
component: '{{ repeat.item.component }}'
continue_on_error: true
- ##### Climate custom buttons #####
- - &climate-update_custom_buttons
- if: '{{ true }}'
- then:
- - &climate-update_custom_buttons-variables
- variables:
- climate_custom_buttons:
- - entity: !input climate_button08
- icon: !input climate_button08_icon
- icon_color_rgb: !input climate_button08_icon_color
- component: button08
- - entity: !input climate_button09
- icon: !input climate_button09_icon
- icon_color_rgb: !input climate_button09_icon_color
- component: button09
- - &climate-update_custom_buttons-update
- repeat:
- for_each: '{{ climate_custom_buttons }}'
- sequence:
- - condition: '{{ repeat.item.entity is defined and repeat.item.entity is string and repeat.item.entity | length > 0 }}'
- - variables:
- entity_domain: >
- {{
- repeat.item.entity.split(".")[0]
- if
- repeat.item.entity is defined and
- repeat.item.entity is string and
- repeat.item.entity.split(".") | count > 0
- else "unknown"
- }}
- - condition: '{{ entity_domain != "unknown" }}'
- - *delay-default
- ### ICON Font Color ###
- - service: '{{ nextion.command.font_color }}'
- data:
- component: 'climate.{{ repeat.item.component }}_icon'
- message: >
- {{
- ((repeat.item.icon_color_rgb[0] //(2**3)) *(2**11))+((repeat.item.icon_color_rgb[1] //(2**2)) *(2**5))+(repeat.item.icon_color_rgb[2] //(2**3))
- if states(repeat.item.entity) in ["on", "true", true, "open", "opening"]
- else nextion.color.disabled
- }}
- continue_on_error: true
- ### ICON Font ###
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: 'climate.{{ repeat.item.component }}_icon'
- message: >
- {{
- all_icons[repeat.item.icon.split(":")[1]] | default(all_icons.unknown)
- if repeat.item.icon is defined and repeat.item.icon is string and ":" in repeat.item.icon and repeat.item.icon.split(":") | count > 0
- else nextion.icon.domain[entity_domain] | default(all_icons.unknown)
- }}
- continue_on_error: true
- ### Enable button click ###
- - *delay-default
- - service: '{{ nextion.command.show }}'
- data:
- component: '{{ repeat.item.component }}'
- continue_on_error: true
- else:
- ##### Return to Home page in case is not a climate entity #####
- - *jump_page_home
+ ##### Climate custom buttons #####
+ - &climate-update_custom_buttons
+ if: '{{ true }}'
+ then:
+ - &climate-update_custom_buttons-variables
+ variables:
+ climate_custom_buttons:
+ - entity: !input climate_button08
+ icon: !input climate_button08_icon
+ icon_color_rgb: !input climate_button08_icon_color
+ component: button08
+ - entity: !input climate_button09
+ icon: !input climate_button09_icon
+ icon_color_rgb: !input climate_button09_icon_color
+ component: button09
+ - &climate-update_custom_buttons-update
+ repeat:
+ for_each: '{{ climate_custom_buttons }}'
+ sequence:
+ - condition: '{{ repeat.item.entity is defined and repeat.item.entity is string and repeat.item.entity | length > 0 }}'
+ - variables:
+ entity_domain: >
+ {{
+ repeat.item.entity.split(".")[0]
+ if
+ repeat.item.entity is defined and
+ repeat.item.entity is string and
+ repeat.item.entity.split(".") | count > 0
+ else "unknown"
+ }}
+ - condition: '{{ entity_domain != "unknown" }}'
+ - *delay-default
+ ### ICON Font Color ###
+ - service: '{{ nextion.command.set_component_color }}'
+ data:
+ component: 'climate.{{ repeat.item.component }}_icon'
+ foreground: >
+ {{
+ repeat.item.icon_color_rgb
+ if states(repeat.item.entity) in ["on", "true", true, "open", "opening"]
+ else nextion.color.disabled
+ }}
+ background: []
+ continue_on_error: true
+ ### ICON Font ###
+ - *delay-default
+ - service: '{{ nextion.command.text_printf }}'
+ data:
+ component: 'climate.{{ repeat.item.component }}_icon'
+ message: >
+ {{
+ all_icons[repeat.item.icon.split(":")[1]] | default(all_icons.unknown)
+ if repeat.item.icon is defined and repeat.item.icon is string and ":" in repeat.item.icon and repeat.item.icon.split(":") | count > 0
+ else nextion.icon.domain[entity_domain] | default(all_icons.unknown)
+ }}
+ continue_on_error: true
+ ### Enable button click ###
+ - *delay-default
+ - service: '{{ nextion.command.show }}'
+ data:
+ component: '{{ repeat.item.component }}'
+ continue_on_error: true
## ENTITY PAGES 01 - 04 ##
- alias: Entity pages
@@ -7838,7 +8078,7 @@ action:
- if: '{{ repeat.item.entity is string and repeat.item.entity | length > 0 }}'
then:
- variables:
- repeat_item_state: '{{ states(repeat.item.entity) | default("unavailable") }}'
+ repeat_item_state: '{{ states(repeat.item.entity, rounded=true) | default("unavailable") }}'
repeat_item_icon: >
{% if repeat.item.icon is string and repeat.item.icon | length > 0 %}
{{
@@ -7874,6 +8114,7 @@ action:
{% elif "OpenWeatherMap" in weather_attribution %} OpenWeather
{% elif "SMHI" in weather_attribution %} SMHI
{% elif "met.no" in weather_attribution %} Met.no
+ {% elif "Météo-France" in weather_attribution %} Meteo_France
{% else %} Other
{% endif %}
weather_units:
@@ -7918,18 +8159,103 @@ action:
##### Display weather data only when available #####
- variables:
+ datetime_is_string: '{{ state_attr(weather_entity, "forecast")[0] is defined and state_attr(weather_entity, "forecast")[0]["datetime"] is string }}'
forecast_day: >
- {{ state_attr(weather_entity, "forecast") | default([])
- | selectattr("datetime", "defined")
- | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | timestamp_local )
- | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local )
- | list
- }}
+ {% if datetime_is_string %}
+ {{
+ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | timestamp_local )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | timestamp_local )
+ | list
+ }}
+ {% else %}
+ [
+ {
+ 'datetime': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="datetime") | list | first | as_timestamp | timestamp_local
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="datetime") | list | count > 0
+ else "" }}',
+ 'condition': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("condition", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="condition") | list | first
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("condition", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="condition") | list | count > 0
+ else "" }}',
+ 'temperature': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("temperature", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="temperature") | list | first
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("temperature", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="temperature") | list | count > 0
+ else "" }}',
+ 'templow': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("templow", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="templow") | list | first
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("templow", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="templow") | list | count > 0
+ else "" }}',
+ 'precipitation': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("precipitation", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="precipitation") | list | first
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("precipitation", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="precipitation") | list | count > 0
+ else "" }}',
+ 'wind_speed': '{{ state_attr(weather_entity, "forecast") | default([])
+ | selectattr("wind_speed", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="wind_speed") | list | first
+ if state_attr(weather_entity, "forecast") | default([])
+ | selectattr("wind_speed", "defined")
+ | selectattr("datetime", "defined")
+ | selectattr("datetime", ">=", (today_at("00:00") + timedelta(days= page_index)) | as_timestamp | as_datetime )
+ | selectattr("datetime", "<", (today_at("00:00") + timedelta(days= (page_index+1))) | as_timestamp | as_datetime )
+ | map(attribute="wind_speed") | list | count > 0
+ else "" }}'
+ }
+ ]
+ {% endif %}
- if: '{{ forecast_day | count > 0 or page_index == 0 }}'
then: # Display forecast
- variables:
metnoweather: '{{ weather_type == "Met.no" }}'
- metnoweather_hourly_forecast: '{{ state_attr(weather_entity ~ "_hourly", "forecast") if metnoweather and states(weather_entity ~ "_hourly") not in ["unavailable", "unknown", "", None] }}'
+ metnoweather_hourly_forecast: '{{ state_attr(weather_entity ~ "_hourly", "forecast") if metnoweather and has_value(weather_entity ~ "_hourly") }}'
forecast_day: >
{% if forecast_day | count > 0 %}{{ forecast_day }}
{% elif metnoweather and metnoweather_hourly_forecast %}
@@ -7962,97 +8288,97 @@ action:
temp_min: >
{{ forecast_day | selectattr("templow", "defined") | map(attribute="templow") | map("float") | list | min
if forecast_day | selectattr("templow", "defined") | map(attribute="templow") | map("float") | list | count > 0
- else forecast_day | selectattr("temperature", "defined") | map(attribute="temperature") | map("float") | list | min | default("unknown")
+ else forecast_day | selectattr("temperature", "defined") | rejectattr("temperature", "eq", "") | map(attribute="temperature") | map("float") | list | min | default("unknown")
}}
temp_max: >
{{
- forecast_day | selectattr("temperature", "defined") | map(attribute="temperature") | map("float") | list | max
- if forecast_day | selectattr("temperature", "defined") | map(attribute="temperature") | map("float") | list | count > 0
+ forecast_day | selectattr("temperature", "defined") | rejectattr("temperature", "eq", "") | map(attribute="temperature") | map("float") | list | max
+ if forecast_day | selectattr("temperature", "defined") | rejectattr("temperature", "eq", "") | map(attribute="temperature") | map("float") | list | count > 0
}}
condition: >
{{
- forecast_day | selectattr("condition", "defined") | map(attribute="condition") | list | first
- if forecast_day | selectattr("condition", "defined") | map(attribute="condition") | list | count > 0
+ forecast_day | selectattr("condition", "defined") | rejectattr("condition", "eq", "") | map(attribute="condition") | list | first
+ if forecast_day | selectattr("condition", "defined") | rejectattr("condition", "eq", "") | map(attribute="condition") | list | count > 0
}}
precipitation: >
{{
- forecast_day | selectattr("precipitation", "defined") | map(attribute="precipitation") | map("float") | list | sum
- if forecast_day | selectattr("precipitation", "defined") | map(attribute="precipitation") | map("float") | list | count > 0
+ forecast_day | selectattr("precipitation", "defined") | rejectattr("precipitation", "eq", "") | map(attribute="precipitation") | map("float") | list | sum | round(0)
+ if forecast_day | selectattr("precipitation", "defined") | rejectattr("precipitation", "eq", "") | map(attribute="precipitation") | map("float") | list | count > 0
}}
precipitation_probability: >
{{
- forecast_day | selectattr("precipitation_probability", "defined") | map(attribute="precipitation_probability") | map("float") | list | max
- if forecast_day | selectattr("precipitation_probability", "defined") | map(attribute="precipitation_probability") | map("float") | list | count > 0
+ forecast_day | selectattr("precipitation_probability", "defined") | rejectattr("precipitation_probability", "eq", "") | map(attribute="precipitation_probability") | map("float") | list | max | round(0)
+ if forecast_day | selectattr("precipitation_probability", "defined") | rejectattr("precipitation_probability", "eq", "") | map(attribute="precipitation_probability") | map("float") | list | count > 0
}}
pressure: >
{{
- forecast_day | selectattr("pressure", "defined") | map(attribute="pressure") | map("float") | list | max
- if forecast_day | selectattr("pressure", "defined") | map(attribute="pressure") | map("float") | list | count > 0
+ forecast_day | selectattr("pressure", "defined") | rejectattr("pressure", "eq", "") | map(attribute="pressure") | map("float") | list | max | round(0)
+ if forecast_day | selectattr("pressure", "defined") | rejectattr("pressure", "eq", "") | map(attribute="pressure") | map("float") | list | count > 0
}}
wind_speed: >
{{
- forecast_day | selectattr("wind_speed", "defined") | map(attribute="wind_speed") | map("float") | list | max
- if forecast_day | selectattr("wind_speed", "defined") | map(attribute="wind_speed") | map("float") | list | count > 0
+ forecast_day | selectattr("wind_speed", "defined") | rejectattr("wind_speed", "eq", "") | map(attribute="wind_speed") | map("float") | list | max | round(0)
+ if forecast_day | selectattr("wind_speed", "defined") | rejectattr("wind_speed", "eq", "") | map(attribute="wind_speed") | map("float") | list | count > 0
}}
hours_of_sun: >
{{
- states(accuweather_sensor_prefix ~ "hours_of_sun" ~ accuweather_sensor_sufix) | default("unknown")
+ states(accuweather_sensor_prefix ~ "hours_of_sun" ~ accuweather_sensor_sufix, rounded=true) | default("unknown")
if accuweather
else
(
- forecast_day | selectattr("hours_of_sun", "defined") | map(attribute="hours_of_sun") | map("float") | list | sum
- if forecast_day | selectattr("hours_of_sun", "defined") | map(attribute="hours_of_sun") | map("float") | list | count > 0
+ forecast_day | selectattr("hours_of_sun", "defined") | rejectattr("hours_of_sun", "eq", "") | map(attribute="hours_of_sun") | map("float") | list | sum | round(0)
+ if forecast_day | selectattr("hours_of_sun", "defined") | rejectattr("hours_of_sun", "eq", "") | map(attribute="hours_of_sun") | map("float") | list | count > 0
)
}}
uv_index: >
{{
- states(accuweather_sensor_prefix ~ "uv_index" ~ accuweather_sensor_sufix) | default("unknown")
+ states(accuweather_sensor_prefix ~ "uv_index" ~ accuweather_sensor_sufix, rounded=true) | default("unknown")
if accuweather
else
(
- forecast_day | selectattr("uv_index", "defined") | map(attribute="uv_index") | map("float") | list | max
- if forecast_day | selectattr("uv_index", "defined") | map(attribute="uv_index") | map("float") | list | count > 0
+ forecast_day | selectattr("uv_index", "defined") | rejectattr("uv_index", "eq", "") | map(attribute="uv_index") | map("float") | list | max | round(0)
+ if forecast_day | selectattr("uv_index", "defined") | rejectattr("uv_index", "eq", "") | map(attribute="uv_index") | map("float") | list | count > 0
)
}}
thunderstorm_probability: >
{{
- states(accuweather_sensor_prefix ~ "thunderstorm_probability_day" ~ accuweather_sensor_sufix) | default("unknown")
+ states(accuweather_sensor_prefix ~ "thunderstorm_probability_day" ~ accuweather_sensor_sufix, rounded=true) | default("unknown")
if accuweather
else
(
- forecast_day | selectattr("thunderstorm_probability", "defined") | map(attribute="thunderstorm_probability") | map("float") | list | max
- if forecast_day | selectattr("thunderstorm_probability", "defined") | map(attribute="thunderstorm_probability") | map("float") | list | count > 0
+ forecast_day | selectattr("thunderstorm_probability", "defined") | rejectattr("thunderstorm_probability", "eq", "") | map(attribute="thunderstorm_probability") | map("float") | list | max | round(0)
+ if forecast_day | selectattr("thunderstorm_probability", "defined") | rejectattr("thunderstorm_probability", "eq", "") | map(attribute="thunderstorm_probability") | map("float") | list | count > 0
)
}}
parameters:
- name: hours_of_sun
visibility: '{{ is_number(hours_of_sun) }}'
- value: '{{ (hours_of_sun | round(0) ~ " " ~ weather_units.hours_of_sun) if is_number(hours_of_sun) }}'
+ value: '{{ (hours_of_sun ~ " " ~ weather_units.hours_of_sun) if is_number(hours_of_sun) }}'
icon: '{{ nextion.icon.weather.sun }}'
- name: thunderstorm_probability
visibility: '{{ is_number(thunderstorm_probability) }}'
- value: '{{ (thunderstorm_probability | round(0) ~ weather_units.thunderstorm_probability) if is_number(thunderstorm_probability) }}'
+ value: '{{ (thunderstorm_probability ~ weather_units.thunderstorm_probability) if is_number(thunderstorm_probability) }}'
icon: '{{ nextion.icon.weather.lightning }}'
- name: precipitation
visibility: '{{ is_number(precipitation) or is_number(precipitation_probability) }}'
value: >
- {{ (precipitation | round(0) ~ " " ~ weather_units.precipitation) if is_number(precipitation) }}
+ {{ (precipitation ~ " " ~ weather_units.precipitation) if is_number(precipitation) }}
{{ "-" if is_number(precipitation) and is_number(precipitation_probability) }}
- {{ (precipitation_probability | round(0) ~ weather_units.precipitation_probability) if is_number(precipitation_probability) }}
+ {{ (precipitation_probability ~ weather_units.precipitation_probability) if is_number(precipitation_probability) }}
icon: '{{ nextion.icon.weather.rain }}'
- name: uv_index
visibility: '{{ is_number(uv_index) }}'
value: >
{{ (state_attr(accuweather_sensor_prefix ~ "uv_index" ~ accuweather_sensor_sufix, "level") | default(None) ~ ": ") if weather_type == "AccuWeather" }}
- {{ (uv_index | round(0) ~ weather_units.uv_index) if is_number(uv_index) }}
+ {{ (uv_index ~ weather_units.uv_index) if is_number(uv_index) }}
icon: '{{ nextion.icon.weather.protect }}'
- name: wind_speed
visibility: '{{ is_number(wind_speed) }}'
- value: '{{ (wind_speed | round(0) ~ " " ~ weather_units.wind_speed) if is_number(wind_speed) }}'
+ value: '{{ (wind_speed ~ " " ~ weather_units.wind_speed) if is_number(wind_speed) }}'
icon: '{{ nextion.icon.weather.wind }}'
- name: pressure
visibility: '{{ is_number(pressure) }}'
- value: '{{ (pressure | round(0) ~ " " ~ weather_units.pressure) if is_number(pressure) }}'
+ value: '{{ (pressure ~ " " ~ weather_units.pressure) if is_number(pressure) }}'
icon: '{{ nextion.icon.weather.gauge }}'
##### Display weather PIC when available
@@ -8109,143 +8435,184 @@ action:
- *delay-default
else: *forecast_unavailable
- ## PAGE NOTIFICATION ##
- - alias: Notification page
- conditions: '{{ nspanel_event.page == page.notification }}'
- sequence:
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: notification.notifi_text01
- message: '{{ states(notification_text) | default(mui[language].unavailable) if notification_text is string else mui[language].unavailable }}'
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: notification.notifi_label
- message: '{{ states(notification_label) | default(mui[language].unavailable) if notification_label is string else mui[language].unavailable }}'
- continue_on_error: true
-
- ## PAGE QR Code ##
- - alias: QRCode page
- conditions: '{{ nspanel_event.page == page.qrcode }}'
+ ##### Button click #####
+ - alias: Button click
+ conditions:
+ - '{{ nspanel_event.type == "button_click"}}'
+ sequence:
+ - choose:
+ - alias: Hardware buttons
+ conditions:
+ - '{{ nspanel_event.component in ["hw_bt_left", "hw_bt_right"] }}'
sequence:
+ - *variables_hardware
- variables:
- qrcode_label: !input 'qrcode_label'
- qrcode_value: !input 'qrcode_value'
- - if: '{{ qrcode_label | length > 0 }}'
- then:
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: 'qrcode_label'
- message: '{{ qrcode_label }}'
- continue_on_error: true
- - *delay-default
- - service: '{{ nextion.command.text_printf }}'
- data:
- component: 'qrcode_value'
- message: '{{ qrcode_value }}'
- continue_on_error: true
+ button_context: '{{ hardware.buttons.left if nspanel_event.component == "hw_bt_left" else hardware.buttons.right }}'
+ button_domain: >
+ {{
+ button_context.entity.split(".")[0] | default("unknown")
+ if
+ button_context.entity is string and
+ button_context.entity | length > 0 and
+ button_context.entity.split(".") | count > 0
+ else "unknown"
+ }}
+ - choose:
+ - alias: Long click
+ conditions:
+ - '{{ nspanel_event.command == "long_click"}}'
+ sequence:
+ - choose:
+ - alias: Default
+ conditions:
+ - '{{ button_context.hold_select == "Default" and button_context.entity | length > 0 }}'
+ - '{{ button_domain in ["climate", "cover", "light", "fan"] }}'
+ - '{{ button_domain != "cover" or state_attr(button_context.entity, "supported_features") | int(0) | bitwise_and(4) > 0 }}'
+ - '{{ button_domain != "fan" or state_attr(button_context.entity, "supported_features") | int(0) | bitwise_and(1) > 0 }}'
+ - '{{ button_domain != "light" or state_attr(button_context.entity, "supported_color_modes") | default("unknown") | string not in ["unknown", "onoff", enum.color_mode.unknown, enum.color_mode.onoff, "", none] }}'
+ sequence:
+ - service: '{{ nextion.command.open_entity_settings_page }}'
+ data:
+ page: '{{ button_domain }}'
+ page_label: '{{ (button_context.name | replace("\\r", " ")) if button_context.name is string and button_context.name | length > 0 else state_attr(button_context.entity, "friendly_name") }}'
+ page_icon: '{{ nextion.icon.domain[button_domain] }}'
+ page_icon_color: [-1 ] #No color set
+ entity: '{{ "embedded_climate" if button_context.entity == thermostat_embedded else button_context.entity }}'
+ back_page: '{{ page.home }}'
+ continue_on_error: true
+ - alias: Custom action - Left
+ conditions: '{{ button_context.hold_select == "Custom Action" and nspanel_event.component == "hw_bt_left" }}'
+ sequence: !input left_button_hold_custom_action
+ - alias: Custom action - Right
+ conditions: '{{ button_context.hold_select == "Custom Action" and nspanel_event.component == "hw_bt_right" }}'
+ sequence: !input right_button_hold_custom_action
+ - alias: Short click
+ conditions:
+ - '{{ nspanel_event.command == "short_click"}}'
+ sequence:
+ - condition: '{{ button_context.entity | length > 0 }}'
+ - condition: '{{ nspanel_event.component != "hw_bt_left" or hardware.buttons.left.entity != relay01_entity }}' ### Prevents blueprint control when locally controlled
+ - condition: '{{ nspanel_event.component != "hw_bt_right" or hardware.buttons.right.entity != relay02_entity }}' ### Prevents blueprint control when locally controlled
+ - service: >
+ {% if button_domain in ["light", "switch", "cover", "input_boolean", "automation", "fan"] %}
+ {{ button_domain }}.toggle
+ {% elif button_domain in ["button", "input_button"] %}
+ {{ button_domain }}.press
+ {% elif button_domain in ["scene", "script"] %}
+ {{ button_domain }}.turn_on
+ {% else %}
+ homeassistant.update_entity
+ {% endif %}
+ data:
+ entity_id: '{{ button_context.entity }}'
+ continue_on_error: true
- ## PAGE SETTINGS ##
- #- alias: Settings page
- # conditions: '{{ nspanel_event.page == page.settings }}'
- # sequence:
-
- ## PAGE BOOT ##
- #- alias: Boot page
- # conditions: '{{ nspanel_event.page == page.boot }}'
- # sequence:
-
- ## PAGE SCREENSAVER ##
- #- alias: Screensaver page
- # conditions: '{{ nspanel_event.page == page.screensaver }}'
- # sequence:
-
- - alias: Page close # general
- conditions: '{{ nspanel_event.component == "close" and nspanel_event.value == "release" }}'
- sequence:
- - *variables-settings_entity
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ settings_entity_dict.page if settings_entity_dict.page is defined else page.home }}'
- continue_on_error: true
-
- - alias: lightsetting # rgb_color, brightness, color_temp
- conditions: '{{ nspanel_event.component in ["rgb_color", "brightness_pct", "color_temp"] }}'
- sequence:
- - *variables-settings_entity
- - condition: '{{ settings_entity_dict.entity is defined and settings_entity_dict.entity is string }}'
- - service: light.turn_on
- data:
- entity_id: '{{ settings_entity_dict.entity }}'
- '{{ nspanel_event.component }}': '{{ nspanel_event.value }}'
- continue_on_error: true
-
- - alias: coversetting position
- conditions: '{{ nspanel_event.component == "cover_position" }}'
- sequence:
- - *variables-settings_entity
- - service: 'cover.set_cover_position'
- data:
- entity_id: '{{ settings_entity_dict.entity }}'
- position: '{{ nspanel_event.value }}'
- continue_on_error: true
-
- - alias: coversetting open close stop
- conditions: '{{ nspanel_event.component in ["open_cover", "close_cover", "stop_cover"] }}'
- sequence:
- - *variables-settings_entity
- - service: 'cover.{{ nspanel_event.component }}'
- data:
- entity_id: '{{ settings_entity_dict.entity }}'
- continue_on_error: true
-
- - alias: climate climateslider
+ ##### Versions mismatch #####
+ - alias: Versions
conditions:
- - '{{ nspanel_event.page in [page.climate, "climatesettings"] }}'
- - '{{ nspanel_event.component == "climate_position" }}'
+ - '{{ nspanel_event.type == "version"}}'
sequence:
- - *variables-settings_entity
- - if: '{{ settings_entity_dict.entity is string and states(settings_entity_dict.entity) != "off" }}'
+ - if:
+ - '{{ nspanel_event.blueprint == nspanel_event.esphome }}'
+ - '{{ nspanel_event.blueprint == nspanel_event.tft }}'
then:
- - variables:
- new_setpoint: '{{ nspanel_event.value | int(-999) }}'
- - if: '{{ is_number(new_setpoint) and new_setpoint > -999 }}'
- then:
- - service: climate.set_temperature
+ - service: persistent_notification.dismiss
+ data:
+ notification_id: 'NSPanel_HA_Blueprint_version_mismatch_{{ nspanel_name }}'
+ continue_on_error: true
+ else:
+ - service: persistent_notification.create
+ data:
+ notification_id: 'NSPanel_HA_Blueprint_version_mismatch_{{ nspanel_name }}'
+ title: NSPanel component version mismatch
+ message: >
+ There's a version mismatch between NSPanel_HA_Blueprint components. Please update all the components to the same version.
+
+ - Panel: {{ nspanel_name }}
+
+ - TFT: {{ nspanel_event.tft }}
+
+ - ESPHome: {{ nspanel_event.esphome }}
+
+ - Blueprint: {{ nspanel_event.blueprint }}
+ continue_on_error: true
+
+ ##### Other events #####
+ - alias: Other events
+ conditions:
+ - '{{ nspanel_event.type == "generic"}}'
+ sequence:
+ - choose:
+ - alias: light settings # rgb_color, brightness, color_temp - This was kept until we find a solution to call with rgb_color directly from ESPHome
+ conditions:
+ - '{{ nspanel_event.page == page.light }}'
+ - '{{ nspanel_event.component in ["rgb_color", "brightness_pct", "color_temp"] }}'
+ - '{{ nspanel_event.entity is defined and nspanel_event.entity is string and nspanel_event.entity | length > 0 }}'
+ sequence:
+ - service: light.turn_on
data:
- entity_id: '{{ settings_entity_dict.entity }}'
- temperature: '{{ new_setpoint / 10 }}'
+ entity_id: '{{ nspanel_event.entity }}'
+ '{{ nspanel_event.component }}': '{{ nspanel_event.value }}'
continue_on_error: true
- - alias: climate button press
- conditions:
- - '{{ nspanel_event.page == page.climate }}'
- - '{{ nspanel_event.component in ["button01", "button02", "button03", "button04", "button05", "button06", "button07"] }}'
- - '{{ nspanel_event.value == "release" }}'
- sequence:
- - *variables-settings_entity
- - *variables-climate_entity
- - condition: '{{ settings_entity_domain == "climate" }}'
- - variables:
- new_hvac_mode: >
- {{
- page_climate.buttons.hvac_mode
- | selectattr("component", "defined")
- | selectattr("component", "eq", nspanel_event.component)
- | map(attribute="mode")
- | list
- | first
- }}
- - condition: '{{ new_hvac_mode in hvac_modes and new_hvac_mode in ["off", "heat", "cool", "heat_cool", "auto", "dry", "fan_only"] }}'
- - service: climate.set_hvac_mode
- data:
- hvac_mode: '{{ new_hvac_mode }}'
- target:
- entity_id: '{{ climate_entity }}'
- continue_on_error: true
- - *climate-update_buttons
+ - alias: Jump to climate page
+ conditions:
+ - '{{ nspanel_event.page == page.home }} '
+ - '{{ nspanel_event.component == "climate" }}'
+ - '{{ nspanel_event.value == "release" }}'
+ - '{{ climate | length > 0 }} '
+ sequence:
+ - service: '{{ nextion.command.open_entity_settings_page }}'
+ data:
+ page: 'climate'
+ page_label: '{{ state_attr(climate, "friendly_name") }}'
+ page_icon: ''
+ page_icon_color: [ -1 ] #No color set
+ entity: '{{ "embedded_climate" if climate == thermostat_embedded else climate }}'
+ back_page: '{{ page.home }}'
+ continue_on_error: true
+ - alias: Show button - Notification clear
+ conditions:
+ - '{{ nspanel_event.page == page.notification }}'
+ - '{{ nspanel_event.component == "clear" }}'
+ - '{{ confirmation_message is string and states(confirmation_message) | default("unavailable") != "on" }}'
+ sequence:
+ - service: switch.turn_off
+ data:
+ entity_id: '{{ notification_unread }}'
+ continue_on_error: true
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: 'page {{ page.home }}'
+ continue_on_error: true
+
+ - alias: Show button - Notification accept
+ conditions:
+ - '{{ nspanel_event.page == page.notification }}'
+ - '{{ nspanel_event.component == "accept" }}'
+ - '{{ confirmation_message is string and states(confirmation_message) | default("unavailable") != "on" }}'
+ sequence:
+ - service: switch.turn_off
+ data:
+ entity_id: '{{ notification_unread }}'
+ continue_on_error: true
+ - service: '{{ nextion.command.notification_clear }}'
+ data: {}
+ continue_on_error: true
+ - service: '{{ nextion.command.printf }}'
+ data:
+ cmd: 'page {{ page.home }}'
+ continue_on_error: true
+
+ ##### NSPanel event #####
+ - alias: Legacy NSPanel Event
+ conditions:
+ - condition: trigger
+ id: nspanelevent_changed
+ sequence:
+ - alias: NSPanel Event component changed
+ choose:
- alias: climate custom button press
conditions:
- '{{ nspanel_event.page == page.climate }}'
@@ -8317,9 +8684,9 @@ action:
{% set button_wait = states(nspanelevent) %}
{% set button_wait = button_wait | from_json if button_wait is string and button_wait not in ["unavailable", "unknown", "", None] else { "page": "unknown", "component": "unknown", "value": "unknown" } %}
{{
- button_wait.page == nspanel_event.page and
- button_wait.component == nspanel_event.component and
- button_wait.value == "release"
+ button_wait.page is defined and button_wait.page == nspanel_event.page and
+ button_wait.component is defined and button_wait.component == nspanel_event.component and
+ button_wait.value is defined and button_wait.value == "release"
}}
timeout:
seconds: 1
@@ -8330,47 +8697,55 @@ action:
button_wait: >
{{
states(nspanelevent)
- if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", "", None]
+ if nspanelevent is string and has_value(nspanelevent)
else { "page": "unknown", "component": "unknown", "value": "unknown" }
}}
last_click_button: '{{ button_pages_buttons | selectattr("page", "defined") | selectattr("page", "eq", nspanel_event.page) | selectattr("component", "defined") | selectattr("component", "eq", nspanel_event.component) | list }}'
- condition: '{{ last_click_button | count >= 0 and button_wait.page == nspanel_event.page }}'
- - if: '{{ not wait.completed }}'
+ - variables:
+ last_click_button: '{{ last_click_button[0] }}'
+ entity_domain: >
+ {{
+ last_click_button.entity.split(".")[0] | default("unknown")
+ if
+ last_click_button.entity is string and
+ last_click_button.entity | length > 0 and
+ last_click_button.entity.split(".") | count > 0
+ else "unknown"
+ }}
+ - if: '{{ (not wait.completed and entity_domain in ["cover", "fan", "light"]) or entity_domain == "climate" }}'
then: # Long press
- - service: '{{ nextion.command.set_settings_entity }}'
- data:
- entity: '{{ last_click_button[0] }}'
- continue_on_error: true
- else: # Short press
- - variables:
- last_click_button: '{{ last_click_button[0] }}'
- entity_domain: >
- {{
- last_click_button.entity.split(".")[0] | default("unknown")
- if
- last_click_button.entity is string and
- last_click_button.entity | length > 0 and
- last_click_button.entity.split(".") | count > 0
- else "unknown"
- }}
- - condition: '{{ entity_domain not in ["unknown", "person", "binary_sensor", "sensor"] }}'
- - if: '{{ entity_domain == "climate" }}'
+ - if:
+ - '{{ entity_domain != "cover" or state_attr(last_click_button.entity, "supported_features") | int(0) | bitwise_and(4) > 0 }}'
+ - '{{ entity_domain != "fan" or state_attr(last_click_button.entity, "supported_features") | int(0) | bitwise_and(1) > 0 }}'
+ - '{{ entity_domain != "light" or state_attr(last_click_button.entity, "supported_color_modes") | default("unknown") | string not in ["unknown", "onoff", enum.color_mode.unknown, enum.color_mode.onoff, "", none] }}'
then:
- - service: '{{ nextion.command.set_settings_entity }}'
+ - service: '{{ nextion.command.open_entity_settings_page }}'
data:
- entity: '{{ last_click_button }}'
+ page: '{{ entity_domain }}'
+ page_label: '{{ (last_click_button.name | replace("\\r", " ")) if last_click_button.name is string and last_click_button.name | length > 0 else state_attr(last_click_button.entity, "friendly_name") }}'
+ page_icon: >
+ {{
+ all_icons[last_click_button.icon.split(":")[1]] | default(last_click_button.icon if last_click_button.icon is defined and last_click_button.icon is string else nextion.icon.domain[entity_domain])
+ if last_click_button.icon not in ["unavailable", "unknown", "", None] and last_click_button.icon | length > 0
+ else nextion.icon.domain[entity_domain]
+ }}
+ page_icon_color: '{{ [ last_click_button.icon_color_rgb ] if is_number(last_click_button.icon_color_rgb) else last_click_button.icon_color_rgb }}'
+ entity: '{{ "embedded_climate" if last_click_button.entity == thermostat_embedded else last_click_button.entity }}'
+ back_page: '{{ nspanel_event.page }}'
continue_on_error: true
- else:
+ else: # Short press
+ - if: '{{ entity_domain not in ["unknown", "person", "binary_sensor", "sensor"] }}'
+ then:
- if: '{{ last_click_button.confirm }}'
then:
- variables:
btn_entity_name: >-
- {%- if state_attr(last_click_button.entity, "friendly_name") != None -%}
- {{ state_attr(last_click_button.entity, "friendly_name") }}
- {%- elif state_attr(last_click_button.entity, "name") != None -%}
- {{ state_attr(last_click_button.entity, "name") }}
- {%- else -%} "unknown"
- {%- endif -%}
+ {% if last_click_button.name is defined and last_click_button.name is string and last_click_button.name | length > 0 %}{{ last_click_button.name }}
+ {% elif state_attr(last_click_button.entity, "friendly_name") != None -%}{{ state_attr(last_click_button.entity, "friendly_name") }}
+ {% elif state_attr(last_click_button.entity, "name") != None -%}{{ state_attr(last_click_button.entity, "name") }}
+ {% else %}{{ last_click_button.entity }}
+ {% endif %}
#### turn on switch confirmation_message
- service: switch.turn_on
data:
@@ -8405,7 +8780,7 @@ action:
notification_answer: >
{{
states(nspanelevent)
- if nspanelevent is string and states(nspanelevent) not in ["unavailable", "unknown", "", None]
+ if nspanelevent is string and has_value(nspanelevent)
else { "page": "unknown", "component": "unknown", "value": "unknown" }
}}
- choose:
@@ -8461,117 +8836,31 @@ action:
else:
- *service-button_changed
- - alias: Jump to climate page
- conditions:
- - '{{ nspanel_event.page == page.home }} '
- - '{{ nspanel_event.component == "climate" }}'
- - '{{ nspanel_event.value == "release" }}'
- - '{{ climate | length > 0 }} '
- sequence:
- - service: '{{ nextion.command.set_settings_entity }}'
- data:
- entity: '{{ dict(nspanel_event.items(), entity=climate, name=state_attr(climate, "friendly_name")) }}'
- continue_on_error: true
-
- - alias: Jump to weather page
- conditions:
- - '{{ nspanel_event.page == page.home }}'
- - '{{ nspanel_event.component == "weather" }}'
- sequence:
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.weatherpages[0] }}'
- continue_on_error: true
-
- - alias: Jump to QR code page
- conditions:
- - '{{ qrcode_enabled == true }}'
- - '{{ nspanel_event.page == page.home }}'
- - '{{ nspanel_event.component == "button05" }}'
- sequence:
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.qrcode }}'
- continue_on_error: true
-
- - alias: Jump to entity page
- conditions:
- - '{{ entitypages_enabled == true }}'
- - '{{ nspanel_event.page == page.home }}'
- - '{{ nspanel_event.component == "button06" }}'
- sequence:
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.entitypages[0] }}'
- continue_on_error: true
-
- - alias: Jump to notification page
- conditions:
- - '{{ nspanel_event.page == page.home }}'
- - '{{ nspanel_event.component == "button04" }}'
- - '{{ notification_text is string and states(notification_text) | length > 0 }}'
- sequence:
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.notification }}'
- continue_on_error: true
-
- - alias: Show button - Notification clear
- conditions:
- - '{{ nspanel_event.page == page.notification }}'
- - '{{ nspanel_event.component == "clear" }}'
- - '{{ confirmation_message is string and states(confirmation_message) | default("unavailable") != "on" }}'
- sequence:
- - service: switch.turn_off
- data:
- entity_id: '{{ notification_unread }}'
- continue_on_error: true
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.home }}'
- continue_on_error: true
-
- - alias: Show button - Notification accept
- conditions:
- - '{{ nspanel_event.page == page.notification }}'
- - '{{ nspanel_event.component == "accept" }}'
- - '{{ confirmation_message is string and states(confirmation_message) | default("unavailable") != "on" }}'
- sequence:
- - service: switch.turn_off
- data:
- entity_id: '{{ notification_unread }}'
- continue_on_error: true
- - service: '{{ nextion.command.notification_clear }}'
- data: {}
- continue_on_error: true
- - service: '{{ nextion.command.printf }}'
- data:
- cmd: 'page {{ page.home }}'
- continue_on_error: true
-
##### BOOT NSPANEL - automation reload #####
- alias: Automation reloaded
conditions:
- condition: trigger
- id: automation_reloaded
+ id:
+ - automation_reloaded
+ - ha_started
sequence:
- ##### Update Date & Time before showing the pages (just in case display format changed) #####
- - *refresh-datetime
+ ##### Update global settings (as user may have changed something) #####
+ - *global_settings
- choose:
## PAGE HOME ##
- - conditions: '{{ nspanel_event.page == page.home }}'
+ - conditions: '{{ page.current == page.home }}'
sequence: *refresh_page_home
## PAGE BUTTON PAGES 01 - 04 ##
- - conditions: '{{ nspanel_event.page in page.buttonpages }}'
+ - conditions: '{{ page.current in page.buttonpages }}'
sequence: *refresh_page_buttonpage
## ENTITY PAGES ##
- - conditions: '{{ nspanel_event.page in page.entitypages }}'
+ - conditions: '{{ page.current in page.entitypages }}'
sequence: *refresh-entity_pages
- ##### UPDATE BUTTONS PAGES - button page / lightsettings page / coversettings page #####
+ ##### UPDATE BUTTONS PAGES - button page / light page / cover page #####
- alias: 'Buttons entity updated'
conditions:
- condition: trigger
@@ -8611,14 +8900,14 @@ action:
- '{{ trigger.to_state.state not in ["unavailable", "unknown", "", None] }}'
- condition: or
conditions:
- - '{{ nspanel_event.page in page.buttonpages }}'
- - '{{ nspanel_event.page in [page.light, page.cover, page.climate] }}'
+ - '{{ page.current in page.buttonpages }}'
+ - '{{ page.current in [page.light, page.cover, page.climate, page.fan, page.alarm] }}'
sequence:
- choose:
- alias: "Button pages"
conditions:
- - '{{ nspanel_event.page in page.buttonpages }}'
+ - '{{ page.current in page.buttonpages }}'
sequence: #*refresh_page_buttonpage
- *variables-page_buttons
- repeat:
@@ -8626,7 +8915,7 @@ action:
{{
button_pages_buttons
| selectattr("page", "defined")
- | selectattr("page", "eq", nspanel_event.page)
+ | selectattr("page", "eq", page.current)
| selectattr("entity", "defined")
| selectattr("entity", "eq", trigger.entity_id)
| list
@@ -8634,19 +8923,28 @@ action:
sequence: *display-button_page_button
- alias: 'Light settings page'
conditions:
- - '{{ nspanel_event.page == page.light }}'
+ - '{{ page.current == page.light }}'
- '{{ trigger.entity_id is match "light." }}'
- sequence: *refresh_page_lightsettings
+ sequence: *refresh_page_light
- alias: 'Cover settings page'
conditions:
- - '{{ nspanel_event.page == page.cover }}'
+ - '{{ page.current == page.cover }}'
- '{{ trigger.entity_id is match "cover." }}'
- sequence: *refresh_page_coversettings
+ sequence: *refresh_page_cover
- alias: 'Climate page'
conditions:
- - '{{ nspanel_event.page == page.climate }}'
+ - '{{ page.current == page.climate }}'
- '{{ trigger.entity_id is match "climate." }}'
sequence: *refresh_page_climate
+ - alias: 'Fan page'
+ conditions:
+ - '{{ page.current == page.fan }}'
+ - '{{ trigger.entity_id is match "fan." }}'
+ sequence: *refresh_page_fan
+ #- alias: 'Alarm page'
+ # conditions:
+ # - '{{ page.current == page.alarm }}'
+ # sequence: *refresh-page_alarm
##### UPDATE ENTITY PAGES #####
- alias: 'Update entity pages'
@@ -8657,7 +8955,7 @@ action:
- trigger_entitypage02
- trigger_entitypage03
- trigger_entitypage04
- - '{{ nspanel_event.page in page.entitypages }}'
+ - '{{ page.current in page.entitypages }}'
sequence:
- *variables-entity_pages
- repeat:
@@ -8665,7 +8963,7 @@ action:
{{
entity_pages_entities
| selectattr("page", "defined")
- | selectattr("page", "eq", nspanel_event.page)
+ | selectattr("page", "eq", page.current)
| selectattr("entity", "defined")
| selectattr("entity", "eq", trigger.entity_id)
| list
@@ -8681,7 +8979,7 @@ action:
- climate_value02_state
- climate_value03_state
- climate_value04_state
- - '{{ nspanel_event.page == page.climate }}'
+ - '{{ page.current == page.climate }}'
sequence:
- *variables-climate_page
- repeat:
@@ -8701,7 +8999,7 @@ action:
id:
- climate_button08_state
- climate_button09_state
- - '{{ nspanel_event.page == page.climate }}'
+ - '{{ page.current == page.climate }}'
sequence:
- *climate-update_custom_buttons
@@ -8710,14 +9008,26 @@ action:
conditions:
- condition: trigger
id: climate_state
- - '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
- - '{{ nspanel_event.page == page.climate }}'
sequence:
- - variables:
- climate_entity: '{{ trigger.event.data.entity_id }}'
- hvac_modes: '{{ state_attr(climate_entity, "hvac_modes") if settings_entity_domain == "climate" }}'
- - *climate-update_slider
- - *climate-update_buttons
+ - *update-home_page-climate_chip
+ - if:
+ - '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
+ - '{{ page.current == page.climate }}'
+ then:
+ - variables:
+ climate_entity: '{{ trigger.event.data.entity_id }}'
+ hvac_modes: '{{ state_attr(climate_entity, "hvac_modes") }}'
+ - *climate-update_slider
+ - *climate-update_buttons
+
+ ##### Sync Alarm #####
+ - alias: Alarm - Sync
+ conditions:
+ - condition: trigger
+ id: alarm_state
+ #- '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
+ #- '{{ page.current == page.alarm }}'
+ sequence: *refresh-page_alarm
########## TRIGGER - HOME PAGE ###########
@@ -8729,7 +9039,7 @@ action:
- home_value01_state
- home_value02_state
- home_value03_state
- - '{{ nspanel_event.page == page.home }}'
+ - '{{ page.current == page.home }}'
sequence:
- *variables-home_page_values
- repeat:
@@ -8742,9 +9052,6 @@ action:
conditions:
- condition: trigger
id:
- - relay01_state
- - relay02_state
- - climate_state
- chip01_state
- chip02_state
- chip03_state
@@ -8752,7 +9059,8 @@ action:
- chip05_state
- chip06_state
- chip07_state
- - '{{ nspanel_event.page == page.home and trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
+ #- '{{ page.current == page.home }}'
+ #- '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
sequence:
- *variables-home_page_status_bar
- repeat:
@@ -8766,84 +9074,27 @@ action:
sequence:
- *display-home_page_status_bar
- #### SHOW BUTTON - notification ####
- - alias: Show button - Notification
- conditions:
- - condition: trigger
- id:
- - notification_text_state
- - notification_unread_state
- - '{{ nspanel_event.page == page.home }}'
- - '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
- sequence:
- - *refresh-page_home-notifications_icon
-
- ##### HW BUTTON - press #####
- - alias: Hardware button - Press
- conditions:
- - condition: trigger
- id:
- - left_button_press
- - right_button_press
- sequence:
- - variables:
- button_context: '{{ page_home.hardware.buttons.left if trigger.id == "left_button_press" else page_home.hardware.buttons.right }}'
- - wait_template: '{{ is_state(left_button if trigger.id == "left_button_press" else right_button, "off") }}'
- timeout: !input hold_delay
- continue_on_timeout: true
- - if: '{{ not wait.completed }}'
- then: # Hold
- - choose:
- - conditions: '{{ button_context.hold_select == "Default" and button_context.entity | length > 0 }}'
- sequence:
- - service: '{{ nextion.command.set_settings_entity }}'
- data:
- entity: '{{ button_context }}'
- continue_on_error: true
- - conditions: '{{ button_context.hold_select == "Custom Action" and trigger.id == "left_button_press" }}'
- sequence: !input left_button_hold_custom_action
- - conditions: '{{ button_context.hold_select == "Custom Action" and trigger.id == "right_button_press" }}'
- sequence: !input right_button_hold_custom_action
- else: # Single Click
- - condition: template
- value_template: '{{ button_context.entity | length > 0 }}'
- - variables:
- button_domain: '{{ (button_context.entity.split(".")[0] | default("unknown")) if button_context.entity | length > 0 else "unknown" }}'
- - service: >
- {% if button_domain in ["light", "switch", "cover", "input_boolean", "automation", "fan"] %}
- {{ button_domain }}.toggle
- {% elif button_domain in ["button", "input_button"] %}
- {{ button_domain }}.press
- {% elif button_domain in ["scene", "script"] %}
- {{ button_domain }}.turn_on
- {% else %}
- homeassistant.update_entity
- {% endif %}
- data:
- entity_id: '{{ button_context.entity }}'
- continue_on_error: true
-
- ##### BUTTON - state #####
- - alias: Button - State
+ ##### HW BUTTON - state #####
+ - alias: Hardware button - State
conditions:
- condition: trigger
id:
- left_button_state
- right_button_state
- - '{{ nspanel_event.page == page.home }}'
+ - '{{ page.current == page.home }}'
- '{{ trigger.to_state.state not in ["unavailable", "unknown", "", None] }}'
sequence:
##### SET hardware Button PIC on Home Page ####
- service: '{{ nextion.command.printf }}'
data:
- cmd: 'home.{{ "left" if trigger.id == "left_button_state" else "right"}}_bt_pic.pic={{ nextion.pic.hardware.button.off if trigger.to_state.state in ["off", "closed", "closing"] else nextion.pic.hardware.button.on }}'
+ cmd: 'home.{{ "left" if trigger.id == "left_button_state" else "right"}}_bt_pic.val={{ 1 if trigger.to_state.state in ["on", "open", "opened", "opening", "true", true, 1] else 0 }}'
continue_on_error: true
- condition: '{{ trigger.to_state.state not in ["off", "closed", "closing", "on", "open", "closed"] }}'
- delay:
milliseconds: 800
- service: '{{ nextion.command.printf }}'
data:
- cmd: 'home.{{ "left" if trigger.id == "left_button_state" else "right"}}_bt_pic.pic={{ nextion.pic.hardware.button.off }}'
+ cmd: 'home.{{ "left" if trigger.id == "left_button_state" else "right"}}_bt_pic.val=0'
continue_on_error: true
##### OUTDOOR TEMP - entity #####
@@ -8851,7 +9102,7 @@ action:
conditions:
- condition: trigger
id: outdoortemp_state
- - '{{ nspanel_event.page == page.home and is_number(trigger.event.data.new_state.state) }}'
+ - '{{ page.current == page.home and is_number(trigger.event.data.new_state.state) }}'
sequence:
- *refresh-page_home-outdoor_temp
@@ -8862,7 +9113,7 @@ action:
id:
- indoortemp_state
- nspaneltemp_state
- - '{{ nspanel_event.page == page.home and is_number(trigger.event.data.new_state.state) }}'
+ - '{{ page.current == page.home and is_number(trigger.event.data.new_state.state) }}'
sequence:
- *refresh-page_home-indoor_temp
@@ -8871,7 +9122,7 @@ action:
conditions:
- condition: trigger
id: weather_state_change
- - '{{ nspanel_event.page == page.home and trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
+ - '{{ page.current == page.home and trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}'
sequence:
- *refresh-page_home-outdoor_temp
- *delay-default
@@ -8889,16 +9140,19 @@ action:
data: {}
continue_on_error: true
- ##### Wake-up when slee mode is disabled #####
+ ##### Wake-up when sleep mode is disabled #####
- alias: Sleep mode changed
conditions:
- condition: trigger
id: sleep_mode_state
- - "{{ nspanel_event.page == page.screensaver }}"
+ - "{{ page.current == page.screensaver }}"
- "{{ trigger.event.data.old_state.state == 'on' }}"
- "{{ trigger.event.data.new_state.state == 'off' }}"
sequence:
- - *jump_page_home
+ service: '{{ nextion.command.wake_up }}'
+ data:
+ reset_timer: true
+ continue_on_error: true
#############################################################
##### CLOSE - Action #####
diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml
index 25070ef..f9f6ddc 100644
--- a/nspanel_esphome.yaml
+++ b/nspanel_esphome.yaml
@@ -5,56 +5,19 @@
##### For normal use with the Blueprint, no changes are necessary. #####
#####################################################################################################
-
-##### ADVANCED CONFIGURATION - activate only when you know what you do ##############################
substitutions:
- baud_rate: "115200" # requires 115200 if tft is installed but can be changed to 9600 if tft upload fails and nextion switches to 9600
- # ## usage of secrets-file ## -> comment in ###### Change ME ######
- # device_name: "nspanel-name" # Wird im Blueprint benötigt!
- # wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file.
- # wifi_password: !secret nspanel_wifi_password # add in your esphome secrets file. -> per default this is also used for ota_password and web_password
- # ota_password: !secret nspanel_ota_password # add in your esphome secrets file. - manual change in code required to activate
- # web_password: !secret nspanel_web_password # add in your esphome secrets file. - manual change in code required to activate
- # api_password: !secret nspanel_api_password # add in your esphome secrets file. - manual change in code required to activate
- # nextion_update_url: !secret nspanel_update_url # add in your esphome secrets file. Example: "http://"HOME ASSISTANT IP":8123/local/nspanel/nspanel.tft"
- # ## static ip config ##
- # ip: "10.0.0.7"
- # gw: "10.0.0.138"
- # subnet: "255.255.255.0"
- # dns: "10.0.0.138"
- # domain: ".local"
-
-###### USE THIS ONLY FOR YOUR FIRST TFT UPLOAD
-###### AND IF EXIT-REPARSE BUTTON FAILS
-###### ONCE IT WORKED, REMOVE THESE LINES
-###### https://github.com/esphome/esphome/pull/2956
-# external_components:
-# - source: github://pr#2956
-# components: [nextion]
-# refresh: 1h
-##################################################
-
-##### if you rename this file to .nspanel_esphome.yaml then you can activate nested config
-##### use the ADVANCED CONFIG-Section as device configuration
-##### https://esphome.io/guides/configuration-types.html#yaml-insertion-operator
-# <<: !include .nspanel_esphome.yaml
-
-##### END OF ADVANCED CONFIGURATION ##############################################################
+ ##### DON'T CHANGE THIS #####
+ version: "4.0"
+ #############################
##### WIFI SETUP #####
wifi:
- ssid: ${wifi_ssid}
- password: ${wifi_password}
+ networks:
+ - id: wifi_default
+ ssid: ${wifi_ssid}
+ password: ${wifi_password}
power_save_mode: none
- ##### advanced config - uncomment to use static IP-Config #####
- # manual_ip:
- # static_ip: ${ip}
- # gateway: ${gw}
- # subnet: ${subnet}
- # dns1: ${dns}
- # domain: ${domain}
- ##### Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name}"
password: ${wifi_password}
@@ -62,7 +25,7 @@ wifi:
##### ESPHOME CONFIGURATION #####
esphome:
name: ${device_name}
- min_version: 2022.10.2
+ min_version: 2023.5.0
##### TYPE OF ESP BOARD #####
esp32:
@@ -71,53 +34,60 @@ esp32:
captive_portal:
web_server:
+ id: web_server_std
port: 80
auth:
username: admin
password: ${wifi_password}
- ##### advanced config - change to use web_password #####
- # password: ${web_password}
##### OTA PASSWORD #####
ota:
+ id: ota_std
password: ${wifi_password}
- ##### advanced config - change to use ota_password #####
- # password: ${ota_password}
safe_mode: true
reboot_timeout: 3min
num_attempts: 3
##### LOGGER #####
logger:
- baud_rate: 0
- # level: WARN
-
-##### CONFIGURE INTERNAL BUZZER #####
-output:
- ##### BUZZER FOR PLAYING RINGTONES #####
- - platform: ledc
- id: buzzer_out
- pin:
- number: 21
+ id: logger_std
##### ENABLE RINGTONE MUSIC SUPPORT #####
rtttl:
id: buzzer
output: buzzer_out
+##### CONFIGURE INTERNAL BUZZER #####
+output:
+ ##### BUZZER FOR PLAYING RINGTONES #####
+ - platform: ledc
+ id: buzzer_out
+ pin:
+ number: 21
+
##### UART FOR NEXTION DISPLAY #####
uart:
+ id: tf_uart
tx_pin: 16
rx_pin: 17
- baud_rate: ${baud_rate}
- id: tf_uart
- # debug:
- # direction: BOTH
- # dummy_receiver: false
- # after:
- # delimiter: "\n"
- # sequence:
- # - lambda: UARTDebug::log_string(direction, bytes);
+ baud_rate: 115200
+
+##### Keeps time display updated #####
+time:
+ - id: time_provider
+ platform: homeassistant
+ on_time:
+ - seconds: 0
+ then:
+ - script.execute:
+ id: refresh_datetime
+ on_time_sync:
+ then:
+ - component.update: api_timestamp
+ - component.update: device_timestamp
+ - logger.log: "System clock synchronized"
+ - script.execute:
+ id: refresh_datetime
##### START - BUTTON CONFIGURATION #####
button:
@@ -133,6 +103,7 @@ button:
id: tft_update
entity_category: config
on_press:
+ - logger.log: "Button pressed: Update TFT display"
- binary_sensor.template.publish:
id: nextion_init
state: false
@@ -146,6 +117,7 @@ button:
id: tft_reparse_off
entity_category: config
on_press:
+ - logger.log: "Button pressed: Exit reparse"
- uart.write:
id: tf_uart
data: "DRAKJHSUYDGBNCJHGJKSHBDN"
@@ -155,13 +127,15 @@ button:
##### START - API CONFIGURATION #####
api:
- ##### advanced config - activate to use api_password #####
- # password: ${api_password}
+ id: api_server
+ reboot_timeout: 0s
+
services:
##### SERVICE TO UPDATE THE HMI FILE ##############
- service: upload_tft
then:
+ - logger.log: "Service: upload_tft"
- binary_sensor.template.publish:
id: nextion_init
state: false
@@ -172,6 +146,7 @@ api:
variables:
url: string
then:
+ - logger.log: "Service: upload_tft_url"
- binary_sensor.template.publish:
id: nextion_init
state: false
@@ -191,8 +166,6 @@ api:
component: string
message: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());'
##### Service to send a command "component_value (Dualstate Button)" directly to the display #####
@@ -201,8 +174,6 @@ api:
component: string
message: int
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: 'id(disp1).set_component_value(component.c_str(), message);'
##### Service to send a command "hide componente" directly to the display #####
@@ -210,8 +181,6 @@ api:
variables:
component: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: 'id(disp1).hide_component(component.c_str());'
##### Service to send a command "show componente" directly to the display #####
@@ -219,36 +188,37 @@ api:
variables:
component: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: 'id(disp1).show_component(component.c_str());'
##### Service to send a command "show ALL componente" directly to the display #####
- service: send_command_show_all ### unused ###
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- - lambda: 'id(disp1).show_component("255");'
+ - lambda: id(disp1).show_component("255");
##### Service to send a command "font color" directly to the display #####
- - service: send_command_font_color
+ - service: set_component_color
variables:
component: string
- message: int
+ foreground: int[]
+ background: int[]
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- - lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
+ - lambda: id(set_component_color).execute(component, foreground, background);
+
+ ##### Service to send a command "font color" directly to the display #####
+ #- service: send_command_font_color
+ # variables:
+ # component: string
+ # message: int
+ # then:
+ # - lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
##### Service to send a command "background color" directly to the display #####
- - service: send_command_background_color
- variables:
- component: string
- message: int
- then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- - lambda: 'id(disp1).set_component_background_color(component.c_str(), message);'
+ #- service: send_command_background_color
+ # variables:
+ # component: string
+ # message: int
+ # then:
+ # - lambda: 'id(disp1).set_component_background_color(component.c_str(), message);'
##### Service to show a notification-message on the screen #####
- service: notification_show
@@ -256,40 +226,72 @@ api:
label: string
text: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
+ ESP_LOGV("service.notification_show", "Starting");
+ ESP_LOGV("service.notification_show", "label: %s", label.c_str());
+ ESP_LOGV("service.notification_show", "text: %s", text.c_str());
+ ESP_LOGV("service.notification_show", "text length: %i", text.length());
+
+ id(disp1).send_command_printf("is_notification=1");
id(disp1).send_command_printf("page notification");
id(disp1).set_component_text_printf("notification.notifi_label", "%s", label.c_str());
- id(disp1).set_component_text_printf("notification.notifi_text01", "%s", text.c_str());
+
+ id(display_wrapped_text).execute("notification.notifi_text01", text.c_str(), id(display_mode) == 2 ? 23 : 32);
+
id(notification_label).publish_state(label.c_str());
id(notification_text).publish_state(text.c_str());
- switch.turn_on: notification_unread
- if:
condition:
- switch.is_on: notification_sound
+ - switch.is_on: notification_sound
then:
- rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6"
##### Service to clear the notification #####
- service: notification_clear
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- - lambda: |-
+ - logger.log: "Service: notification_clear"
+ - ¬ification_clear
+ lambda: |-
+ id(disp1).send_command_printf("is_notification=0");
id(notification_label).publish_state("");
id(notification_text).publish_state("");
- switch.turn_off: notification_unread
- ##### Service to set entity-information for settings-page(s)
- - service: set_settings_entity
+ ##### Service to open information for settings-page(s)
+ - service: open_entity_settings_page
variables:
+ page: string
+ page_label: string
+ page_icon: string
+ page_icon_color: int[]
entity: string
+ back_page: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
- id(settings_entity).publish_state(entity.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "Starting");
+ ESP_LOGV("api.service.open_entity_settings_page", "page: %s", page.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "page_label: %s", page_label.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "page_icon: %s", page_icon.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "page_icon_color: %i, %i, %i", page_icon_color[0], page_icon_color[1], page_icon_color[2] );
+ ESP_LOGV("api.service.open_entity_settings_page", "entity: %s", entity.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "back_page: %s", back_page.c_str());
+ id(disp1).set_component_text_printf("home.entity", "%s", entity.c_str());
+ std::string cmd_page = std::string("page ") + page.c_str();
+ id(disp1).send_command_printf(cmd_page.c_str());
+ id(disp1).set_component_text_printf("page_label", "%s", page_label.c_str());
+ id(disp1).set_component_text_printf("back_page", "%s", back_page.c_str());
+ if ((page_icon.c_str() != std::string()) and (page_icon.c_str() != "") and (page != "climate"))
+ {
+ id(disp1).set_component_text_printf("icon_state", "%s", page_icon.c_str());
+ }
+ if (page != "climate")
+ {
+ id(set_component_color).execute("icon_state", page_icon_color, {});
+ //id(disp1).set_component_font_color("icon_state", page_icon_color);
+ }
+ if (page == "climate" and entity == "embedded_climate") id(addon_climate_set_climate_friendly_name).execute(page_label.c_str());
+ ESP_LOGV("api.service.open_entity_settings_page", "Finished");
##### Service to play a rtttl tones #####
# Example tones : https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
@@ -301,15 +303,16 @@ api:
rtttl: !lambda 'return song_str;'
# Service to show a QR code on the display (ex. for WiFi password)
- - service: qr_code
+ - service: qrcode
variables:
- qrdata: string
+ title: string
+ qrcode: string
+ show: bool
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
- id(disp1).send_command_printf("page qrcode");
- id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrdata.c_str());
+ id(disp1).set_component_text_printf("qrcode.qrcode_label", "%s", title.c_str());
+ id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrcode.c_str());
+ if (show) id(disp1).send_command_printf("page qrcode");
#### Service to set climate state ####
- service: set_climate
@@ -318,69 +321,60 @@ api:
target_temp: float
temp_step: int
total_steps: int
- slider_val: int
temp_offset: int
climate_icon: string
+ embedded_climate: bool
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
- if (target_temp > -999)
- {
- id(disp1).set_component_value("climateslider", slider_val);
- id(disp1).set_component_text_printf("target_temp", "%.1f°", target_temp);
- id(disp1).set_component_text_printf("target_icon", "%s", climate_icon.c_str());
- id(disp1).show_component("target_icon");
- id(disp1).show_component("target_temp");
- id(disp1).show_component("climateslider");
- id(disp1).show_component("decrease_temp");
- id(disp1).show_component("increase_temp");
- }
- else
- {
- id(disp1).hide_component("target_icon");
- id(disp1).hide_component("target_temp");
- id(disp1).hide_component("climateslider");
- id(disp1).hide_component("decrease_temp");
- id(disp1).hide_component("increase_temp");
- }
- - lambda: |-
- id(disp1).send_command_printf("climateslider.maxval=%i", total_steps);
- id(disp1).set_component_value("temp_offset", temp_offset);
- id(disp1).set_component_value("temp_step", temp_step);
- id(disp1).set_component_text_printf("current_temp", "%.1f°", current_temp);
- id(disp1).show_component("current_temp");
- id(disp1).show_component("current_icon");
+ ESP_LOGV("api.service.set_climate", "climateslider.maxval=%i", total_steps);
+ ESP_LOGV("api.service.set_climate", "temp_offset=%f", temp_offset);
+ ESP_LOGV("api.service.set_climate", "temp_step=%f", temp_step);
+ ESP_LOGV("api.service.set_climate", "current_temp=%f", current_temp);
+ ESP_LOGV("api.service.set_climate", "target_temp=%f", target_temp);
+ ESP_LOGV("api.service.set_climate", "target_icon=%s", climate_icon.c_str());
+ ESP_LOGV("api.service.set_climate", "embedded=%i", (embedded_climate) ? 1 : 0);
+
+ - script.execute:
+ id: set_climate
+ current_temp: !lambda "return current_temp;"
+ target_temp: !lambda "return target_temp;"
+ temp_step: !lambda "return temp_step;"
+ total_steps: !lambda "return total_steps;"
+ temp_offset: !lambda "return temp_offset;"
+ climate_icon: !lambda "return climate_icon;"
+ embedded_climate: !lambda "return embedded_climate;"
#### Service to set the buttons ####
- service: set_button
variables:
btn_id: string
btn_pic: int
- btn_bg: int
- btn_icon_font: int
- btn_txt_font: int
- btn_bri_font: int
+ btn_bg: int[]
+ btn_icon_font: int[]
+ btn_txt_font: int[]
+ btn_bri_font: int[]
btn_icon: string
btn_label: string
btn_bri_txt: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
- // ESP_LOGD("nextion", "set button %s", btn_id.c_str());
+ // ESP_LOGV("nextion", "set button %s", btn_id.c_str());
std::string btnicon = btn_id.c_str() + std::string("icon");
std::string btntext = btn_id.c_str() + std::string("text");
std::string btnbri = btn_id.c_str() + std::string("bri");
id(disp1).send_command_printf("%spic.pic=%i", btn_id.c_str(), btn_pic);
- id(disp1).set_component_background_color(btnicon.c_str(), btn_bg);
- id(disp1).set_component_background_color(btntext.c_str(), btn_bg);
- id(disp1).set_component_background_color(btnbri.c_str(), btn_bg);
- id(disp1).set_component_font_color(btnicon.c_str(), btn_icon_font);
- id(disp1).set_component_font_color(btntext.c_str(), btn_txt_font);
- id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font);
+ id(set_component_color).execute(btnicon.c_str(), btn_icon_font, btn_bg);
+ id(set_component_color).execute(btntext.c_str(), btn_txt_font, btn_bg);
+ id(set_component_color).execute(btnbri.c_str(), btn_bri_font, btn_bg);
+ //id(disp1).set_component_background_color(btnicon.c_str(), btn_bg);
+ //id(disp1).set_component_background_color(btntext.c_str(), btn_bg);
+ //id(disp1).set_component_background_color(btnbri.c_str(), btn_bg);
+ //id(disp1).set_component_font_color(btnicon.c_str(), btn_icon_font);
+ //id(disp1).set_component_font_color(btntext.c_str(), btn_txt_font);
+ //id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font);
id(disp1).set_component_text_printf(btnicon.c_str(), "%s", btn_icon.c_str());
- id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str());
+ //id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str());
+ id(display_wrapped_text).execute(btntext.c_str(), btn_label.c_str(), 10);
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
if (strcmp(btn_bri_txt.c_str(), "0") != 0) {
id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
@@ -389,35 +383,19 @@ api:
}
##### SERVICE TO WAKE UP THE DISPLAY #####
- - service: wake_up_display
+ - service: wake_up
variables:
- option: string
+ reset_timer: bool
then:
- lambda: |-
- DynamicJsonDocument doc(1024);
- deserializeJson(doc, id(disp1_nspanel_event).state);
- std::string page = doc["page"];
- if (page == "screensaver") {
- id(disp1).send_command_printf("page home");
- } else {
- if (page == "home"){
- id(disp1).send_command_printf("dim=brightness.val");
+ if (id(current_page).state == "home")
+ {
+ id(disp1).send_command_printf("home.dimtimer.en=1");
+ id(disp1).send_command_printf("home.sleeptimer.en=1");
}
- }
- - if:
- condition:
- - lambda: 'return option == "keep_wake";'
- then:
- - lambda: id(disp1).send_command_printf("home.dimtimer.en=1");
- - lambda: id(disp1).send_command_printf("home.sleeptimer.en=1");
- - if:
- condition:
- - lambda: 'return option == "keep_page";'
- then:
- - lambda: id(disp1).send_command_printf("home.dimtimer.en=1");
- - lambda: id(disp1).send_command_printf("home.sleeptimer.en=1");
- - lambda: |-
- id(page_timer)->execute(int(id(page_timeout).state));
+ else if (id(current_page).state == "screensaver") id(disp1).send_command_printf("page %i", id(wakeup_page_id));
+ id(disp1).send_command_printf("dim=brightness");
+ if (reset_timer) id(page_timer)->execute(int(id(page_timeout).state));
#### Service to set the entities ####
- service: set_entity
@@ -428,26 +406,322 @@ api:
ent_value: string
ent_value_xcen: string
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- lambda: |-
- // ESP_LOGD("nextion", "set entity %s", ent_id.c_str());
+ ESP_LOGV("service.set_entity", "entity: %s", ent_id.c_str());
std::string enticon = ent_id.c_str() + std::string("_pic");
std::string entlabel = ent_id.c_str() + std::string("_label");
std::string entxcen = ent_id.c_str() + std::string(".xcen=") + ent_value_xcen.c_str();
id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str());
- if (strcmp(ent_icon.c_str(), "0") != 0) {
- id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str());
- }
+ if (strcmp(ent_icon.c_str(), "0") != 0) id(disp1).set_component_text_printf(enticon.c_str(), "%s", ent_icon.c_str());
id(disp1).set_component_text_printf(entlabel.c_str(), "%s", ent_label.c_str());
id(disp1).set_component_text_printf(ent_id.c_str(), "%s", ent_value.c_str());
- if (strcmp(ent_value_xcen.c_str(), "0") != 0) {
- id(disp1).send_command_printf("%s", entxcen.c_str());
- }
+ if (strcmp(ent_value_xcen.c_str(), "0") != 0) id(disp1).send_command_printf("%s", entxcen.c_str());
+
+ ##### Service for transferring global settings from the blueprint to ESPHome #####
+ - service: global_settings
+ variables:
+ blueprint_version: string
+ relay1_local_control: bool
+ relay1_icon: string
+ relay1_icon_color: int
+ relay2_local_control: bool
+ relay2_icon: string
+ relay2_icon_color: int
+ date_color: int
+ time_format: string
+ time_color: int
+ embedded_climate: bool
+ embedded_indoor_temperature: bool
+ temperature_unit_is_fahrenheit: bool
+ wakeup_page: int
+ then:
+ - lambda: |-
+ // Logs - Begin
+ ESP_LOGV("service.global_settings", "Starting");
+ ESP_LOGD("service.global_settings", "Blueprint version: %s", blueprint_version.c_str());
+ ESP_LOGV("service.global_settings", "relay1_local_control: %i", (relay1_local_control) ? 1 : 0);
+ ESP_LOGV("service.global_settings", "relay1_icon: %s", relay1_icon.c_str());
+ ESP_LOGV("service.global_settings", "relay1_icon_color: %i", relay1_icon_color);
+ ESP_LOGV("service.global_settings", "relay2_local_control: %i", (relay2_local_control) ? 1 : 0);
+ ESP_LOGV("service.global_settings", "relay2_icon: %s", relay2_icon.c_str());
+ ESP_LOGV("service.global_settings", "relay2_icon_color: %i", relay2_icon_color);
+ ESP_LOGV("service.global_settings", "date_color: %i", date_color);
+ ESP_LOGV("service.global_settings", "time_format: %s", time_format.c_str());
+ ESP_LOGV("service.global_settings", "time_color: %i", time_color);
+ ESP_LOGV("service.global_settings", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ ESP_LOGV("service.global_settings", "embedded_indoor_temperature: %i", (embedded_indoor_temperature) ? 1 : 0);
+ ESP_LOGV("service.global_settings", "temperature_unit_is_fahrenheit: %i", (temperature_unit_is_fahrenheit) ? 1 : 0);
+ ESP_LOGV("service.global_settings", "wakeup_page: %i", wakeup_page);
+
+ // Blueprint version
+ id(version_blueprint) = blueprint_version;
+ id(check_versions).execute();
+
+ // Relays
+ id(relay1_local).publish_state(relay1_local_control);
+ id(relay2_local).publish_state(relay2_local_control);
+ id(home_relay1_icon) = relay1_icon.c_str();
+ id(home_relay2_icon) = relay2_icon.c_str();
+ id(home_relay1_icon_color) = relay1_icon_color;
+ id(home_relay2_icon_color) = relay2_icon_color;
+
+ // Localization
+ id(mui_time_format) = time_format;
+
+ // Date/Time colors
+ id(home_date_color) = date_color;
+ id(home_time_color) = time_color;
+
+ // Embedded thermostat
+ id(addon_climate_global_settings)->execute(embedded_climate);
+
+ // Indoor temperature
+ id(embedded_indoor_temp) = embedded_indoor_temperature;
+ id(temp_unit_fahrenheit) = temperature_unit_is_fahrenheit;
+ id(display_embedded_temp)->execute();
+
+ // Wakeup page
+ ESP_LOGV("service.global_settings", "Wakeup page - Start");
+ id(wakeup_page_id) = wakeup_page;
+
+ // Refresh colors of global components
+ ESP_LOGV("service.global_settings", "Refresh colors of global components");
+ id(disp1).set_component_font_color("home.date", id(home_date_color));
+ id(disp1).set_component_font_color("home.time", id(home_time_color));
+ id(disp1).set_component_font_color("home.icon_top_01", id(home_relay1_icon_color));
+ id(disp1).set_component_font_color("home.icon_top_02", id(home_relay2_icon_color));
+
+ // Update home page
+ ESP_LOGV("service.global_settings", "Update home page");
+ id(update_page_home).execute();
+
+ - if:
+ condition:
+ - text_sensor.state: # Is boot page visible?
+ id: current_page
+ state: 'boot'
+ then:
+ - lambda: |-
+ ESP_LOGV("service.global_settings", "Boot page is visible");
+ id(disp1).set_component_text_printf("boot.bluep_version", "%s", blueprint_version.c_str());
+ ESP_LOGV("service.global_settings", "Wait a bit");
+ - wait_until:
+ condition:
+ - not:
+ - text_sensor.state: # Is boot page visible?
+ id: current_page
+ state: 'boot'
+ timeout: 2s
+ - if:
+ condition:
+ - text_sensor.state: # Avoid this being called twice by multiple boot triggers
+ id: current_page
+ state: 'boot'
+ then:
+ - if:
+ condition:
+ switch.is_on: notification_sound
+ then:
+ - lambda: ESP_LOGV("service.global_settings", "Play boot sound");
+ - rtttl.play:
+ rtttl: 'two short:d=4,o=5,b=100:16e6,16e6'
+ - lambda: id(disp1).send_command_printf("page %i", id(wakeup_page_id));
+
+ - lambda: ESP_LOGV("service.global_settings", "Finished");
+
+ #### Service to populate the page Home #####
+ - service: page_home
+ variables:
+ notification_icon: string
+ notification_icon_color_normal: int[]
+ notification_icon_color_unread: int[]
+ qrcode: bool
+ qrcode_icon: string
+ qrcode_icon_color: int[]
+ entities_pages: bool
+ entities_pages_icon: string
+ entities_pages_icon_color: int[]
+ alarm_state: string
+ then:
+ - lambda: |-
+ // Logs - Begin
+ ESP_LOGV("service.page_home_settings", "Starting");
+ ESP_LOGV("service.page_home_settings", "notification_icon: %s", notification_icon.c_str());
+ ESP_LOGV("service.page_home_settings", "qrcode: %i", (qrcode) ? 1 : 0);
+ ESP_LOGV("service.page_home_settings", "qrcode_icon: %s", qrcode_icon.c_str());
+ ESP_LOGV("service.page_home_settings", "entities_pages: %i", (entities_pages) ? 1 : 0);
+ ESP_LOGV("service.page_home_settings", "entities_pages_icon: %s", entities_pages_icon.c_str());
+ ESP_LOGV("service.page_home_settings", "alarm_state: %s", alarm_state.c_str());
+
+ // Notification button
+ ESP_LOGV("service.page_home_settings", "Notification button - Start");
+ id(disp1).send_command_printf("is_notification=%i", (id(notification_text).state.empty() and id(notification_label).state.empty()) ? 0 : 1);
+ id(disp1).set_component_text_printf("home.bt_notific", "%s", notification_icon.c_str());
+ id(set_component_color).execute("home.bt_notific", id(notification_unread).state ? notification_icon_color_unread : notification_icon_color_normal, {});
+ id(home_notify_icon_color_normal) = notification_icon_color_normal;
+ id(home_notify_icon_color_unread) = notification_icon_color_unread;
+
+ // QRCode button
+ ESP_LOGV("service.page_home_settings", "QRcode button - Start");
+ id(disp1).send_command_printf("is_qrcode=%i", (qrcode) ? 1 : 0);
+ id(disp1).set_component_text_printf("home.bt_qrcode", "%s", qrcode_icon.c_str());
+ id(set_component_color).execute("home.bt_qrcode", qrcode_icon_color, {});
+
+ // Entities pages button
+ ESP_LOGV("service.page_home_settings", "Entities pages button - Start");
+ id(disp1).send_command_printf("is_entities=%i", (entities_pages) ? 1 : 0);
+ id(disp1).set_component_text_printf("home.bt_entities", "%s", entities_pages_icon.c_str());
+ id(set_component_color).execute("home.bt_entities", entities_pages_icon_color, {});
+
+ // Alarm button
+ ESP_LOGV("service.page_home_settings", "Alarm button - Start");
+ id(disp1).send_command_printf("is_alarm=%i", (alarm_state=="" or alarm_state.empty()) ? 0 : 1);
+ id(update_alarm_icon)->execute("home.bt_alarm", alarm_state.c_str());
+
+ // Logs - End
+ ESP_LOGV("service.page_home_settings", "Finished");
+
+ #### Service to populate the page Settings #####
+ - service: page_settings
+ variables:
+ reboot: string
+ sleep_mode: string
+ brightness: string
+ dimming: string
+ then:
+ - lambda: |-
+ ESP_LOGV("service.page_settings", "Starting");
+ ESP_LOGV("service.page_settings", "reboot: %s", reboot.c_str());
+ ESP_LOGV("service.page_settings", "sleep_mode: %s", sleep_mode.c_str());
+ ESP_LOGV("service.page_settings", "brightness: %s", brightness.c_str());
+ ESP_LOGV("service.page_settings", "dimming: %s", dimming.c_str());
+ if (not reboot.empty()) id(disp1).set_component_text_printf("settings.lbl_reboot", " %s", reboot.c_str());
+ if (not sleep_mode.empty()) id(disp1).set_component_text_printf("settings.lbl_sleep", " %s", sleep_mode.c_str());
+ if (not brightness.empty()) id(disp1).set_component_text_printf("settings.lbl_brightness", "%s", brightness.c_str());
+ if (not dimming.empty()) id(disp1).set_component_text_printf("settings.lbl_dimming", "%s", dimming.c_str());
+
+ #### Service to populate the alarm settings page #####
+ - service: alarm_settings
+ variables:
+ page_title: string
+ state: string
+ supported_features: int
+ code_format: string
+ code_arm_required: bool
+ entity: string
+ mui_alarm: string[] #std::vector #std::map
+ then:
+ - lambda: |-
+ // Logs - Begin
+ ESP_LOGV("service.alarm_settings", "Starting");
+ ESP_LOGV("service.alarm_settings", "page_title: %s", page_title.c_str());
+ ESP_LOGV("service.alarm_settings", "state: %s", state.c_str());
+ ESP_LOGV("service.alarm_settings", "supported_features: %i", supported_features);
+ ESP_LOGV("service.alarm_settings", "code_format: %s", code_format.c_str());
+ ESP_LOGV("service.alarm_settings", "code_arm_required: %i", (code_arm_required) ? 1 : 0);
+ ESP_LOGV("service.alarm_settings", "entity: %s", entity.c_str());
+
+ // set alarm icon on home page
+ ESP_LOGV("service.alarm_settings", "Updating home page icon");
+ id(disp1).send_command_printf("is_alarm=%i", (state=="" or state.empty()) ? 0 : 1);
+ id(update_alarm_icon)->execute("home.bt_alarm", state.c_str());
+
+ // Is page Alarm visible?
+ if (id(current_page).state=="alarm")
+ { // Update alarm page
+ ESP_LOGV("service.alarm_settings", "Updating alarm page");
+ // Alarm page - Header
+ id(update_alarm_icon)->execute("icon_state", state.c_str());
+ id(disp1).set_component_text_printf("page_label", "%s", page_title.c_str());
+ id(disp1).set_component_text_printf("code_format", "%s", code_format.c_str());
+ if (code_arm_required) id(disp1).set_component_text_printf("code_arm_req", "1"); else id(disp1).set_component_text_printf("code_arm_req", "0");
+ id(disp1).set_component_text_printf("entity", "%s", entity.c_str());
+
+ // Alarm page - Button's icons
+ id(disp1).set_component_text_printf("bt_home_icon", "\uE689"); //mdi:shield-home
+ id(disp1).set_component_text_printf("bt_away_icon", "\uE99C"); //mdi:shield-lock
+ id(disp1).set_component_text_printf("bt_night_icon", "\uF827"); //mdi:shield-moon
+ id(disp1).set_component_text_printf("bt_vacat_icon", "\uE6BA"); //mdi:shield-airplane
+ id(disp1).set_component_text_printf("bt_bypass_icon", "\uE77F"); //mdi:shield-half-full
+ id(disp1).set_component_text_printf("bt_disarm_icon", "\uE99D"); //mdi:shield-off
+
+ // Alarm page - Button's text
+ id(display_wrapped_text).execute("bt_home_text", mui_alarm[0].c_str(), 10);
+ id(display_wrapped_text).execute("bt_away_text", mui_alarm[1].c_str(), 10);
+ id(display_wrapped_text).execute("bt_night_text", mui_alarm[2].c_str(), 10);
+ id(display_wrapped_text).execute("bt_vacat_text", mui_alarm[3].c_str(), 10);
+ id(display_wrapped_text).execute("bt_bypass_text", mui_alarm[4].c_str(), 10);
+ id(display_wrapped_text).execute("bt_disarm_text", mui_alarm[5].c_str(), 10);
+
+ // Alarm page - Buttons
+ if (supported_features & 1) // Alarm - Button - Home
+ {
+ id(disp1).send_command_printf("bt_home_pic.pic=%i", (state=="armed_home") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_home_text", (state=="armed_home") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_home_icon", (state=="armed_home") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_home_text", (state=="armed_home") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_home_icon", (state=="armed_home") ? 65535 : 0);
+ if (state=="armed_home") id(disp1).hide_component("bt_home"); else id(disp1).show_component("bt_home");
+ }
+ if (supported_features & 2) // Alarm - Button - Away
+ {
+ id(disp1).send_command_printf("bt_away_pic.pic=%i", (state=="armed_away") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_away_text", (state=="armed_away") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_away_icon", (state=="armed_away") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_away_text", (state=="armed_away") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_away_icon", (state=="armed_away") ? 65535 : 0);
+ if (state=="armed_away") id(disp1).hide_component("bt_away"); else id(disp1).show_component("bt_away");
+ }
+ if (supported_features & 4) // Alarm - Button - Night
+ {
+ id(disp1).send_command_printf("bt_night_pic.pic=%i", (state=="armed_night") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_night_text", (state=="armed_night") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_night_icon", (state=="armed_night") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_night_text", (state=="armed_night") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_night_icon", (state=="armed_night") ? 65535 : 0);
+ if (state=="armed_night") id(disp1).hide_component("bt_night"); else id(disp1).show_component("bt_night");
+ }
+ if (supported_features & 32) // Alarm - Button - Vacation
+ {
+ id(disp1).send_command_printf("bt_vacat_pic.pic=%i", (state=="armed_vacation") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_vacat_text", (state=="armed_vacation") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_vacat_icon", (state=="armed_vacation") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_vacat_text", (state=="armed_vacation") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_vacat_icon", (state=="armed_vacation") ? 65535 : 0);
+ if (state=="armed_vacation") id(disp1).hide_component("bt_vacat"); else id(disp1).show_component("bt_vacat");
+ }
+ if (supported_features & 16) // Alarm - Button - Custom bypass
+ {
+ id(disp1).send_command_printf("bt_bypass_pic.pic=%i", (state=="armed_bypass") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_bypass_text", (state=="armed_bypass") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_bypass_icon", (state=="armed_bypass") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_bypass_text", (state=="armed_bypass") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_bypass_icon", (state=="armed_bypass") ? 65535 : 0);
+ if (state=="armed_bypass") id(disp1).hide_component("bt_bypass"); else id(disp1).show_component("bt_bypass");
+ }
+ if ( true ) // Alarm - Button - Disarm
+ {
+ id(disp1).send_command_printf("bt_disarm_pic.pic=%i", (state=="disarmed") ? 43 : 42);
+ id(disp1).set_component_background_color("bt_disarm_text", (state=="disarmed") ? 19818 : 52857);
+ id(disp1).set_component_background_color("bt_disarm_icon", (state=="disarmed") ? 19818 : 52857);
+ id(disp1).set_component_font_color("bt_disarm_text", (state=="disarmed") ? 65535 : 0);
+ id(disp1).set_component_font_color("bt_disarm_icon", (state=="disarmed") ? 65535 : 0);
+ if (state=="disarmed") id(disp1).hide_component("bt_disarm"); else id(disp1).show_component("bt_disarm");
+ }
+ }
+
+ // Logs - End
+ ESP_LOGV("service.alarm_settings", "Finished");
##### START - GLOBALS CONFIGURATION #####
globals:
+ ##### Display mode (1 = EU, 2 = US, 3 = US Landscape)
+ - id: display_mode
+ type: int
+ restore_value: true
+ initial_value: '0'
+
##### Save Display Brightness for NSPanel reboot #####
- id: display_brightness_global
type: int
@@ -460,11 +734,83 @@ globals:
restore_value: true
initial_value: '10'
- ##### Temperature Correction #####
- - id: temperature_correction_global
- type: float
+ ##### Temperature unit #####
+ ##### Is embedded sensor used for indoor temperature? #####
+ - id: embedded_indoor_temp
+ type: bool
restore_value: true
- initial_value: '0.0'
+ initial_value: 'true'
+ - id: temp_unit_fahrenheit
+ type: bool
+ restore_value: true
+ initial_value: 'false'
+
+ ##### Date/time formats #####
+ #- id: mui_date_format
+ # type: std::string
+ # restore_value: no
+ # initial_value: '"%A, %d.%m"'
+ - id: home_date_color
+ type: int
+ restore_value: true
+ initial_value: '65535'
+
+ - id: mui_time_format
+ type: std::string
+ restore_value: no
+ initial_value: '"%H:%M"'
+
+ - id: home_time_color
+ type: int
+ restore_value: true
+ initial_value: '65535'
+
+ ##### Relay icons #####
+ - id: home_relay1_icon
+ type: std::string
+ restore_value: false
+ initial_value: ''
+
+ - id: home_relay1_icon_color
+ type: int
+ restore_value: true
+ initial_value: '65535'
+
+ - id: home_relay2_icon
+ type: std::string
+ restore_value: false
+ initial_value: ''
+
+ - id: home_relay2_icon_color
+ type: int
+ restore_value: true
+ initial_value: '65535'
+
+ - id: home_notify_icon_color_normal
+ type: std::vector
+ restore_value: false
+ #initial_value: '52857'
+
+ - id: home_notify_icon_color_unread
+ type: std::vector
+ restore_value: false
+ #initial_value: '63488'
+
+ ##### Wakeup page ID #####
+ - id: wakeup_page_id
+ type: int
+ restore_value: true
+ initial_value: '0'
+
+ ##### Versions #####
+ - id: version_blueprint
+ type: std::string
+ restore_value: false
+ initial_value: ''
+ - id: version_tft
+ type: std::string
+ restore_value: false
+ initial_value: ''
##### START - BINARY SENSOR CONFIGURATION #####
binary_sensor:
@@ -476,25 +822,31 @@ binary_sensor:
pin:
number: 14
inverted: true
- on_click:
- then:
- - if:
- condition:
- and:
- - switch.is_on: relay1_fallback
- - not:
- api.connected:
- then:
- - switch.toggle: relay_1
- - if:
- condition:
- switch.is_on: relay_1
- then:
- - lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
- - lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
- else:
- - lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
- - lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");
+ on_multi_click:
+ - timing: &long_click-timing
+ - ON for at least 0.8s
+ then:
+ - logger.log: "Left button - Long click"
+ - script.execute:
+ id: ha_button
+ page: !lambda return id(current_page).state;
+ component: "hw_bt_left"
+ command: "long_click"
+ - timing: &short_click-timing
+ - ON for at most 0.8s
+ then:
+ - logger.log: "Left button - Short click"
+ - if:
+ condition:
+ - switch.is_on: relay1_local
+ then:
+ - switch.toggle: relay_1
+ - script.execute: refresh_relays
+ - script.execute:
+ id: ha_button
+ page: !lambda return id(current_page).state;
+ component: "hw_bt_left"
+ command: "short_click"
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
- name: ${device_name} Right Button
@@ -503,43 +855,35 @@ binary_sensor:
pin:
number: 27
inverted: true
- on_click:
- then:
- - if:
- condition:
- and:
- - switch.is_on: relay2_fallback
- - not:
- api.connected:
- then:
- - switch.toggle: relay_2
- - if:
- condition:
- switch.is_on: relay_2
- then:
- - lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=78");
- - lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000E3A8");
- else:
- - lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=77");
- - lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000FFFF");
-
- ##### JUMP PAGE TO SETTING PAGE #####
- - name: $device_name setting page
- platform: nextion
- page_id: 0
- component_id: 52
- internal: true
on_multi_click:
- - timing:
- - ON for at least 1s #LONG Press
+ - timing: *long_click-timing
then:
- - lambda: 'id(disp1).send_command_printf("page settings");'
+ - logger.log: "Right button - Long click"
+ - script.execute:
+ id: ha_button
+ page: !lambda return id(current_page).state;
+ component: "hw_bt_right"
+ command: "long_click"
+ - timing: *short_click-timing
+ then:
+ - logger.log: "Right button - Short click"
+ - if:
+ condition:
+ - switch.is_on: relay2_local
+ then:
+ - switch.toggle: relay_2
+ - script.execute: refresh_relays
+ - script.execute:
+ id: ha_button
+ page: !lambda return id(current_page).state;
+ component: "hw_bt_right"
+ command: "short_click"
##### Restart NSPanel Button - Setting Page #####
- name: ${device_name} Restart
platform: nextion
page_id: 7
- component_id: 13
+ component_id: 9
internal: true
on_click:
- button.press: restart_nspanel
@@ -557,7 +901,7 @@ binary_sensor:
- name: ${device_name} Sleep mode
platform: nextion
page_id: 7
- component_id: 14
+ component_id: 10
internal: true
on_click:
- logger.log: "Sleep mode - Nextion toggle"
@@ -574,29 +918,50 @@ binary_sensor:
icon: mdi:tablet-dashboard
##### API connection status
- - platform: status
- name: ${device_name} Status
+ - name: ${device_name} Status
+ platform: status
+ id: api_status
+ on_state:
+ then:
+ - script.execute:
+ id: refresh_wifi_icon
##### START - SENSOR CONFIGURATION #####
sensor:
- ##### Uptime #####
- - name: ${device_name} uptime
+ ##### Uptime Sensors #####
+ - name: ${device_name} Uptime seconds
+ id: uptime_sec
platform: uptime
- disabled_by_default: true
+ internal: true
+
+ - name: ${device_name} API uptime
+ id: api_timestamp
+ platform: template
+ lambda: 'return id(time_provider).now().timestamp;'
+ internal: false
+ device_class: timestamp
+ entity_category: diagnostic
+ accuracy_decimals: 0
+ update_interval: never
+
+ - name: ${device_name} Device uptime
+ id: device_timestamp
+ platform: template
+ lambda: 'return (id(time_provider).now().timestamp - id(uptime_sec).state);'
+ internal: false
+ device_class: timestamp
+ entity_category: diagnostic
+ accuracy_decimals: 0
+ update_interval: never
##### WIFI Signal stregth
- name: ${device_name} RSSI
platform: wifi_signal
update_interval: 60s
on_value:
- - if:
- condition:
- wifi.connected:
- then:
- - lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U0000E5A8");
- else:
- - lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\U0000FFFF");
+ - script.execute:
+ id: refresh_wifi_icon
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
- id: ntc_source
@@ -622,13 +987,11 @@ sensor:
reference_temperature: 25°C
reference_resistance: 10kOhm
filters:
- - lambda: return x + id(temperature_correction_global);
- #on_value:
- # then:
- # - wait_until:
- # binary_sensor.is_on: nextion_init
- # - lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
- # - lambda: id(disp1).set_component_text_printf("climate.current_temp", "%.1f", id(temp_nspanel).state);
+ - lambda: return x + id(temperature_correction).state;
+ on_value:
+ then:
+ # Show panel's temperature if API or Wi-Fi are out
+ - lambda: id(display_embedded_temp)->execute();
###### Display Brightness GET VALUE FROM NSPanel SLIDER #####
- name: ${device_name} brightness Slider
@@ -638,13 +1001,9 @@ sensor:
internal: true
on_value:
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- number.set:
id: display_brightness
value: !lambda 'return int(x);'
- # send text field percentage of current_lightslider_val
- - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER #####
- name: ${device_name} dim brightness slider
@@ -654,20 +1013,23 @@ sensor:
internal: true
on_value:
then:
- - wait_until:
- binary_sensor.is_on: nextion_init
- number.set:
id: display_dim_brightness
value: !lambda 'return int(x);'
- # send text field percentage of current_lightslider_val
- - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
##### START - TEXT SENSOR CONFIGURATION #####
text_sensor:
+ ##### Current page name #####
+ - name: ${device_name} current page
+ platform: template
+ id: current_page
+ internal: false
+ disabled_by_default: false
+
##### ESPhome version used to compile the app #####
- - platform: version
- name: ${device_name} ESPhome Version
+ - name: ${device_name} ESPhome Version
+ platform: version
disabled_by_default: true
- platform: wifi_info
@@ -690,10 +1052,6 @@ text_sensor:
platform: template
id: notification_text
- - name: ${device_name} Settings Entity
- platform: template
- id: settings_entity
-
##### NSPanel event sensor, the main action sensor - push to HA #####
- name: ${device_name} NSPanel event
platform: nextion
@@ -709,7 +1067,221 @@ text_sensor:
on_value:
then:
- lambda: |-
+ ESP_LOGV("text_sensor.nspanelevent", "Starting");
id(page_timer)->execute(int(id(page_timeout).state));
+ DynamicJsonDocument doc(1024);
+ deserializeJson(doc, x);
+ std::string page = doc["page"];
+ std::string component = doc["component"];
+ std::string value = doc["value"];
+ std::string entity = doc["entity"];
+ ESP_LOGV("text_sensor.nspanelevent", "page: %s", page.c_str());
+ ESP_LOGV("text_sensor.nspanelevent", "component: %s", component.c_str());
+ ESP_LOGV("text_sensor.nspanelevent", "value: %s", value.c_str());
+ ESP_LOGV("text_sensor.nspanelevent", "entity: %s", entity.c_str());
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "generic"},
+ {"page", page},
+ {"component", component},
+ {"value", value},
+ {"entity", entity}
+ });
+ if (component=="currentpage")
+ {
+ ESP_LOGD("text_sensor.nspanelevent", "New page: %s", page.c_str());
+ ESP_LOGV("text_sensor.nspanelevent", "Trigger HA event");
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "page_changed"},
+ {"page", page},
+ {"entity", entity}
+ });
+ ESP_LOGV("text_sensor.nspanelevent", "Call add-ons scripts for new page");
+ id(addon_climate_set_climate).execute(page=="climate" and entity=="embedded_climate");
+ ESP_LOGV("text_sensor.nspanelevent", "Publish current_page sensor");
+ id(current_page).publish_state(page);
+ ESP_LOGV("text_sensor.nspanelevent", "Construct new page");
+ if (page=="home")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct home page");
+ id(update_page_home).execute();
+ }
+ else if (page=="screensaver")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct screensaver page");
+ id(disp1).set_component_value("orign", id(wakeup_page_id));
+ }
+ else if (page=="climate")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct climate page");
+ id(disp1).set_component_text_printf("climate.button01_icon", "%s", "\uEE8D"); //mdi:calendar-sync
+ id(disp1).set_component_text_printf("climate.button02_icon", "%s", "\uE069"); //mdi:autorenew
+ id(disp1).set_component_text_printf("climate.button03_icon", "%s", "\uE237"); //mdi:fire
+ id(disp1).set_component_text_printf("climate.button04_icon", "%s", "\uE716"); //mdi:snowflake
+ id(disp1).set_component_text_printf("climate.button05_icon", "%s", "\uE58D"); //mdi:water-percent
+ id(disp1).set_component_text_printf("climate.button06_icon", "%s", "\uE20F"); //mdi:fan
+ id(disp1).set_component_text_printf("climate.button07_icon", "%s", "\uE424"); //mdi:power
+ id(addon_climate_update_page_climate)->execute();
+ }
+ else if (page=="cover")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct cover page");
+ id(disp1).set_component_text_printf("cover.cover_stop", "%s", "\uE666"); //mdi:stop-circle-outline
+ // In the future this will be dynamically contructed based on the device_class
+ id(disp1).set_component_text_printf("cover.cover_open", "%s", "\uF11D"); //mdi:window-shutter-open
+ id(disp1).set_component_text_printf("cover.cover_close", "%s", "\uF11B"); //mdi:window-shutter
+ }
+ else if (page=="fan")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct fan page");
+ id(disp1).set_component_text_printf("fan.button_on", "%s", "\uE20F"); //mdi:fan
+ id(disp1).set_component_text_printf("fan.button_off", "%s", "\uE81C"); //mdi:fan-off
+ id(disp1).set_component_text_printf("fan.button_up", "%s", "\uF46D"); //mdi:fan-chevron-up
+ id(disp1).set_component_text_printf("fan.button_down", "%s", "\uF46C"); //mdi:fan-chevron-down
+ }
+ else if (page=="keyb_num")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct keyb_num page");
+ id(disp1).set_component_text_printf("keyb_num.bview", "%s", "\uE207"); //mdi:eye
+ id(disp1).set_component_text_printf("keyb_num.bclose", "%s", "\uE158"); //mdi:close-circle
+ id(disp1).set_component_text_printf("keyb_num.bclear", "%s", "\uE641"); //mdi:eraser-variant
+ id(disp1).set_component_text_printf("keyb_num.benter", "%s", "\uE12B"); //mdi:check
+ }
+ else if (page=="weather01") id(disp1).set_component_text_printf("page_index", "%s", "\uE764\uE765\uE765\uE765\uE765"); // 1/5
+ else if (page=="weather02") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE764\uE765\uE765\uE765"); // 2/5
+ else if (page=="weather03") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE765\uE764\uE765\uE765"); // 3/5
+ else if (page=="weather04") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE765\uE765\uE764\uE765"); // 4/5
+ else if (page=="weather05") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE765\uE765\uE765\uE764"); // 5/5
+ else if (page=="buttonpage01" or page=="entitypage01") id(disp1).set_component_text_printf("page_index", "%s", "\uE764\uE765\uE765\uE765"); // 1/4
+ else if (page=="buttonpage02" or page=="entitypage02") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE764\uE765\uE765"); // 2/4
+ else if (page=="buttonpage03" or page=="entitypage03") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE765\uE764\uE765"); // 3/4
+ else if (page=="buttonpage04" or page=="entitypage04") id(disp1).set_component_text_printf("page_index", "%s", "\uE765\uE765\uE765\uE764"); // 4/4
+ else if (page=="settings")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Construct settings page");
+ //id(disp1).set_component_text_printf("bt_reboot", "%s", "\uE708"); //mdi:restart
+ id(disp1).set_component_text_printf("bt_sleep", "%s", (id(sleep_mode).state) ? "\uEA19" : "\uEA18"); //mdi:toggle-switch-outline or mdi:toggle-switch-off-outline
+ id(disp1).set_component_text_printf("icon_bright", "%s", "\uE0DD"); //mdi:brightness-5
+ id(disp1).set_component_text_printf("icon_dim", "%s", "\uE0DE"); //mdi:brightness-5
+ }
+ else if (page=="notification")
+ {
+ if (not id(confirmation_message).state)
+ {
+ id(disp1).set_component_text_printf("notification.notifi_label", "%s", id(notification_label).state.c_str());
+ id(display_wrapped_text).execute("notification.notifi_text01", id(notification_text).state.c_str(), id(display_mode) == 2 ? 23 : 32);
+ }
+ }
+ }
+ if (page=="boot")
+ {
+ // Detect display mode - Need review
+ if (doc.containsKey("display_mode"))
+ {
+ std::string display_mode_str = doc["display_mode"];
+ ESP_LOGV("text_sensor.nspanelevent", "display_mode: %s", display_mode_str.c_str());
+ float display_mode_float = stof(display_mode_str);
+ if (display_mode_float > 0) id(display_mode) = int(display_mode_float);
+ }
+
+ // Detect TFT version
+ if (doc.containsKey("version"))
+ {
+ std::string version_tmp = doc["version"];
+ id(version_tft) = version_tmp;
+ }
+ id(check_versions).execute();
+
+ // Detect timeout
+ if (component=="timeout")
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Trigger boot timeout event");
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "boot"},
+ {"step", "timeout"},
+ {"value", value}
+ });
+ if (stof(value) >= 5)
+ {
+ ESP_LOGV("text_sensor.nspanelevent", "Jump to wakeup page: %i", id(wakeup_page_id));
+ id(disp1).send_command_printf("page %i", id(wakeup_page_id));
+ }
+ }
+ }
+
+ ##### NSPanel event - Execute actions from ESPHome - NO push to HA #####
+ - name: ${device_name} NSPanel local event
+ platform: nextion
+ nextion_id: disp1
+ id: disp1_local_event
+ component_name: localevent
+ internal: True
+ filters:
+ - lambda: |-
+ x = x.c_str();
+ x.shrink_to_fit();
+ return x;
+ on_value:
+ then:
+ - lambda: |-
+ id(page_timer)->execute(int(id(page_timeout).state));
+ DynamicJsonDocument doc(1024);
+ deserializeJson(doc, x);
+ std::string domain = doc["domain"];
+ std::string key = doc["key"];
+ std::string value = doc["value"];
+ std::string entity = doc["entity"];
+ int embedded = doc["embedded"];
+ std::string service = "";
+ ESP_LOGV("text_sensor.localevent", "domain=%s", domain.c_str());
+ ESP_LOGV("text_sensor.localevent", "key=%s", key.c_str());
+ ESP_LOGV("text_sensor.localevent", "value=%s", value.c_str());
+ ESP_LOGV("text_sensor.localevent", "entity=%s", entity.c_str());
+ ESP_LOGV("text_sensor.localevent", "embedded=%i", embedded);
+ if (domain == "climate") id(service_call_climate)->execute(entity.c_str(), key.c_str(), value.c_str(), (embedded==1));
+ else if (domain == "alarm")
+ {
+ std::string code_format = doc["code_format"];
+ std::string code_arm_req = doc["code_arm_req"];
+ std::string title = doc["mui"];
+ if (code_format=="number" and (key=="disarm" or code_arm_req=="1"))
+ {
+ id(disp1).send_command_printf("page keyb_num");
+ id(disp1).set_component_value("keyb_num.page_id", 23); //Calling from Alarm page
+ id(disp1).set_component_text_printf("keyb_num.domain", "%s", domain.c_str());
+ id(disp1).set_component_text_printf("keyb_num.key", "%s", key.c_str());
+ id(disp1).set_component_text_printf("keyb_num.value", "%s", value.c_str());
+ id(disp1).set_component_text_printf("keyb_num.entity", "%s", entity.c_str());
+ id(disp1).set_component_text_printf("keyb_num.title", "%s", title.c_str());
+ }
+ else id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), "");
+ }
+ else if (domain == "keyb_num")
+ {
+ std::string base_domain = doc["base_domain"];
+ if (base_domain == "alarm")
+ {
+ std::string code_format = doc["code_format"];
+ std::string pin = doc["pin"];
+ id(service_call_alarm_control_panel)->execute(entity.c_str(), key.c_str(), code_format.c_str(), pin.c_str());
+ }
+ else if (base_domain == "" or base_domain.empty()) base_domain = "home";
+ id(disp1).send_command_printf("page %s", base_domain.c_str());
+ }
+ else if (domain == "light") id(ha_call_service)->execute("light.turn_on", key.c_str(), value.c_str(), entity.c_str());
+ else if (domain == "cover")
+ {
+ if (key == "position") id(ha_call_service)->execute("cover.set_cover_position", key.c_str(), value.c_str(), entity.c_str());
+ else id(ha_call_service)->execute((std::string("cover.") + key.c_str()), "", "", entity.c_str());
+ }
+ else if (domain == "fan")
+ {
+ if (key == "stop" or value == "0") id(ha_call_service)->execute("fan.turn_off", "", "", entity.c_str());
+ else id(ha_call_service)->execute("fan.turn_on", key.c_str(), value.c_str(), entity.c_str());
+ }
##### touchevent sensor, Reset the page timeout #####
- id: disp1_touchevent
@@ -736,8 +1308,12 @@ switch:
platform: template
id: notification_unread
entity_category: config
- restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
+ restore_mode: ALWAYS_OFF
+ on_turn_on:
+ - lambda: id(set_component_color).execute("home.bt_notific", id(home_notify_icon_color_unread), {});
+ on_turn_off:
+ - lambda: id(set_component_color).execute("home.bt_notific", id(home_notify_icon_color_normal), {});
##### Notification sound #####
- name: ${device_name} Notification sound
@@ -762,7 +1338,14 @@ switch:
pin:
number: 22
restore_mode: RESTORE_DEFAULT_OFF
-
+ on_turn_on:
+ then:
+ - script.execute:
+ id: refresh_relays
+ on_turn_off:
+ then:
+ - script.execute:
+ id: refresh_relays
##### PHYSICAL SWITCH 2 ######
- name: ${device_name} Relay 2
platform: gpio
@@ -770,6 +1353,14 @@ switch:
pin:
number: 19
restore_mode: RESTORE_DEFAULT_OFF
+ on_turn_on:
+ then:
+ - script.execute:
+ id: refresh_relays
+ on_turn_off:
+ then:
+ - script.execute:
+ id: refresh_relays
##### DISPLAY ALWAYS ON #####
- name: ${device_name} Screen Power
@@ -791,34 +1382,43 @@ switch:
restore_mode: RESTORE_DEFAULT_OFF
optimistic: false
turn_on_action: &sleep_mode-turn_on
- - logger.log: "Sleep mode - Turn on"
- - lambda: id(disp1).send_command_printf("home.sleepmodus.val=1");
- - lambda: id(disp1).set_component_value("settings.bt1",1);
- - switch.template.publish:
- id: sleep_mode
- state: ON
+ - lambda: |-
+ ESP_LOGV("switch.sleep_mode", "Turn on");
+ id(disp1).send_command_printf("sleep_mode=1");
+ id(disp1).set_component_value("settings.bt_sleep",1);
+ id(disp1).set_component_text_printf("settings.bt_sleep", "%s", "\uEA19");
+ id(sleep_mode).publish_state(true);
turn_off_action: &sleep_mode-turn_off
- - logger.log: "Sleep mode - Turn off"
- - lambda: id(disp1).send_command_printf("home.sleepmodus.val=0");
- - lambda: id(disp1).set_component_value("settings.bt1",0);
- - switch.template.publish:
- id: sleep_mode
- state: OFF
+ - lambda: |-
+ ESP_LOGV("switch.sleep_mode", "Turn off");
+ id(disp1).send_command_printf("sleep_mode=0");
+ id(disp1).set_component_value("settings.bt_sleep",0);
+ id(disp1).set_component_text_printf("settings.bt_sleep", "%s", "\uEA18");
+ id(sleep_mode).publish_state(false);
- ##### Relay Local control Fallback #####
- - name: ${device_name} Relay 1 Local Fallback
+ ##### Relay Local control #####
+ - name: ${device_name} Relay 1 Local
platform: template
- id: relay1_fallback
+ id: relay1_local
entity_category: config
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
-
- - name: ${device_name} Relay 2 Local Fallback
+ internal: true
+ on_turn_on:
+ - logger.log: "Relay 1 Local turned On!"
+ on_turn_off:
+ - logger.log: "Relay 1 Local turned Off!"
+ - name: ${device_name} Relay 2 Local
platform: template
- id: relay2_fallback
+ id: relay2_local
entity_category: config
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
+ internal: true
+ on_turn_on:
+ - logger.log: "Relay 2 Local turned On!"
+ on_turn_off:
+ - logger.log: "Relay 2 Local turned Off!"
##### START - NUMBER CONFIGURATION #####
number:
@@ -836,11 +1436,19 @@ number:
optimistic: true
set_action:
then:
- - lambda: 'id(disp1).set_backlight_brightness(x/100);'
- - lambda: 'id(disp1).send_command_printf("home.brightness.val=%i", int(x));'
- - globals.set:
- id: display_brightness_global
- value: !lambda 'return int(x);'
+ - lambda: |-
+ id(display_brightness_global) = int(x);
+ id(disp1).send_command_printf("brightness=%i", int(x));
+ id(disp1).send_command_printf("settings.brightslider.val=%i", int(x));
+ if (id(current_page).state != "screensaver")
+ {
+ id(disp1).set_backlight_brightness(x/100);
+ id(disp1).send_command_printf("home.dimtimer.en=1");
+ }
+ if (id(current_page).state == "settings")
+ {
+ id(disp1).set_component_text_printf("bright_text", "%i%%", int(x));
+ }
##### SCREEN BRIGHTNESS DIMMED DOWN #####
- platform: template
@@ -855,27 +1463,29 @@ number:
optimistic: true
set_action:
then:
- - lambda: 'id(disp1).send_command_printf("home.brightdd.val=%i", int(x));'
- - globals.set:
- id: display_dim_brightness_global
- value: !lambda 'return int(x);'
+ - lambda: |-
+ id(display_dim_brightness_global) = int(x);
+ id(disp1).send_command_printf("brightness_dim=%i", int(x));
+ id(disp1).send_command_printf("settings.dimslider.val=%i", int(x));
+ if (id(current_page).state == "settings") id(disp1).set_component_text_printf("dim_text", "%i%%", int(x));
##### Temperature Correction #####
- - platform: template
- name: ${device_name} Temperature Correction
+ - name: ${device_name} Temperature Correction
+ platform: template
id: temperature_correction
entity_category: config
unit_of_measurement: '°C'
+ initial_value: 0
min_value: -10
max_value: 10
- step: 0.5
+ step: 0.1
restore_value: true
+ internal: false
optimistic: true
set_action:
- then:
- - globals.set:
- id: temperature_correction_global
- value: !lambda 'return x;'
+ - logger.log: Temperature correction changed.
+ - delay: 1s
+ - lambda: id(temp_nspanel).publish_state(id(temp_nspanel).raw_state);
##### page-timeout #####
- platform: template
@@ -895,41 +1505,46 @@ display:
platform: nextion
uart_id: tf_uart
tft_url: ${nextion_update_url}
+ on_page: # I couldn't make this trigger to work, so used text_sensor nspanelevent and localevent instead
+ - lambda: ESP_LOGW("display.disp1", "NEXTION PAGE CHANGED");
on_setup:
then:
- - logger.log: "Nextion start - Jump to page 8"
- - lambda: id(disp1).send_command_printf("page 8");
- - logger.log: "Nextion start - Publish ESPHome version"
- - lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.4.1"); ### esphome-version ###
- - logger.log: "Nextion start - Wait for Home Assistant API"
+ - lambda: |-
+ id(disp1).send_command_printf("page 8");
+ id(disp1).set_component_text_printf("boot.esph_version", "%s", "${version}"); // ### esphome-version ###
+ id(disp1).show_component("bt_reboot");
- wait_until:
api.connected
- - logger.log: "Nextion start - Publish IP address"
- - lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
+ - lambda: |-
+ id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "boot"},
+ {"step", "start"}
+ });
- delay: 1s
- - logger.log: "Nextion start - Set display brigntess"
- - number.set:
- id: display_brightness
- value: !lambda 'return id(display_brightness_global);'
- - logger.log: "Nextion start - Set display dim brightness"
- - number.set:
- id: display_dim_brightness
- value: !lambda 'return id(display_dim_brightness_global);'
- - logger.log: "Nextion start - Update settings page"
- - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
- - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
- - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
- - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
- if:
condition:
switch.is_off: sleep_mode
then: *sleep_mode-turn_off
else: *sleep_mode-turn_on
- - delay: 1s
- - logger.log: "Nextion start - Inform Home Assistant display is ready"
- - binary_sensor.template.publish:
- id: nextion_init
- state: true
+ - lambda: |-
+ id(display_brightness).publish_state(id(display_brightness_global));
+ id(display_dim_brightness).publish_state(id(display_dim_brightness_global));
+ id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
+ id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
+ id(nextion_init).publish_state(true);
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "boot"},
+ {"step", "nextion_init"}
+ });
+ id(home_relay1_icon) = "\uE3A5";
+ id(home_relay1_icon) = "\uE3A8";
+ - *notification_clear
+ - switch.turn_off: notification_unread
- logger.log: "Nextion start - Done!"
### Script for page_timer
@@ -939,15 +1554,565 @@ script:
parameters:
delay: int
then:
- - lambda: ESP_LOGD("nspanel", "start page-timer delay %i", int(id(page_timeout).state));
+ - lambda: ESP_LOGV("script.page_timer", "start page-timer delay %i", int(id(page_timeout).state));
- delay: !lambda return delay *1000;
- lambda: |-
- DynamicJsonDocument doc(1024);
- deserializeJson(doc, id(disp1_nspanel_event).state);
- std::string page = doc["page"];
- if (page == "home" or page == "screensaver" or page == "boot" or int(id(page_timeout).state) == 0) {
- ESP_LOGD("nspanel", "no page-jump");
- } else {
- ESP_LOGD("nspanel", "timer->home");
- id(disp1).send_command_printf("page 0");
+ if (id(current_page).state == "home" or id(current_page).state == "screensaver" or id(current_page).state == "boot" or int(id(page_timeout).state) == 0)
+ ESP_LOGD("script.page_timer", "no page-jump");
+ else
+ {
+ ESP_LOGD("script.page_timer", "timer->home");
+ id(disp1).send_command_printf("page 0");
+ }
+
+ - id: set_climate
+ mode: restart
+ parameters:
+ current_temp: float
+ target_temp: float
+ temp_step: int
+ total_steps: int
+ temp_offset: int
+ climate_icon: string
+ embedded_climate: bool
+ then:
+ - lambda: ESP_LOGV("script.set_climate", "Starting");
+ - if:
+ condition:
+ - text_sensor.state: # Is climate page visible?
+ id: current_page
+ state: 'climate'
+ then:
+ - lambda: |-
+ ESP_LOGV("script.set_climate", "climateslider.maxval=%i", total_steps);
+ ESP_LOGV("script.set_climate", "temp_offset=%i", temp_offset);
+ ESP_LOGV("script.set_climate", "temp_step=%i", temp_step);
+ ESP_LOGV("script.set_climate", "current_temp=%f", current_temp);
+ ESP_LOGV("script.set_climate", "target_temp=%f", target_temp);
+ ESP_LOGV("script.set_climate", "target_icon=%s", climate_icon.c_str());
+ ESP_LOGV("script.set_climate", "embedded=%i", (embedded_climate) ? 1 : 0);
+ id(addon_climate_set_climate).execute(embedded_climate);
+ id(disp1).send_command_printf("climateslider.maxval=%i", total_steps);
+ id(disp1).set_component_value("temp_offset", temp_offset);
+ id(disp1).set_component_value("temp_step", temp_step);
+ id(disp1).set_component_text_printf("current_temp", "%.1f°", current_temp);
+ id(disp1).show_component("current_temp");
+ id(disp1).show_component("current_icon");
+ if (target_temp > -999)
+ {
+ float slider_val = round(((10*target_temp) - temp_offset) / temp_step);
+ ESP_LOGV("script.set_climate", "climateslider=%f", slider_val);
+ id(disp1).set_component_value("climateslider", slider_val);
+ id(disp1).set_component_text_printf("target_temp", "%.1f°", target_temp);
+ id(disp1).set_component_text_printf("target_icon", "%s", climate_icon.c_str());
+ id(disp1).show_component("target_icon");
+ id(disp1).show_component("target_temp");
+ id(disp1).show_component("climateslider");
+ id(disp1).show_component("decrease_temp");
+ id(disp1).show_component("increase_temp");
+ }
+ else
+ {
+ id(disp1).hide_component("target_icon");
+ id(disp1).hide_component("target_temp");
+ id(disp1).hide_component("climateslider");
+ id(disp1).hide_component("decrease_temp");
+ id(disp1).hide_component("increase_temp");
+ }
+ id(disp1).set_component_value("embedded", (embedded_climate) ? 1 : 0);
+ - lambda: ESP_LOGV("script.set_climate", "Finished");
+
+ - id: refresh_datetime
+ mode: restart
+ then:
+ - lambda: |-
+ ESP_LOGV("script.refresh_datetime", "Starting");
+ std::string time_format_str = id(mui_time_format);
+ if (time_format_str.find("%p") != std::string::npos)
+ {
+ std::string meridiem_text = id(time_provider).now().strftime("%p");
+ id(disp1).set_component_text_printf("home.meridiem", "%s", meridiem_text.c_str());
+ }
+ else { id(disp1).set_component_text_printf("home.meridiem", " "); }
+ if (time_format_str.find("%-H") != std::string::npos) { time_format_str = time_format_str.replace(time_format_str.find("%-H"), sizeof("%-H")-1, to_string((int)(id(time_provider).now().hour))); }
+ if (time_format_str.find("%-I") != std::string::npos)
+ {
+ if (id(time_provider).now().hour>12)
+ {
+ time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1, to_string((int)(id(time_provider).now().hour-12)));
+ }
+ else if (id(time_provider).now().hour==0)
+ {
+ time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1, "12");
+ }
+ else
+ {
+ time_format_str = time_format_str.replace(time_format_str.find("%-I"), sizeof("%-I")-1, to_string((int)(id(time_provider).now().hour)));
+ }
+ }
+ std::string time_text = id(time_provider).now().strftime(time_format_str);
+ id(disp1).set_component_text_printf("home.time", "%s", time_text.c_str());
+ ESP_LOGV("script.refresh_datetime", "Finished");
+
+ - id: refresh_relays
+ mode: restart
+ then:
+ - lambda: |-
+ ESP_LOGV("script.refresh_relays", "Starting");
+ // Chips - Relays
+ if (id(relay_1).state) id(disp1).set_component_text_printf("home.icon_top_01", "%s", id(home_relay1_icon).c_str());
+ else id(disp1).set_component_text_printf("icon_top_01", "\uFFFF");
+ if (id(relay_2).state) id(disp1).set_component_text_printf("home.icon_top_02", "%s", id(home_relay2_icon).c_str());
+ else id(disp1).set_component_text_printf("home.icon_top_02", "\uFFFF");
+ // Hardware buttons - Fallback mode
+ if (id(relay_1).state and id(relay1_local).state) id(disp1).send_command_printf("home.left_bt_pic.val=%i", (id(relay_1).state) ? 1 : 0);
+ if (id(relay_2).state and id(relay2_local).state) id(disp1).send_command_printf("home.right_bt_pic.val=%i", (id(relay_2).state) ? 1 : 0);
+ ESP_LOGV("script.refresh_relays", "Finished");
+
+ - id: refresh_wifi_icon
+ mode: restart
+ then:
+ - lambda: ESP_LOGV("script.refresh_wifi_icon", "Starting");
+ - if:
+ condition:
+ - binary_sensor.is_on: nextion_init
+ then:
+ # Update Wi-Fi icon
+ - if:
+ condition:
+ wifi.connected:
+ then:
+ - if:
+ condition:
+ api.connected:
+ then:
+ - lambda: id(disp1).send_command_printf("api=1");
+ - lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\uE5A8");
+ - lambda: id(disp1).set_component_font_color("home.wifi_icon", 33808);
+ else:
+ - lambda: id(disp1).send_command_printf("api=0");
+ - lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\uF256");
+ - lambda: id(disp1).set_component_font_color("home.wifi_icon", 63488);
+ else:
+ - lambda: id(disp1).send_command_printf("api=0");
+ - lambda: id(disp1).set_component_text_printf("home.wifi_icon", "%s", "\uE5A9");
+ - lambda: id(disp1).set_component_font_color("home.wifi_icon", 63488);
+ - lambda: ESP_LOGV("script.refresh_wifi_icon", "Finished");
+
+ - id: update_page_home
+ mode: restart
+ then:
+ - lambda: ESP_LOGV("script.update_page_home", "Starting");
+ - if:
+ condition:
+ - text_sensor.state: # Is home page visible?
+ id: current_page
+ state: 'home'
+ then:
+ - script.execute: refresh_relays
+ - script.execute: refresh_wifi_icon
+ - lambda: |-
+ ESP_LOGV("script.update_page_home", "is_notification=%i", (id(notification_text).state.empty() and id(notification_label).state.empty()) ? 0 : 1);
+ id(disp1).send_command_printf("is_notification=%i", (id(notification_text).state.empty() and id(notification_label).state.empty()) ? 0 : 1);
+ id(set_component_color).execute("home.bt_notific", id(notification_unread).state ? id(home_notify_icon_color_unread) : id(home_notify_icon_color_normal), {});
+ - script.execute: refresh_datetime
+ - script.execute: addon_climate_update_page_home
+
+ - lambda: ESP_LOGV("script.update_page_home", "Finished");
+
+ - id: service_call_alarm_control_panel
+ mode: restart
+ parameters:
+ entity: string
+ key: string
+ code_format: string
+ pin: string
+ then:
+ - lambda: |-
+ ESP_LOGV("service_call_alarm_control_panel", "ESPHome remote service call");
+ ESP_LOGV("service_call_alarm_control_panel", "entity=%s", entity.c_str());
+ ESP_LOGV("service_call_alarm_control_panel", "key=%s", key.c_str());
+ ESP_LOGV("service_call_alarm_control_panel", "code_format=%s", code_format.c_str());
+ ESP_LOGV("service_call_alarm_control_panel", "pin=%s", entity.c_str());
+ std::string service = "";
+ if (key=="home") service = "alarm_control_panel.alarm_arm_home";
+ else if (key=="away") service = "alarm_control_panel.alarm_arm_away";
+ else if (key=="night") service = "alarm_control_panel.alarm_arm_night";
+ else if (key=="vacation") service = "alarm_control_panel.alarm_arm_vacation";
+ else if (key=="bypass") service = "alarm_control_panel.alarm_arm_custom_bypass";
+ else if (key=="disarm") service = "alarm_control_panel.alarm_disarm";
+ ESP_LOGV("service_call_alarm_control_panel", "service=%s", service.c_str());
+ if (service != "" and not service.empty())
+ {
+ ESP_LOGV("service_call_alarm_control_panel", "ESPHome remote service call");
+ HomeassistantServiceResponse resp;
+ HomeassistantServiceMap resp_kv;
+ resp.service = service.c_str();
+ resp_kv.key = "entity_id";
+ resp_kv.value = entity.c_str();
+ resp.data.push_back(resp_kv);
+ if (pin != "" and not pin.empty())
+ {
+ resp_kv.key = "code";
+ resp_kv.value = pin.c_str();
+ resp.data.push_back(resp_kv);
+ }
+ id(api_server).send_homeassistant_service_call(resp);
+ }
+
+ - id: service_call_climate
+ mode: restart
+ parameters:
+ entity: string
+ key: string
+ value: string
+ embedded: bool
+ then:
+ - lambda: |-
+ if (embedded)
+ id(addon_climate_service_call)->execute(key.c_str(), value.c_str());
+ else if (key == "set_temperature")
+ id(ha_call_service)->execute("climate.set_temperature", "temperature", to_string(stof(value) / 10), entity.c_str());
+ else if (key == "hvac_mode")
+ id(ha_call_service)->execute("climate.set_hvac_mode", key.c_str(), value.c_str(), entity.c_str());
+
+ - id: ha_call_service
+ mode: restart
+ parameters:
+ service: string
+ key: string
+ value: string
+ entity: string
+ then:
+ - lambda: |-
+ if (service != "" and not service.empty())
+ {
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "service_call"},
+ {"service", service},
+ {"entity", entity},
+ {"key", key},
+ {"value", value}
+ });
+ }
+
+ - id: ha_button
+ mode: parallel
+ parameters:
+ page: string
+ component: string
+ command: string
+ then:
+ - lambda: |-
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "button_click"},
+ {"page", page},
+ {"component", component},
+ {"command", command}
+ });
+
+ - id: update_alarm_icon
+ mode: restart
+ parameters:
+ component: string
+ state: string
+ then:
+ - lambda: |-
+ ESP_LOGV("script.update_alarm_icon", "Starting");
+ std::string alarm_icon = "\uEECC"; //mdi:shield-alert-outline
+ int alarm_color = 65535;
+ // Standard colors:
+ // blue: '1055' # rgb(0, 128, 248)
+ // grey_dark: '10597' # rgb(40, 44, 40)
+ // grey_light: '33808' # rgb(128, 128, 128)
+ // grey_super_light: '52857' # rgb(200, 204, 200)
+ // grey_white: '59164' # rgb(225, 225, 225)
+ // red: '63488' # rgb(248, 0, 0)
+ // white: '65535' # rgb(255, 255, 255)
+ // yellow: '65472' # rgb(248, 248, 0)
+ // #### Colors from HA Style:
+ // green: '19818' # rgb(76, 175, 80)
+ // orange: '64704' # rgb(255, 152, 0)
+ // cyan: '1530' # rgb(0, 188, 212)
+ // deep-orange: '64164' # rgb(255, 87, 34)
+ // amber: '65024' # rgb(255, 193, 7)
+ // "off": '35921' #8a8a8a
+ // disabled: '48631' # rgb(189, 189, 189)
+ if (state == "disarmed")
+ {
+ alarm_icon = "\uE99B"; //mdi:shield-off-outline
+ alarm_color = 65535;
+ }
+ else if (state == "armed_home")
+ {
+ alarm_icon = "\uECCA"; //mdi:shield-home-outline
+ alarm_color = 19818;
+ }
+ else if (state == "armed_away")
+ {
+ alarm_icon = "\uECCB"; //mdi:shield-lock-outline
+ alarm_color = 19818;
+ }
+ else if (state == "armed_night")
+ {
+ alarm_icon = "\uF828"; //mdi:shield-moon-outline
+ alarm_color = 19818;
+ }
+ else if (state == "armed_vacation")
+ {
+ alarm_icon = "\uECC6"; //mdi:shield-airplane-outline
+ alarm_color = 19818;
+ }
+ else if (state == "armed_custom_bypass")
+ {
+ alarm_icon = "\uE77F"; //mdi:shield-half-full
+ alarm_color = 19818;
+ }
+ else if (state == "pending" or state == "arming")
+ {
+ alarm_icon = "\uE498"; //mdi:shield-outline
+ alarm_color = 65024;
+ }
+ else if (state == "disarming")
+ {
+ alarm_icon = "\uE99B"; //mdi:shield-off-outline
+ alarm_color = 65024;
+ }
+ else if (state == "triggered")
+ {
+ alarm_icon = "\uEECC"; //mdi:shield-alert-outline
+ alarm_color = 63488;
+ }
+ id(disp1).set_component_text_printf(component.c_str(), alarm_icon.c_str());
+ id(disp1).set_component_font_color(component.c_str(), alarm_color);
+ ESP_LOGV("script.update_alarm_icon", "Finished");
+
+ - id: update_climate_icon
+ mode: restart
+ parameters:
+ component: string
+ action: int
+ mode: int
+ then:
+ - lambda: |-
+ ESP_LOGV("script.update_climate_icon", "Starting");
+ ESP_LOGV("script.update_climate_icon", "component: %s", component.c_str());
+ ESP_LOGV("script.update_climate_icon", "action: %i", action);
+ ESP_LOGV("script.update_climate_icon", "mode: %i", mode);
+ switch (action) // CLIMATE_ACTION_OFF = 0, CLIMATE_ACTION_COOLING = 2, CLIMATE_ACTION_HEATING = 3, CLIMATE_ACTION_IDLE = 4, CLIMATE_ACTION_DRYING = 5, CLIMATE_ACTION_FAN = 6
+ {
+ case 0: //CLIMATE_ACTION_OFF
+ ESP_LOGV("script.update_climate_icon", "Climate 'action' is off. Using 'mode' instead");
+ switch (mode) // CLIMATE_MODE_OFF = 0, CLIMATE_MODE_HEAT_COOL = 1, CLIMATE_MODE_COOL = 2, CLIMATE_MODE_HEAT = 3, CLIMATE_MODE_FAN_ONLY = 4, CLIMATE_MODE_DRY = 5, CLIMATE_MODE_AUTO = 6
+ {
+ case 0: //CLIMATE_MODE_OFF
+ ESP_LOGV("script.update_climate_icon", "Icon: none");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uFFFF"); // (E424) Don't show icon when off
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 1: //CLIMATE_MODE_HEAT_COOL
+ ESP_LOGV("script.update_climate_icon", "Icon: autorenew");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE069"); // mdi:autorenew
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 2: //CLIMATE_MODE_COOL
+ ESP_LOGV("script.update_climate_icon", "Icon: snowflake");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE716"); // mdi:snowflake
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 3: //CLIMATE_MODE_HEAT
+ ESP_LOGV("script.update_climate_icon", "Icon: fire");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE237"); // mdi:fire
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 4: //CLIMATE_MODE_FAN_ONLY
+ ESP_LOGV("script.update_climate_icon", "Icon: fan");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE20F"); // mdi:fan
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 5: //CLIMATE_MODE_DRY
+ ESP_LOGV("script.update_climate_icon", "Icon: water-percent");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE58D"); // mdi:water-percent
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 6: //CLIMATE_MODE_AUTO
+ ESP_LOGV("script.update_climate_icon", "Icon: calendar-sync");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uEE8D"); // mdi:calendar-sync
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ }
+ break;
+ case 2: //CLIMATE_ACTION_COOLING
+ ESP_LOGV("script.update_climate_icon", "Icon: snowflake");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE716"); // mdi:snowflake
+ id(disp1).set_component_font_color(component.c_str(), 1055); // blue
+ break;
+ case 3: //CLIMATE_ACTION_HEATING
+ ESP_LOGV("script.update_climate_icon", "Icon: fire");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE237"); // mdi:fire
+ id(disp1).set_component_font_color(component.c_str(), 64164); // deep-orange
+ break;
+ case 4: //CLIMATE_ACTION_IDLE
+ ESP_LOGV("script.update_climate_icon", "Icon: thermometer");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE50E"); // mdi:thermometer
+ id(disp1).set_component_font_color(component.c_str(), 35921); // grey (off)
+ break;
+ case 5: //CLIMATE_ACTION_DRYING
+ ESP_LOGV("script.update_climate_icon", "Icon: water-percent");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE58D"); // mdi:water-percent
+ id(disp1).set_component_font_color(component.c_str(), 64704); // orange
+ break;
+ case 6: //CLIMATE_ACTION_FAN
+ ESP_LOGV("script.update_climate_icon", "Icon: fan");
+ id(disp1).set_component_text_printf(component.c_str(), "%s", "\uE20F"); // mdi:fan
+ id(disp1).set_component_font_color(component.c_str(), 1530); // cyan
+ break;
+ }
+ ESP_LOGV("script.update_climate_icon", "Finished");
+
+ - id: set_component_color
+ mode: queued
+ parameters:
+ component: string
+ foreground: int[]
+ background: int[]
+ then:
+ - lambda: |-
+ ESP_LOGV("script.set_component_color", "Starting");
+ ESP_LOGV("script.set_component_color", "Component: %s", component.c_str());
+ int fg565 = -1;
+ int bg565 = -1;
+
+ // Foreground
+ if (foreground.size() == 3) fg565 = ((foreground[0] & 0b11111000) << 8) | ((foreground[1] & 0b11111100) << 3) | (foreground[2] >> 3);
+ else if (foreground.size() == 1) fg565 = foreground[0];
+ if (fg565 >= 0) id(disp1).set_component_font_color(component.c_str(), fg565);
+
+ // Background
+ if (background.size() == 3) bg565 = ((background[0] & 0b11111000) << 8) | ((background[1] & 0b11111100) << 3) | (background[2] >> 3);
+ else if (background.size() == 1) bg565 = background[0];
+ if (bg565 >= 0) id(disp1).set_component_background_color(component.c_str(), bg565);
+
+ ESP_LOGV("script.set_component_color", "Finished");
+
+ - id: display_wrapped_text
+ mode: queued
+ parameters:
+ component: string
+ text: string
+ line_length_limit: int
+ then:
+ - lambda: |-
+ int startPos = 0;
+ int endPos = 0;
+ std::string wrappedText = "";
+ while (startPos < text.length()) {
+ while (text[startPos] == ' ' and startPos < text.length()) { startPos++; }
+ int endPos = startPos + line_length_limit;
+ if (endPos >= text.length()) endPos = text.length();
+ else
+ {
+ while (endPos > startPos && text[endPos] != ' ') { endPos--; }
+ if (endPos == startPos) endPos = startPos + line_length_limit; // Handle case of long word
+ }
+ wrappedText += text.substr(startPos, endPos-startPos);
+ if (endPos < text.length())
+ {
+ while (text[endPos] == ' ') { endPos--; }
+ if (endPos >= startPos) wrappedText += "\\r";
+ }
+ startPos = endPos + 1; // Skip the space
+ while (text[startPos] == ' ' and startPos < text.length()) { startPos++; }
}
+ ESP_LOGV("script.display_wrapped_text", "text (new): %s", wrappedText.c_str());
+ id(disp1).set_component_text_printf(component.c_str(), "%s", wrappedText.c_str());
+
+ - id: display_embedded_temp
+ mode: restart
+ then:
+ - if:
+ condition:
+ - or:
+ - lambda: return id(embedded_indoor_temp);
+ - not:
+ - api.connected:
+ - not:
+ - wifi.connected:
+ then:
+ - lambda: |-
+ if (id(temp_unit_fahrenheit)) id(disp1).set_component_text_printf("home.current_temp", "%.0f°F", ((id(temp_nspanel).state * 9.0 / 5.0) + 32.0)); // °F = (°C à 9/5) + 32
+ else id(disp1).set_component_text_printf("home.current_temp", "%.1f°C", id(temp_nspanel).state);
+
+ - id: check_versions
+ mode: restart
+ then:
+ - delay: 30s
+ - lambda: |-
+ ESP_LOGD("script.check_versions", "ESPHome version: ${version}");
+ ESP_LOGD("script.check_versions", "TFT version: %s", id(version_tft).c_str());
+ if (id(version_tft) != "${version}") ESP_LOGE("script.check_versions", "TFT version mismatch!");
+ ESP_LOGD("script.check_versions", "Blueprint version: %s", id(version_blueprint).c_str());
+ if (id(version_blueprint) != "${version}") ESP_LOGE("script.check_versions", "Blueprint version mismatch!");
+ auto ha_event = new esphome::api::CustomAPIDevice();
+ ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
+ {
+ {"type", "version"},
+ {"tft", id(version_tft).c_str()},
+ {"esphome", "${version}"},
+ {"blueprint", id(version_blueprint).c_str()}
+ });
+
+ ##### ADD-ONS ############################################################
+ ##### Add-on - Climate #####
+ - id: addon_climate_service_call
+ mode: restart
+ parameters:
+ key: string
+ value: string
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_service_call", "Check for addon_climate");
+ - id: addon_climate_update_page_home
+ mode: restart
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_home", "Check for addon_climate");
+ - id: addon_climate_set_climate
+ mode: restart
+ parameters:
+ embedded_climate: bool
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate", "Check for addon_climate");
+ ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ - id: addon_climate_global_settings
+ mode: restart
+ parameters:
+ embedded_climate: bool
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_global_settings", "Check for addon_climate");
+ ESP_LOGV("script.addon_climate_global_settings", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ - id: addon_climate_update_page_climate
+ mode: restart
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_climate", "Check for addon_climate");
+ - id: addon_climate_set_climate_friendly_name
+ mode: restart
+ parameters:
+ friendly_name: string
+ then:
+ # Reserved for Add-on Climate
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Check for addon_climate");
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "friendly_name: %s", friendly_name.c_str());
diff --git a/nspanel_esphome_addon_climate_cool.yaml b/nspanel_esphome_addon_climate_cool.yaml
new file mode 100644
index 0000000..2c40ba1
--- /dev/null
+++ b/nspanel_esphome_addon_climate_cool.yaml
@@ -0,0 +1,189 @@
+####################################################################################################
+##### NSPanel ESPHome Add-on for Climate control - Cool #####
+##### Add-on for https://github.com/Blackymas/NSPanel_HA_Blueprint #####
+####################################################################################################
+
+substitutions:
+ ### Local thermostat defaults ###
+ # https://esphome.io/components/climate/thermostat.html
+ temp_units: "°C"
+ cooler_relay: "0" # Select 1 for "Relay 1", 2 for "Relay 2" or "0" to a dummy switch/disabled
+ min_off_time: "300"
+ min_run_time: "300"
+ min_idle_time: "30"
+ # https://esphome.io/components/climate/index.html#base-climate-configuration
+ temp_min: "15"
+ temp_max: "45"
+ temp_step: "0.5"
+
+ ##### DO NOT CHANGE THIS #####
+ addon_climate_cool: "true"
+ addon_climate_heat: "false"
+ ##############################
+
+climate:
+ - platform: thermostat
+ name: ${device_name} Thermostat
+ id: thermostat_embedded
+ sensor: temp_nspanel
+ min_cooling_off_time: ${min_off_time}s
+ min_cooling_run_time: ${min_run_time}s
+ min_idle_time: ${min_idle_time}s
+ visual:
+ min_temperature: ${temp_min} ${temp_units}
+ max_temperature: ${temp_max} ${temp_units}
+ temperature_step: ${temp_step} ${temp_units}
+ cool_action:
+ - switch.turn_on: relay_${cooler_relay}
+ idle_action:
+ - switch.turn_off: relay_${cooler_relay}
+ default_preset: "Off"
+ on_boot_restore_from: memory
+ preset:
+ - name: "Off"
+ default_target_temperature_high: ${temp_min} ${temp_units}
+ mode: "off"
+ - name: Home
+ default_target_temperature_high: 21 ${temp_units}
+ internal: false
+ on_state:
+ - logger.log: Climate state changed - Start
+ - script.execute: addon_climate_update_page_climate
+ - script.execute: addon_climate_update_page_home
+ - logger.log: Climate state changed - End
+
+###### All the code bellow this point is shared between addon_climate_cool and addon_climate_heat #####
+
+globals:
+ ##### Is embedded thermostat set as main climate entity? #####
+ - id: is_embedded_thermostat
+ type: bool
+ restore_value: true
+ initial_value: 'false'
+ ##### Is embedded thermostat visible on climate page? #####
+ - id: is_addon_climate_visible
+ type: bool
+ restore_value: false
+ initial_value: 'false'
+ ##### Embeded climate friendly name #####
+ - id: addon_climate_friendly_name
+ type: std::string
+ restore_value: false
+ initial_value: '"${device_name} Thermostat"'
+
+script:
+ - id: !extend addon_climate_update_page_home
+ mode: restart
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_home", "Starting");
+ // Update home.entity variable
+ ESP_LOGV("script.addon_climate_update_page_home", "Update home.entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : "");
+ id(disp1).set_component_text_printf("home.entity", (id(is_embedded_thermostat)) ? "embedded_climate" : "");
+ // Update chips
+ if (id(is_embedded_thermostat))
+ {
+ ESP_LOGV("script.addon_climate_update_page_home", "Update chips");
+ id(update_climate_icon).execute("home.icon_top_03", int(id(thermostat_embedded).action), int(id(thermostat_embedded).mode));
+ }
+ ESP_LOGV("script.addon_climate_update_page_home", "Finished");
+
+ - id: !extend addon_climate_service_call
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_service_call", "Starting");
+ id(is_addon_climate_visible) = true;
+ auto call = id(thermostat_embedded).make_call();
+ if (key == "set_temperature")
+ {
+ call.set_target_temperature(stof(value) / 10);
+ }
+ else if (key == "hvac_mode")
+ {
+ call.set_mode(value);
+ }
+ call.perform();
+ ESP_LOGV("script.addon_climate_service_call", "Finished");
+
+ - id: !extend addon_climate_set_climate
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate", "Starting");
+ ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ id(is_addon_climate_visible) = embedded_climate;
+ ESP_LOGV("script.addon_climate_set_climate", "Finished");
+
+ - id: !extend addon_climate_global_settings
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_global_settings", "Starting");
+ ESP_LOGV("script.addon_climate_global_settings", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ id(is_embedded_thermostat) = embedded_climate;
+ ESP_LOGV("script.addon_climate_global_settings", "Finished");
+
+ - id: !extend addon_climate_update_page_climate
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_climate", "Starting");
+ ESP_LOGV("script.addon_climate_update_page_climate", "nextion_init: %i", (id(nextion_init)) ? 1 : 0);
+ ESP_LOGV("script.addon_climate_update_page_climate", "current_page: %s", id(current_page).state.c_str());
+ ESP_LOGV("script.addon_climate_update_page_climate", "is_addon_climate_visible: %i", (id(is_addon_climate_visible)) ? 1 : 0);
+ if (id(current_page).state == "climate" and id(is_addon_climate_visible))
+ {
+ id(disp1).set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
+ float temp_step = ${temp_step};
+ float temp_offset = ${temp_min};
+ float temp_max = ${temp_max};
+ float total_steps = (temp_max-temp_offset)/temp_step;
+ id(set_climate)->execute
+ (
+ id(thermostat_embedded).current_temperature, // current_temp
+ id(thermostat_embedded).target_temperature, // target_temp
+ int(round(${temp_step}*10)), // temp_step
+ int(round(total_steps)), // total_steps //int(round((10*id(thermostat_embedded).target_temperature-temp_offset)/temp_step)), // slider_val
+ int(round(${temp_min}*10)), // temp_offset
+ "", // climate_icon
+ true // embedded_climate
+ );
+
+ // Update target temp icon
+ ESP_LOGV("script.addon_climate_update_page_climate", "thermostat_embedded.action=%i", int(id(thermostat_embedded).action));
+ id(update_climate_icon).execute("climate.target_icon", int(id(thermostat_embedded).action), int(id(thermostat_embedded).mode));
+
+ // Update buttons bar
+ ESP_LOGV("script.addon_climate_update_page_climate", "Updating buttons bar");
+ // Hide not supported hotspots
+ id(disp1).hide_component("button01");
+ id(disp1).hide_component("button02");
+ if (${addon_climate_heat}) id(disp1).show_component("button03"); else id(disp1).hide_component("button03"); //Heat
+ if (${addon_climate_cool}) id(disp1).show_component("button04"); else id(disp1).hide_component("button04"); //Cool
+ id(disp1).hide_component("button05");
+ id(disp1).hide_component("button06");
+ id(disp1).show_component("button07"); //Off
+ // Set buttons colors
+ id(disp1).set_component_font_color("climate.button01_icon", 6339);
+ id(disp1).set_component_font_color("climate.button02_icon", 6339);
+ id(disp1).set_component_font_color("climate.button03_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_HEAT) ? 64164 : ((${addon_climate_heat}) ? 48631 : 6339));
+ id(disp1).set_component_font_color("climate.button04_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_COOL) ? 1055 : ((${addon_climate_cool}) ? 48631 : 6339));
+ id(disp1).set_component_font_color("climate.button05_icon", 6339);
+ id(disp1).set_component_font_color("climate.button06_icon", 6339);
+ id(disp1).set_component_font_color("climate.button07_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_OFF) ? 10597 : 35921);
+ }
+ ESP_LOGV("script.addon_climate_update_page_climate", "Finished");
+
+ - id: !extend addon_climate_set_climate_friendly_name
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Starting");
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "friendly_name: %s", friendly_name.c_str());
+ id(addon_climate_friendly_name) = friendly_name;
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Finished");
+
+switch:
+ ##### PHYSICAL SWITCH 0 (Dummy) - Used when relay is not set #####
+ - name: ${device_name} Relay 0 (dummy)
+ platform: template
+ id: relay_0
+ lambda: !lambda return false;
+ internal: true
+ optimistic: true
diff --git a/nspanel_esphome_addon_climate_heat.yaml b/nspanel_esphome_addon_climate_heat.yaml
new file mode 100644
index 0000000..c4350c8
--- /dev/null
+++ b/nspanel_esphome_addon_climate_heat.yaml
@@ -0,0 +1,189 @@
+####################################################################################################
+##### NSPanel ESPHome Add-on for Climate control - Heat #####
+##### Add-on for https://github.com/Blackymas/NSPanel_HA_Blueprint #####
+####################################################################################################
+
+substitutions:
+ ### Local thermostat defaults ###
+ # https://esphome.io/components/climate/thermostat.html
+ temp_units: "°C"
+ heater_relay: "0" # Select 1 for "Relay 1", 2 for "Relay 2" or "0" to a dummy switch/disabled
+ min_off_time: "300"
+ min_run_time: "300"
+ min_idle_time: "30"
+ # https://esphome.io/components/climate/index.html#base-climate-configuration
+ temp_min: "5"
+ temp_max: "25"
+ temp_step: "0.5"
+
+ ##### DO NOT CHANGE THIS #####
+ addon_climate_cool: "false"
+ addon_climate_heat: "true"
+ ##############################
+
+climate:
+ - platform: thermostat
+ name: ${device_name} Thermostat
+ id: thermostat_embedded
+ sensor: temp_nspanel
+ min_heating_off_time: ${min_off_time}s
+ min_heating_run_time: ${min_run_time}s
+ min_idle_time: ${min_idle_time}s
+ visual:
+ min_temperature: ${temp_min} ${temp_units}
+ max_temperature: ${temp_max} ${temp_units}
+ temperature_step: ${temp_step} ${temp_units}
+ heat_action:
+ - switch.turn_on: relay_${heater_relay}
+ idle_action:
+ - switch.turn_off: relay_${heater_relay}
+ default_preset: "Off"
+ on_boot_restore_from: memory
+ preset:
+ - name: "Off"
+ default_target_temperature_low: ${temp_min} ${temp_units}
+ mode: "off"
+ - name: Home
+ default_target_temperature_low: 21 ${temp_units}
+ internal: false
+ on_state:
+ - logger.log: Climate state changed - Start
+ - script.execute: addon_climate_update_page_climate
+ - script.execute: addon_climate_update_page_home
+ - logger.log: Climate state changed - End
+
+###### All the code bellow this point is shared between addon_climate_cool and addon_climate_heat #####
+
+globals:
+ ##### Is embedded thermostat set as main climate entity? #####
+ - id: is_embedded_thermostat
+ type: bool
+ restore_value: true
+ initial_value: 'false'
+ ##### Is embedded thermostat visible on climate page? #####
+ - id: is_addon_climate_visible
+ type: bool
+ restore_value: false
+ initial_value: 'false'
+ ##### Embeded climate friendly name #####
+ - id: addon_climate_friendly_name
+ type: std::string
+ restore_value: false
+ initial_value: '"${device_name} Thermostat"'
+
+script:
+ - id: !extend addon_climate_update_page_home
+ mode: restart
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_home", "Starting");
+ // Update home.entity variable
+ ESP_LOGV("script.addon_climate_update_page_home", "Update home.entity variable: %s", (id(is_embedded_thermostat)) ? "embedded_climate" : "");
+ id(disp1).set_component_text_printf("home.entity", (id(is_embedded_thermostat)) ? "embedded_climate" : "");
+ // Update chips
+ if (id(is_embedded_thermostat))
+ {
+ ESP_LOGV("script.addon_climate_update_page_home", "Update chips");
+ id(update_climate_icon).execute("home.icon_top_03", int(id(thermostat_embedded).action), int(id(thermostat_embedded).mode));
+ }
+ ESP_LOGV("script.addon_climate_update_page_home", "Finished");
+
+ - id: !extend addon_climate_service_call
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_service_call", "Starting");
+ id(is_addon_climate_visible) = true;
+ auto call = id(thermostat_embedded).make_call();
+ if (key == "set_temperature")
+ {
+ call.set_target_temperature(stof(value) / 10);
+ }
+ else if (key == "hvac_mode")
+ {
+ call.set_mode(value);
+ }
+ call.perform();
+ ESP_LOGV("script.addon_climate_service_call", "Finished");
+
+ - id: !extend addon_climate_set_climate
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate", "Starting");
+ ESP_LOGV("script.addon_climate_set_climate", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ id(is_addon_climate_visible) = embedded_climate;
+ ESP_LOGV("script.addon_climate_set_climate", "Finished");
+
+ - id: !extend addon_climate_global_settings
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_global_settings", "Starting");
+ ESP_LOGV("script.addon_climate_global_settings", "embedded_climate: %i", (embedded_climate) ? 1 : 0);
+ id(is_embedded_thermostat) = embedded_climate;
+ ESP_LOGV("script.addon_climate_global_settings", "Finished");
+
+ - id: !extend addon_climate_update_page_climate
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_update_page_climate", "Starting");
+ ESP_LOGV("script.addon_climate_update_page_climate", "nextion_init: %i", (id(nextion_init)) ? 1 : 0);
+ ESP_LOGV("script.addon_climate_update_page_climate", "current_page: %s", id(current_page).state.c_str());
+ ESP_LOGV("script.addon_climate_update_page_climate", "is_addon_climate_visible: %i", (id(is_addon_climate_visible)) ? 1 : 0);
+ if (id(current_page).state == "climate" and id(is_addon_climate_visible))
+ {
+ id(disp1).set_component_text_printf("page_label", id(addon_climate_friendly_name).c_str());
+ float temp_step = ${temp_step};
+ float temp_offset = ${temp_min};
+ float temp_max = ${temp_max};
+ float total_steps = (temp_max-temp_offset)/temp_step;
+ id(set_climate)->execute
+ (
+ id(thermostat_embedded).current_temperature, // current_temp
+ id(thermostat_embedded).target_temperature, // target_temp
+ int(round(${temp_step}*10)), // temp_step
+ int(round(total_steps)), // total_steps //int(round((10*id(thermostat_embedded).target_temperature-temp_offset)/temp_step)), // slider_val
+ int(round(${temp_min}*10)), // temp_offset
+ "", // climate_icon
+ true // embedded_climate
+ );
+
+ // Update target temp icon
+ ESP_LOGV("script.addon_climate_update_page_climate", "thermostat_embedded.action=%i", int(id(thermostat_embedded).action));
+ id(update_climate_icon).execute("climate.target_icon", int(id(thermostat_embedded).action), int(id(thermostat_embedded).mode));
+
+ // Update buttons bar
+ ESP_LOGV("script.addon_climate_update_page_climate", "Updating buttons bar");
+ // Hide not supported hotspots
+ id(disp1).hide_component("button01");
+ id(disp1).hide_component("button02");
+ if (${addon_climate_heat}) id(disp1).show_component("button03"); else id(disp1).hide_component("button03"); //Heat
+ if (${addon_climate_cool}) id(disp1).show_component("button04"); else id(disp1).hide_component("button04"); //Cool
+ id(disp1).hide_component("button05");
+ id(disp1).hide_component("button06");
+ id(disp1).show_component("button07"); //Off
+ // Set buttons colors
+ id(disp1).set_component_font_color("climate.button01_icon", 6339);
+ id(disp1).set_component_font_color("climate.button02_icon", 6339);
+ id(disp1).set_component_font_color("climate.button03_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_HEAT) ? 64164 : ((${addon_climate_heat}) ? 48631 : 6339));
+ id(disp1).set_component_font_color("climate.button04_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_COOL) ? 1055 : ((${addon_climate_cool}) ? 48631 : 6339));
+ id(disp1).set_component_font_color("climate.button05_icon", 6339);
+ id(disp1).set_component_font_color("climate.button06_icon", 6339);
+ id(disp1).set_component_font_color("climate.button07_icon", (id(thermostat_embedded).mode==climate::CLIMATE_MODE_OFF) ? 10597 : 35921);
+ }
+ ESP_LOGV("script.addon_climate_update_page_climate", "Finished");
+
+ - id: !extend addon_climate_set_climate_friendly_name
+ then:
+ - lambda: |-
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Starting");
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "friendly_name: %s", friendly_name.c_str());
+ id(addon_climate_friendly_name) = friendly_name;
+ ESP_LOGV("script.addon_climate_set_climate_friendly_name", "Finished");
+
+switch:
+ ##### PHYSICAL SWITCH 0 (Dummy) - Used when relay is not set #####
+ - name: ${device_name} Relay 0 (dummy)
+ platform: template
+ id: relay_0
+ lambda: !lambda return false;
+ internal: true
+ optimistic: true
diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI
index a93787a..1ae8ecc 100644
Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ
diff --git a/nspanel_eu.tft b/nspanel_eu.tft
index 266010a..36e0944 100644
Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ
diff --git a/nspanel_eu_code/Program.s.txt b/nspanel_eu_code/Program.s.txt
index c76d01f..38c65b6 100644
--- a/nspanel_eu_code/Program.s.txt
+++ b/nspanel_eu_code/Program.s.txt
@@ -4,10 +4,18 @@ Program.s
int r=0,g=0,b=0
int h=0,s=0,v=0
int p=0,q=0,t=0,f=0
- bauds=115200//Configure baudrat
- recmod=0//Serial data parsing mode:0-Passive mode;1-Active mod
- printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial pore
- lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
+ int api=0 // 0 = disconnected from HA, 1 = connected to HA
+ int sleep_mode=0
+ int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
+ int brightness=100,brightness_dim=40
+ int display_mode=1 // 1 = EU, 2 = US, 3 = US landscape
+ bauds=115200//Configure baudrate
+ recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
+ printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
+ if(display_mode==1)
+ {
+ lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
+ }
printh 92
prints "nspanelevent",0
printh 00
diff --git a/nspanel_eu_code/alarm.txt b/nspanel_eu_code/alarm.txt
new file mode 100644
index 0000000..d5c57cb
--- /dev/null
+++ b/nspanel_eu_code/alarm.txt
@@ -0,0 +1,445 @@
+Page alarm
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ vis bt_home,0
+ vis bt_away,0
+ vis bt_night,0
+ vis bt_vacat,0
+ vis bt_bypass,0
+ }
+
+ Touch Press Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) lastclick
+ Attributes
+ ID : 3
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 4
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) code_format
+ Attributes
+ ID : 29
+ Scope : local
+ Text :
+ Max. Text Size: 15
+
+Variable (string) entity
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) code_arm_req
+ Attributes
+ ID : 31
+ Scope : local
+ Text :
+ Max. Text Size: 1
+
+Text page_label
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm Control Panel
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : î
+ Max. Text Size : 10
+
+Text bt_home_text
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Home
+ Max. Text Size : 22
+
+Text bt_away_text
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Away
+ Max. Text Size : 22
+
+Text bt_night_text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Night
+ Max. Text Size : 22
+
+Text bt_vacat_text
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Vacation
+ Max. Text Size : 22
+
+Text bt_bypass_text
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Bypass
+ Max. Text Size : 22
+
+Text bt_disarm_text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Disarm
+ Max. Text Size : 22
+
+Text bt_home_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_away_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_night_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_vacat_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_bypass_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_disarm_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture bt_home_pic
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_away_pic
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_night_pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_vacat_pic
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_bypass_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_disarm_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot bt_home
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_home_pic.pic=44
+ bt_home_text.bco=65024
+ bt_home_text.pco=0
+ bt_home_icon.bco=65024
+ bt_home_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_away
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_away_pic.pic=44
+ bt_away_text.bco=65024
+ bt_away_text.pco=0
+ bt_away_icon.bco=65024
+ bt_away_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_night
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_night_pic.pic=44
+ bt_night_text.bco=65024
+ bt_night_text.pco=0
+ bt_night_icon.bco=65024
+ bt_night_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_vacat
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_vacat_pic.pic=44
+ bt_vacat_text.bco=65024
+ bt_vacat_text.pco=0
+ bt_vacat_icon.bco=65024
+ bt_vacat_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_bypass
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_bypass_pic.pic=44
+ bt_bypass_text.bco=65024
+ bt_bypass_text.pco=0
+ bt_bypass_icon.bco=65024
+ bt_bypass_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_disarm
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_disarm_pic.pic=44
+ bt_disarm_text.bco=65024
+ bt_disarm_text.pco=0
+ bt_disarm_icon.bco=65024
+ bt_disarm_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_eu_code/boot.txt b/nspanel_eu_code/boot.txt
index 19e879f..dce2681 100644
--- a/nspanel_eu_code/boot.txt
+++ b/nspanel_eu_code/boot.txt
@@ -12,13 +12,44 @@ Page boot
Events
Preinitialize Event
+ dim=100
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
printh 92
prints "nspanelevent",0
printh 00
- prints "{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ prints nspanelevent.txt,0
printh 00
printh FF FF FF
+ vis bt_reboot,0
+Variable (int32) counter
+ Attributes
+ ID : 12
+ Scope: local
+ Value: 0
+
+Variable (string) aux1
+ Attributes
+ ID : 13
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) nspanelevent
+ Attributes
+ ID : 14
+ Scope : local
+ Text :
+ Max. Text Size: 150
+
+Variable (string) aux2
+ Attributes
+ ID : 15
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
Text ip_addr
Attributes
ID : 1
@@ -86,7 +117,7 @@ Text tft_version
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text : 3.4
+ Text : 4.0
Max. Text Size : 8
Text esph_version
@@ -109,7 +140,7 @@ Text bluep_version
Text :
Max. Text Size : 8
-Dual-state Button a01
+Dual-state Button bt_reboot
Attributes
ID : 4
Scope : local
@@ -119,3 +150,24 @@ Dual-state Button a01
Text : Reboot
Max. Text Size : 6
+Timer timer
+ Attributes
+ ID : 11
+ Scope : local
+ Period (ms): 65534
+ Enabled : yes
+
+ Events
+ Timer Event
+ counter.val++
+ covx counter.val,aux1.txt,0,0
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
+ bluep_version.txt="Retry: "+aux1.txt
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints nspanelevent.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_eu_code/buttonpage01.txt b/nspanel_eu_code/buttonpage01.txt
index 5a1fe58..cba5b81 100644
--- a/nspanel_eu_code/buttonpage01.txt
+++ b/nspanel_eu_code/buttonpage01.txt
@@ -12,14 +12,22 @@ Page buttonpage01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage01
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage01_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage01_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 46
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_eu_code/buttonpage02.txt b/nspanel_eu_code/buttonpage02.txt
index 3d6af5d..e681569 100644
--- a/nspanel_eu_code/buttonpage02.txt
+++ b/nspanel_eu_code/buttonpage02.txt
@@ -12,14 +12,22 @@ Page buttonpage02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage02
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage02_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage02_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_eu_code/buttonpage03.txt b/nspanel_eu_code/buttonpage03.txt
index 375f8f6..4b36f81 100644
--- a/nspanel_eu_code/buttonpage03.txt
+++ b/nspanel_eu_code/buttonpage03.txt
@@ -12,14 +12,22 @@ Page buttonpage03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage03
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage03_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage03_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_eu_code/buttonpage04.txt b/nspanel_eu_code/buttonpage04.txt
index c66ee0f..14fc68e 100644
--- a/nspanel_eu_code/buttonpage04.txt
+++ b/nspanel_eu_code/buttonpage04.txt
@@ -12,14 +12,22 @@ Page buttonpage04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage04
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage04_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage04_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_eu_code/climate.txt b/nspanel_eu_code/climate.txt
index e69de29..14fbd65 100644
--- a/nspanel_eu_code/climate.txt
+++ b/nspanel_eu_code/climate.txt
@@ -0,0 +1,729 @@
+Page climate
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==1||home.entity.txt=="embedded_climate")
+ {
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis target_icon,0
+ vis target_temp,0
+ vis current_temp,0
+ vis current_icon,0
+ vis climateslider,0
+ vis button01,0
+ vis button02,0
+ vis button03,0
+ vis button04,0
+ vis button05,0
+ vis button06,0
+ vis button07,0
+ page_label.txt=home.entity.txt
+ }else
+ {
+ page home
+ }
+
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ if(timer01.en==1)
+ {
+ timer01.en=0
+ covx temp_number.val,va1.txt,0,0
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ }
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 25
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) climatesetting
+ Attributes
+ ID : 26
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) lastclick
+ Attributes
+ ID : 34
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (int32) temp_offset
+ Attributes
+ ID : 36
+ Scope: local
+ Value: 0
+
+Variable (int32) temp_step
+ Attributes
+ ID : 37
+ Scope: local
+ Value: 0
+
+Variable (int32) temp_number
+ Attributes
+ ID : 43
+ Scope: local
+ Value: 0
+
+Variable (int32) va0
+ Attributes
+ ID : 44
+ Scope: local
+ Value: 0
+
+Variable (string) back_page
+ Attributes
+ ID : 45
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (int32) embedded
+ Attributes
+ ID : 46
+ Scope: local
+ Value: 0
+
+Variable (string) va2
+ Attributes
+ ID : 47
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text current_temp
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 100
+
+Text current_icon
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_icon
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value02_icon
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value03_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text button01_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06_icon
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07_icon
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08_icon
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button09_icon
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_temp
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider climateslider
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 20
+ Upper range limit: 40
+ Lower range limit: 0
+
+ Events
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ timer01.en=1
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 48
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot decrease_temp
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.val>0)
+ {
+ climateslider.val--
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ }
+
+ Touch Release Event
+ timer01.en=1
+
+Hotspot increase_temp
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_eu_code/cover.txt b/nspanel_eu_code/cover.txt
new file mode 100644
index 0000000..1a8db51
--- /dev/null
+++ b/nspanel_eu_code/cover.txt
@@ -0,0 +1,233 @@
+Page cover
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 7
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) coversetting
+ Attributes
+ ID : 11
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 12
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Text battery_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text cover_value
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text battery_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider coverslider
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx coverslider.val,va1.txt,0,0
+ cover_value.txt=va1.txt+"%"
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_open
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_close
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_stop
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
diff --git a/nspanel_eu_code/entitypage01.txt b/nspanel_eu_code/entitypage01.txt
index 0dae56e..e7e9ea3 100644
--- a/nspanel_eu_code/entitypage01.txt
+++ b/nspanel_eu_code/entitypage01.txt
@@ -12,12 +12,19 @@ Page entitypage01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity01_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity01_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity01_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/entitypage02.txt b/nspanel_eu_code/entitypage02.txt
index 5c453cf..e66ba1d 100644
--- a/nspanel_eu_code/entitypage02.txt
+++ b/nspanel_eu_code/entitypage02.txt
@@ -12,12 +12,19 @@ Page entitypage02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity02_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity02_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity02_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/entitypage03.txt b/nspanel_eu_code/entitypage03.txt
index 6c0658d..01a4cb1 100644
--- a/nspanel_eu_code/entitypage03.txt
+++ b/nspanel_eu_code/entitypage03.txt
@@ -12,12 +12,19 @@ Page entitypage03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity03_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity03_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity03_back
+Text page_index
Attributes
- ID : 8
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 29
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/entitypage04.txt b/nspanel_eu_code/entitypage04.txt
index 76f4d0c..92eed65 100644
--- a/nspanel_eu_code/entitypage04.txt
+++ b/nspanel_eu_code/entitypage04.txt
@@ -12,12 +12,19 @@ Page entitypage04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity04_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity04_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity04_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/fan.txt b/nspanel_eu_code/fan.txt
new file mode 100644
index 0000000..27327a3
--- /dev/null
+++ b/nspanel_eu_code/fan.txt
@@ -0,0 +1,405 @@
+Page fan
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) fansetting
+ Attributes
+ ID : 7
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 8
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) va0
+ Attributes
+ ID : 9
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text fan_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider fanslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 4
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.val=5)
+ {
+ fanslider.val++
+ }
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ fanslider.val--
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ }
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_eu_code/home.txt b/nspanel_eu_code/home.txt
index d821007..607d307 100644
--- a/nspanel_eu_code/home.txt
+++ b/nspanel_eu_code/home.txt
@@ -12,7 +12,7 @@ Page home
Events
Preinitialize Event
- dim=brightness.val
+ dim=brightness
dimtimer.en=1
sleeptimer.en=1
printh 92
@@ -21,41 +21,39 @@ Page home
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
+ vis bt_notific,is_notification
+ vis bt_qrcode,is_qrcode
+ vis bt_entities,is_entities
+ vis bt_alarm,is_alarm
+ if(display_mode==3)
+ {
+ vis left_bt_text,0
+ vis right_bt_text,0
+ }
-Variable (int32) brightness
- Attributes
- ID : 2
- Scope: global
- Value: 100
-
-Variable (int32) brightdd
- Attributes
- ID : 3
- Scope: global
- Value: 40
-
Variable (int32) disdim
Attributes
- ID : 4
- Scope: global
- Value: 0
-
-Variable (int32) sleepmodus
- Attributes
- ID : 16
+ ID : 2
Scope: global
Value: 0
Variable (string) lastclick
Attributes
- ID : 54
+ ID : 45
Scope : local
Text :
Max. Text Size: 100
+Variable (string) entity
+ Attributes
+ ID : 46
+ Scope : global
+ Text :
+ Max. Text Size: 100
+
Text time
Attributes
- ID : 7
+ ID : 5
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -65,7 +63,7 @@ Text time
Text current_temp
Attributes
- ID : 8
+ ID : 6
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -75,7 +73,7 @@ Text current_temp
Text outdoor_temp
Attributes
- ID : 9
+ ID : 7
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -85,7 +83,7 @@ Text outdoor_temp
Text date
Attributes
- ID : 10
+ ID : 8
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -95,7 +93,7 @@ Text date
Text value01_state
Attributes
- ID : 12
+ ID : 10
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -105,7 +103,7 @@ Text value01_state
Text left_bt_text
Attributes
- ID : 17
+ ID : 14
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -115,7 +113,7 @@ Text left_bt_text
Text right_bt_text
Attributes
- ID : 18
+ ID : 15
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -125,7 +123,7 @@ Text right_bt_text
Text icon_top_01
Attributes
- ID : 21
+ ID : 16
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -135,7 +133,7 @@ Text icon_top_01
Text icon_top_02
Attributes
- ID : 22
+ ID : 17
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -145,7 +143,7 @@ Text icon_top_02
Text icon_top_03
Attributes
- ID : 23
+ ID : 18
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -155,7 +153,7 @@ Text icon_top_03
Text icon_top_04
Attributes
- ID : 24
+ ID : 19
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -165,7 +163,7 @@ Text icon_top_04
Text icon_top_05
Attributes
- ID : 25
+ ID : 20
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -175,7 +173,7 @@ Text icon_top_05
Text icon_top_06
Attributes
- ID : 26
+ ID : 21
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -185,7 +183,7 @@ Text icon_top_06
Text icon_top_07
Attributes
- ID : 27
+ ID : 22
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -195,7 +193,7 @@ Text icon_top_07
Text icon_top_08
Attributes
- ID : 28
+ ID : 23
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -205,7 +203,7 @@ Text icon_top_08
Text icon_top_09
Attributes
- ID : 29
+ ID : 24
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -215,7 +213,7 @@ Text icon_top_09
Text icon_top_10
Attributes
- ID : 30
+ ID : 25
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -225,7 +223,7 @@ Text icon_top_10
Text value01_icon
Attributes
- ID : 31
+ ID : 26
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -235,7 +233,7 @@ Text value01_icon
Text value03_state
Attributes
- ID : 32
+ ID : 27
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -245,7 +243,7 @@ Text value03_state
Text value03_icon
Attributes
- ID : 33
+ ID : 28
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -255,7 +253,7 @@ Text value03_icon
Text value02_icon
Attributes
- ID : 34
+ ID : 29
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -265,7 +263,7 @@ Text value02_icon
Text value02_state
Attributes
- ID : 35
+ ID : 30
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -275,7 +273,7 @@ Text value02_state
Text wifi_icon
Attributes
- ID : 36
+ ID : 31
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -285,7 +283,7 @@ Text wifi_icon
Text indoortempicon
Attributes
- ID : 37
+ ID : 32
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -295,7 +293,7 @@ Text indoortempicon
Text button01_icon
Attributes
- ID : 38
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -305,7 +303,7 @@ Text button01_icon
Text button02_icon
Attributes
- ID : 39
+ ID : 34
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -315,7 +313,7 @@ Text button02_icon
Text button03_icon
Attributes
- ID : 40
+ ID : 35
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -323,9 +321,9 @@ Text button03_icon
Text :
Max. Text Size : 10
-Text button04_icon
+Text bt_notific
Attributes
- ID : 41
+ ID : 36
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -333,9 +331,16 @@ Text button04_icon
Text :
Max. Text Size : 10
-Text button05_icon
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page notification
+ }
+
+Text bt_qrcode
Attributes
- ID : 42
+ ID : 37
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -343,9 +348,13 @@ Text button05_icon
Text :
Max. Text Size : 10
-Text button06_icon
+ Events
+ Touch Release Event
+ page qrcode
+
+Text bt_entities
Attributes
- ID : 43
+ ID : 38
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -353,7 +362,32 @@ Text button06_icon
Text :
Max. Text Size : 10
-Text button07_icon
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page entitypage01
+ }
+
+Text bt_alarm
+ Attributes
+ ID : 39
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ entity.txt=""
+ page alarm
+ }
+
+Text meridiem
Attributes
ID : 44
Scope : global
@@ -363,92 +397,88 @@ Text button07_icon
Text :
Max. Text Size : 10
-Text meridiem
- Attributes
- ID : 53
- Scope : global
- Dragging : 0
- Send Component ID : disabled
- Associated Keyboard: none
- Text :
- Max. Text Size : 10
-
Picture weather
Attributes
- ID : 11
+ ID : 9
Scope : global
Dragging : 0
Send Component ID: disabled
-Picture left_bt_pic
+Dual-state Button left_bt_pic
Attributes
- ID : 19
+ ID : 48
Scope : global
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
-Picture right_bt_pic
+Dual-state Button right_bt_pic
Attributes
- ID : 20
+ ID : 49
Scope : global
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
Hotspot fc_weather
Attributes
- ID : 13
+ ID : 11
Scope : global
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(api==1)
+ {
+ page weather01
+ }
Hotspot jump_climate
Attributes
- ID : 14
+ ID : 12
Scope : local
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
Hotspot button01
Attributes
- ID : 45
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -465,7 +495,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 46
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -482,7 +512,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 47
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -497,81 +527,20 @@ Hotspot button03
printh 00
printh FF FF FF
-Hotspot button04
- Attributes
- ID : 48
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button05
- Attributes
- ID : 49
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button06
- Attributes
- ID : 50
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button07
- Attributes
- ID : 51
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button07\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
Hotspot settings_click
Attributes
- ID : 52
+ ID : 43
Scope : local
Dragging : 0
- Send Component ID: on press and release
+ Send Component ID: disabled
+ Events
+ Touch Press Event
+ settings_timer.en=1
+
+ Touch Release Event
+ settings_timer.en=0
+
Timer dimtimer
Attributes
ID : 1
@@ -583,12 +552,12 @@ Timer dimtimer
Timer Event
if(disdim.val==0)
{
- dim=brightdd.val // Dim down screen to val set from HA
+ dim=brightness_dim // Dim down screen to val set from HA
}
Timer swipestore
Attributes
- ID : 6
+ ID : 4
Scope : local
Period (ms): 50
Enabled : no
@@ -600,30 +569,41 @@ Timer swipestore
Timer sleeptimer
Attributes
- ID : 15
+ ID : 13
Scope : local
Period (ms): 65000
Enabled : no
Events
Timer Event
- if(sleepmodus.val==1)
+ if(sleep_mode==1)
{
screensaver.orign.val=0
// Go to screensaver page
page screensaver
}
+Timer settings_timer
+ Attributes
+ ID : 47
+ Scope : local
+ Period (ms): 1000
+ Enabled : no
+
+ Events
+ Timer Event
+ page settings
+
TouchCap swipe
Attributes
- ID : 5
+ ID : 3
Scope: local
Value: 0
Events
Touch Press Event
swipestore.en=1 // Start swipestore timer
- dim=brightness.val // Set brightness to saved value (from HA)
+ dim=brightness // Set brightness to saved value (from HA)
dimtimer.en=1 // Enable timer to calc down for dimming screen
sleeptimer.en=1
@@ -634,13 +614,13 @@ TouchCap swipe
{
swipec=swipex-tch2
// From Left to Right
- if(swipec>swipedx)
+ if(swipec>swipedx&&api==1)
{
page buttonpage04
}
// Right to Left
swipec2=0-swipedx
- if(swipec100)
+ if(swipec>100&&api==1)
{
page buttonpage02
}
// Down to Up
swipec2=0-swipedy
- if(swipec<-100)
+ if(swipec<-100&&api==1)
{
page buttonpage03
}
diff --git a/nspanel_eu_code/keyb_num.txt b/nspanel_eu_code/keyb_num.txt
new file mode 100644
index 0000000..54fefee
--- /dev/null
+++ b/nspanel_eu_code/keyb_num.txt
@@ -0,0 +1,326 @@
+Page keyb_num
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page page_id.val
+ }else
+ {
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Variable (int32) page_id
+ Attributes
+ ID : 17
+ Scope: local
+ Value: 0
+
+Variable (string) key
+ Attributes
+ ID : 19
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) entity
+ Attributes
+ ID : 20
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) domain
+ Attributes
+ ID : 21
+ Scope : local
+ Text : alarm
+ Max. Text Size: 10
+
+Variable (string) aux
+ Attributes
+ ID : 22
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) value
+ Attributes
+ ID : 23
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text t0
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text pin
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text title
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm
+ Max. Text Size : 10
+
+Button b1
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 1
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b1.txt
+
+Button bclose
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ page page_id.val
+
+Button b2
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 2
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b2.txt
+
+Button b3
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 3
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b3.txt
+
+Button b4
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 4
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b4.txt
+
+Button b5
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 5
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b5.txt
+
+Button b6
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 6
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b6.txt
+
+Button b7
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 7
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b7.txt
+
+Button b8
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 8
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b8.txt
+
+Button b9
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 9
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b9.txt
+
+Button bclear
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : <
+ Max. Text Size : 5
+
+ Events
+ Touch Release Event
+ pin.txt=""
+
+Button b0
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 0
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b0.txt
+
+Button benter
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : OK
+ Max. Text Size : 3
+
+ Events
+ Touch Release Event
+ aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Button bview
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : O
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(pin.pw==1)
+ {
+ pin.pw=0
+ }else
+ {
+ pin.pw=1
+ }
+
diff --git a/nspanel_eu_code/light.txt b/nspanel_eu_code/light.txt
new file mode 100644
index 0000000..766b785
--- /dev/null
+++ b/nspanel_eu_code/light.txt
@@ -0,0 +1,696 @@
+Page light
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+ // #### Hide color & temp buttons #####
+ vis temp_touch,0
+ vis temp_value_2,0
+ vis temp_button,0
+ vis color_touch,0
+ vis color_button,0
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (int32) rgb565
+ Attributes
+ ID : 22
+ Scope: local
+ Value: 0
+
+Variable (string) va1
+ Attributes
+ ID : 23
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 20
+
+Variable (string) va2
+ Attributes
+ ID : 24
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) va3
+ Attributes
+ ID : 25
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (int32) currenttab
+ Attributes
+ ID : 26
+ Scope: local
+ Value: 0
+
+Variable (string) lightsetting
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 31
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Number ring
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Number field
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Text light_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temp_value
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text light_value_2
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text temp_value_2
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_state
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture light_button
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_button
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_button
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture light_b_press
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_b_press
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_b_pres
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture colorwheel
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ // Circular Color Picker for Nextion (c) Max Zuidberg 2022
+ // This Source Code Form is subject to the terms of the Mozilla Public
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ //
+ // Put this code in the touch press or release
+ // event of the pic component with the color wheel.
+ // Requires the two variables field.val and ring.val
+ //
+ // sya0 = x, sya1 = sya1
+ // Note the usage of the hidden sya0, sya1 variables
+ // within event code as local, temporary variable is fine.
+ sya0=tch0
+ sya1=tch1
+ //
+ // Convert absolute coordinates to coordinates relative to
+ // the color wheel center.
+ // sys0 = x_center, sys1 = y_center
+ sys0=colorwheel.w/2
+ sys0+=colorwheel.x
+ sys1=colorwheel.h/2
+ sys1+=colorwheel.y
+ sya0-=sys0
+ sya1-=sys1
+ //
+ // Determine ring
+ ring.val=0
+ // sys0 = r^2 = x^2 + y^2
+ sys0=sya0*sya0
+ sys1=sya1*sya1
+ sys0+=sys1
+ // repeat for all rings
+ if(sys0>=156)
+ {
+ ring.val++
+ }
+ if(sys0>=625)
+ {
+ ring.val++
+ }
+ if(sys0>=1406)
+ {
+ ring.val++
+ }
+ if(sys0>=2500)
+ {
+ ring.val++
+ }
+ if(sys0>=3906)
+ {
+ ring.val++
+ }
+ if(sys0>=5625)
+ {
+ ring.val++
+ }
+ if(sys0>=7656)
+ {
+ ring.val++
+ }
+ //
+ // Determine quadrant (0-3). Note: pixel y coords are inverted
+ // compared to mathematical y coords. But we want math. quadrants.
+ sya1*=-1
+ sys2=0
+ if(sya1<0)
+ {
+ sys2+=2
+ }
+ sys0=sya0*sya1
+ if(sys0<0)
+ {
+ sys2+=1
+ // In this case we also want to swap x and y otherwise the
+ // atan(abs(x/y)) (calculated below) gives values running
+ // "the wrong way" (cw instead of ccw).
+ sys1=sya1
+ sya1=sya0
+ sya0=sys1
+ }
+ //
+ field.val=sys2*6
+ //
+ // x,y sign is not required anymore
+ if(sya0<0)
+ {
+ sya0*=-1
+ }
+ if(sya1<0)
+ {
+ sya1*=-1
+ }
+ //
+ // Determine field in ring quadrant
+ // Factor 100000 chosen more or less arbitrarily.
+ // sys0 = 100000 * tan_a = 100000 * y / x
+ sys0=100000*sya1
+ sys0/=sya0
+ // repeat for all fields
+ if(sys0>=26794)
+ {
+ field.val++
+ }
+ if(sys0>=57735)
+ {
+ field.val++
+ }
+ if(sys0>=99999)
+ {
+ field.val++
+ }
+ if(sys0>=173205)
+ {
+ field.val++
+ }
+ if(sys0>=373205)
+ {
+ field.val++
+ }
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+ Touch Release Event
+ // Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
+ h=23-field.val// 0 <= field.val <= 23
+ // h is expected to be 0-6*256 (see hsv2rgb)
+ h*=6*256
+ h/=24// Number of fields
+ //
+ // s is expected to be 0-256 (see hsv2rgb)
+ s=ring.val*256
+ s/=8// Number of rings
+ // no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
+ v=255
+ click hsv2rgb,0
+ click rgb888to565,0
+ //colPreview.bco=rgb565.val
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+Slider lightslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx lightslider.val,va1.txt,0,0
+ light_value.txt=va1.txt+"%"
+ light_value_2.txt=va1.txt+"%"
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Slider tempslider
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 500
+ Lower range limit: 153
+
+ Events
+ Touch Release Event
+ covx tempslider.val,va1.txt,0,0
+ temp_value.txt=va1.txt
+ temp_value_2.txt=va1.txt
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot hsv2rgb
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ // https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
+ // The values range from 0..255 instead of 0..1
+ // h ranges from 0..(6*256)
+ if(s>=256)
+ {
+ s=255
+ }else if(s<0)
+ {
+ s=0
+ }
+ if(v>=256)
+ {
+ v=255
+ }else if(v<0)
+ {
+ v=0
+ }
+ f=h&0xff
+ p=256-s
+ p*=v
+ p=p>>8// / 256
+ q=s*f// 0-256*256 = 0-65536
+ q=65536-q
+ q*=v
+ q=q>>16
+ t=256-f
+ t*=s
+ t=65536-t
+ t*=v
+ t=t>>16
+ //
+ f=h>>8
+ if(f==1)
+ {
+ r=q
+ g=v
+ b=p
+ }else if(f==2)
+ {
+ r=p
+ g=v
+ b=t
+ }else if(f==3)
+ {
+ r=p
+ g=q
+ b=v
+ }else if(f==4)
+ {
+ r=t
+ g=p
+ b=v
+ }else if(f==5)
+ {
+ r=v
+ g=p
+ b=q
+ }else
+ {
+ r=v
+ g=t
+ b=p
+ }
+
+Hotspot rgb888to565
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ r=r&0xff
+ g=g&0xff
+ b=b&0xff
+ sys1=r>>3
+ sys2=sys1<<6
+ sys1=g>>2
+ sys2+=sys1
+ sys2=sys2<<5
+ sys1=b>>3
+ sys2+=sys1
+ rgb565.val=sys2
+
+Hotspot light_touch
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ vis temp_value_2,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+
+Hotspot temp_touch
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis temp_b_press,1
+ vis tempslider,1
+ vis temp_value,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis colorwheel,0
+
+Hotspot color_touch
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis color_b_pres,1
+ vis colorwheel,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis temp_b_press,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis tempslider,0
+ // #### OFF Color #####
+
+Timer swipestore
+ Attributes
+ ID : 21
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 20
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_eu_code/notification.txt b/nspanel_eu_code/notification.txt
index 8ce367b..5708896 100644
--- a/nspanel_eu_code/notification.txt
+++ b/nspanel_eu_code/notification.txt
@@ -12,13 +12,19 @@ Page notification
Events
Preinitialize Event
- dim=home.brightness.val
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -38,12 +44,22 @@ Page notification
Variable (string) lastclick
Attributes
- ID : 10
+ ID : 5
Scope : local
Text :
Max. Text Size: 100
Text notifi_text01
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 250
+
+Text notifi_label
Attributes
ID : 2
Scope : local
@@ -51,49 +67,31 @@ Text notifi_text01
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 100
-
-Text notifi_label
- Attributes
- ID : 3
- Scope : local
- Dragging : 0
- Send Component ID : disabled
- Associated Keyboard: none
- Text :
Max. Text Size : 30
-Picture accept_pic
- Attributes
- ID : 4
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
-Picture clear_pic
- Attributes
- ID : 5
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
-Hotspot notifi_back
- Attributes
- ID : 1
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Press Event
- page home
-
-Hotspot accept
+Button button_back
Attributes
ID : 6
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Button bt_accept
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Release Event
@@ -105,12 +103,15 @@ Hotspot accept
printh 00
printh FF FF FF
-Hotspot clear
+Button bt_clear
Attributes
- ID : 7
+ ID : 8
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 10
Events
Touch Release Event
@@ -124,7 +125,7 @@ Hotspot clear
Timer swipestore
Attributes
- ID : 9
+ ID : 4
Scope : local
Period (ms): 50
Enabled : no
@@ -136,7 +137,7 @@ Timer swipestore
TouchCap swipe
Attributes
- ID : 8
+ ID : 3
Scope: local
Value: 0
diff --git a/nspanel_eu_code/pics/SinglePixel.png b/nspanel_eu_code/pics/SinglePixel.png
new file mode 100644
index 0000000..392651a
Binary files /dev/null and b/nspanel_eu_code/pics/SinglePixel.png differ
diff --git a/nspanel_eu_code/qrcode.txt b/nspanel_eu_code/qrcode.txt
index 47a3d93..74019a6 100644
--- a/nspanel_eu_code/qrcode.txt
+++ b/nspanel_eu_code/qrcode.txt
@@ -12,7 +12,7 @@ Page qrcode
Events
Preinitialize Event
- dim=home.brightness.val
+ dim=brightness
printh 92
prints "nspanelevent",0
printh 00
@@ -38,8 +38,8 @@ Page qrcode
Text qrcode_label
Attributes
- ID : 4
- Scope : local
+ ID : 3
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
@@ -48,19 +48,22 @@ Text qrcode_label
QR Code qrcode_value
Attributes
- ID : 5
- Scope : local
+ ID : 4
+ Scope : global
Dragging : 0
Send Component ID: disabled
Text :
Max. Text Size : 50
-Hotspot qrcode_back
+Button button_back
Attributes
- ID : 3
+ ID : 5
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/screensaver.txt b/nspanel_eu_code/screensaver.txt
index 5c7168e..d53450d 100644
--- a/nspanel_eu_code/screensaver.txt
+++ b/nspanel_eu_code/screensaver.txt
@@ -21,7 +21,7 @@ Page screensaver
printh FF FF FF
Touch Release Event
- page home
+ page orign.val
Variable (int32) orign
Attributes
diff --git a/nspanel_eu_code/settings.txt b/nspanel_eu_code/settings.txt
index 9c993e4..08b5886 100644
--- a/nspanel_eu_code/settings.txt
+++ b/nspanel_eu_code/settings.txt
@@ -12,6 +12,11 @@ Page settings
Events
Preinitialize Event
+ dim=brightness
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
printh 92
prints "nspanelevent",0
printh 00
@@ -35,76 +40,89 @@ Page settings
printh 00
printh FF FF FF
-Text a03
+Text bright_text
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 80%
+ Max. Text Size : 4
+
+Text dim_text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 20%
+ Max. Text Size : 4
+
+Text lbl_reboot
Attributes
ID : 5
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text :
- Max. Text Size : 3
+ Text : Reboot
+ Max. Text Size : 25
-Text a04
+Text lbl_sleep
Attributes
ID : 6
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text :
- Max. Text Size : 3
+ Text : Sleep mode
+ Max. Text Size : 25
-Text a06
+Text lbl_brightness
Attributes
ID : 7
- Scope : local
- Dragging : 0
- Send Component ID : disabled
- Associated Keyboard: none
- Text : Reboot
- Max. Text Size : 6
-
-Text a07
- Attributes
- ID : 8
- Scope : local
- Dragging : 0
- Send Component ID : disabled
- Associated Keyboard: none
- Text : Sleep
- Max. Text Size : 5
-
-Text a08
- Attributes
- ID : 9
- Scope : local
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Brightness
Max. Text Size : 10
-Text a09
+Text lbl_dimming
Attributes
- ID : 10
- Scope : local
+ ID : 8
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Dimming
Max. Text Size : 7
-Picture settings_exit
+Text icon_bright
Attributes
- ID : 11
- Scope : local
- Dragging : 0
- Send Component ID: disabled
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
+
+Text icon_dim
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
Slider brightslider
Attributes
- ID : 3
+ ID : 1
Scope : global
Dragging : 0
Send Component ID: on press and release
@@ -113,7 +131,17 @@ Slider brightslider
Lower range limit: 0
Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
Touch Release Event
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
printh 91
prints "brightslider",0
printh 00
@@ -122,7 +150,7 @@ Slider brightslider
Slider dimslider
Attributes
- ID : 4
+ ID : 2
Scope : global
Dragging : 0
Send Component ID: on press and release
@@ -131,34 +159,58 @@ Slider dimslider
Lower range limit: 0
Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
Touch Release Event
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
printh 91
prints "dimslider",0
printh 00
prints dimslider.val,0
printh FF FF FF
-Dual-state Button bt0
+Button button_back
Attributes
- ID : 13
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Dual-state Button bt_reboot
+ Attributes
+ ID : 9
Scope : local
Dragging : 0
Send Component ID: on press and release
State : unpressed
- Text :
- Max. Text Size : 0
+ Text : î
+ Max. Text Size : 3
-Dual-state Button bt1
+Dual-state Button bt_sleep
Attributes
- ID : 14
+ ID : 10
Scope : global
Dragging : 0
Send Component ID: on press and release
State : unpressed
- Text :
- Max. Text Size : 0
+ Text : îš
+ Max. Text Size : 3
-Hotspot setings_back
+Hotspot bt_bright_down
Attributes
ID : 12
Scope : local
@@ -166,63 +218,75 @@ Hotspot setings_back
Send Component ID: disabled
Events
- Touch Press Event
- page home
-
-Timer swipestore
- Attributes
- ID : 2
- Scope : local
- Period (ms): 50
- Enabled : no
-
- Events
- Timer Event
- swipex=tch0
- swipey=tch1
-
-TouchCap swipe
- Attributes
- ID : 1
- Scope: local
- Value: 0
-
- Events
- Touch Press Event
- swipestore.en=1 // Start swipestore timer
-
Touch Release Event
- swipestore.en=0
- // Touch has ended, x
- if(tch0==0)
+ if(brightslider.val>0)
{
- swipec=swipex-tch2
- // From Left to Right
- if(swipec>swipedx)
- {
- //page
- }
- // Right to Left
- swipec2=0-swipedx
- if(swipec100)
- {
- //page
- }
- // Down to Up
- swipec2=0-swipedy
- if(swipec<-100)
- {
- //page
- }
+ brightslider.val--
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_bright_up
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(brightslider.val<100)
+ {
+ brightslider.val++
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_down
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val>0)
+ {
+ dimslider.val--
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_up
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val<100)
+ {
+ dimslider.val++
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
}
diff --git a/nspanel_eu_code/weather01.txt b/nspanel_eu_code/weather01.txt
index b3c876c..a9af4ea 100644
--- a/nspanel_eu_code/weather01.txt
+++ b/nspanel_eu_code/weather01.txt
@@ -12,12 +12,19 @@ Page weather01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -67,7 +74,7 @@ Text temperature
Text loading
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text loading
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 7
+ ID : 18
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/weather02.txt b/nspanel_eu_code/weather02.txt
index dfe10b4..0987b66 100644
--- a/nspanel_eu_code/weather02.txt
+++ b/nspanel_eu_code/weather02.txt
@@ -12,12 +12,19 @@ Page weather02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/weather03.txt b/nspanel_eu_code/weather03.txt
index c05f616..078875c 100644
--- a/nspanel_eu_code/weather03.txt
+++ b/nspanel_eu_code/weather03.txt
@@ -12,12 +12,19 @@ Page weather03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/weather04.txt b/nspanel_eu_code/weather04.txt
index 1def451..1d4973a 100644
--- a/nspanel_eu_code/weather04.txt
+++ b/nspanel_eu_code/weather04.txt
@@ -12,12 +12,19 @@ Page weather04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_eu_code/weather05.txt b/nspanel_eu_code/weather05.txt
index 31fa499..5c4d139 100644
--- a/nspanel_eu_code/weather05.txt
+++ b/nspanel_eu_code/weather05.txt
@@ -12,12 +12,19 @@ Page weather05
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us.HMI b/nspanel_us.HMI
index c3130c6..a116329 100644
Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ
diff --git a/nspanel_us.tft b/nspanel_us.tft
index 46e6995..9c525fa 100644
Binary files a/nspanel_us.tft and b/nspanel_us.tft differ
diff --git a/nspanel_us_code/Program.s.txt b/nspanel_us_code/Program.s.txt
index 3829088..3548a25 100644
--- a/nspanel_us_code/Program.s.txt
+++ b/nspanel_us_code/Program.s.txt
@@ -4,9 +4,18 @@ Program.s
int r=0,g=0,b=0
int h=0,s=0,v=0
int p=0,q=0,t=0,f=0
- bauds=115200//Configure baudrat
- recmod=0//Serial data parsing mode:0-Passive mode;1-Active mod
- printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial pore
+ int api=0 // 0 = disconnected from HA, 1 = connected to HA
+ int sleep_mode=0
+ int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
+ int brightness=100,brightness_dim=40
+ int display_mode=2 // 1 = EU, 2 = US, 3 = US landscape
+ bauds=115200//Configure baudrate
+ recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
+ printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
+ if(display_mode==1)
+ {
+ lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
+ }
printh 92
prints "nspanelevent",0
printh 00
diff --git a/nspanel_us_code/alarm.txt b/nspanel_us_code/alarm.txt
new file mode 100644
index 0000000..d5c57cb
--- /dev/null
+++ b/nspanel_us_code/alarm.txt
@@ -0,0 +1,445 @@
+Page alarm
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ vis bt_home,0
+ vis bt_away,0
+ vis bt_night,0
+ vis bt_vacat,0
+ vis bt_bypass,0
+ }
+
+ Touch Press Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) lastclick
+ Attributes
+ ID : 3
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 4
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) code_format
+ Attributes
+ ID : 29
+ Scope : local
+ Text :
+ Max. Text Size: 15
+
+Variable (string) entity
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) code_arm_req
+ Attributes
+ ID : 31
+ Scope : local
+ Text :
+ Max. Text Size: 1
+
+Text page_label
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm Control Panel
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : î
+ Max. Text Size : 10
+
+Text bt_home_text
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Home
+ Max. Text Size : 22
+
+Text bt_away_text
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Away
+ Max. Text Size : 22
+
+Text bt_night_text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Night
+ Max. Text Size : 22
+
+Text bt_vacat_text
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Vacation
+ Max. Text Size : 22
+
+Text bt_bypass_text
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Bypass
+ Max. Text Size : 22
+
+Text bt_disarm_text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Disarm
+ Max. Text Size : 22
+
+Text bt_home_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_away_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_night_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_vacat_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_bypass_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_disarm_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture bt_home_pic
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_away_pic
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_night_pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_vacat_pic
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_bypass_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_disarm_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot bt_home
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_home_pic.pic=44
+ bt_home_text.bco=65024
+ bt_home_text.pco=0
+ bt_home_icon.bco=65024
+ bt_home_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_away
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_away_pic.pic=44
+ bt_away_text.bco=65024
+ bt_away_text.pco=0
+ bt_away_icon.bco=65024
+ bt_away_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_night
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_night_pic.pic=44
+ bt_night_text.bco=65024
+ bt_night_text.pco=0
+ bt_night_icon.bco=65024
+ bt_night_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_vacat
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_vacat_pic.pic=44
+ bt_vacat_text.bco=65024
+ bt_vacat_text.pco=0
+ bt_vacat_icon.bco=65024
+ bt_vacat_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_bypass
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_bypass_pic.pic=44
+ bt_bypass_text.bco=65024
+ bt_bypass_text.pco=0
+ bt_bypass_icon.bco=65024
+ bt_bypass_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_disarm
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_disarm_pic.pic=44
+ bt_disarm_text.bco=65024
+ bt_disarm_text.pco=0
+ bt_disarm_icon.bco=65024
+ bt_disarm_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_us_code/boot.txt b/nspanel_us_code/boot.txt
index 19e879f..dce2681 100644
--- a/nspanel_us_code/boot.txt
+++ b/nspanel_us_code/boot.txt
@@ -12,13 +12,44 @@ Page boot
Events
Preinitialize Event
+ dim=100
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
printh 92
prints "nspanelevent",0
printh 00
- prints "{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ prints nspanelevent.txt,0
printh 00
printh FF FF FF
+ vis bt_reboot,0
+Variable (int32) counter
+ Attributes
+ ID : 12
+ Scope: local
+ Value: 0
+
+Variable (string) aux1
+ Attributes
+ ID : 13
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) nspanelevent
+ Attributes
+ ID : 14
+ Scope : local
+ Text :
+ Max. Text Size: 150
+
+Variable (string) aux2
+ Attributes
+ ID : 15
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
Text ip_addr
Attributes
ID : 1
@@ -86,7 +117,7 @@ Text tft_version
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text : 3.4
+ Text : 4.0
Max. Text Size : 8
Text esph_version
@@ -109,7 +140,7 @@ Text bluep_version
Text :
Max. Text Size : 8
-Dual-state Button a01
+Dual-state Button bt_reboot
Attributes
ID : 4
Scope : local
@@ -119,3 +150,24 @@ Dual-state Button a01
Text : Reboot
Max. Text Size : 6
+Timer timer
+ Attributes
+ ID : 11
+ Scope : local
+ Period (ms): 65534
+ Enabled : yes
+
+ Events
+ Timer Event
+ counter.val++
+ covx counter.val,aux1.txt,0,0
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
+ bluep_version.txt="Retry: "+aux1.txt
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints nspanelevent.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_us_code/buttonpage01.txt b/nspanel_us_code/buttonpage01.txt
index 5a1fe58..cba5b81 100644
--- a/nspanel_us_code/buttonpage01.txt
+++ b/nspanel_us_code/buttonpage01.txt
@@ -12,14 +12,22 @@ Page buttonpage01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage01
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage01_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage01_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 46
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_us_code/buttonpage02.txt b/nspanel_us_code/buttonpage02.txt
index 3d6af5d..e681569 100644
--- a/nspanel_us_code/buttonpage02.txt
+++ b/nspanel_us_code/buttonpage02.txt
@@ -12,14 +12,22 @@ Page buttonpage02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage02
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage02_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage02_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_us_code/buttonpage03.txt b/nspanel_us_code/buttonpage03.txt
index 375f8f6..4b36f81 100644
--- a/nspanel_us_code/buttonpage03.txt
+++ b/nspanel_us_code/buttonpage03.txt
@@ -12,14 +12,22 @@ Page buttonpage03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage03
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage03_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage03_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_us_code/buttonpage04.txt b/nspanel_us_code/buttonpage04.txt
index c66ee0f..14fc68e 100644
--- a/nspanel_us_code/buttonpage04.txt
+++ b/nspanel_us_code/buttonpage04.txt
@@ -12,14 +12,22 @@ Page buttonpage04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
- vis 255,0
- vis button_back,1
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
Touch Press Event
printh 92
@@ -39,7 +47,7 @@ Page buttonpage04
Variable (string) lastclick
Attributes
- ID : 45
+ ID : 44
Scope : local
Text :
Max. Text Size: 100
@@ -52,7 +60,7 @@ Text button01text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button01bri
Attributes
@@ -72,7 +80,7 @@ Text button02text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button02bri
Attributes
@@ -92,7 +100,7 @@ Text button03text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button03bri
Attributes
@@ -112,7 +120,7 @@ Text button04text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button04bri
Attributes
@@ -132,7 +140,7 @@ Text button05text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button05bri
Attributes
@@ -152,7 +160,7 @@ Text button06text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button06bri
Attributes
@@ -172,7 +180,7 @@ Text button07text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button07bri
Attributes
@@ -192,7 +200,7 @@ Text button08text
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 10
+ Max. Text Size : 22
Text button08bri
Attributes
@@ -206,7 +214,7 @@ Text button08bri
Text bpage04_label
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -216,7 +224,7 @@ Text bpage04_label
Text button01icon
Attributes
- ID : 29
+ ID : 28
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -226,7 +234,7 @@ Text button01icon
Text button02icon
Attributes
- ID : 30
+ ID : 29
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -236,7 +244,7 @@ Text button02icon
Text button03icon
Attributes
- ID : 31
+ ID : 30
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -246,7 +254,7 @@ Text button03icon
Text button04icon
Attributes
- ID : 32
+ ID : 31
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -256,7 +264,7 @@ Text button04icon
Text button05icon
Attributes
- ID : 33
+ ID : 32
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -266,7 +274,7 @@ Text button05icon
Text button06icon
Attributes
- ID : 34
+ ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -276,7 +284,7 @@ Text button06icon
Text button07icon
Attributes
- ID : 35
+ ID : 34
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -286,7 +294,7 @@ Text button07icon
Text button08icon
Attributes
- ID : 36
+ ID : 35
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -294,6 +302,16 @@ Text button08icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture button01pic
Attributes
ID : 3
@@ -350,12 +368,15 @@ Picture button08pic
Dragging : 0
Send Component ID: disabled
-Hotspot button_back
+Button button_back
Attributes
- ID : 27
+ ID : 45
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
@@ -363,7 +384,7 @@ Hotspot button_back
Hotspot button01
Attributes
- ID : 37
+ ID : 36
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -389,7 +410,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 38
+ ID : 37
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -415,7 +436,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 39
+ ID : 38
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -441,7 +462,7 @@ Hotspot button03
Hotspot button04
Attributes
- ID : 40
+ ID : 39
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -467,7 +488,7 @@ Hotspot button04
Hotspot button05
Attributes
- ID : 41
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -493,7 +514,7 @@ Hotspot button05
Hotspot button06
Attributes
- ID : 42
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -519,7 +540,7 @@ Hotspot button06
Hotspot button07
Attributes
- ID : 43
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: on press and release
@@ -545,7 +566,7 @@ Hotspot button07
Hotspot button08
Attributes
- ID : 44
+ ID : 43
Scope : local
Dragging : 0
Send Component ID: on press and release
diff --git a/nspanel_us_code/climate.txt b/nspanel_us_code/climate.txt
index e69de29..7f7247f 100644
--- a/nspanel_us_code/climate.txt
+++ b/nspanel_us_code/climate.txt
@@ -0,0 +1,729 @@
+Page climate
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==1||home.entity.txt=="embedded_climate")
+ {
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis target_icon,0
+ vis target_temp,0
+ vis current_temp,0
+ vis current_icon,0
+ vis climateslider,0
+ vis button01,0
+ vis button02,0
+ vis button03,0
+ vis button04,0
+ vis button05,0
+ vis button06,0
+ vis button07,0
+ page_label.txt=home.entity.txt
+ }else
+ {
+ page home
+ }
+
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ if(timer01.en==1)
+ {
+ timer01.en=0
+ covx temp_number.val,va1.txt,0,0
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ }
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 25
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) climatesetting
+ Attributes
+ ID : 26
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) lastclick
+ Attributes
+ ID : 34
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (int32) temp_offset
+ Attributes
+ ID : 36
+ Scope: local
+ Value: 0
+
+Variable (int32) temp_step
+ Attributes
+ ID : 37
+ Scope: local
+ Value: 1
+
+Variable (int32) temp_number
+ Attributes
+ ID : 43
+ Scope: local
+ Value: 0
+
+Variable (int32) va0
+ Attributes
+ ID : 44
+ Scope: local
+ Value: 0
+
+Variable (string) back_page
+ Attributes
+ ID : 45
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (int32) embedded
+ Attributes
+ ID : 46
+ Scope: local
+ Value: 0
+
+Variable (string) va2
+ Attributes
+ ID : 47
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text current_temp
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 100
+
+Text current_icon
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_icon
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value02_icon
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value03_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text button01_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06_icon
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07_icon
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08_icon
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button09_icon
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_temp
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider climateslider
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 20
+ Upper range limit: 40
+ Lower range limit: 0
+
+ Events
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ timer01.en=1
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 48
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot decrease_temp
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.val>0)
+ {
+ climateslider.val--
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ }
+
+ Touch Release Event
+ timer01.en=1
+
+Hotspot increase_temp
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_code/cover.txt b/nspanel_us_code/cover.txt
new file mode 100644
index 0000000..1a8db51
--- /dev/null
+++ b/nspanel_us_code/cover.txt
@@ -0,0 +1,233 @@
+Page cover
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 7
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) coversetting
+ Attributes
+ ID : 11
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 12
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Text battery_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text cover_value
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text battery_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider coverslider
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx coverslider.val,va1.txt,0,0
+ cover_value.txt=va1.txt+"%"
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_open
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_close
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_stop
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
diff --git a/nspanel_us_code/entitypage01.txt b/nspanel_us_code/entitypage01.txt
index 0dae56e..e7e9ea3 100644
--- a/nspanel_us_code/entitypage01.txt
+++ b/nspanel_us_code/entitypage01.txt
@@ -12,12 +12,19 @@ Page entitypage01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity01_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity01_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity01_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/entitypage02.txt b/nspanel_us_code/entitypage02.txt
index 5c453cf..e66ba1d 100644
--- a/nspanel_us_code/entitypage02.txt
+++ b/nspanel_us_code/entitypage02.txt
@@ -12,12 +12,19 @@ Page entitypage02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity02_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity02_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity02_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/entitypage03.txt b/nspanel_us_code/entitypage03.txt
index 6c0658d..0260674 100644
--- a/nspanel_us_code/entitypage03.txt
+++ b/nspanel_us_code/entitypage03.txt
@@ -12,12 +12,19 @@ Page entitypage03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity03_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity03_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity03_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/entitypage04.txt b/nspanel_us_code/entitypage04.txt
index 76f4d0c..92eed65 100644
--- a/nspanel_us_code/entitypage04.txt
+++ b/nspanel_us_code/entitypage04.txt
@@ -12,12 +12,19 @@ Page entitypage04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -87,7 +94,7 @@ Text value03_label
Text entity04_label
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text entity04_label
Text value06_label
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value06_label
Text value07_label
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value07_label
Text value08_label
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value08_label
Text value01_pic
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_pic
Text value02_pic
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_pic
Text value03_pic
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_pic
Text value04_pic
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_pic
Text value05_pic
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -177,7 +184,7 @@ Text value05_pic
Text value06_pic
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -187,7 +194,7 @@ Text value06_pic
Text value07_pic
Attributes
- ID : 19
+ ID : 18
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -197,7 +204,7 @@ Text value07_pic
Text value08_pic
Attributes
- ID : 20
+ ID : 19
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -207,7 +214,7 @@ Text value08_pic
Text value01
Attributes
- ID : 21
+ ID : 20
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -217,7 +224,7 @@ Text value01
Text value02
Attributes
- ID : 22
+ ID : 21
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -227,7 +234,7 @@ Text value02
Text value03
Attributes
- ID : 23
+ ID : 22
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -237,7 +244,7 @@ Text value03
Text value04
Attributes
- ID : 24
+ ID : 23
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -247,7 +254,7 @@ Text value04
Text value05
Attributes
- ID : 25
+ ID : 24
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -257,7 +264,7 @@ Text value05
Text value06
Attributes
- ID : 26
+ ID : 25
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -267,7 +274,7 @@ Text value06
Text value07
Attributes
- ID : 27
+ ID : 26
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -277,7 +284,7 @@ Text value07
Text value08
Attributes
- ID : 28
+ ID : 27
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -285,12 +292,25 @@ Text value08
Text :
Max. Text Size : 10
-Hotspot entity04_back
+Text page_index
Attributes
- ID : 8
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/fan.txt b/nspanel_us_code/fan.txt
new file mode 100644
index 0000000..27327a3
--- /dev/null
+++ b/nspanel_us_code/fan.txt
@@ -0,0 +1,405 @@
+Page fan
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) fansetting
+ Attributes
+ ID : 7
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 8
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) va0
+ Attributes
+ ID : 9
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text fan_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider fanslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 4
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.val=5)
+ {
+ fanslider.val++
+ }
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ fanslider.val--
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ }
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_code/home.txt b/nspanel_us_code/home.txt
index e1f0777..423f75b 100644
--- a/nspanel_us_code/home.txt
+++ b/nspanel_us_code/home.txt
@@ -12,7 +12,7 @@ Page home
Events
Preinitialize Event
- dim=brightness.val
+ dim=brightness
dimtimer.en=1
sleeptimer.en=1
printh 92
@@ -21,43 +21,39 @@ Page home
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
printh 00
printh FF FF FF
- vis 255,0
- vis settings_click,1
+ vis bt_notific,is_notification
+ vis bt_qrcode,is_qrcode
+ vis bt_entities,is_entities
+ vis bt_alarm,is_alarm
+ if(display_mode==3)
+ {
+ vis left_bt_text,0
+ vis right_bt_text,0
+ }
-Variable (int32) brightness
- Attributes
- ID : 2
- Scope: global
- Value: 100
-
-Variable (int32) brightdd
- Attributes
- ID : 3
- Scope: global
- Value: 40
-
Variable (int32) disdim
Attributes
- ID : 4
- Scope: global
- Value: 0
-
-Variable (int32) sleepmodus
- Attributes
- ID : 16
+ ID : 2
Scope: global
Value: 0
Variable (string) lastclick
Attributes
- ID : 54
+ ID : 45
Scope : local
Text :
Max. Text Size: 100
+Variable (string) entity
+ Attributes
+ ID : 46
+ Scope : global
+ Text :
+ Max. Text Size: 100
+
Text time
Attributes
- ID : 7
+ ID : 5
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -67,7 +63,7 @@ Text time
Text current_temp
Attributes
- ID : 8
+ ID : 6
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -77,7 +73,7 @@ Text current_temp
Text outdoor_temp
Attributes
- ID : 9
+ ID : 7
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -87,7 +83,7 @@ Text outdoor_temp
Text date
Attributes
- ID : 10
+ ID : 8
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -97,7 +93,7 @@ Text date
Text value01_state
Attributes
- ID : 12
+ ID : 10
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -107,7 +103,7 @@ Text value01_state
Text left_bt_text
Attributes
- ID : 17
+ ID : 14
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -117,7 +113,7 @@ Text left_bt_text
Text right_bt_text
Attributes
- ID : 18
+ ID : 15
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -127,7 +123,7 @@ Text right_bt_text
Text icon_top_01
Attributes
- ID : 21
+ ID : 16
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -137,7 +133,7 @@ Text icon_top_01
Text icon_top_02
Attributes
- ID : 22
+ ID : 17
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -147,7 +143,7 @@ Text icon_top_02
Text icon_top_03
Attributes
- ID : 23
+ ID : 18
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -157,7 +153,7 @@ Text icon_top_03
Text icon_top_04
Attributes
- ID : 24
+ ID : 19
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -167,7 +163,7 @@ Text icon_top_04
Text icon_top_05
Attributes
- ID : 25
+ ID : 20
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -177,7 +173,7 @@ Text icon_top_05
Text icon_top_06
Attributes
- ID : 26
+ ID : 21
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -187,7 +183,7 @@ Text icon_top_06
Text icon_top_07
Attributes
- ID : 27
+ ID : 22
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -197,7 +193,7 @@ Text icon_top_07
Text icon_top_08
Attributes
- ID : 28
+ ID : 23
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -207,7 +203,7 @@ Text icon_top_08
Text icon_top_09
Attributes
- ID : 29
+ ID : 24
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -217,7 +213,7 @@ Text icon_top_09
Text icon_top_10
Attributes
- ID : 30
+ ID : 25
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -227,7 +223,7 @@ Text icon_top_10
Text value01_icon
Attributes
- ID : 31
+ ID : 26
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -237,7 +233,7 @@ Text value01_icon
Text value03_state
Attributes
- ID : 32
+ ID : 27
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -247,7 +243,7 @@ Text value03_state
Text value03_icon
Attributes
- ID : 33
+ ID : 28
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -257,7 +253,7 @@ Text value03_icon
Text value02_icon
Attributes
- ID : 34
+ ID : 29
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -267,7 +263,7 @@ Text value02_icon
Text value02_state
Attributes
- ID : 35
+ ID : 30
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -277,7 +273,7 @@ Text value02_state
Text wifi_icon
Attributes
- ID : 36
+ ID : 31
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -287,7 +283,7 @@ Text wifi_icon
Text indoortempicon
Attributes
- ID : 37
+ ID : 32
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -297,7 +293,7 @@ Text indoortempicon
Text button01_icon
Attributes
- ID : 38
+ ID : 33
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -307,7 +303,7 @@ Text button01_icon
Text button02_icon
Attributes
- ID : 39
+ ID : 34
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -317,7 +313,7 @@ Text button02_icon
Text button03_icon
Attributes
- ID : 40
+ ID : 35
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -325,9 +321,9 @@ Text button03_icon
Text :
Max. Text Size : 10
-Text button04_icon
+Text bt_notific
Attributes
- ID : 41
+ ID : 36
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -335,9 +331,16 @@ Text button04_icon
Text :
Max. Text Size : 10
-Text button05_icon
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page notification
+ }
+
+Text bt_qrcode
Attributes
- ID : 42
+ ID : 37
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -345,9 +348,13 @@ Text button05_icon
Text :
Max. Text Size : 10
-Text button06_icon
+ Events
+ Touch Release Event
+ page qrcode
+
+Text bt_entities
Attributes
- ID : 43
+ ID : 38
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -355,9 +362,16 @@ Text button06_icon
Text :
Max. Text Size : 10
-Text button07_icon
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page entitypage01
+ }
+
+Text bt_alarm
Attributes
- ID : 44
+ ID : 39
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -365,9 +379,17 @@ Text button07_icon
Text :
Max. Text Size : 10
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ entity.txt=""
+ page alarm
+ }
+
Text meridiem
Attributes
- ID : 53
+ ID : 44
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -377,80 +399,86 @@ Text meridiem
Picture weather
Attributes
- ID : 11
+ ID : 9
Scope : global
Dragging : 0
Send Component ID: disabled
-Picture left_bt_pic
+Dual-state Button left_bt_pic
Attributes
- ID : 19
+ ID : 48
Scope : global
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
-Picture right_bt_pic
+Dual-state Button right_bt_pic
Attributes
- ID : 20
+ ID : 49
Scope : global
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
Hotspot fc_weather
Attributes
- ID : 13
+ ID : 11
Scope : global
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"press\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"weather\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(api==1)
+ {
+ page weather01
+ }
Hotspot jump_climate
Attributes
- ID : 14
+ ID : 12
Scope : local
Dragging : 0
Send Component ID: on press and release
Events
Touch Press Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
Hotspot button01
Attributes
- ID : 45
+ ID : 40
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -467,7 +495,7 @@ Hotspot button01
Hotspot button02
Attributes
- ID : 46
+ ID : 41
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -484,7 +512,7 @@ Hotspot button02
Hotspot button03
Attributes
- ID : 47
+ ID : 42
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -499,81 +527,20 @@ Hotspot button03
printh 00
printh FF FF FF
-Hotspot button04
- Attributes
- ID : 48
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button04\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button05
- Attributes
- ID : 49
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button05\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button06
- Attributes
- ID : 50
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button06\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
-Hotspot button07
- Attributes
- ID : 51
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
- Events
- Touch Release Event
- lastclick.txt="{\"page\": \"home\", \"component\": \"button07\", \"value\": \"release\"}"
- printh 92
- prints "nspanelevent",0
- printh 00
- prints lastclick.txt,0
- printh 00
- printh FF FF FF
-
Hotspot settings_click
Attributes
- ID : 52
+ ID : 43
Scope : local
Dragging : 0
- Send Component ID: on press and release
+ Send Component ID: disabled
+ Events
+ Touch Press Event
+ settings_timer.en=1
+
+ Touch Release Event
+ settings_timer.en=0
+
Timer dimtimer
Attributes
ID : 1
@@ -585,12 +552,12 @@ Timer dimtimer
Timer Event
if(disdim.val==0)
{
- dim=brightdd.val // Dim down screen to val set from HA
+ dim=brightness_dim // Dim down screen to val set from HA
}
Timer swipestore
Attributes
- ID : 6
+ ID : 4
Scope : local
Period (ms): 50
Enabled : no
@@ -602,30 +569,41 @@ Timer swipestore
Timer sleeptimer
Attributes
- ID : 15
+ ID : 13
Scope : local
Period (ms): 65000
Enabled : no
Events
Timer Event
- if(sleepmodus.val==1)
+ if(sleep_mode==1)
{
screensaver.orign.val=0
// Go to screensaver page
page screensaver
}
+Timer settings_timer
+ Attributes
+ ID : 47
+ Scope : local
+ Period (ms): 1000
+ Enabled : no
+
+ Events
+ Timer Event
+ page settings
+
TouchCap swipe
Attributes
- ID : 5
+ ID : 3
Scope: local
Value: 0
Events
Touch Press Event
swipestore.en=1 // Start swipestore timer
- dim=brightness.val // Set brightness to saved value (from HA)
+ dim=brightness // Set brightness to saved value (from HA)
dimtimer.en=1 // Enable timer to calc down for dimming screen
sleeptimer.en=1
@@ -636,13 +614,13 @@ TouchCap swipe
{
swipec=swipex-tch2
// From Left to Right
- if(swipec>swipedx)
+ if(swipec>swipedx&&api==1)
{
page buttonpage04
}
// Right to Left
swipec2=0-swipedx
- if(swipec100)
+ if(swipec>100&&api==1)
{
page buttonpage02
}
// Down to Up
swipec2=0-swipedy
- if(swipec<-100)
+ if(swipec<-100&&api==1)
{
page buttonpage03
}
diff --git a/nspanel_us_code/keyb_num.txt b/nspanel_us_code/keyb_num.txt
new file mode 100644
index 0000000..d911ac8
--- /dev/null
+++ b/nspanel_us_code/keyb_num.txt
@@ -0,0 +1,326 @@
+Page keyb_num
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page page_id.val
+ }else
+ {
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Variable (int32) page_id
+ Attributes
+ ID : 17
+ Scope: local
+ Value: 0
+
+Variable (string) key
+ Attributes
+ ID : 19
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) entity
+ Attributes
+ ID : 20
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) domain
+ Attributes
+ ID : 21
+ Scope : local
+ Text : alarm
+ Max. Text Size: 10
+
+Variable (string) aux
+ Attributes
+ ID : 22
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) value
+ Attributes
+ ID : 23
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text t0
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text pin
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text title
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm
+ Max. Text Size : 10
+
+Button b1
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 1
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b1.txt
+
+Button bclose
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Release Event
+ page page_id.val
+
+Button b2
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 2
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b2.txt
+
+Button b3
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 3
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b3.txt
+
+Button b4
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 4
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b4.txt
+
+Button b5
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 5
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b5.txt
+
+Button b6
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 6
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b6.txt
+
+Button b7
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 7
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b7.txt
+
+Button b8
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 8
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b8.txt
+
+Button b9
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 9
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b9.txt
+
+Button bclear
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : <
+ Max. Text Size : 5
+
+ Events
+ Touch Release Event
+ pin.txt=""
+
+Button b0
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 0
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b0.txt
+
+Button benter
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : OK
+ Max. Text Size : 3
+
+ Events
+ Touch Release Event
+ aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Button bview
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : O
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(pin.pw==1)
+ {
+ pin.pw=0
+ }else
+ {
+ pin.pw=1
+ }
+
diff --git a/nspanel_us_code/light.txt b/nspanel_us_code/light.txt
new file mode 100644
index 0000000..766b785
--- /dev/null
+++ b/nspanel_us_code/light.txt
@@ -0,0 +1,696 @@
+Page light
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+ // #### Hide color & temp buttons #####
+ vis temp_touch,0
+ vis temp_value_2,0
+ vis temp_button,0
+ vis color_touch,0
+ vis color_button,0
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (int32) rgb565
+ Attributes
+ ID : 22
+ Scope: local
+ Value: 0
+
+Variable (string) va1
+ Attributes
+ ID : 23
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 20
+
+Variable (string) va2
+ Attributes
+ ID : 24
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) va3
+ Attributes
+ ID : 25
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (int32) currenttab
+ Attributes
+ ID : 26
+ Scope: local
+ Value: 0
+
+Variable (string) lightsetting
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 31
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Number ring
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Number field
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Text light_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temp_value
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text light_value_2
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text temp_value_2
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_state
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture light_button
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_button
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_button
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture light_b_press
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_b_press
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_b_pres
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture colorwheel
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ // Circular Color Picker for Nextion (c) Max Zuidberg 2022
+ // This Source Code Form is subject to the terms of the Mozilla Public
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ //
+ // Put this code in the touch press or release
+ // event of the pic component with the color wheel.
+ // Requires the two variables field.val and ring.val
+ //
+ // sya0 = x, sya1 = sya1
+ // Note the usage of the hidden sya0, sya1 variables
+ // within event code as local, temporary variable is fine.
+ sya0=tch0
+ sya1=tch1
+ //
+ // Convert absolute coordinates to coordinates relative to
+ // the color wheel center.
+ // sys0 = x_center, sys1 = y_center
+ sys0=colorwheel.w/2
+ sys0+=colorwheel.x
+ sys1=colorwheel.h/2
+ sys1+=colorwheel.y
+ sya0-=sys0
+ sya1-=sys1
+ //
+ // Determine ring
+ ring.val=0
+ // sys0 = r^2 = x^2 + y^2
+ sys0=sya0*sya0
+ sys1=sya1*sya1
+ sys0+=sys1
+ // repeat for all rings
+ if(sys0>=156)
+ {
+ ring.val++
+ }
+ if(sys0>=625)
+ {
+ ring.val++
+ }
+ if(sys0>=1406)
+ {
+ ring.val++
+ }
+ if(sys0>=2500)
+ {
+ ring.val++
+ }
+ if(sys0>=3906)
+ {
+ ring.val++
+ }
+ if(sys0>=5625)
+ {
+ ring.val++
+ }
+ if(sys0>=7656)
+ {
+ ring.val++
+ }
+ //
+ // Determine quadrant (0-3). Note: pixel y coords are inverted
+ // compared to mathematical y coords. But we want math. quadrants.
+ sya1*=-1
+ sys2=0
+ if(sya1<0)
+ {
+ sys2+=2
+ }
+ sys0=sya0*sya1
+ if(sys0<0)
+ {
+ sys2+=1
+ // In this case we also want to swap x and y otherwise the
+ // atan(abs(x/y)) (calculated below) gives values running
+ // "the wrong way" (cw instead of ccw).
+ sys1=sya1
+ sya1=sya0
+ sya0=sys1
+ }
+ //
+ field.val=sys2*6
+ //
+ // x,y sign is not required anymore
+ if(sya0<0)
+ {
+ sya0*=-1
+ }
+ if(sya1<0)
+ {
+ sya1*=-1
+ }
+ //
+ // Determine field in ring quadrant
+ // Factor 100000 chosen more or less arbitrarily.
+ // sys0 = 100000 * tan_a = 100000 * y / x
+ sys0=100000*sya1
+ sys0/=sya0
+ // repeat for all fields
+ if(sys0>=26794)
+ {
+ field.val++
+ }
+ if(sys0>=57735)
+ {
+ field.val++
+ }
+ if(sys0>=99999)
+ {
+ field.val++
+ }
+ if(sys0>=173205)
+ {
+ field.val++
+ }
+ if(sys0>=373205)
+ {
+ field.val++
+ }
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+ Touch Release Event
+ // Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
+ h=23-field.val// 0 <= field.val <= 23
+ // h is expected to be 0-6*256 (see hsv2rgb)
+ h*=6*256
+ h/=24// Number of fields
+ //
+ // s is expected to be 0-256 (see hsv2rgb)
+ s=ring.val*256
+ s/=8// Number of rings
+ // no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
+ v=255
+ click hsv2rgb,0
+ click rgb888to565,0
+ //colPreview.bco=rgb565.val
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+Slider lightslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx lightslider.val,va1.txt,0,0
+ light_value.txt=va1.txt+"%"
+ light_value_2.txt=va1.txt+"%"
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Slider tempslider
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 500
+ Lower range limit: 153
+
+ Events
+ Touch Release Event
+ covx tempslider.val,va1.txt,0,0
+ temp_value.txt=va1.txt
+ temp_value_2.txt=va1.txt
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot hsv2rgb
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ // https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
+ // The values range from 0..255 instead of 0..1
+ // h ranges from 0..(6*256)
+ if(s>=256)
+ {
+ s=255
+ }else if(s<0)
+ {
+ s=0
+ }
+ if(v>=256)
+ {
+ v=255
+ }else if(v<0)
+ {
+ v=0
+ }
+ f=h&0xff
+ p=256-s
+ p*=v
+ p=p>>8// / 256
+ q=s*f// 0-256*256 = 0-65536
+ q=65536-q
+ q*=v
+ q=q>>16
+ t=256-f
+ t*=s
+ t=65536-t
+ t*=v
+ t=t>>16
+ //
+ f=h>>8
+ if(f==1)
+ {
+ r=q
+ g=v
+ b=p
+ }else if(f==2)
+ {
+ r=p
+ g=v
+ b=t
+ }else if(f==3)
+ {
+ r=p
+ g=q
+ b=v
+ }else if(f==4)
+ {
+ r=t
+ g=p
+ b=v
+ }else if(f==5)
+ {
+ r=v
+ g=p
+ b=q
+ }else
+ {
+ r=v
+ g=t
+ b=p
+ }
+
+Hotspot rgb888to565
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ r=r&0xff
+ g=g&0xff
+ b=b&0xff
+ sys1=r>>3
+ sys2=sys1<<6
+ sys1=g>>2
+ sys2+=sys1
+ sys2=sys2<<5
+ sys1=b>>3
+ sys2+=sys1
+ rgb565.val=sys2
+
+Hotspot light_touch
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ vis temp_value_2,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+
+Hotspot temp_touch
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis temp_b_press,1
+ vis tempslider,1
+ vis temp_value,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis colorwheel,0
+
+Hotspot color_touch
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis color_b_pres,1
+ vis colorwheel,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis temp_b_press,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis tempslider,0
+ // #### OFF Color #####
+
+Timer swipestore
+ Attributes
+ ID : 21
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 20
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_code/notification.txt b/nspanel_us_code/notification.txt
index 8cf3e6b..c372ed9 100644
--- a/nspanel_us_code/notification.txt
+++ b/nspanel_us_code/notification.txt
@@ -12,13 +12,19 @@ Page notification
Events
Preinitialize Event
- dim=home.brightness.val
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -38,24 +44,24 @@ Page notification
Variable (string) lastclick
Attributes
- ID : 11
+ ID : 6
Scope : local
Text :
Max. Text Size: 100
Text notifi_text01
Attributes
- ID : 2
+ ID : 1
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
- Max. Text Size : 100
+ Max. Text Size : 250
Text notifi_label
Attributes
- ID : 3
+ ID : 2
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -65,7 +71,7 @@ Text notifi_label
Text loading
Attributes
- ID : 10
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -73,37 +79,29 @@ Text loading
Text :
Max. Text Size : 1
-Picture accept_pic
+Button button_back
Attributes
- ID : 4
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
-Picture clear_pic
- Attributes
- ID : 5
- Scope : local
- Dragging : 0
- Send Component ID: disabled
-
-Hotspot notifi_back
- Attributes
- ID : 1
+ ID : 7
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
page home
-Hotspot accept
+Button bt_accept
Attributes
- ID : 6
+ ID : 8
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Release Event
@@ -115,12 +113,15 @@ Hotspot accept
printh 00
printh FF FF FF
-Hotspot clear
+Button bt_clear
Attributes
- ID : 7
+ ID : 9
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Release Event
@@ -134,7 +135,7 @@ Hotspot clear
Timer swipestore
Attributes
- ID : 9
+ ID : 4
Scope : local
Period (ms): 50
Enabled : no
@@ -146,7 +147,7 @@ Timer swipestore
TouchCap swipe
Attributes
- ID : 8
+ ID : 3
Scope: local
Value: 0
diff --git a/nspanel_us_code/qrcode.txt b/nspanel_us_code/qrcode.txt
index 47a3d93..74019a6 100644
--- a/nspanel_us_code/qrcode.txt
+++ b/nspanel_us_code/qrcode.txt
@@ -12,7 +12,7 @@ Page qrcode
Events
Preinitialize Event
- dim=home.brightness.val
+ dim=brightness
printh 92
prints "nspanelevent",0
printh 00
@@ -38,8 +38,8 @@ Page qrcode
Text qrcode_label
Attributes
- ID : 4
- Scope : local
+ ID : 3
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
@@ -48,19 +48,22 @@ Text qrcode_label
QR Code qrcode_value
Attributes
- ID : 5
- Scope : local
+ ID : 4
+ Scope : global
Dragging : 0
Send Component ID: disabled
Text :
Max. Text Size : 50
-Hotspot qrcode_back
+Button button_back
Attributes
- ID : 3
+ ID : 5
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/screensaver.txt b/nspanel_us_code/screensaver.txt
index 0f8c5fd..d53450d 100644
--- a/nspanel_us_code/screensaver.txt
+++ b/nspanel_us_code/screensaver.txt
@@ -20,6 +20,9 @@ Page screensaver
printh 00
printh FF FF FF
+ Touch Release Event
+ page orign.val
+
Variable (int32) orign
Attributes
ID : 2
diff --git a/nspanel_us_code/settings.txt b/nspanel_us_code/settings.txt
index 7c59276..2096ae4 100644
--- a/nspanel_us_code/settings.txt
+++ b/nspanel_us_code/settings.txt
@@ -12,6 +12,11 @@ Page settings
Events
Preinitialize Event
+ dim=brightness
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
printh 92
prints "nspanelevent",0
printh 00
@@ -35,72 +40,85 @@ Page settings
printh 00
printh FF FF FF
-Text a03
+Text bright_text
Attributes
ID : 3
- Scope : global
+ Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text : 80
- Max. Text Size : 3
+ Text : 80%
+ Max. Text Size : 4
-Text a04
+Text dim_text
Attributes
ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 20%
+ Max. Text Size : 4
+
+Text lbl_reboot
+ Attributes
+ ID : 5
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text : 10
- Max. Text Size : 3
+ Text : Reboot
+ Max. Text Size : 25
-Text a06
- Attributes
- ID : 5
- Scope : local
- Dragging : 0
- Send Component ID : disabled
- Associated Keyboard: none
- Text : Reboot
- Max. Text Size : 6
-
-Text a07
+Text lbl_sleep
Attributes
ID : 6
- Scope : local
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
- Text : Sleep
- Max. Text Size : 5
+ Text : Sleep mode
+ Max. Text Size : 25
-Text a08
+Text lbl_brightness
Attributes
ID : 7
- Scope : local
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Brightness
Max. Text Size : 10
-Text a09
+Text lbl_dimming
Attributes
ID : 8
- Scope : local
+ Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Dimming
Max. Text Size : 7
-Picture settings_exit
+Text icon_bright
Attributes
- ID : 9
- Scope : local
- Dragging : 0
- Send Component ID: disabled
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
+
+Text icon_dim
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
Slider brightslider
Attributes
@@ -113,7 +131,17 @@ Slider brightslider
Lower range limit: 0
Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
Touch Release Event
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
printh 91
prints "brightslider",0
printh 00
@@ -131,98 +159,134 @@ Slider dimslider
Lower range limit: 0
Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
Touch Release Event
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
printh 91
prints "dimslider",0
printh 00
prints dimslider.val,0
printh FF FF FF
-Dual-state Button bt0
+Button button_back
Attributes
- ID : 13
- Scope : local
- Dragging : 0
- Send Component ID: on press and release
- State : unpressed
- Text :
- Max. Text Size : 0
-
-Dual-state Button bt1
- Attributes
- ID : 14
- Scope : global
- Dragging : 0
- Send Component ID: on press and release
- State : unpressed
- Text :
- Max. Text Size : 0
-
-Hotspot setings_back
- Attributes
- ID : 10
+ ID : 11
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
page home
-Timer swipestore
+Dual-state Button bt_reboot
Attributes
- ID : 11
- Scope : local
- Period (ms): 50
- Enabled : no
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+Dual-state Button bt_sleep
+ Attributes
+ ID : 10
+ Scope : global
+ Dragging : 0
+ Send Component ID: on press and release
+ State : unpressed
+ Text : îš
+ Max. Text Size : 3
+
+Hotspot bt_bright_down
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
Events
- Timer Event
- swipex=tch0
- swipey=tch1
-
-TouchCap swipe
- Attributes
- ID : 12
- Scope: local
- Value: 0
-
- Events
- Touch Press Event
- swipestore.en=1 // Start swipestore timer
-
Touch Release Event
- swipestore.en=0
- // Touch has ended, x
- if(tch0==0)
+ if(brightslider.val>0)
{
- swipec=swipex-tch2
- // From Left to Right
- if(swipec>swipedx)
- {
- //page
- }
- // Right to Left
- swipec2=0-swipedx
- if(swipec100)
- {
- //page
- }
- // Down to Up
- swipec2=0-swipedy
- if(swipec<-100)
- {
- //page
- }
+ brightslider.val--
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_bright_up
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(brightslider.val<100)
+ {
+ brightslider.val++
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_down
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val>0)
+ {
+ dimslider.val--
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_up
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val<100)
+ {
+ dimslider.val++
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
}
diff --git a/nspanel_us_code/weather01.txt b/nspanel_us_code/weather01.txt
index d72d1a8..0aa74b9 100644
--- a/nspanel_us_code/weather01.txt
+++ b/nspanel_us_code/weather01.txt
@@ -12,12 +12,19 @@ Page weather01
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -117,7 +124,7 @@ Text value03
Text value01_icon
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value05_icon
Text loading
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text loading
Text :
Max. Text Size : 1
+Text page_index
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 12
+ ID : 18
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/weather02.txt b/nspanel_us_code/weather02.txt
index dfe10b4..0987b66 100644
--- a/nspanel_us_code/weather02.txt
+++ b/nspanel_us_code/weather02.txt
@@ -12,12 +12,19 @@ Page weather02
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/weather03.txt b/nspanel_us_code/weather03.txt
index c05f616..078875c 100644
--- a/nspanel_us_code/weather03.txt
+++ b/nspanel_us_code/weather03.txt
@@ -12,12 +12,19 @@ Page weather03
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/weather04.txt b/nspanel_us_code/weather04.txt
index 1def451..1d4973a 100644
--- a/nspanel_us_code/weather04.txt
+++ b/nspanel_us_code/weather04.txt
@@ -12,12 +12,19 @@ Page weather04
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_code/weather05.txt b/nspanel_us_code/weather05.txt
index 31fa499..5c4d139 100644
--- a/nspanel_us_code/weather05.txt
+++ b/nspanel_us_code/weather05.txt
@@ -12,12 +12,19 @@ Page weather05
Events
Preinitialize Event
- printh 92
- prints "nspanelevent",0
- printh 00
- prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
- printh 00
- printh FF FF FF
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
Touch Press Event
printh 92
@@ -47,7 +54,7 @@ Text day
Text loading
Attributes
- ID : 6
+ ID : 5
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -57,7 +64,7 @@ Text loading
Text date
Attributes
- ID : 7
+ ID : 6
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -67,7 +74,7 @@ Text date
Text temperature
Attributes
- ID : 8
+ ID : 7
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -77,7 +84,7 @@ Text temperature
Text value01
Attributes
- ID : 9
+ ID : 8
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -87,7 +94,7 @@ Text value01
Text value05
Attributes
- ID : 10
+ ID : 9
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -97,7 +104,7 @@ Text value05
Text value04
Attributes
- ID : 11
+ ID : 10
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -107,7 +114,7 @@ Text value04
Text value02
Attributes
- ID : 12
+ ID : 11
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -117,7 +124,7 @@ Text value02
Text value03
Attributes
- ID : 13
+ ID : 12
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -127,7 +134,7 @@ Text value03
Text value01_icon
Attributes
- ID : 14
+ ID : 13
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -137,7 +144,7 @@ Text value01_icon
Text value02_icon
Attributes
- ID : 15
+ ID : 14
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -147,7 +154,7 @@ Text value02_icon
Text value03_icon
Attributes
- ID : 16
+ ID : 15
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -157,7 +164,7 @@ Text value03_icon
Text value04_icon
Attributes
- ID : 17
+ ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -167,7 +174,7 @@ Text value04_icon
Text value05_icon
Attributes
- ID : 18
+ ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -175,6 +182,16 @@ Text value05_icon
Text :
Max. Text Size : 10
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
Picture weather_icon
Attributes
ID : 3
@@ -182,12 +199,15 @@ Picture weather_icon
Dragging : 0
Send Component ID: disabled
-Hotspot weather_back
+Button button_back
Attributes
- ID : 5
+ ID : 19
Scope : local
Dragging : 0
Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
Events
Touch Press Event
diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI
new file mode 100644
index 0000000..4f1ad4e
Binary files /dev/null and b/nspanel_us_land.HMI differ
diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft
new file mode 100644
index 0000000..bf81602
Binary files /dev/null and b/nspanel_us_land.tft differ
diff --git a/nspanel_us_land_code/Program.s.txt b/nspanel_us_land_code/Program.s.txt
new file mode 100644
index 0000000..ec8dfba
--- /dev/null
+++ b/nspanel_us_land_code/Program.s.txt
@@ -0,0 +1,25 @@
+Program.s
+ //The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
+ int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipex2=0,swipey2=0,swipec=0,swipec2=0,swipedx=100,swipedy=100 //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
+ int r=0,g=0,b=0
+ int h=0,s=0,v=0
+ int p=0,q=0,t=0,f=0
+ int api=0 // 0 = disconnected from HA, 1 = connected to HA
+ int sleep_mode=0
+ int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
+ int brightness=100,brightness_dim=40
+ int display_mode=3 // 1 = EU, 2 = US, 3 = US landscape
+ bauds=115200//Configure baudrate
+ recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode
+ printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port
+ if(display_mode==1)
+ {
+ lcd_dev fffb 0002 0000 0020// Fix touch offset for EU Version
+ }
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"\", \"component\": \"\", \"value\": \"\"}",0
+ printh 00
+ printh FF FF FF
+ page 8//Power on start page boot
diff --git a/nspanel_us_land_code/alarm.txt b/nspanel_us_land_code/alarm.txt
new file mode 100644
index 0000000..d5c57cb
--- /dev/null
+++ b/nspanel_us_land_code/alarm.txt
@@ -0,0 +1,445 @@
+Page alarm
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ vis bt_home,0
+ vis bt_away,0
+ vis bt_night,0
+ vis bt_vacat,0
+ vis bt_bypass,0
+ }
+
+ Touch Press Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"alarm\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) lastclick
+ Attributes
+ ID : 3
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 4
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) code_format
+ Attributes
+ ID : 29
+ Scope : local
+ Text :
+ Max. Text Size: 15
+
+Variable (string) entity
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) code_arm_req
+ Attributes
+ ID : 31
+ Scope : local
+ Text :
+ Max. Text Size: 1
+
+Text page_label
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm Control Panel
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : î
+ Max. Text Size : 10
+
+Text bt_home_text
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Home
+ Max. Text Size : 22
+
+Text bt_away_text
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Away
+ Max. Text Size : 22
+
+Text bt_night_text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Night
+ Max. Text Size : 22
+
+Text bt_vacat_text
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Vacation
+ Max. Text Size : 22
+
+Text bt_bypass_text
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Bypass
+ Max. Text Size : 22
+
+Text bt_disarm_text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Disarm
+ Max. Text Size : 22
+
+Text bt_home_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_away_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_night_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_vacat_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_bypass_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_disarm_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture bt_home_pic
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_away_pic
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_night_pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_vacat_pic
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_bypass_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture bt_disarm_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot bt_home
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_home_pic.pic=44
+ bt_home_text.bco=65024
+ bt_home_text.pco=0
+ bt_home_icon.bco=65024
+ bt_home_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_home_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_away
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_away_pic.pic=44
+ bt_away_text.bco=65024
+ bt_away_text.pco=0
+ bt_away_icon.bco=65024
+ bt_away_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_away_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_night
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_night_pic.pic=44
+ bt_night_text.bco=65024
+ bt_night_text.pco=0
+ bt_night_icon.bco=65024
+ bt_night_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_night_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_vacat
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_vacat_pic.pic=44
+ bt_vacat_text.bco=65024
+ bt_vacat_text.pco=0
+ bt_vacat_icon.bco=65024
+ bt_vacat_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_vacat_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_bypass
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_bypass_pic.pic=44
+ bt_bypass_text.bco=65024
+ bt_bypass_text.pco=0
+ bt_bypass_icon.bco=65024
+ bt_bypass_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_bypass_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot bt_disarm
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ bt_disarm_pic.pic=44
+ bt_disarm_text.bco=65024
+ bt_disarm_text.pco=0
+ bt_disarm_icon.bco=65024
+ bt_disarm_icon.pco=0
+
+ Touch Release Event
+ lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+entity.txt+"\", \"mui\": \""+bt_disarm_text.txt+"\", \"code_format\": \""+code_format.txt+"\", \"code_arm_req\": \""+code_arm_req.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_us_land_code/boot.txt b/nspanel_us_land_code/boot.txt
new file mode 100644
index 0000000..dce2681
--- /dev/null
+++ b/nspanel_us_land_code/boot.txt
@@ -0,0 +1,173 @@
+Page boot
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=100
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints nspanelevent.txt,0
+ printh 00
+ printh FF FF FF
+ vis bt_reboot,0
+
+Variable (int32) counter
+ Attributes
+ ID : 12
+ Scope: local
+ Value: 0
+
+Variable (string) aux1
+ Attributes
+ ID : 13
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) nspanelevent
+ Attributes
+ ID : 14
+ Scope : local
+ Text :
+ Max. Text Size: 150
+
+Variable (string) aux2
+ Attributes
+ ID : 15
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text ip_addr
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Initializing...
+ Max. Text Size : 15
+
+Text t0
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Please wait...
+ Max. Text Size : 15
+
+Text t1
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : The process can take several seconds!
+ Max. Text Size : 50
+
+Text tft_label
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : TFT:
+ Max. Text Size : 4
+
+Text esph_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : ESPHome:
+ Max. Text Size : 8
+
+Text bluep_label
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Blueprint:
+ Max. Text Size : 10
+
+Text tft_version
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 4.0
+ Max. Text Size : 8
+
+Text esph_version
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 8
+
+Text bluep_version
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 8
+
+Dual-state Button bt_reboot
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+ State : unpressed
+ Text : Reboot
+ Max. Text Size : 6
+
+Timer timer
+ Attributes
+ ID : 11
+ Scope : local
+ Period (ms): 65534
+ Enabled : yes
+
+ Events
+ Timer Event
+ counter.val++
+ covx counter.val,aux1.txt,0,0
+ covx display_mode,aux2.txt,0,0
+ nspanelevent.txt="{\"page\": \"boot\", \"component\": \"timeout\", \"value\": "+aux1.txt+", \"version\": \""+tft_version.txt+"\", \"display_mode\": \""+aux2.txt+"\"}"
+ bluep_version.txt="Retry: "+aux1.txt
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints nspanelevent.txt,0
+ printh 00
+ printh FF FF FF
+
diff --git a/nspanel_us_land_code/buttonpage01.txt b/nspanel_us_land_code/buttonpage01.txt
new file mode 100644
index 0000000..0fa3c17
--- /dev/null
+++ b/nspanel_us_land_code/buttonpage01.txt
@@ -0,0 +1,649 @@
+Page buttonpage01
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Variable (string) lastclick
+ Attributes
+ ID : 44
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Text button01text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button01bri
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button02text
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button02bri
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button03text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button03bri
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button04text
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button04bri
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button05text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button05bri
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button06text
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button06bri
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button07text
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button07bri
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button08text
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button08bri
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text bpage01_label
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text button01icon
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02icon
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03icon
+ Attributes
+ ID : 30
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04icon
+ Attributes
+ ID : 31
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05icon
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06icon
+ Attributes
+ ID : 33
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07icon
+ Attributes
+ ID : 34
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08icon
+ Attributes
+ ID : 35
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture button01pic
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button02pic
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button03pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button04pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button05pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button06pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button07pic
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button08pic
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Hotspot button01
+ Attributes
+ ID : 36
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button01\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button02
+ Attributes
+ ID : 37
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button02\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button03
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button03\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button04
+ Attributes
+ ID : 39
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button04\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button05
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button05\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button06
+ Attributes
+ ID : 41
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button06\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button07
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button07\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button08
+ Attributes
+ ID : 43
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage01\", \"component\": \"button08\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page home
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/buttonpage02.txt b/nspanel_us_land_code/buttonpage02.txt
new file mode 100644
index 0000000..a775cc7
--- /dev/null
+++ b/nspanel_us_land_code/buttonpage02.txt
@@ -0,0 +1,649 @@
+Page buttonpage02
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Variable (string) lastclick
+ Attributes
+ ID : 44
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Text button01text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button01bri
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button02text
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button02bri
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button03text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button03bri
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button04text
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button04bri
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button05text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button05bri
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button06text
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button06bri
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button07text
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button07bri
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button08text
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button08bri
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text bpage02_label
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text button01icon
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02icon
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03icon
+ Attributes
+ ID : 30
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04icon
+ Attributes
+ ID : 31
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05icon
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06icon
+ Attributes
+ ID : 33
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07icon
+ Attributes
+ ID : 34
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08icon
+ Attributes
+ ID : 35
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture button01pic
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button02pic
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button03pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button04pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button05pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button06pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button07pic
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button08pic
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Hotspot button01
+ Attributes
+ ID : 36
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button01\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button02
+ Attributes
+ ID : 37
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button02\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button03
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button03\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button04
+ Attributes
+ ID : 39
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button04\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button05
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button05\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button06
+ Attributes
+ ID : 41
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button06\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button07
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button07\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button08
+ Attributes
+ ID : 43
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage02\", \"component\": \"button08\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page buttonpage01
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ page home
+ }
+ }
+
diff --git a/nspanel_us_land_code/buttonpage03.txt b/nspanel_us_land_code/buttonpage03.txt
new file mode 100644
index 0000000..77aa898
--- /dev/null
+++ b/nspanel_us_land_code/buttonpage03.txt
@@ -0,0 +1,649 @@
+Page buttonpage03
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Variable (string) lastclick
+ Attributes
+ ID : 44
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Text button01text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button01bri
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button02text
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button02bri
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button03text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button03bri
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button04text
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button04bri
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button05text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button05bri
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button06text
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button06bri
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button07text
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button07bri
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button08text
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button08bri
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text bpage03_label
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text button01icon
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02icon
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03icon
+ Attributes
+ ID : 30
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04icon
+ Attributes
+ ID : 31
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05icon
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06icon
+ Attributes
+ ID : 33
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07icon
+ Attributes
+ ID : 34
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08icon
+ Attributes
+ ID : 35
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture button01pic
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button02pic
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button03pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button04pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button05pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button06pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button07pic
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button08pic
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Hotspot button01
+ Attributes
+ ID : 36
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button01\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button02
+ Attributes
+ ID : 37
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button02\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button03
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button03\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button04
+ Attributes
+ ID : 39
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button04\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button05
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button05\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button06
+ Attributes
+ ID : 41
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button06\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button07
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button07\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button08
+ Attributes
+ ID : 43
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage03\", \"component\": \"button08\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page buttonpage02
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ page home
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/buttonpage04.txt b/nspanel_us_land_code/buttonpage04.txt
new file mode 100644
index 0000000..1609fa8
--- /dev/null
+++ b/nspanel_us_land_code/buttonpage04.txt
@@ -0,0 +1,649 @@
+Page buttonpage04
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis 255,0
+ vis button_back,1
+ vis page_index,1
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"buttonpage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Variable (string) lastclick
+ Attributes
+ ID : 44
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Text button01text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button01bri
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button02text
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button02bri
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button03text
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button03bri
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button04text
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button04bri
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button05text
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button05bri
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button06text
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button06bri
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button07text
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button07bri
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text button08text
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 22
+
+Text button08bri
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 4
+
+Text bpage04_label
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text button01icon
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02icon
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03icon
+ Attributes
+ ID : 30
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04icon
+ Attributes
+ ID : 31
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05icon
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06icon
+ Attributes
+ ID : 33
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07icon
+ Attributes
+ ID : 34
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08icon
+ Attributes
+ ID : 35
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 46
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture button01pic
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button02pic
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button03pic
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button04pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button05pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button06pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button07pic
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture button08pic
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 45
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Hotspot button01
+ Attributes
+ ID : 36
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button01\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button02
+ Attributes
+ ID : 37
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button02\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button03
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button03\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button04
+ Attributes
+ ID : 39
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button04\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button05
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button05\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button06
+ Attributes
+ ID : 41
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button06\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button07
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button07\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button08
+ Attributes
+ ID : 43
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lastclick.txt="{\"page\": \"buttonpage04\", \"component\": \"button08\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page buttonpage03
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/climate.txt b/nspanel_us_land_code/climate.txt
new file mode 100644
index 0000000..14fbd65
--- /dev/null
+++ b/nspanel_us_land_code/climate.txt
@@ -0,0 +1,729 @@
+Page climate
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==1||home.entity.txt=="embedded_climate")
+ {
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis target_icon,0
+ vis target_temp,0
+ vis current_temp,0
+ vis current_icon,0
+ vis climateslider,0
+ vis button01,0
+ vis button02,0
+ vis button03,0
+ vis button04,0
+ vis button05,0
+ vis button06,0
+ vis button07,0
+ page_label.txt=home.entity.txt
+ }else
+ {
+ page home
+ }
+
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ if(timer01.en==1)
+ {
+ timer01.en=0
+ covx temp_number.val,va1.txt,0,0
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"climate_position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+ }
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 25
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) climatesetting
+ Attributes
+ ID : 26
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) lastclick
+ Attributes
+ ID : 34
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (int32) temp_offset
+ Attributes
+ ID : 36
+ Scope: local
+ Value: 0
+
+Variable (int32) temp_step
+ Attributes
+ ID : 37
+ Scope: local
+ Value: 0
+
+Variable (int32) temp_number
+ Attributes
+ ID : 43
+ Scope: local
+ Value: 0
+
+Variable (int32) va0
+ Attributes
+ ID : 44
+ Scope: local
+ Value: 0
+
+Variable (string) back_page
+ Attributes
+ ID : 45
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (int32) embedded
+ Attributes
+ ID : 46
+ Scope: local
+ Value: 0
+
+Variable (string) va2
+ Attributes
+ ID : 47
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text current_temp
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 100
+
+Text current_icon
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_icon
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value02_icon
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value03_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 6
+
+Text button01_icon
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02_icon
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03_icon
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button04_icon
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button05_icon
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button06_icon
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button07_icon
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button08_icon
+ Attributes
+ ID : 38
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button09_icon
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text target_temp
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider climateslider
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 20
+ Upper range limit: 40
+ Lower range limit: 0
+
+ Events
+ Touch Press Event
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ timer01.en=1
+ climatesetting.txt="{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints climatesetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 48
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot decrease_temp
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.val>0)
+ {
+ climateslider.val--
+ temp_number.val=climateslider.val*temp_step.val
+ temp_number.val+=temp_offset.val
+ va0.val=temp_number.val/10
+ covx va0.val,target_temp.txt,0,0
+ va0.val=temp_number.val%10
+ covx va0.val,va1.txt,0,0
+ target_temp.txt+="."+va1.txt
+ }
+
+ Touch Release Event
+ timer01.en=1
+
+Hotspot increase_temp
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ if(climateslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/cover.txt b/nspanel_us_land_code/cover.txt
new file mode 100644
index 0000000..1a8db51
--- /dev/null
+++ b/nspanel_us_land_code/cover.txt
@@ -0,0 +1,233 @@
+Page cover
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ coversetting.txt="{\"page\": \"cover\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) va1
+ Attributes
+ ID : 7
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) coversetting
+ Attributes
+ ID : 11
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 12
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Text battery_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text cover_value
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text battery_icon
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider coverslider
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx coverslider.val,va1.txt,0,0
+ cover_value.txt=va1.txt+"%"
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"position\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_open
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"open_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_close
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"close_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button cover_stop
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ coversetting.txt="{\"domain\": \"cover\", \"key\": \"stop_cover\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints coversetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
diff --git a/nspanel_us_land_code/entitypage01.txt b/nspanel_us_land_code/entitypage01.txt
new file mode 100644
index 0000000..a3879a0
--- /dev/null
+++ b/nspanel_us_land_code/entitypage01.txt
@@ -0,0 +1,375 @@
+Page entitypage01
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text value01_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value05_label
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value04_label
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value02_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value03_label
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text entity01_label
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text value06_label
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value07_label
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value08_label
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value01_pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value02_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value03_pic
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value04_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value05_pic
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value06_pic
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value07_pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value08_pic
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value01
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value06
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value07
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value08
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page entitypage04
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ page entitypage03
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ page entitypage04
+ }
+ }
+
diff --git a/nspanel_us_land_code/entitypage02.txt b/nspanel_us_land_code/entitypage02.txt
new file mode 100644
index 0000000..0a9367f
--- /dev/null
+++ b/nspanel_us_land_code/entitypage02.txt
@@ -0,0 +1,375 @@
+Page entitypage02
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text value01_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value05_label
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value04_label
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value02_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value03_label
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text entity02_label
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text value06_label
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value07_label
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value08_label
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value01_pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value02_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value03_pic
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value04_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value05_pic
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value06_pic
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value07_pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value08_pic
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value01
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value06
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value07
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value08
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page entitypage01
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/entitypage03.txt b/nspanel_us_land_code/entitypage03.txt
new file mode 100644
index 0000000..ec40ef7
--- /dev/null
+++ b/nspanel_us_land_code/entitypage03.txt
@@ -0,0 +1,375 @@
+Page entitypage03
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text value01_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value05_label
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value04_label
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value02_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value03_label
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text entity03_label
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text value06_label
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value07_label
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value08_label
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value01_pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value02_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value03_pic
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value04_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value05_pic
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value06_pic
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value07_pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value08_pic
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value01
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value06
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value07
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value08
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page entitypage02
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ page entitypage01
+ }
+ }
+
diff --git a/nspanel_us_land_code/entitypage04.txt b/nspanel_us_land_code/entitypage04.txt
new file mode 100644
index 0000000..49dc4e3
--- /dev/null
+++ b/nspanel_us_land_code/entitypage04.txt
@@ -0,0 +1,375 @@
+Page entitypage04
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"entitypage04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text value01_label
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value05_label
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value04_label
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value02_label
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value03_label
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text entity04_label
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Text value06_label
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value07_label
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value08_label
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text value01_pic
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value02_pic
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value03_pic
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value04_pic
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value05_pic
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value06_pic
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value07_pic
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value08_pic
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text value01
+ Attributes
+ ID : 20
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02
+ Attributes
+ ID : 21
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03
+ Attributes
+ ID : 22
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04
+ Attributes
+ ID : 23
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05
+ Attributes
+ ID : 24
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value06
+ Attributes
+ ID : 25
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value07
+ Attributes
+ ID : 26
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value08
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Button button_back
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page entitypage03
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ page entitypage01
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/fan.txt b/nspanel_us_land_code/fan.txt
new file mode 100644
index 0000000..27327a3
--- /dev/null
+++ b/nspanel_us_land_code/fan.txt
@@ -0,0 +1,405 @@
+Page fan
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ fansetting.txt="{\"page\": \"fan\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints fansetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (string) fansetting
+ Attributes
+ ID : 7
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 8
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Variable (string) va0
+ Attributes
+ ID : 9
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text fan_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text icon_state
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Slider fanslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 4
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.val=5)
+ {
+ fanslider.val++
+ }
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ fanslider.val--
+ sys0=100*fanslider.val/fanslider.maxval
+ covx sys0,va0.txt,0,0
+ fan_value.txt=va0.txt+"%"
+ }
+ if(fanslider.val>fanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valfanslider.minval)
+ {
+ button_off.pco=59164
+ button_down.pco=59164
+ }else
+ {
+ button_off.pco=10597
+ button_down.pco=10597
+ }
+ if(fanslider.valswipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/home.txt b/nspanel_us_land_code/home.txt
new file mode 100644
index 0000000..211bd17
--- /dev/null
+++ b/nspanel_us_land_code/home.txt
@@ -0,0 +1,644 @@
+Page home
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ dimtimer.en=1
+ sleeptimer.en=1
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ vis bt_notific,is_notification
+ vis bt_qrcode,is_qrcode
+ vis bt_entities,is_entities
+ vis bt_alarm,is_alarm
+ if(display_mode==3)
+ {
+ vis left_bt_text,0
+ vis right_bt_text,0
+ }
+
+Variable (int32) disdim
+ Attributes
+ ID : 2
+ Scope: global
+ Value: 0
+
+Variable (string) lastclick
+ Attributes
+ ID : 45
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) entity
+ Attributes
+ ID : 46
+ Scope : global
+ Text :
+ Max. Text Size: 100
+
+Text time
+ Attributes
+ ID : 5
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text current_temp
+ Attributes
+ ID : 6
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 8
+
+Text outdoor_temp
+ Attributes
+ ID : 7
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 8
+
+Text date
+ Attributes
+ ID : 8
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text value01_state
+ Attributes
+ ID : 10
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text left_bt_text
+ Attributes
+ ID : 14
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text right_bt_text
+ Attributes
+ ID : 15
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text icon_top_01
+ Attributes
+ ID : 16
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_02
+ Attributes
+ ID : 17
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_03
+ Attributes
+ ID : 18
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_04
+ Attributes
+ ID : 19
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_05
+ Attributes
+ ID : 20
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_06
+ Attributes
+ ID : 21
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_07
+ Attributes
+ ID : 22
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_08
+ Attributes
+ ID : 23
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_09
+ Attributes
+ ID : 24
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_top_10
+ Attributes
+ ID : 25
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value01_icon
+ Attributes
+ ID : 26
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_state
+ Attributes
+ ID : 27
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 28
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 29
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_state
+ Attributes
+ ID : 30
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text wifi_icon
+ Attributes
+ ID : 31
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 5
+
+Text indoortempicon
+ Attributes
+ ID : 32
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button01_icon
+ Attributes
+ ID : 33
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button02_icon
+ Attributes
+ ID : 34
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text button03_icon
+ Attributes
+ ID : 35
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text bt_notific
+ Attributes
+ ID : 36
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page notification
+ }
+
+Text bt_qrcode
+ Attributes
+ ID : 37
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ page qrcode
+
+Text bt_entities
+ Attributes
+ ID : 38
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ page entitypage01
+ }
+
+Text bt_alarm
+ Attributes
+ ID : 39
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ if(api==1)
+ {
+ entity.txt=""
+ page alarm
+ }
+
+Text meridiem
+ Attributes
+ ID : 44
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture weather
+ Attributes
+ ID : 9
+ Scope : global
+ Dragging : 0
+ Send Component ID: disabled
+
+Dual-state Button left_bt_pic
+ Attributes
+ ID : 48
+ Scope : global
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
+
+Dual-state Button right_bt_pic
+ Attributes
+ ID : 49
+ Scope : global
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text :
+ Max. Text Size : 0
+
+Hotspot fc_weather
+ Attributes
+ ID : 11
+ Scope : global
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ if(api==1)
+ {
+ page weather01
+ }
+
+Hotspot jump_climate
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+
+ Events
+ Touch Press Event
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"press\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
+
+ Touch Release Event
+ if(entity.txt=="")
+ {
+ lastclick.txt="{\"page\": \"home\", \"component\": \"climate\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+ }else
+ {
+ page climate
+ }
+
+Hotspot button01
+ Attributes
+ ID : 40
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ lastclick.txt="{\"page\": \"home\", \"component\": \"button01\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button02
+ Attributes
+ ID : 41
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ lastclick.txt="{\"page\": \"home\", \"component\": \"button02\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot button03
+ Attributes
+ ID : 42
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ lastclick.txt="{\"page\": \"home\", \"component\": \"button03\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Hotspot settings_click
+ Attributes
+ ID : 43
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ settings_timer.en=1
+
+ Touch Release Event
+ settings_timer.en=0
+
+Timer dimtimer
+ Attributes
+ ID : 1
+ Scope : global
+ Period (ms): 50000
+ Enabled : yes
+
+ Events
+ Timer Event
+ if(disdim.val==0)
+ {
+ dim=brightness_dim // Dim down screen to val set from HA
+ }
+
+Timer swipestore
+ Attributes
+ ID : 4
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+Timer sleeptimer
+ Attributes
+ ID : 13
+ Scope : local
+ Period (ms): 65000
+ Enabled : no
+
+ Events
+ Timer Event
+ if(sleep_mode==1)
+ {
+ screensaver.orign.val=0
+ // Go to screensaver page
+ page screensaver
+ }
+
+Timer settings_timer
+ Attributes
+ ID : 47
+ Scope : local
+ Period (ms): 1000
+ Enabled : no
+
+ Events
+ Timer Event
+ page settings
+
+TouchCap swipe
+ Attributes
+ ID : 3
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+ dim=brightness // Set brightness to saved value (from HA)
+ dimtimer.en=1 // Enable timer to calc down for dimming screen
+ sleeptimer.en=1
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx&&api==1)
+ {
+ page buttonpage04
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100&&api==1)
+ {
+ page buttonpage02
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100&&api==1)
+ {
+ page buttonpage03
+ }
+ }
+
diff --git a/nspanel_us_land_code/instructions.md b/nspanel_us_land_code/instructions.md
new file mode 100644
index 0000000..932d017
--- /dev/null
+++ b/nspanel_us_land_code/instructions.md
@@ -0,0 +1,9 @@
+# Creating `nspanel_us_land.HMI` from `nspanel_eu.HMI`:
+
+## Program.s:
+Change to `display_mode=3`
+
+## Page `home`:
+1. Change left_bt_pic (x,y,w,h) from ( 47,307,120,3) to (467,173,3,120)
+2. Change right_bt_pic(x,y,w,h) from (288,307,120,3) to (467, 27,3,120)
+3. Rotate pictures 30 & 31 by 90degrees - You will find the rotated pics under pics folder where this instruction file is.
diff --git a/nspanel_us_land_code/keyb_num.txt b/nspanel_us_land_code/keyb_num.txt
new file mode 100644
index 0000000..54fefee
--- /dev/null
+++ b/nspanel_us_land_code/keyb_num.txt
@@ -0,0 +1,326 @@
+Page keyb_num
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page page_id.val
+ }else
+ {
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ aux.txt="{\"page\": \"keyb_num\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Variable (int32) page_id
+ Attributes
+ ID : 17
+ Scope: local
+ Value: 0
+
+Variable (string) key
+ Attributes
+ ID : 19
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Variable (string) entity
+ Attributes
+ ID : 20
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Variable (string) domain
+ Attributes
+ ID : 21
+ Scope : local
+ Text : alarm
+ Max. Text Size: 10
+
+Variable (string) aux
+ Attributes
+ ID : 22
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) value
+ Attributes
+ ID : 23
+ Scope : local
+ Text :
+ Max. Text Size: 10
+
+Text t0
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text pin
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text title
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Alarm
+ Max. Text Size : 10
+
+Button b1
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 1
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b1.txt
+
+Button bclose
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ page page_id.val
+
+Button b2
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 2
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b2.txt
+
+Button b3
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 3
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b3.txt
+
+Button b4
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 4
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b4.txt
+
+Button b5
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 5
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b5.txt
+
+Button b6
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 6
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b6.txt
+
+Button b7
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 7
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b7.txt
+
+Button b8
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 8
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b8.txt
+
+Button b9
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 9
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b9.txt
+
+Button bclear
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : <
+ Max. Text Size : 5
+
+ Events
+ Touch Release Event
+ pin.txt=""
+
+Button b0
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : 0
+ Max. Text Size : 1
+
+ Events
+ Touch Release Event
+ pin.txt+=b0.txt
+
+Button benter
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : OK
+ Max. Text Size : 3
+
+ Events
+ Touch Release Event
+ aux.txt="{\"domain\": \"keyb_num\", \"key\": \""+key.txt+"\", \"value\": \""+value.txt+"\", \"entity\": \""+entity.txt+"\", \"pin\": \""+pin.txt+"\", \"base_domain\": \""+domain.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints aux.txt,0
+ printh 00
+ printh FF FF FF
+
+Button bview
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : O
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(pin.pw==1)
+ {
+ pin.pw=0
+ }else
+ {
+ pin.pw=1
+ }
+
diff --git a/nspanel_us_land_code/light.txt b/nspanel_us_land_code/light.txt
new file mode 100644
index 0000000..766b785
--- /dev/null
+++ b/nspanel_us_land_code/light.txt
@@ -0,0 +1,696 @@
+Page light
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+ // #### Hide color & temp buttons #####
+ vis temp_touch,0
+ vis temp_value_2,0
+ vis temp_button,0
+ vis color_touch,0
+ vis color_button,0
+ page_label.txt=home.entity.txt
+ }
+
+ Touch Press Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"press\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"touchevent\", \"value\": \"release\", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+ Page Exit Event
+ home.entity.txt=""
+
+Variable (int32) rgb565
+ Attributes
+ ID : 22
+ Scope: local
+ Value: 0
+
+Variable (string) va1
+ Attributes
+ ID : 23
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 20
+
+Variable (string) va2
+ Attributes
+ ID : 24
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (string) va3
+ Attributes
+ ID : 25
+ Scope : local
+ Text : newtxt
+ Max. Text Size: 10
+
+Variable (int32) currenttab
+ Attributes
+ ID : 26
+ Scope: local
+ Value: 0
+
+Variable (string) lightsetting
+ Attributes
+ ID : 30
+ Scope : local
+ Text :
+ Max. Text Size: 255
+
+Variable (string) back_page
+ Attributes
+ ID : 31
+ Scope : local
+ Text : home
+ Max. Text Size: 15
+
+Number ring
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Number field
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Value : 0
+
+Text light_value
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temp_value
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text light_value_2
+ Attributes
+ ID : 27
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text temp_value_2
+ Attributes
+ ID : 28
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text icon_state
+ Attributes
+ ID : 29
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Picture light_button
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_button
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_button
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture light_b_press
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture temp_b_press
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture color_b_pres
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Picture colorwheel
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ // Circular Color Picker for Nextion (c) Max Zuidberg 2022
+ // This Source Code Form is subject to the terms of the Mozilla Public
+ // License, v. 2.0. If a copy of the MPL was not distributed with this
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ //
+ // Put this code in the touch press or release
+ // event of the pic component with the color wheel.
+ // Requires the two variables field.val and ring.val
+ //
+ // sya0 = x, sya1 = sya1
+ // Note the usage of the hidden sya0, sya1 variables
+ // within event code as local, temporary variable is fine.
+ sya0=tch0
+ sya1=tch1
+ //
+ // Convert absolute coordinates to coordinates relative to
+ // the color wheel center.
+ // sys0 = x_center, sys1 = y_center
+ sys0=colorwheel.w/2
+ sys0+=colorwheel.x
+ sys1=colorwheel.h/2
+ sys1+=colorwheel.y
+ sya0-=sys0
+ sya1-=sys1
+ //
+ // Determine ring
+ ring.val=0
+ // sys0 = r^2 = x^2 + y^2
+ sys0=sya0*sya0
+ sys1=sya1*sya1
+ sys0+=sys1
+ // repeat for all rings
+ if(sys0>=156)
+ {
+ ring.val++
+ }
+ if(sys0>=625)
+ {
+ ring.val++
+ }
+ if(sys0>=1406)
+ {
+ ring.val++
+ }
+ if(sys0>=2500)
+ {
+ ring.val++
+ }
+ if(sys0>=3906)
+ {
+ ring.val++
+ }
+ if(sys0>=5625)
+ {
+ ring.val++
+ }
+ if(sys0>=7656)
+ {
+ ring.val++
+ }
+ //
+ // Determine quadrant (0-3). Note: pixel y coords are inverted
+ // compared to mathematical y coords. But we want math. quadrants.
+ sya1*=-1
+ sys2=0
+ if(sya1<0)
+ {
+ sys2+=2
+ }
+ sys0=sya0*sya1
+ if(sys0<0)
+ {
+ sys2+=1
+ // In this case we also want to swap x and y otherwise the
+ // atan(abs(x/y)) (calculated below) gives values running
+ // "the wrong way" (cw instead of ccw).
+ sys1=sya1
+ sya1=sya0
+ sya0=sys1
+ }
+ //
+ field.val=sys2*6
+ //
+ // x,y sign is not required anymore
+ if(sya0<0)
+ {
+ sya0*=-1
+ }
+ if(sya1<0)
+ {
+ sya1*=-1
+ }
+ //
+ // Determine field in ring quadrant
+ // Factor 100000 chosen more or less arbitrarily.
+ // sys0 = 100000 * tan_a = 100000 * y / x
+ sys0=100000*sya1
+ sys0/=sya0
+ // repeat for all fields
+ if(sys0>=26794)
+ {
+ field.val++
+ }
+ if(sys0>=57735)
+ {
+ field.val++
+ }
+ if(sys0>=99999)
+ {
+ field.val++
+ }
+ if(sys0>=173205)
+ {
+ field.val++
+ }
+ if(sys0>=373205)
+ {
+ field.val++
+ }
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+ Touch Release Event
+ // Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
+ h=23-field.val// 0 <= field.val <= 23
+ // h is expected to be 0-6*256 (see hsv2rgb)
+ h*=6*256
+ h/=24// Number of fields
+ //
+ // s is expected to be 0-256 (see hsv2rgb)
+ s=ring.val*256
+ s/=8// Number of rings
+ // no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
+ v=255
+ click hsv2rgb,0
+ click rgb888to565,0
+ //colPreview.bco=rgb565.val
+ covx r,va1.txt,0,0
+ covx g,va2.txt,0,0
+ covx b,va3.txt,0,0
+ lightsetting.txt="{\"page\": \"light\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+", "+va2.txt+", "+va3.txt+"], \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+ va1.txt=""
+ va2.txt=""
+ va3.txt=""
+
+Slider lightslider
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Release Event
+ covx lightslider.val,va1.txt,0,0
+ light_value.txt=va1.txt+"%"
+ light_value_2.txt=va1.txt+"%"
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"brightness_pct\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Slider tempslider
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ Position : 0
+ Upper range limit: 500
+ Lower range limit: 153
+
+ Events
+ Touch Release Event
+ covx tempslider.val,va1.txt,0,0
+ temp_value.txt=va1.txt
+ temp_value_2.txt=va1.txt
+ lightsetting.txt="{\"domain\": \"light\", \"key\": \"color_temp\", \"value\": "+va1.txt+", \"entity\": \""+home.entity.txt+"\"}"
+ printh 92
+ prints "localevent",0
+ printh 00
+ prints lightsetting.txt,0
+ printh 00
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 32
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ if(back_page.txt=="buttonpage01")
+ {
+ page buttonpage01
+ }else if(back_page.txt=="buttonpage02")
+ {
+ page buttonpage02
+ }else if(back_page.txt=="buttonpage03")
+ {
+ page buttonpage03
+ }else if(back_page.txt=="buttonpage04")
+ {
+ page buttonpage04
+ }else
+ {
+ page home
+ }
+
+Hotspot hsv2rgb
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ // https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
+ // The values range from 0..255 instead of 0..1
+ // h ranges from 0..(6*256)
+ if(s>=256)
+ {
+ s=255
+ }else if(s<0)
+ {
+ s=0
+ }
+ if(v>=256)
+ {
+ v=255
+ }else if(v<0)
+ {
+ v=0
+ }
+ f=h&0xff
+ p=256-s
+ p*=v
+ p=p>>8// / 256
+ q=s*f// 0-256*256 = 0-65536
+ q=65536-q
+ q*=v
+ q=q>>16
+ t=256-f
+ t*=s
+ t=65536-t
+ t*=v
+ t=t>>16
+ //
+ f=h>>8
+ if(f==1)
+ {
+ r=q
+ g=v
+ b=p
+ }else if(f==2)
+ {
+ r=p
+ g=v
+ b=t
+ }else if(f==3)
+ {
+ r=p
+ g=q
+ b=v
+ }else if(f==4)
+ {
+ r=t
+ g=p
+ b=v
+ }else if(f==5)
+ {
+ r=v
+ g=p
+ b=q
+ }else
+ {
+ r=v
+ g=t
+ b=p
+ }
+
+Hotspot rgb888to565
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ r=r&0xff
+ g=g&0xff
+ b=b&0xff
+ sys1=r>>3
+ sys2=sys1<<6
+ sys1=g>>2
+ sys2+=sys1
+ sys2=sys2<<5
+ sys1=b>>3
+ sys2+=sys1
+ rgb565.val=sys2
+
+Hotspot light_touch
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis light_b_press,1
+ vis lightslider,1
+ vis light_value,1
+ vis temp_value_2,1
+ // #### OFF Button #####
+ vis temp_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis temp_value,0
+ vis light_value_2,0
+ // #### OFF Slider #####
+ vis tempslider,0
+ vis colorwheel,0
+
+Hotspot temp_touch
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis temp_b_press,1
+ vis tempslider,1
+ vis temp_value,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis color_b_pres,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis colorwheel,0
+
+Hotspot color_touch
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Press Event
+ vis color_b_pres,1
+ vis colorwheel,1
+ vis light_value_2,1
+ // #### OFF Button #####
+ vis light_b_press,0
+ vis temp_b_press,0
+ // #### OFF Value #####
+ vis light_value,0
+ vis temp_value,0
+ vis temp_value_2,0
+ // #### OFF Slider #####
+ vis lightslider,0
+ vis tempslider,0
+ // #### OFF Color #####
+
+Timer swipestore
+ Attributes
+ ID : 21
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 20
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/notification.txt b/nspanel_us_land_code/notification.txt
new file mode 100644
index 0000000..5708896
--- /dev/null
+++ b/nspanel_us_land_code/notification.txt
@@ -0,0 +1,182 @@
+Page notification
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"notification\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Variable (string) lastclick
+ Attributes
+ ID : 5
+ Scope : local
+ Text :
+ Max. Text Size: 100
+
+Text notifi_text01
+ Attributes
+ ID : 1
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 250
+
+Text notifi_label
+ Attributes
+ ID : 2
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+Button button_back
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Button bt_accept
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Release Event
+ lastclick.txt="{\"page\": \"notification\", \"component\": \"accept\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Button bt_clear
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 10
+
+ Events
+ Touch Release Event
+ lastclick.txt="{\"page\": \"notification\", \"component\": \"clear\", \"value\": \"release\"}"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints lastclick.txt,0
+ printh 00
+ printh FF FF FF
+
+Timer swipestore
+ Attributes
+ ID : 4
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 3
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/pics/30_vertical.png b/nspanel_us_land_code/pics/30_vertical.png
new file mode 100644
index 0000000..415a7f3
Binary files /dev/null and b/nspanel_us_land_code/pics/30_vertical.png differ
diff --git a/nspanel_us_land_code/pics/31_vertical.png b/nspanel_us_land_code/pics/31_vertical.png
new file mode 100644
index 0000000..e530e71
Binary files /dev/null and b/nspanel_us_land_code/pics/31_vertical.png differ
diff --git a/nspanel_us_land_code/qrcode.txt b/nspanel_us_land_code/qrcode.txt
new file mode 100644
index 0000000..74019a6
--- /dev/null
+++ b/nspanel_us_land_code/qrcode.txt
@@ -0,0 +1,128 @@
+Page qrcode
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"qrcode\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text qrcode_label
+ Attributes
+ ID : 3
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 30
+
+QR Code qrcode_value
+ Attributes
+ ID : 4
+ Scope : global
+ Dragging : 0
+ Send Component ID: disabled
+ Text :
+ Max. Text Size : 50
+
+Button button_back
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ //page
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/screensaver.txt b/nspanel_us_land_code/screensaver.txt
new file mode 100644
index 0000000..d53450d
--- /dev/null
+++ b/nspanel_us_land_code/screensaver.txt
@@ -0,0 +1,41 @@
+Page screensaver
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=0
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ page orign.val
+
+Variable (int32) orign
+ Attributes
+ ID : 2
+ Scope: global
+ Value: 0
+
+TouchCap wakeup
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ page orign.val
+
diff --git a/nspanel_us_land_code/settings.txt b/nspanel_us_land_code/settings.txt
new file mode 100644
index 0000000..db740b0
--- /dev/null
+++ b/nspanel_us_land_code/settings.txt
@@ -0,0 +1,292 @@
+Page settings
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text bright_text
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 80%
+ Max. Text Size : 4
+
+Text dim_text
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : 20%
+ Max. Text Size : 4
+
+Text lbl_reboot
+ Attributes
+ ID : 5
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Reboot
+ Max. Text Size : 25
+
+Text lbl_sleep
+ Attributes
+ ID : 6
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Sleep mode
+ Max. Text Size : 25
+
+Text lbl_brightness
+ Attributes
+ ID : 7
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Brightness
+ Max. Text Size : 10
+
+Text lbl_dimming
+ Attributes
+ ID : 8
+ Scope : global
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text : Dimming
+ Max. Text Size : 7
+
+Text icon_bright
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
+
+Text icon_dim
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 3
+
+Slider brightslider
+ Attributes
+ ID : 1
+ Scope : global
+ Dragging : 0
+ Send Component ID: on press and release
+ Position : 80
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ covx brightslider.val,bright_text.txt,0,0
+ bright_text.txt+="%"
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+
+Slider dimslider
+ Attributes
+ ID : 2
+ Scope : global
+ Dragging : 0
+ Send Component ID: on press and release
+ Position : 20
+ Upper range limit: 100
+ Lower range limit: 0
+
+ Events
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ covx dimslider.val,dim_text.txt,0,0
+ dim_text.txt+="%"
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
+
+Button button_back
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Dual-state Button bt_reboot
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID: on press and release
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+Dual-state Button bt_sleep
+ Attributes
+ ID : 10
+ Scope : global
+ Dragging : 0
+ Send Component ID: on press and release
+ State : unpressed
+ Text : îš
+ Max. Text Size : 3
+
+Hotspot bt_bright_down
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(brightslider.val>0)
+ {
+ brightslider.val--
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_bright_up
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(brightslider.val<100)
+ {
+ brightslider.val++
+ covx brightslider.val,bright_text.txt,0,0
+ printh 91
+ prints "brightslider",0
+ printh 00
+ prints brightslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_down
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val>0)
+ {
+ dimslider.val--
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
+ }
+
+Hotspot bt_dim_up
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+ Events
+ Touch Release Event
+ if(dimslider.val<100)
+ {
+ dimslider.val++
+ covx dimslider.val,dim_text.txt,0,0
+ printh 91
+ prints "dimslider",0
+ printh 00
+ prints dimslider.val,0
+ printh FF FF FF
+ }
+
diff --git a/nspanel_us_land_code/weather01.txt b/nspanel_us_land_code/weather01.txt
new file mode 100644
index 0000000..3091b90
--- /dev/null
+++ b/nspanel_us_land_code/weather01.txt
@@ -0,0 +1,272 @@
+Page weather01
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather01\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text day
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text date
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temperature
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text loading
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 1
+
+Text value01
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value05
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value04
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value02
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value03
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01_icon
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture weather_icon
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page weather05
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/weather02.txt b/nspanel_us_land_code/weather02.txt
new file mode 100644
index 0000000..af1574b
--- /dev/null
+++ b/nspanel_us_land_code/weather02.txt
@@ -0,0 +1,272 @@
+Page weather02
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather02\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text day
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text loading
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 1
+
+Text date
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temperature
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value05
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value04
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value02
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value03
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01_icon
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture weather_icon
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page weather01
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/weather03.txt b/nspanel_us_land_code/weather03.txt
new file mode 100644
index 0000000..393b593
--- /dev/null
+++ b/nspanel_us_land_code/weather03.txt
@@ -0,0 +1,272 @@
+Page weather03
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather03\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text day
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text loading
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 1
+
+Text date
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temperature
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value05
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value04
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value02
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value03
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01_icon
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture weather_icon
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page weather02
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/weather04.txt b/nspanel_us_land_code/weather04.txt
new file mode 100644
index 0000000..0739b91
--- /dev/null
+++ b/nspanel_us_land_code/weather04.txt
@@ -0,0 +1,272 @@
+Page weather04
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather04\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text day
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text loading
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 1
+
+Text date
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temperature
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value05
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value04
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value02
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value03
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01_icon
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture weather_icon
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page weather03
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+
diff --git a/nspanel_us_land_code/weather05.txt b/nspanel_us_land_code/weather05.txt
new file mode 100644
index 0000000..9730873
--- /dev/null
+++ b/nspanel_us_land_code/weather05.txt
@@ -0,0 +1,272 @@
+Page weather05
+ Attributes
+ ID : 0
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ 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
+ dim=brightness
+ if(api==0)
+ {
+ page home
+ }else
+ {
+ printh 92
+ prints "nspanelevent",0
+ printh 00
+ prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
+ printh 00
+ printh FF FF FF
+ }
+
+ Touch Press Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"press\"}",0
+ printh 00
+ printh FF FF FF
+
+ Touch Release Event
+ printh 92
+ prints "touchevent",0
+ printh 00
+ prints "{\"page\": \"weather05\", \"component\": \"touchevent\", \"value\": \"release\"}",0
+ printh 00
+ printh FF FF FF
+
+Text day
+ Attributes
+ ID : 4
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Text loading
+ Attributes
+ ID : 5
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 1
+
+Text date
+ Attributes
+ ID : 6
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 25
+
+Text temperature
+ Attributes
+ ID : 7
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01
+ Attributes
+ ID : 8
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value05
+ Attributes
+ ID : 9
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value04
+ Attributes
+ ID : 10
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value02
+ Attributes
+ ID : 11
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value03
+ Attributes
+ ID : 12
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 15
+
+Text value01_icon
+ Attributes
+ ID : 13
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value02_icon
+ Attributes
+ ID : 14
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value03_icon
+ Attributes
+ ID : 15
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value04_icon
+ Attributes
+ ID : 16
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text value05_icon
+ Attributes
+ ID : 17
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 10
+
+Text page_index
+ Attributes
+ ID : 18
+ Scope : local
+ Dragging : 0
+ Send Component ID : disabled
+ Associated Keyboard: none
+ Text :
+ Max. Text Size : 20
+
+Picture weather_icon
+ Attributes
+ ID : 3
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+
+Button button_back
+ Attributes
+ ID : 19
+ Scope : local
+ Dragging : 0
+ Send Component ID: disabled
+ State : unpressed
+ Text : î
+ Max. Text Size : 3
+
+ Events
+ Touch Press Event
+ page home
+
+Timer swipestore
+ Attributes
+ ID : 2
+ Scope : local
+ Period (ms): 50
+ Enabled : no
+
+ Events
+ Timer Event
+ swipex=tch0
+ swipey=tch1
+
+TouchCap swipe
+ Attributes
+ ID : 1
+ Scope: local
+ Value: 0
+
+ Events
+ Touch Press Event
+ swipestore.en=1 // Start swipestore timer
+
+ Touch Release Event
+ swipestore.en=0
+ // Touch has ended, x
+ if(tch0==0)
+ {
+ swipec=swipex-tch2
+ // From Left to Right
+ if(swipec>swipedx)
+ {
+ page weather04
+ }
+ // Right to Left
+ swipec2=0-swipedx
+ if(swipec100)
+ {
+ //page
+ }
+ // Down to Up
+ swipec2=0-swipedy
+ if(swipec<-100)
+ {
+ //page
+ }
+ }
+