Moving docs to repo

This commit is contained in:
Edward Firmo
2023-12-11 23:28:39 +01:00
parent eadedd1401
commit 6c23adcf6c
12 changed files with 1618 additions and 3 deletions

3
docs/de/README.md Normal file
View File

@@ -0,0 +1,3 @@
## Attention
The manuals in Germany are not being updated. Please use the latest documents in English. Your browser translations can help if English is an issue for you.

20
docs/en/README.md Normal file
View File

@@ -0,0 +1,20 @@
# Manuals:
### Setup
- [First Steps | Installation and Setup](install.md)
- [Blueprint | Setup and explanation of the Blueprint](blueprint.md)
- [HowTo | All important things you should know](howto.md)
### Common issues
- [Common Issues | TFT Upload](tft_upload.md)
- [Common Issues | Stuck on Initializing](error_initializing.md)
- [Common Issues | AccuWeather Setup & Blank weather pages](weather.md)
### Advanced settings
- [Customization](customization.md)
- [Add-on climate](addon_climate.md)
- [Alarm Control Panel](alarm.md)
 
 
# Setup and overview videos:
- **_[Overview and features](https://www.youtube.com/watch?v=b7vW4YtUaTs) - Mark Watt Tech_**
- **_[How to setup](https://www.youtube.com/watch?v=jpSTA_ILB8g) - Mark Watt Tech_**
- **_[(DE) Einrichtungs und konfigurations video](https://www.youtube.com/watch?v=3afPFg6kUdc) - SmartHome yourself_**

View File

@@ -1 +1,144 @@
This page was moved to the Wiki area: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Add%E2%80%90on:-Climate
# 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<br>
- 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.
&nbsp;
## 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
```
&nbsp;
## 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).
&nbsp;
### 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
esp32:
framework:
type: esp-idf
```
&nbsp;
#### 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
esp32:
framework:
type: esp-idf
```

View File

@@ -1 +1,52 @@
This page was moved to the Wiki area: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Alarm-Control-Panel
# 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.
&nbsp;
### 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.<br>
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).
&nbsp;
## 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.<br>
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:<br>
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/37bfc622-c0cd-4941-a397-3eeb2ddbe6a2)
Then check the option "Allow the device to make Home Assistant service calls":<br>
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/9b20a1b6-94ad-4fff-aef2-eb3599db9bf1)
<br>
### Blueprint settings
Open the automation based on the NSPanel Blueprint and look for a section related to "Alarm Control Panel".<br>
Select your alarm control panel entity, click "Save", and your are done. :sunglasses:<br>
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/859d3f4b-9a05-4694-9e2c-c32ab3a5e22f)
&nbsp;
## 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:<br>
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/bc312981-3d5a-42c7-b0b4-203457ff549f)
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 |![shield-off-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/5b1c8219-3958-4096-9100-0b4ef47e7dac)|mdi:shield-off-outline | The alarm is disarmed (off).
armed_home | Green |![shield-home-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/1ed9347b-139a-4729-a795-b08934b56581)| mdi:shield-home-outline | The alarm is armed in home mode.
armed_away | Green |![shield-lock-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/998db33c-3ec5-47dd-9686-c28eee81e9eb)| mdi:shield-lock-outline | The alarm is armed in away mode.
armed_night | Green |![shield-moon-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/84528bca-577d-4a43-8366-e6f9e41bc7b4)| mdi:shield-moon-outline | The alarm is armed in night mode.
armed_vacation | Green |![shield-airplane-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/067218de-ec8c-4fce-a427-7848a7ae9f27)| mdi:shield-airplane-outline | The alarm is armed in vacation mode.
armed_custom_bypass | Green |![shield-half-full](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/af7ed346-28eb-4796-b62b-2a51e9cb6272)| mdi:shield-half-full | The alarm is armed in bypass mode.
pending | Amber |![shield-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/31bcd613-04d6-455a-a443-3299211d487e)| mdi:shield-outline | The alarm is pending (towards triggered).
arming | Amber |![shield-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/31bcd613-04d6-455a-a443-3299211d487e)| mdi:shield-outline | The alarm is arming.
disarming | Amber |![shield-off-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/37c02584-dd65-4575-8d95-c7346de599e4)| mdi:shield-off-outline | The alarm is disarming.
triggered | Red |![shield-alert-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/ee1ec55b-e671-4aa0-9baa-77eb2a8c8c7f)| mdi:shield-alert-outline | The alarm is triggered.
unknown / unavailable | White |![shield-alert-outline](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/a382e5ab-2e16-453c-bc9b-b3dcd3825de7)| mdi:shield-alert-outline | The alarm state is unknown or unavailable

232
docs/en/blueprint.md Normal file
View File

@@ -0,0 +1,232 @@
This article covers the settings in the Blueprint Automation.
The Blueprint Automation is the central configuration element of this solution for the NSPanel.&nbsp;
In principle, the setup of the automation is self-explanatory. The individual elements of the Blueprint are described below.
It is possible to change both the color of the labels and the icons for most of the elements on each screen.
Default color is "65535". The desired Nextion color code can be found at
``https://nodtem66.github.io/nextion-hmi-color-convert/index.html``
The icons under the following link can be used:
``https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html``
For an easier overview, the menu items "Icon Color" and "Label Color" will not be described separately in the following documentation.
&nbsp;
# Parameters
### ESPhome Node Name
Refers to the ESPhome device name. **Allowed characters are "__",a-z, 0-9, but no special characters or spaces**. This is a restriction on the side of HA, since the respective entity_IDs are generated from the device name of the blueprint.
### Language for NSPanel
The language can be selected via the drop-down menu. Currently 26 languages are supported.
### Delay to avoid synchronization problems
If the WiFi signal is poor, menus may not be loaded completely. If this happens, a delay in 5ms increments can be set here to compensate for this.
## Weather and Temperature
### Weather integration
Choose between HA own weather integration or the more accurate Accuweather.
### Weather entity from HA
Dropdown menu to select the Weather entity to use. Example: If "Accuweather" is selected in item 7, then the entity for Accuweather must be selected here.
### Outdoor temperature Sensor (Optional)
Optionally, the value of an outdoor temperature sensor can be used here. If no separate sensor is used, the value of the weather integration will be used.
### Indoor Temperature Sensor (Optional)
An indoor temperature sensor is not necessary. Leave the field empty if you want to use the temperature sensor of the NSPanel. If the value of the sensor needs to be corrected, this can be done via the temperature correction for the NSPanel under HA Devices.
## Sensor Home Page
#### Sensor 01-03 - Entity (Optional)
Up to three sensors can be displayed on the home screen. Select the corresponding HA entity.
## Chips
#### Chip 01-07 - Entity (Optional)
Used to display HA entities on the home screen. For example to display the status of a specific switch on the NSPanel.
## Climate
### Climate to Control (Optional)
If a Climate Integration is to be controlled, it must be entered here. This can then be accessed via the temperature on the home screen of the NSPanel.
### Climate Control optimistic Mode (Optional)
Depending on the climate control, the optimistic mode can be used for better response. The changes made are only transferred to the device when the screen is exited.
### Hot Water Charge Button (Optional)
Optional hot water switch, e.g. for a boiler.
## QR Code
### Activate QR Code - TRUE/FALSE (Optional)
Activates the QR Code Page and the QR Code Button on the home page
### QR Code content (Optional)
String, which is shown as a QR Code on the NSPanel. This can be a simple text, a URL or could also be used for a simplified login to the WiFi. Here is an example (simply change SSID and password to your credentials and either use "WPA" or "WEP"):
```WIFI:S:SSID;T:WPA/WEP;P:PASSWORD;;```
## Hardware Buttons
### Delay for HW-Buttons hold in seconds - VALUE
Setting for how long a button must remain pressed in order to be recognized as a "hold". Default: 1 second.
### Activate Relay x local Fallback (Optional)
Normally, the internal relays of the NSPanels are triggered via HA. If the NSPanel loses WiFi connection or HA is down, the hardware button can then switch the corresponding relay directly.
### Left/Right Hardware Button - Entity (Optional)
The entity that should be switched with the left/right hardware button.
### Left/Right Hardware Button Name - Label (Optional)
Text on the screen above the corresponding hardware button (home screen).
### Left/Right Hardware Button hold assignment - VALUE (optional)
Selection of what action should happen when the button is pressed for a longer time.
### Left/Right Hardware Button custom hold action - VALUE (Optional)
Selection of the action to start when holding the button.
## Button Page 01-04
### Button Page 01-04 name - LABEL (Optional)
Text on the respective button screens.
### Buttons 01 - 32 (Optional)
The buttons can be accessed by swiping on the Home Screen and their functions are completely identical.
Either the individual button pages can be accessed one after the other by swiping to the left, or the button pages can be accessed directly by swiping up, down or to the right.
The buttons are numbered as follows:
| | Button Page 1 | Button Page 2 | Button Page 3 | Button Page 4 |
| ----- | ------------- | ------------- | ------------- | ------------- |
| Row 1 | 01 02 03 04 | 09 10 11 12 | 17 18 19 20 | 25 26 27 28 |
| Row 2 | 05 06 07 08 | 13 14 15 16 | 21 22 23 24 | 29 30 31 32 |
The following entities can be stored:
- Light
- Switch
- Cover
- Input Boolean
- Automation
- Button
- Input Button
- Scene
- Person
- Script
- Binary Sensor
- Fan
- Climate
When the respective button is pressed, the corresponding page is automatically opened, e.g. the cover control for covers, etc.
For each button an own name can be specified optionally.
All buttons offer the possibility to optionally confirm the execution of the action. This can be activated or deactivated separately for each button via *"Confirm execution of the button press"*.
## Entity Page 01-04
### Activate Entity Page - TRUE/FALSE (Optional)
This option activates the entity pages on the Home Screen. The entity pages can be used for example to display values or statuses of entities on the individual pages.
### Entity Page 01-04 name - LABEL (Optional)
Naming of the corresponding Entity Screens.
### Entity 01 - 32 (Optional)
The entity pages can be accessed by pressing the symbol on the Home Screen and their functions are completely identical.
The entities are numbered as follows:
| | Entity Page 1 | Entity Page 2 | Entity Page 3 | Entity Page 4 |
| ----- | ------------- | ------------- | ------------- | ------------- |
| Row 1 | 01 02 03 04 | 09 10 11 12 | 17 18 19 20 | 25 26 27 28 |
| Row 2 | 05 06 07 08 | 13 14 15 16 | 21 22 23 24 | 29 30 31 32 |
Additionally there is the possibility to choose an icon of your choice from 6896 icons.
Of course there is also the possibility to enter your own entity label and to assign a label for the 4 pages. If no entity label is set, the friendly name is taken from HA.
The currently implemented symbols can be found here: https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html
**To use the icons in the Blueprint you would have to click on the "U" on the website to copy the icon and then paste it in the Blueprint** *(Attention: Only a "strange" character is displayed, but that is correct).*
## Custom Configuration
### Hot Water Temperature Sensor (Optional)
Optional Hot Water Sensor.
### Top 04 Flame
Displays a flame symbol on the home screen, e.g. when a boiler is switched on.
### Nextion TFT File Folder
Can be left blank. However, it is required if a custom TFT configuration is to be used.
### Synchronization of all values (Optional)
Light and cover pages (values) are updated continuously (may cause flickering).
### Synchronization of all all sliders (Optional)
Light and cover pages (cover position) are updated continuously (may cause flickering).
***
Example Screenshots
![image-20230317162851693](./assets/image-20230317162851693.png)
![image-20230317162944247](./assets/image-20230317162944247.png)
![image-20230317163012105](./assets/image-20230317163012105.png)
![image-20230317163035519](./assets/image-20230317163035519.png)

View File

@@ -1 +1,536 @@
This page was moved to the Wiki area: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Customization
# Customization
Table of contents:
- [Description](#description)
- [Instructions](#instructions)
- [Examples](#examples)
- [API encryption](#api-encryption)
- [Custom OTA password](#custom-ota-password)
- [Web server credentials](#web-server-credentials)
- [Reboot when API fails](#reboot-when-api-fails)
- [Change UART's baud rate](#change-uarts-baud-rate)
- [Manual IP](#manual-ip)
- [Hidden Wi-Fi](#hidden-wi-fi)
- [Connect to multiple networks](#connect-to-multiple-networks)
- [SNTP (time) server](#sntp-time-server)
- [Sensor for display awake vs sleeping](#sensor-for-display-awake-vs-sleeping)
- [Button to upload `nspanel_blank.tft`](#button-to-upload-nspanel_blanktft)
- [Deep sleep](#deep-sleep)
- [Enforce time zone](#enforce-time-zone)
- [Compiling ESPHome on lower powered machines](#compiling-esphome-on-lower-powered-machines)
- [Sleep & Wake-up buttons](#sleep--wake-up-buttons)
- [Set display as a light](#set-display-as-a-light)
- [Scheduled actions](#scheduled-actions)
- [Scheduled relay](#scheduled-relay)
- [Scheduled climate](#scheduled-climate)
- [Framework `esp-idf`](#framework-esp-idf)
- [Bluetooth proxy](#bluetooth-proxy)
- [Logger via UART](#logger-via-uart)
- [Climate custom presets](#climate-custom-presets)
&nbsp;
&nbsp;
## 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.*
- *Please monitor the memory consumption when using customizations. Getting closer to the full memory can drive to errors in the system or prevent your system to support the future updates.*
&nbsp;
## 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 # Core package
# - advanced/esphome/nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control
# - advanced/esphome/nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control
refresh: 1s
esp32:
framework:
type: esp-idf
##### 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 #####
```
&nbsp;
## 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
```
&nbsp;
### Custom OTA password
By default, the Wi-Fi password will be used as your OTA password, but you can replace it.<br>
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
```
&nbsp;
### 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
```
&nbsp;
### 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).<br>
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.<br>
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
```
&nbsp;
### Change UART's baud rate
Use this to change the baud rate on the communication between ESPHome and Nextion display.<br>
> This project uses 115200 bps as default, but will automatically try to change to 921600 bps when uploading TFT, so you shouldn't need this customization in normal situations.
> Higher baud rates might cause issues when upload some pages.
```yaml
# Set Nextion comms baud rate to 921600 bps
uart:
- id: !extend tf_uart
baud_rate: 921600
```
&nbsp;
### 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
```
&nbsp;
### 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
```
&nbsp;
### 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
```
&nbsp;
### 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
```
&nbsp;
### Sensor for display awake vs sleeping
Creates a binary sensor to indicate either when the display is showing some page (`on`) or sleeping (`off`).
```yaml
# Is display awake?
binary_sensor:
- name: ${device_name} Display state
id: display_state
platform: template
lambda: |-
return (id(current_page).state != "screensaver");
```
You can easily invert the meaning to have a sensor for display sleeping:
```yaml
# Is display sleeping?
binary_sensor:
- name: ${device_name} Display sleeping
id: display_sleeping
platform: template
lambda: |-
return (id(current_page).state == "screensaver");
```
&nbsp;
### Button to upload `nspanel_blank.tft`
This can also be used for any other alternative tft file you might want to use frequently:
```yaml
button:
##### UPDATE TFT BLANK DISPLAY #####
- name: ${device_name} Update TFT display (blank)
platform: template
icon: mdi:file-sync
id: tft_update_blank
entity_category: config
on_press:
- logger.log: "Button pressed: Update TFT display (blank)"
- binary_sensor.template.publish:
id: nextion_init
state: false
- delay: 16ms
- lambda: |-
id(disp1)->set_tft_url("${nextion_update_blank_url}");
id(disp1).upload_tft();
```
You also must add the url for the alternative tft in your substitutions, like this:
```yaml
nextion_update_blank_url: "http://homeassistant.local:8123/local/nspanel/dev/nspanel_blank.tft"
```
&nbsp;
### Deep sleep
In this example, the panel will deep sleep for 7 hours, starting at 23:00:00 every day, for its maximum energy saving.
During this time, nothing will be shown, the screen will be off and therefore no response to touch, and the panel will be disconnected from Wi-Fi, but you can still wake-up the panel by pressing one of the hardware buttons (the left one in this example):
```yaml
# Define the wake-up button. Use pin 14 for left button or pin 27 for right button
deep_sleep:
wakeup_pin: 14
wakeup_pin_mode: INVERT_WAKEUP
time:
- id: !extend time_provider
on_time:
- hours: 23
minutes: 0
seconds: 0
then:
- deep_sleep.enter:
sleep_duration: 7h
```
You can find more ideas around this on [#955](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/955).
&nbsp;
### Enforce time zone
Until v3.4 (including), the time was coming from Home Assistant with it's timezone, so the Blueprint was sending the info with no transformation, to the panel.
From v4.0, the time reference still coming from HA (or optionally from a time server), but is calculated in ESPHome, which will try to detect the timezone from the server.
If your system is not showing the time in the correct timezone, it's probabily ESPHome not succeeding on finding your time zone.
You can easily force a timezone by adding this to your ESPHome settings:
```yaml
time:
- id: !extend time_provider
timezone: "America/Cancun"
```
&nbsp;
### Compiling ESPHome on lower powered machines
For systems with lower CPU or memory capabilities, like an RPi 3 or systems with less than 2GB of RAM, this could help preventing errors caused by lack of resources when compiling ESPHome firmware.
More datails on the [ESPHome docs](https://esphome.io/changelog/2022.11.0.html#running-esphome-on-lower-powered-machines).
```yaml
# Limit the amount of resources used for compiling
esphome:
compile_process_limit: 1
```
&nbsp;
### Sleep & Wake-up buttons
There are several ways to wake-up or put your panel to sleep, but in this example we tried a simple approach by adding two buttons (you can implement only one of those if you want):
```yaml
button:
# Adds a button to put the panel to sleep
- name: ${device_name} Sleep
id: force_sleep
platform: template
icon: mdi:sleep
on_press:
then:
- logger.log: Button Sleep pressed
- lambda: |-
if (id(current_page).state != "screensaver") id(disp1).goto_page("screensaver");
# Adds a button to wake-up the panel (similar to the existing service)
- name: ${device_name} Wake-up
id: force_wake_up
platform: template
icon: mdi:alarm
on_press:
then:
- logger.log: Button Wake-up pressed
- lambda: |-
if (id(current_page).state == "screensaver") id(disp1).goto_page(id(wakeup_page_name).state.c_str());
// id(timer_page).execute(id(wakeup_page_name).state.c_str()); // enable this if you want page timeout to be reset
id(timer_sleep).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_sleep).state));
id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state));
```
&nbsp;
### Set display as a light
You can set your display as a light in Home Assistant, so you can control the brightness and turn on/off just like any other light, and even use this in your automation to control when your panel is on with the same automation you use for your lights:
```yaml
light:
# Add the display as a light in Home Assistant
- name: ${device_name} Display
id: display_light
icon: mdi:tablet-dashboard
platform: monochromatic
output: display_output
default_transition_length: 0s
on_turn_on:
then:
- lambda: |-
ESP_LOGD("light.display_light", "Turn-on");
if (current_page->state == "screensaver") disp1->goto_page(wakeup_page_name->state.c_str());
timer_reset_all->execute(wakeup_page_name->state.c_str());
on_turn_off:
then:
- lambda: |-
ESP_LOGD("light.display_light", "Turn-off");
disp1->goto_page("screensaver");
output:
# Output required by `display_light` to send the commands to Nextion
- id: display_output
platform: template
type: float
write_action:
- lambda: |-
ESP_LOGV("output.display_output", "state: %f", state);
uint8_t current_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
ESP_LOGV("output.display_output", "current_brightness: %i%%", current_brightness);
set_brightness->execute(current_brightness);
script:
# Updates the existing `page_changed` script to update the `display_light` status when a page changes
- id: !extend page_changed
then:
- lambda: |-
ESP_LOGD("script.page_changed(custom)", "page: %s", page.c_str());
ESP_LOGV("script.page_changed(custom)", "is_on(): %s", display_light->current_values.is_on() ? "True" : "False");
if (page == "screensaver" and display_light->current_values.is_on()) {
auto call = display_light->turn_off();
call.perform();
} else if (page != "screensaver" and (not display_light->current_values.is_on())) {
auto call = display_light->turn_on();
call.perform();
}
# Updates the existing `set_brightness` script to update the `display_light` status when a new brightness level is set
- id: !extend set_brightness
then:
- lambda: |-
ESP_LOGD("script.set_brightness(custom)", "brightness: %i%%", brightness);
uint8_t current_brightness = int(round(display_light->current_values.is_on() ? (display_light->current_values.get_brightness() * 100.0f) : 0.0));
ESP_LOGV("script.set_brightness(custom)", "current_brightness: %i%%", current_brightness);
if (brightness != current_brightness) {
if (current_page->state != "screensaver" and brightness > 0) {
auto call = display_light->turn_on();
call.set_brightness(static_cast<float>(id(display_last_brightness)) / 100.0f);
call.perform();
} else if (display_light->current_values.is_on()) {
auto call = display_light->turn_off();
call.set_brightness(0);
call.perform();
}
}
```
&nbsp;
### Scheduled actions
Although ESPHome doesn't have a Scheduler component, it is possible to use the timer to schedule actions and this is entirely managed in the device, so it will work even if Home Assistant and/or the Wi-Fi are unavailable.
Following some examples:
#### Scheduled relay
```yaml
# Scheduled relay
time:
- id: !extend time_provider
on_time:
- hours: 7
minutes: 30
seconds: 0
then:
- switch.turn_on: relay_1
- hours: 12
minutes: 15
seconds: 0
then:
- switch.turn_off: relay_1
- hours: 19
minutes: 0
seconds: 0
then:
- switch.turn_on: relay_1
- hours: 23
minutes: 30
seconds: 0
then:
- switch.turn_off: relay_1
```
#### Scheduled climate
> This requires add-on climate to be installed
```yaml
# Scheduled climate
time:
- id: !extend time_provider
on_time:
- hours: 7
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 22°C
- hours: 19
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 20°C
- hours: 23
minutes: 0
seconds: 0
then:
- climate.control:
id: thermostat_embedded
mode: auto
target_temperature: 18°C
```
&nbsp;
### Framework `esp-idf`
> When switching from `arduino` to `esp-idf`, make sure to update the device with a serial cable as the partition table is different between the two frameworks as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table.
The `arduino` protocol still more popular and therefore more components are available, but as `esp-idf` is maintained by EspressIF and is kept updated, more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities, like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/).
This project uses `arduino` as default framework. The advanced package changes it to `esp-idf`. In any case, you can overlap the settings with this customization.
For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32).
```yaml
# Change framework to `esp-idf`
esp32:
framework:
type: esp-idf
```
&nbsp;
### Bluetooth proxy
> The [ESP32 Platform](#framework-esp-idf) component should be configured to use the `esp-idf` framework, as the `arduino` framework uses significantly more memory and performs poorly with the Bluetooth proxy enabled.
```yaml
# Enable Bluetooth proxy
bluetooth_proxy:
# Set Wi-Fi power save mode to "LIGHT" as required for Bluetooth on ESP32
wifi:
power_save_mode: LIGHT
```
&nbsp;
### Logger via UART
By default, the logging via hardware UART is disable in this project. You can enable it by setting the baud rate accordingly to your interface:
```yaml
# Enable hardware UART serial logging
logger:
baud_rate: 115200
```
&nbsp;
### Climate custom presets
```yaml
# Add custom presets to your climate (heat in this example)
climate:
- id: !extend thermostat_embedded
default_preset: "Home"
preset:
- name: "Off"
default_target_temperature_low: ${temp_min} ${temp_units}
mode: "off"
- name: Home
default_target_temperature_low: 21 ${temp_units}
mode: "heat"
- name: Away
default_target_temperature_low: 16.5 ${temp_units}
mode: "heat"
- name: Sleep
default_target_temperature_low: 17.5 ${temp_units}
mode: "heat"
```

View File

@@ -0,0 +1,29 @@
A number of different things needs to be setup, if they are either not setup or setup incorrectly the NSPanel will stay on Initializing.<br>
![boot](https://user-images.githubusercontent.com/123868814/215597698-b89eb275-6c67-480a-a9d5-623ab17bee1b.png)
<br><br>
#### 1. Flashed ESPHome
Make sure you have installed the ESPHome config onto the NSPanel<br>
<br>
#### 2. ESPHome Name
The device_name in ESPHome must only use lowercase letters, numbers or underscore (\_). If you use hyphens (-) then it will 100% not work.<br>
![Screenshot 2023-01-30 212555](https://user-images.githubusercontent.com/123868814/215598710-af41f2f6-7184-4469-9e45-a91504803722.png)<br>
<br>
#### 3. NSPanel added to Home Assistant
You must add the ESPHome integration in Home Assistant for each NSPanel
![HAESPHomeIntegration](https://user-images.githubusercontent.com/123868814/215600125-a9e8cb72-17b3-4517-8132-bb3c5da5a50a.png)<br>
<br>
#### 4. Blueprint installed and Automation deployed
Make sure the blueprint is installed.<br>
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)<br>
![Screenshot 2023-01-30 213511](https://user-images.githubusercontent.com/123868814/215600277-4c66bc36-91d5-40c9-9d81-21bd8be4b114.png)
Make sure you have created an automation for the NSPanel and that the **ESP Node Name** matches the name from ESPHome exactly
![Screenshot 2023-01-30 214156](https://user-images.githubusercontent.com/123868814/215601843-bb5c31f7-6827-4c95-ac01-6b94e6dfdff4.png)
<br><br><br>
Once these steps are complete the display should connect after a short delay

322
docs/en/howto.md Normal file
View File

@@ -0,0 +1,322 @@
In this post we will collect all the important things about different topics that we notice over time.&nbsp;
> ### _**NOTE! If you notice something during the configuration or you had some problem and could solve it, it would be great for us and everyone else in the community if you share your knowledge with us. You can write me a short message and I will include it in this post.
&nbsp;
> ### IMPORTANT! If you have a problem with the setup or a feature and open an _**"Issue on Github "**_, please describe your problem as detailed as possible. Pictures can also help here.
&nbsp;
> ### IMPORTANT! When you open an _**"Issue "**_, follow the instructions bitterly see here [How to create "Issues"](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-things-you-should-know#1-how-to-create-issues-when-I-have-a-problem).
&nbsp;
&nbsp;
------
&nbsp;
# Contents:
1. [How do I create "Issues" when I have a problem ](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#1-how-do-I-create-issues-when-I-have-a-problem)
2. [Update Blueprint](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#2-update-blueprint)
3. [Update ESPHome](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#3-update-esphome)
4. [Update TFT](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#4-update-tft)
5. Manual TFT upload via local HA (coming soon)
6. Upload TFT error and solution (coming soon)
7. [Notification via HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#7-notification-via-ha)
8. [Climate control with relays](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#8-climate-control-with-relays)
9. [Display internal switches as lamp in HA](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#9-display-internal-switches-as-lamp-in-ha)
10. Quick navigation (coming soon)
11. [Call certain pages directly](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#11-call-certain-pages-directly)
12. [Play RTTTL Sound](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#12-play-rtttl-sound)
13. Advanced functions and automations (coming soon)
14. [Start automations via Input_Boolean](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-HowTo---All-important-thing-you-should-know#14-start-automations-via-input_boolean)
&nbsp;
***
&nbsp;
## 1. How to create "issues" when I have a problem
> _**To be able to solve your problem, it is important for us to have as much information as possible**_.
* Issues can be created in DE or EN.
* Describe your problem as detailed as possible.
* Please write your ESPHome and Home Assistant version.
* Please go to your automation and then to the "3 dots" and then to _**Edit as YAML**_. Copy the complete code and attach it to the ticket
* An important "helper" for solving problems is the trace of an automation. You can find the trace under _**Settings --> Automations & Scenes --> your NSPanel automation --> Traces (top right)**_
> TRACES! Please execute again what does not work and open the trace immediately afterwards. Often you have to open the trace after the reboot too. During the start up, most things are loaded.
> IMPORTANT! in the trace you can see by the _**"orange "**_ lines which way the automation has gone. Please tell us this path. Also, please take one or more screenshots and add them to your ticket. Especially important for us is where the _**"Orange "**_ line ends, because most of the time this is also where the problem is.
> IMPORTANT! When you have opened the trace, there is a _**"timestamp "**_ at the top. It is important that you select the correct timestamp.
### Example trace after reboot:
![Bildschirmfoto 2022-11-27 um 14 54 58](https://user-images.githubusercontent.com/41958506/204139082-70d3a8d1-1c82-43cb-88f2-573f2e276a48.png)
### Example automations Blueprint:
```
alias: YYXYYXYYX - NSPanel Configuration
description: ""
use_blueprint:
path: nspanel_configuration.yaml
input:
nspanel_name: nspanel_dev
language: DE
sync_value_ha: select_no
sync_slider_ha: select_no
weather: AccuWeather
accuweather: home_wetter
outdoortemp: sensor.terrasse_garage_motion_sensor_temperature
humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity
hotwatertemp: sensor.hotwater_temp
hotwatercharge: switch.charge
heatingsystemflame: binary_sensor.flamestatus
climate: climate.nspanel_buro
left_button_entity: light.haustur_spot_2
right_button_entity: light.haustur_spot_1
entity01: light.buro_sideboard
entity01_name: Sideboard
entity02: cover.kuche_rollo
entity02_name: Küche Rollo
entity03: switch.buro_dart_beleuchtung
entity03_name: Dart Licht
delay: 2
right_button_name: Test 1
left_button_name: Test 2
```
------
## 2. Update Blueprint
>IMPORTANT: To install a new version of the NSPanel, the Blueprint, ESPHome and the TFT must be updated!
1. In Home Assistant, go to Settings > Automation & Scenes, select the tab Blueprints and find the blueprint named "NSPanel Configuration"
2. Click the 3-dot menu and select "Re-import blueprint":<br>![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/afb433e8-f29c-4b3f-8d6b-16a12b181422)
3. Click "Re-import" button:<br>![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/1db36411-e5a4-4cef-bcef-575a08019a67)
4. Reload automations or restart Home Assistant.
5. The new Blueprint is now available. Settings that have already been made are adopted.
6. Please review the blueprint settings (under Automations tab) for new settings available with the new version.
------
## 3. Update ESPHome
***IMPORTANT:***
- *To install a new version of the NSPanel, the Blueprint, ESPHome and the TFT must be updated!*
- *These instructions are for updating a panel where an older version of these files are already installed.*
To flash your panel with an updated version from this project, go to the ESPHome dashboard (in your Home Assistant) and find the device you want to update. Then click the 3-dot menu and select the option "Validate":
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/e393ced5-78d4-475a-8630-893c05734f5d)
The system will go thru all the settings, combining your entries in "substitutions" and the ESPHome file(s) from the GitHub repository and validate the final setup. It might take some time.
If everything goes well, you will see a green check mark in the top of the dialog window. When you get that, you can click "Install":
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/bc67533b-4f2e-4034-8e7e-34063a26f1c3)
As your panel is probably already connected to the Wi-Fi, you may select to install "Wirelessly", as it is much easier and you don't have to unassemble your panel.
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/c9b53549-c78a-4a02-bcde-31582905d0c4)
The new firmware will be built and then flashed to your panel, which will restart at the end of this process and start sending logs again:
![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/e63dcb4a-ef74-4665-9897-455e02950964)
------
## 4. Update TFT
>IMPORTANT: To install a new version of the NSPanel, the Blueprint, ESPHome and the TFT must be updated!
The display can be updated via the UI:
1. Go to ***Settings --> Devices & Services --> Integrations*** , select the display under the ESPHome integration.
2. Press the switch "Update TFT Display" under Configuration.
3. The display starts the update process and then restarts.
![DisplayUpdate](./(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/DisplayUpdate.PNG)
------
## 5. Manual TFT upload via local HA
coming soon
------
## 6. Upload TFT error and solution
coming soon
------
## 7. Notification via HA
To show a notification on the NSPAnel, the following service call can be used:
```
service: esphome.panelname_notification_show
data:
label: Example text
text: Example text
```
To clear any notifications, the following service call can be used:
```
service: esphome.panelname_notification_clear
data: {}
```
To use the notifications in an automation, again simply use the service call as shown in the example below:
```
description: ""
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.motion_detector
to: "on"
condition: []
action:
- service: esphome.panelname_notification_show
data:
label: Motion Detected
text: Example for a Notification on the Panel Screen
```
------
##
------
## 8. Climate control with Relays
> Attention!! Although these instructions are still valid, since v4.0 there is a better way to setup a climate control using the panel's relays: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Add%E2%80%90on:-Climate
In order to use the NSPanel to control a radiator or underfloor heating, at least one Generic Thermostat must be created in the HA. More information can be found here: https://www.home-assistant.io/integrations/generic_thermostat/
Example configuration Generic Thermostat:
```
climate:
- platform: generic_thermostat
name: Study
heater: switch.study_heater ## Wenn das NSPanel Relays den Heizkreis Regler schaltet, kann dieses hier definiert werden
target_sensor: sensor.study_temperature ## Hier kann der NSPanel Sensor verwendet werden
min_temp: 15
max_temp: 21
ac_mode: false
target_temp: 17
cold_tolerance: 0.3
hot_tolerance: 0
min_cycle_duration:
seconds: 5
keep_alive:
minutes: 3
initial_hvac_mode: "off"
away_temp: 16
precision: 0.1
```
Afterwards, the climate.entity must be assigned accordingly in the panel configuration:![climate](./(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/climate.PNG)
------
## 9. Display internal switches as lamp in HA
In the world of Home Assistant, the relay in the NSPanel is a switch. And although this is generally correct, these relays are often used for a lamp or a fan, for example. If now e.g. a lamp is switched directly with the relay, it is desirable that also in the HA the switch is displayed as a lamp or that this "lamp" should be added to a light group.
With the Switch as X integration, these switches can be converted into the entity types that best suit the use case: https://www.home-assistant.io/integrations/switch_as_x/
![Swichasx](./(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Swichasx.png)
------
## 10. Quick Navigation
coming soon
------
## 11. Call certain pages directly
Sometimes it can make sense to automatically show a certain side of the display. To do this, the following service can be used:
```
service: esphome.nspanel_send_command_printf
data:
cmd: page home
```
For example, to directly display button page 2, "home" must be replaced with "buttonpage02".
The following pages are currently available:
![img](./assets/Bildschirmfoto_2023-03-21_um_00.24.01.png)
------
## 12. Play RTTTL Sound
HA can send a RTTTL to the NSPanel, custom melodies are possible.
The use this function, the following service is called: ***nspanel_play_rtttl***
You can find many RTTTL strings on the web, the important thing is that they must start with the name and then a colon.
Here is an example:
```
The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6
```
![image-20230320222454441](./assets/image-20230320222454441.png)
More information: https://esphome.io/components/rtttl.html#common-beeps
More songs: https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
------
## 13. Advanced functions and automations
coming soon
------
## 14. Start Automations via Input_Boolean
Although the NSPanel can execute scripts directly over the buttons, there is also the possibility of starting automations directly by the means of Input_Boolean.
For this, a helper must first be created under ***Settings --> Devices&Services --> Helpers***, see here:
https://www.home-assistant.io/integrations/input_boolean/![Toggle1](./(EN)-HowTo---All-important-thing-you-should-know.assets/Toggle1.PNG)
Now add the created Input_Boolean as a trigger in the desired automation under State:![Toggle2](./(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle2.PNG)
In the last step, assign the trigger to a button in the Panel Config:![Toggle3](./(DE)-HowTo---Alle-wichtigen-Dinge-die-man-wissen-sollte.assets/Toggle3.PNG)
------

166
docs/en/install.md Normal file
View File

@@ -0,0 +1,166 @@
This section covers the initial configuration. All important steps for installation and setup of ESPHome and the Blueprint are described here.&nbsp;
**_Step by Step [Setup Video](https://www.youtube.com/watch?v=jpSTA_ILB8g)_**
&nbsp;
> _**ATTENTION! if you have already installed the version "nspanel-lovelace-ui" from joBr99 on your NSPanel, an [intermediate step](lovelace_ui.md) is necessary - otherwise it is not possible to install this or any other version.**_
&nbsp;
> _**NOTE! We are not EN native speakers, there may well be errors in translation or sentence structure. If something is wrong or unclear an "[Issue](/Blackymas/NSPanel_HA_Blueprint/issues)" can be opened. If you want to help us, feel free to propose a change directly in GitHub or please get in contact with us.**_
&nbsp;
&nbsp;
***
&nbsp;
# Content:
1. [Short version of the setup of Esphome and Blueprint](install.md#1-short-version-of-the-setup-of-esphome-and-blueprint)
2. [Version "nspanel-lovelace-ui" by joBr99 was previously installed](install.md#2-version-nspanel-lovelace-ui-by-jobr99-was-previously-installed)
3. [Advanced configuration for all ESPHome and Home Assistant professionals](install.md#3-advanced-configuration-for-all-esphome-and-home-assistant-professionals)
4. [Step by Step Configuration and setup of ESPHome and Blueprint](install.md#4-step-by-step-configuration-and-setup-of-esphome-and-blueprint)
&nbsp;
***
&nbsp;
&nbsp;
## 1. Short version of the setup of Esphome and Blueprint
> _**(for those who already have experience with ESPhome and Home Assistant)**_
#### 1. First you have to install the Blueprint. For this please use the following link
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)
> It is also possible to copy the code from the file _**"nspnael_blueprint.yaml "**_ and paste it into HA.
> You can find instructions for this under [Using Automation Blueprints](https://www.home-assistant.io/docs/automation/using_blueprints/) and [Automation blueprint tutorial](https://www.home-assistant.io/docs/blueprint/tutorial/#create-the-blueprint-file)
#### 2. You have to download the file **_nspanel_us.tft_** or **_"nspanel_eu.tft"_** from Github
![Bildschirmfoto 2023-01-23 um 21 31 05](https://user-images.githubusercontent.com/41958506/214144182-e2a5f28e-e96d-4263-8c4b-b7fbcc6658e7.png)
#### 3. Upload the file to your **_Home Assistant Server_** in the **_www_** folder, see [Home Assistant HTTP](https://www.home-assistant.io/integrations/http/#hosting-files) 'Hosting Files' section for details.
![Bildschirmfoto 2023-01-23 um 21 33 20](https://user-images.githubusercontent.com/41958506/214144729-08fb5d3f-9255-4f57-9c6e-a5e33665e4df.png)
#### 4. In the next step you have to create a new ESP32 device in ESPHome
#### 5. When the new ESP32 device has been created, next click _**"Edit "**_ on the device you have just created to open the web editor. Now the following code must be copied and pasted.
> ❗ _**IMPORTANT!**_ The already existing code in the ESPHome file must be _**"COMPLETELY "**_ deleted and _**"REPLACED "**_ by the code below.
> ❗ _**IMPORTANT!**_ in the block _**"CHANGE ME "**_ all values _**(device_name, wifi_ssid, wifi_password, nextion_update_url )**_ in the _**" "**_ must be replaced by your own values. It is also possible to work here with _**"!secret "**_.
&nbsp;
### CODE:
```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"
nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.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 # Core package
# - advanced/esphome/nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
# - 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: 1s
esp32:
framework:
type: esp-idf
##### My customization - Start #####
##### My customization - End #####
```
⚠️ The following TFT files are available and can be replaced in your URL accordingly:
- [`nspanel_eu.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_eu.tft) (European layout)
- [`nspanel_us.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_us.tft) (US layout)
- [`nspanel_us_land.tft`](/Blackymas/NSPanel_HA_Blueprint/raw/main/nspanel_us_land.tft) (US layout - landscape orientation)
&nbsp;
#### 6. Now the NSPanel can be flashed with the new ESPHome code.
> How to flash the NSPanel you can see here: [HowTo - Flash NSPanel with ESPhome](https://www.youtube.com/watch?v=jpSTA_ILB8g)
#### 7. After the NSPanel is flashed, you can go to _**"Settings --> Devices & Services --> Add Integration"**_ to add your new device and finish setting it up.
#### 8. In the last step, only the TFT must be uploaded. To do this, open your new device in the ESPHome integration and activate the item _**"Update TFT display "**_ under _**"Configuration"**_. Now the current TFT file is loaded from local Home Assistant Server or GitHub and uploaded to your NSPanel. _**ATTENTION!**_ This process will take up to 30 minutes.
#### 9. Now the setup of ESPHome and NSPanel is completed.
#### 10. Now you can configure your NSPanel via the Blueprint. To do this, go to _**"Settings --> Automations & Scenes --> Templates --> NSPanel Configuration --> CREATE AUTOMATION"**_ and start with the setup of the NSPanel.
> _**NOTE!**_ In the blueprint, the field _**"NSPanel device"**_ is required. Although you can still save the automation without a device selected, it would be unusable without that information.
&nbsp;
&nbsp;
***
&nbsp;
&nbsp;
## 2. Version "nspanel-lovelace-ui" by joBr99 was previously installed
See [(EN) Common Issues | TFT Upload When nspanel lovelace ui has been installed](lovelace_ui.md)
&nbsp;
&nbsp;
***
&nbsp;
&nbsp;
## 3. Advanced configuration for all ESPHome and Home Assistant professionals
> _**ATTENTION!**_ Customizations and advanced mode are not supported by this project's team. Use this with caution and only when you know what you are doing.
Before you start customizing your system, we would like to invite you to share anything nice you achieve. You can always create a new [Pull Request](/Blackymas/NSPanel_HA_Blueprint/pulls) to `dev` branch and this will give a chance for other users with similar challenges to take advantage of your discoveries.
The simpler way to go "advanced" with ESPHome is to use "Customizations". We have a page specifically for that where, again, your contribution is very welcome: [Customization](customization.md)
If you want for some reason use a local copy of `nspanel_esphome.yaml`, you can copy the file from GitHub to you local file system and reference in your ESPHome settings like this:
```yaml
substitutions:
###### CHANGE ME START ######
device_name: office-workstation-panel
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us_land.tft"
##### CHANGE ME END #####
packages:
local_package: !include packages/nspanel_esphome.yaml
```
> Note that a sub-folder was used in the example above in order to avoid that file to be added as an additional device in your ESPHome dashboard. You can also have the file in the same folder, but with it's name starting with `.`, so ESPHome dashboard understands that file should be ignored when listing devices.
* Blueprint file _**"nspanel_blueprint.yaml "**_ can also be installed manually.
* There is also the possibility to upload the TFT file _**"nspanel_us.tft "**_ manually. The whole thing can also be combined with a _**"Folder Watcher "**_.
* additionally we provide the HMI files _**"nspanel_xx.HMI "**_ for the Nextion Editor to customize graphics and programming if needed.
&nbsp;
&nbsp;
***

18
docs/en/lovelace_ui.md Normal file
View File

@@ -0,0 +1,18 @@
> _**in the version "nspanel-lovelace-ui" from joBr99 are a few special features built in, which make it not so easy to flash a new version and TFT on the NSPanel. But since we already had this problem, we have of course already a solution for you ;)**_
### _**It is necessary to upload a "Blank TFT" file while "Lovelace ui" is still installed on the NSPanel.**_
> IMPORTANT! If you have already installed the NSPanel with my version, you must first fully install "Lovelace ui" again.
### The following steps are necessary:
1. download the file _**"nspanel_blank.tft"**_ from the folder _**custom_configuration**_.
2. now upload the TFT file _**"nspanel_blank.tft"**_ to the folder _**"www"**_ in Home Assistant
3. now go to the item _**"Developer tools --> Services"**_ and search there for the services
&nbsp;
_**"ESPHome: DEVICE_NAME_upload_tft"**_ --> (esphome.device_name_upload_tft)
4. under URL you have to enter the path to your file _**nspanel_blank.tft**_. This could look like this
_**"http://homeassistan.local:8123/local/nspanel_blank.tft"**_
5. now the TFT file should be played on the NSPanel. It may take a moment until it is ready
6. If everything worked, you should see only a QR code on the NSPanel.
7. now you can continue with the setup and configuration of my version. For this see [Short version of the setup of Esphome and Blueprint](intall.md#1-short-version-of-the-setup-of-esphome-and-blueprint)

69
docs/en/tft_upload.md Normal file
View File

@@ -0,0 +1,69 @@
> #### _**ATTENTION! if you have already installed the version "nspanel-lovelace-ui" from joBr99 on your NSPanel, an intermediate step is necessary - otherwise it is not possible to install this or any other version.**_
> See [Common Issues | TFT Upload when NSPanel Lovelace UI has been installed](howto.md)
<br>
> #### _**The previous method of having the NSPanel download the TFT directly from GitHub has been discontinued due to a large number of users experiencing slow or failed downloads. Please make sure you change to locally hosted tft file**_
There are a number of issues that can affect the upload of the TFT upload, these are not issues with the NSPanel HA Blueprint project but seem to be common to Nextion displays and ESPhome. Not all of the below causes affect all users however following instructions in each point have resolved
<br>In order of likelihood:
### Using a local source (Home Assistant)
This is our most common cause of issues and is the reason our instructions no longer point to downloading the TFT from GitHub, changing the nextion_update_url to host the TFT file on your home assistant resolves the majority of issues.
&nbsp;
### HTTP instead of HTTPS
While HTTPS may work for some users we have seen it cause a number of issues. Change your TFT file hosting and nextion_update_url to use http.
&nbsp;
### Remove customizations
Please try removing any customization you might have added to your panel. Specially `bluetooth_proxy` and `ble_tracker` consumes quite a lot of memory, competing with the uploading TFT engine, which also requires lots of memory from ESP.
&nbsp;
### Network issues
Check there are no issues with your network, bring your NSPanel and router closer together or try rebooting the router.
The issue we have seen with this is _connection refused_ or _connection reset_.
&nbsp;
### DNS
Related to point 2, please use IP address instead of DNS. e.g. use http://192.168.0.100:8123/local/nspanel.tft instead of http://homeassistant.local:8123/local/nspanel.tft
&nbsp;
### Check the file size by downloading to your computer
Use the same url provided to ESPHome into your browser (in your computer), e.g. http://192.168.0.100:8123/local/nspanel_eu.tft, and make sure you can download the file to your computer and the file have the same size as the one from GitHub.
&nbsp;
### Power cycle your panel
Cut the power supply off, wait a bit, and power on again. It usually helps when you already tried many other things.
If your panel is already installed in your wall, you probably can still power cycle using your power relay connected to that room.
&nbsp;
### Consider changing the framework
This project supports both `arduino` (ESPHome default) or `esp-idf` frameworks. Those have totally independently upload TFT engines, so changing the framework may cause a significant change.
In our experience, `esp-idf` have a better memory management and therefore is more efficient with uploading TFT, however the support to HTTPS is a bit better (although not indicated) with `arduino`.
You can set the framework you want by adding this to your ESPHome yaml:
#### ESP-IDF
```yaml
esp32:
framework:
type: esp-idf
```
#### Arduino
```yaml
esp32:
framework:
type: arduino
```
&nbsp;
### Flash your panel again
Remove all add-ons and non-essential customization, flash your panel again (you can do this over the air/wirelessly, although it is recommended to use serial when changing between frameworks), try to update the TFT, add the add-ons and removed customization back and then flash it again.
&nbsp;
### Try an alternative http service. There are many options available for free to run under you local Windows, MAC or Linux machine.
Just to name some:
- NGINX
- IIS
- Apache
- Xampp
- etc.

27
docs/en/weather.md Normal file
View File

@@ -0,0 +1,27 @@
## Expected configuration
#### In Home Assistant Automation
The integration should be Accuweather and you weather entity selected<br>
![Screenshot 2023-01-30 214603](https://user-images.githubusercontent.com/123868814/215602716-60d92287-943f-465b-aac7-8b47795ef608.png)<br>
<br>
#### Enable Accuweather forcasts
![Screenshot 2023-01-30 214638](https://user-images.githubusercontent.com/123868814/215602723-7732578b-3870-4c1a-baec-5ebee98b37ad.png)<br>
<br>
#### Confirm source in Developer Tools States
In developer tools the weather entity should have the attribute 'attribution: Data provided by AccuWeather'<br>
![Screenshot 2023-01-30 214739](https://user-images.githubusercontent.com/123868814/215602730-87093a5d-1a67-460d-9a9c-27a93371ea82.png)<br>
<br>
<br>
## If you are still having issues
Its likely you weather integrations are clashing. 1 method we have found to resolve this is to delete ALL weather integrations and just re add Accuweather - Be aware you will lose your existing weather integrations and any associated data / entities.
#### 1. Delete the Standard and AccuWeather integrations
#### 2. Add Accuweather & Enable forcasts
#### 3. Set the Weather entity in the Automation