Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.44k stars 258 forks source link

`Bug` Saving 1 preferences to flash... EVERY SECOND? #2242

Closed rehakf closed 1 month ago

rehakf commented 2 months ago

TFT Version

4.3.11

Firmware Version

4.3.11

Blueprint Version

4.3.9

Panel Model

EU

What is the bug?

Is saving preferences to flash every second necessary?

17:25:00 [D][esp32.preferences:114]: Saving 1 preferences to flash... ... 17:26:00 [D][esp32.preferences:114]: Saving 1 preferences to flash... ... 17:27:00 [D][esp32.preferences:114]: Saving 1 preferences to flash...

Steps to Reproduce

No response

Your Panel's YAML

No response

ESPHome Logs

No response

Home Assistant Logs

INFO Starting log output from 10.0.0.2 using esphome API

INFO Successfully connected to nspanel-m @ 10.0.0.2 in 7.263s

INFO Successful handshake with nspanel-m @ 10.0.0.2 in 0.130s

[17:11:08][I][app:100]: ESPHome version 2024.7.3 compiled on Aug 26 2024, 17:03:44

[17:11:08][I][app:102]: Project esphome.NSPanel_HA_Blueprint version 4.3.11

[17:11:08][C][wifi:599]: WiFi:

[17:11:08][C][wifi:427]:   Local MAC: 48:E7:29:C6:1B:A8

[17:11:08][C][wifi:432]:   SSID: 'Internet_35'[redacted]

[17:11:08][C][wifi:435]:   IP Address: 10.0.0.2

[17:11:08][C][wifi:439]:   BSSID: D8:B6:B7:F5:11:C3[redacted]

[17:11:08][C][wifi:440]:   Hostname: 'nspanel-m'

[17:11:08][C][wifi:442]:   Signal strength: -70 dB ▂▄▆█

[17:11:08][C][wifi:446]:   Channel: 7

[17:11:08][C][wifi:447]:   Subnet: 255.255.255.0

[17:11:08][C][wifi:448]:   Gateway: 10.0.0.138

[17:11:08][C][wifi:449]:   DNS1: 10.0.0.138

[17:11:08][C][wifi:450]:   DNS2: 0.0.0.0

[17:11:08][C][logger:185]: Logger:

[17:11:08][C][logger:186]:   Level: DEBUG

[17:11:08][C][logger:188]:   Log Baud Rate: 0

[17:11:08][C][logger:189]:   Hardware UART: UART0

[17:11:08][C][uart.idf:159]: UART Bus 0:

[17:11:08][C][uart.idf:160]:   TX Pin: GPIO16

[17:11:08][C][uart.idf:161]:   RX Pin: GPIO17

[17:11:08][C][uart.idf:163]:   RX Buffer Size: 256

[17:11:08][C][uart.idf:165]:   Baud Rate: 115200 baud

[17:11:08][C][uart.idf:166]:   Data Bits: 8

[17:11:08][C][uart.idf:167]:   Parity: NONE

[17:11:08][C][uart.idf:168]:   Stop bits: 1

[17:11:08][C][ledc.output:176]: LEDC Output:

[17:11:08][C][ledc.output:177]:   Pin GPIO21

[17:11:08][C][ledc.output:178]:   LEDC Channel: 0

[17:11:08][C][ledc.output:179]:   PWM Frequency: 1000.0 Hz

[17:11:08][C][ledc.output:180]:   Phase angle: 0.0°

[17:11:08][C][ledc.output:181]:   Bit depth: 16

[17:11:09][C][template.binary_sensor:028]: Template Binary Sensor 'Nextion display'

[17:11:09][C][template.binary_sensor:028]:   Device Class: 'connectivity'

[17:11:09][C][template.number:050]: Template Number 'Display Brightness'

[17:11:09][C][template.number:050]:   Unit of Measurement: '%'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Display Brightness Dimdown'

[17:11:09][C][template.number:050]:   Unit of Measurement: '%'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Display Brightness Sleep'

[17:11:09][C][template.number:050]:   Unit of Measurement: '%'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Temperature Correction'

[17:11:09][C][template.number:050]:   Unit of Measurement: '°C'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Timeout Page'

[17:11:09][C][template.number:050]:   Icon: 'mdi:timer'

[17:11:09][C][template.number:050]:   Unit of Measurement: 's'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Timeout Dimming'

[17:11:09][C][template.number:050]:   Icon: 'mdi:timer'

[17:11:09][C][template.number:050]:   Unit of Measurement: 's'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.number:050]: Template Number 'Timeout Sleep'

[17:11:09][C][template.number:050]:   Icon: 'mdi:timer'

[17:11:09][C][template.number:050]:   Unit of Measurement: 's'

[17:11:09][C][template.number:051]:   Optimistic: YES

[17:11:09][C][template.number:052]:   Update Interval: 60.0s

[17:11:09][C][template.select:065]: Template Select 'Baud rate'

[17:11:09][C][template.select:065]:   Icon: 'mdi:swap-horizontal'

[17:11:09][C][template.select:066]:   Update Interval: 60.0s

[17:11:09][C][template.select:069]:   Optimistic: YES

[17:11:09][C][template.select:070]:   Initial Option: 115200

[17:11:09][C][template.select:071]:   Restore Value: YES

[17:11:09][C][template.select:065]: Template Select 'Wake-up page'

[17:11:09][C][template.select:065]:   Icon: 'mdi:page-next-outline'

[17:11:09][C][template.select:066]:   Update Interval: 60.0s

[17:11:09][C][template.select:069]:   Optimistic: YES

[17:11:09][C][template.select:070]:   Initial Option: home

[17:11:09][C][template.select:071]:   Restore Value: YES

[17:11:09][C][template.select:065]: Template Select 'Update TFT display - Model'

[17:11:09][C][template.select:065]:   Icon: 'mdi:file-sync'

[17:11:09][C][template.select:066]:   Update Interval: 60.0s

[17:11:09][C][template.select:069]:   Optimistic: YES

[17:11:09][C][template.select:070]:   Initial Option: NSPanel EU

[17:11:09][C][template.select:071]:   Restore Value: YES

[17:11:09][C][template.select:065]: Template Select 'Update TFT display - Baud rate'

[17:11:09][C][template.select:065]:   Icon: 'mdi:swap-horizontal'

[17:11:09][C][template.select:066]:   Update Interval: 60.0s

[17:11:09][C][template.select:069]:   Optimistic: YES

[17:11:09][C][template.select:070]:   Initial Option: 921600

[17:11:09][C][template.select:071]:   Restore Value: YES

[17:11:09][C][switch.gpio:068]: GPIO Switch 'Nextion display - Power'

[17:11:09][C][switch.gpio:091]:   Restore Mode: always ON

[17:11:09][C][switch.gpio:031]:   Pin: GPIO4

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Device Name'

[17:11:09][C][template.text_sensor:020]:   Icon: 'mdi:identifier'

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Detailed Entity'

[17:11:09][C][template.text_sensor:020]:   Icon: 'mdi:tablet-dashboard'

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Notification Label'

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Notification Text'

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Version Blueprint'

[17:11:09][C][template.text_sensor:020]:   Icon: 'mdi:tag-text-outline'

[17:11:09][C][template.text_sensor:020]: Template Sensor 'Version ESPHome'

[17:11:09][C][template.text_sensor:020]:   Icon: 'mdi:tag-text-outline'

[17:11:09][C][template.sensor:022]: Template Sensor 'Blueprint'

[17:11:09][C][template.sensor:022]:   State Class: ''

[17:11:09][C][template.sensor:022]:   Unit of Measurement: '%'

[17:11:09][C][template.sensor:022]:   Accuracy Decimals: 1

[17:11:09][C][template.sensor:022]:   Icon: 'mdi:link-variant'

[17:11:09][C][template.sensor:023]:   Update Interval: 60.0s

[17:11:09][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Left Button'

[17:11:09][C][gpio.binary_sensor:016]:   Pin: GPIO14

[17:11:09][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Right Button'

[17:11:09][C][gpio.binary_sensor:016]:   Pin: GPIO27

[17:11:09][C][switch.gpio:068]: GPIO Switch 'Relay 1'

[17:11:09][C][switch.gpio:091]:   Restore Mode: restore defaults to OFF

[17:11:09][C][switch.gpio:031]:   Pin: GPIO22

[17:11:09][C][switch.gpio:033]:   Interlocks:

[17:11:09][C][switch.gpio:037]:     Relay 2

[17:11:09][C][switch.gpio:068]: GPIO Switch 'Relay 2'

[17:11:09][C][switch.gpio:091]:   Restore Mode: restore defaults to OFF

[17:11:09][C][switch.gpio:031]:   Pin: GPIO19

[17:11:09][C][switch.gpio:033]:   Interlocks:

[17:11:09][C][switch.gpio:037]:     Relay 1

[17:11:09][C][template.switch:068]: Template Switch 'Notification unread'

[17:11:09][C][template.switch:091]:   Restore Mode: always OFF

[17:11:09][C][template.switch:057]:   Optimistic: YES

[17:11:09][C][template.switch:068]: Template Switch 'Notification sound'

[17:11:09][C][template.switch:091]:   Restore Mode: restore defaults to OFF

[17:11:09][C][template.switch:057]:   Optimistic: YES

[17:11:09][C][template.switch:068]: Template Switch 'Relay 0 (dummy)'

[17:11:09][C][template.switch:091]:   Restore Mode: always OFF

[17:11:09][C][template.switch:057]:   Optimistic: YES

[17:11:09][C][psram:020]: PSRAM:

[17:11:09][C][psram:021]:   Available: YES

[17:11:09][C][psram:024]:   Size: 2036 KB

[17:11:09][C][rtttl:029]: Rtttl

[17:11:09][C][nextion:128]: Nextion:

[17:11:09][C][nextion:129]:   Device Model:     NX4832F035_011C

[17:11:09][C][nextion:130]:   Firmware Version: 72

[17:11:09][C][nextion:131]:   Serial Number:    0EB13401B89C6437

[17:11:09][C][nextion:132]:   Flash Size:       16777216

[17:11:09][C][nextion:133]:   Wake On Touch:    YES

[17:11:09][C][nextion:134]:   Exit reparse:     YES

[17:11:09][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'

[17:11:09][C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'

[17:11:09][C][restart.button:017]: Restart Button 'Restart'

[17:11:09][C][restart.button:017]:   Icon: 'mdi:restart'

[17:11:09][C][adc:097]: ADC Sensor 'ntc_source'

[17:11:09][C][adc:097]:   Device Class: 'voltage'

[17:11:09][C][adc:097]:   State Class: 'measurement'

[17:11:09][C][adc:097]:   Unit of Measurement: 'V'

[17:11:09][C][adc:097]:   Accuracy Decimals: 2

[17:11:09][C][adc:107]:   Pin: GPIO38

[17:11:10][C][adc:122]:   Attenuation: 12db

[17:11:10][C][adc:141]:   Samples: 4

[17:11:10][C][adc:142]:   Update Interval: 10.0s

[17:11:10][C][resistance:010]: Resistance Sensor 'resistance_sensor'

[17:11:10][C][resistance:010]:   State Class: 'measurement'

[17:11:10][C][resistance:010]:   Unit of Measurement: 'Ω'

[17:11:10][C][resistance:010]:   Accuracy Decimals: 1

[17:11:10][C][resistance:010]:   Icon: 'mdi:flash'

[17:11:10][C][resistance:011]:   Configuration: DOWNSTREAM

[17:11:10][C][resistance:012]:   Resistor: 11200.00Ω

[17:11:10][C][resistance:013]:   Reference Voltage: 3.3V

[17:11:10][C][ntc:014]: NTC Sensor 'Temperature'

[17:11:10][C][ntc:014]:   Device Class: 'temperature'

[17:11:10][C][ntc:014]:   State Class: 'measurement'

[17:11:10][C][ntc:014]:   Unit of Measurement: '°C'

[17:11:10][C][ntc:014]:   Accuracy Decimals: 1

[17:11:10][C][thermostat.climate:1290]: Thermostat 'Thermostat'

[17:11:10][C][thermostat.climate:1293]:   Minimum Set Point Differential: 0.5°C

[17:11:10][C][thermostat.climate:1295]:   Start-up Delay Enabled: NO

[17:11:10][C][thermostat.climate:1297]:   Cooling Parameters:

[17:11:10][C][thermostat.climate:1298]:     Deadband: 0.5°C

[17:11:10][C][thermostat.climate:1299]:     Overrun: 0.5°C

[17:11:10][C][thermostat.climate:1306]:     Minimum Off Time: 300s

[17:11:10][C][thermostat.climate:1308]:     Minimum Run Time: 300s

[17:11:10][C][thermostat.climate:1311]:   Heating Parameters:

[17:11:10][C][thermostat.climate:1312]:     Deadband: 0.5°C

[17:11:10][C][thermostat.climate:1313]:     Overrun: 0.5°C

[17:11:10][C][thermostat.climate:1320]:     Minimum Off Time: 300s

[17:11:10][C][thermostat.climate:1322]:     Minimum Run Time: 300s

[17:11:10][C][thermostat.climate:1337]:   Minimum Idle Time: 30s

[17:11:10][C][thermostat.climate:1338]:   Supports AUTO: NO

[17:11:10][C][thermostat.climate:1339]:   Supports HEAT/COOL: YES

[17:11:10][C][thermostat.climate:1340]:   Supports COOL: YES

[17:11:10][C][thermostat.climate:1341]:   Supports DRY: NO

[17:11:10][C][thermostat.climate:1342]:   Supports FAN_ONLY: NO

[17:11:10][C][thermostat.climate:1344]:   Supports FAN_ONLY_ACTION_USES_FAN_MODE_TIMER: NO

[17:11:10][C][thermostat.climate:1345]:   Supports FAN_ONLY_COOLING: NO

[17:11:10][C][thermostat.climate:1347]:   Supports FAN_WITH_COOLING: NO

[17:11:10][C][thermostat.climate:1350]:   Supports FAN_WITH_HEATING: NO

[17:11:10][C][thermostat.climate:1352]:   Supports HEAT: YES

[17:11:10][C][thermostat.climate:1353]:   Supports FAN MODE ON: NO

[17:11:10][C][thermostat.climate:1354]:   Supports FAN MODE OFF: NO

[17:11:10][C][thermostat.climate:1355]:   Supports FAN MODE AUTO: NO

[17:11:10][C][thermostat.climate:1356]:   Supports FAN MODE LOW: NO

[17:11:10][C][thermostat.climate:1357]:   Supports FAN MODE MEDIUM: NO

[17:11:10][C][thermostat.climate:1358]:   Supports FAN MODE HIGH: NO

[17:11:10][C][thermostat.climate:1359]:   Supports FAN MODE MIDDLE: NO

[17:11:10][C][thermostat.climate:1360]:   Supports FAN MODE FOCUS: NO

[17:11:10][C][thermostat.climate:1361]:   Supports FAN MODE DIFFUSE: NO

[17:11:10][C][thermostat.climate:1362]:   Supports FAN MODE QUIET: NO

[17:11:10][C][thermostat.climate:1363]:   Supports SWING MODE BOTH: NO

[17:11:10][C][thermostat.climate:1364]:   Supports SWING MODE OFF: NO

[17:11:10][C][thermostat.climate:1365]:   Supports SWING MODE HORIZONTAL: NO

[17:11:10][C][thermostat.climate:1366]:   Supports SWING MODE VERTICAL: NO

[17:11:10][C][thermostat.climate:1367]:   Supports TWO SET POINTS: YES

[17:11:10][C][thermostat.climate:1369]:   Supported PRESETS: 

[17:11:10][C][thermostat.climate:1373]:     Supports HOME: YES

[17:11:10][C][thermostat.climate:959]:       HOME Is Default: NO

[17:11:10][C][thermostat.climate:964]:       HOME Default Target Temperature Low: 18.0°C

[17:11:10][C][thermostat.climate:972]:       HOME Default Target Temperature High: 24.0°C

[17:11:10][C][thermostat.climate:980]:       HOME Default Mode: HEAT_COOL

[17:11:10][C][thermostat.climate:1377]:   Supported CUSTOM PRESETS: 

[17:11:10][C][thermostat.climate:1381]:     Supports Off: YES

[17:11:10][C][thermostat.climate:959]:       Off Is Default: YES

[17:11:10][C][thermostat.climate:964]:       Off Default Target Temperature Low: 18.0°C

[17:11:10][C][thermostat.climate:972]:       Off Default Target Temperature High: 24.0°C

[17:11:10][C][thermostat.climate:980]:       Off Default Mode: OFF

[17:11:10][C][thermostat.climate:1385]:   On boot, restore from: MEMORY

[17:11:10][C][homeassistant.time:010]: Home Assistant Time:

[17:11:10][C][homeassistant.time:011]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'

[17:11:10][D][sensor:094]: 'ntc_source': Sending state 1.51950 V with 2 decimals of accuracy

[17:11:10][D][resistance:039]: 'resistance_sensor' - Resistance 9558.2Ω

[17:11:10][D][sensor:094]: 'resistance_sensor': Sending state 9558.21484 Ω with 1 decimals of accuracy

[17:11:10][D][ntc:026]: 'Temperature' - Temperature: 26.0°C

[17:11:10][D][sensor:094]: 'Temperature': Sending state 27.02033 °C with 1 decimals of accuracy

[17:11:10][D][climate:396]: 'Thermostat' - Sending state:

[17:11:10][D][climate:399]:   Mode: OFF

[17:11:10][D][climate:401]:   Action: OFF

[17:11:10][D][climate:419]:   Current Temperature: 27.02°C

[17:11:10][D][climate:423]:   Target Temperature: Low: 7.00°C High: 35.00°C

[17:11:10][C][mdns:116]: mDNS:

[17:11:10][C][mdns:117]:   Hostname: nspanel-m

[17:11:10][C][esphome.ota:073]: Over-The-Air updates:

[17:11:10][C][esphome.ota:074]:   Address: nspanel-m.local:3232

[17:11:10][C][esphome.ota:075]:   Version: 2

[17:11:10][C][esphome.ota:078]:   Password configured

[17:11:10][C][safe_mode:018]: Safe Mode:

[17:11:10][C][safe_mode:020]:   Boot considered successful after 60 seconds

[17:11:10][C][safe_mode:021]:   Invoke after 3 boot attempts

[17:11:10][C][safe_mode:023]:   Remain in safe mode for 180 seconds

[17:11:10][C][api:139]: API Server:

[17:11:10][C][api:140]:   Address: nspanel-m.local:6053

[17:11:10][C][api:142]:   Using noise encryption: YES

[17:11:10][C][wifi_signal.sensor:009]: WiFi Signal 'RSSI'

[17:11:10][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'

[17:11:10][C][wifi_signal.sensor:009]:   State Class: 'measurement'

[17:11:10][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'

[17:11:10][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0

[17:11:10][C][wifi_signal.sensor:009]:   Icon: 'mdi:wifi'

[17:11:12][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:12][D][script.boot_progress:2098]: Progress: 25%

[17:11:12][D][script.boot_log:2048]: Sending display settings

[17:11:12][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:12][D][script.boot_progress:2098]: Progress: 30%

[17:11:12][D][script.boot_log:2048]: Publish Nextion state

[17:11:12][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:12][D][script.boot_progress:2098]: Progress: 35%

[17:11:12][D][script.boot_log:2048]: Set Home page elements

[17:11:12][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:12][D][script.boot_progress:2098]: Progress: 40%

[17:11:12][D][script.boot_log:2048]: Wait to finish

[17:11:12][W][component:237]: Component script took a long time for an operation (93 ms).

[17:11:12][W][component:238]: Components should block for at most 30 ms.

[17:11:12][D][script.boot_log:2048]: init_page_home

[17:11:12][D][sensor:094]: 'Blueprint': Sending state 3.22581 % with 1 decimals of accuracy

[17:11:12][W][component:237]: Component api took a long time for an operation (76 ms).

[17:11:12][W][component:238]: Components should block for at most 30 ms.

[17:11:12][W][nextion:416]: Nextion reported variable name invalid!

[17:11:13][W][nextion:446]: Nextion reported Serial Buffer overflow!

[17:11:13][D][sensor:094]: 'Blueprint': Sending state 9.67742 % with 1 decimals of accuracy

[17:11:13][D][script.boot_log:2048]: init_page_settings

[17:11:13][D][sensor:094]: 'Blueprint': Sending state 22.58064 % with 1 decimals of accuracy

[17:11:13][D][script.boot_log:2048]: init_hardware

[17:11:13][D][sensor:094]: 'Blueprint': Sending state 48.38710 % with 1 decimals of accuracy

[17:11:13][D][script.boot_log:2048]: init_global

[17:11:13][D][script.boot_log:2048]: Global settings

[17:11:13][D][text_sensor:064]: 'Version Blueprint': Sending state '4.3.9'

[17:11:13][D][script:077]: Script 'check_versions' restarting (mode: restart)

[17:11:13][D][script.check_versions:2131]: Versions:

[17:11:13][D][script.check_versions:2132]:   TFT:       4.3.11

[17:11:13][D][script.check_versions:2133]:   ESPHome:   4.3.11

[17:11:13][D][script.check_versions:2136]:   Blueprint: 4.3.9

[17:11:13][D][script.check_versions:2131]: Versions:

[17:11:13][D][script.check_versions:2132]:   TFT:       4.3.11

[17:11:13][D][script.check_versions:2133]:   ESPHome:   4.3.11

[17:11:13][D][script.check_versions:2136]:   Blueprint: 4.3.9

[17:11:13][D][sensor:094]: 'Blueprint': Sending state 100.00000 % with 1 decimals of accuracy

[17:11:13][W][component:237]: Component api took a long time for an operation (53 ms).

[17:11:13][W][component:238]: Components should block for at most 30 ms.

[17:11:13][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:13][D][script.boot_progress:2098]: Progress: 95%

[17:11:18][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:18][D][script.boot_progress:2094]: Progress: Completed

[17:11:18][W][nspanel_ha_blueprint:2225]: Wi-Fi:         Weak (-78 dBm)

[17:11:18][C][nspanel_ha_blueprint:2235]: API:           Connected

[17:11:18][C][nspanel_ha_blueprint:2243]: Blueprint:

[17:11:18][C][nspanel_ha_blueprint:2245]:   Version:     4.3.9

[17:11:18][C][nspanel_ha_blueprint:2246]:   Init steps:  62 (100.0%)

[17:11:18][C][nspanel_ha_blueprint:2255]: ESPHome:

[17:11:18][C][nspanel_ha_blueprint:2256]:   Version:     4.3.11

[17:11:18][C][nspanel_ha_blueprint:2257]:   Compiler:    2024.7.3

[17:11:18][C][nspanel_ha_blueprint:2262]:   Framework:   ESP-IDF

[17:11:18][C][nspanel_ha_blueprint:2267]:   Free heap:

[17:11:18][C][nspanel_ha_blueprint:2271]:     Internal:   199280 bytes (56.7%)

[17:11:18][C][nspanel_ha_blueprint:2281]:     PSRAM:     2017987 bytes (96.8%)

[17:11:18][C][nspanel_ha_blueprint:2288]: UART:

[17:11:18][C][nspanel_ha_blueprint:2289]:   Baud rate:   115200 bps

[17:11:18][C][nspanel_ha_blueprint:2290]:   Queue size:  0

[17:11:18][C][nspanel_ha_blueprint:2294]: Nextion:

[17:11:18][C][nspanel_ha_blueprint:2295]:   Queue size:  2

[17:11:18][C][nspanel_ha_blueprint:2297]:   Is setup:    True

[17:11:18][C][nspanel_ha_blueprint:2304]:   Init:        True

[17:11:18][C][nspanel_ha_blueprint:2310]:   TFT:         4.3.11

[17:11:18][C][nspanel_ha_blueprint:2311]: Packages:

[17:11:18][C][nspanel_ha_blueprint:2313]:   - Core

[17:11:18][C][nspanel_ha_blueprint:2322]:   - Upload TFT

[17:11:18][C][nspanel_ha_blueprint:2325]:   - Climate - Base

[17:11:18][C][nspanel_ha_blueprint:2331]:   - Climate - Dual

[17:11:18][C][nspanel_ha_blueprint:097]: Add-on Upload TFT:

[17:11:18][C][nspanel_ha_blueprint:098]:   File model: NSPanel EU

[17:11:18][C][nspanel_ha_blueprint:099]:   Valid TFT:  YES

[17:11:18][C][nspanel_ha_blueprint:133]: Add-on climate:

[17:11:18][C][nspanel_ha_blueprint:149]:   Dual:  Enabled

[17:11:18][E][nspanel_ha_blueprint:153]:   Relay (cooler): 0

[17:11:18][E][nspanel_ha_blueprint:157]:   Relay (heater): 0

[17:11:18][E][nspanel_ha_blueprint:159]:   Double relay assignment

[17:11:18][W][component:237]: Component script took a long time for an operation (79 ms).

[17:11:18][W][component:238]: Components should block for at most 30 ms.

[17:11:19][D][script.boot_log:2048]: Jump to wake-up page

[17:11:19][D][script.page_boot:2606]: Jump to wake-up page: home

[17:11:19][E][nextion:561]: ERROR: Received numeric return but next in queue "send_command" is not a valid sensor type 0

[17:11:19][D][text_sensor:064]: 'Current Page': Sending state 'home'

[17:11:19][D][script.page_changed:2644]: New page: home

[17:11:19][D][text_sensor:064]: 'Detailed Entity': Sending state ''

[17:11:19][D][script:077]: Script 'timer_dim' restarting (mode: restart)

[17:11:19][D][nextion_textsensor:014]: Processed text_sensor "current_page" state "home"

[17:11:20][D][resistance:039]: 'resistance_sensor' - Resistance 9564.0Ω

[17:11:20][D][sensor:094]: 'resistance_sensor': Sending state 9564.04492 Ω with 1 decimals of accuracy

[17:11:20][D][ntc:026]: 'Temperature' - Temperature: 26.0°C

[17:11:20][D][sensor:094]: 'Temperature': Sending state 27.00651 °C with 1 decimals of accuracy

[17:11:20][D][climate:396]: 'Thermostat' - Sending state:

[17:11:20][D][climate:399]:   Mode: OFF

[17:11:20][D][climate:401]:   Action: OFF

[17:11:20][D][climate:419]:   Current Temperature: 27.01°C

[17:11:20][D][climate:423]:   Target Temperature: Low: 7.00°C High: 35.00°C
rehakf commented 2 months ago

logs_nspanel-m_run(3).txt

edwardtfn commented 2 months ago

There's no need to save preferences every second, but this is coming from ESPHome, not from our code. I will take a look for a way to change this.

Thanks for highlighting this.

rehakf commented 2 months ago

I'm sorry about that - it's not every second it's every minute but It is also quite often

It corresponds to ESPHome Core Configuration `Adjusting flash writes

Example configuration entry

preferences: flash_write_interval: 1min `

Maybe it don't really write every minute? (1 cached, 0 written, 0 failed) ... ?

edwardtfn commented 2 months ago

Maybe it don't really write every minute? (1 cached, 0 written, 0 failed) ... ?

No, it will only save when something changed, otherwise it will be cached. In fact, it's hard to find the right interval here. Saving too frequently could reduce the flash lifespan, while longer intervals could lead to lost of info in the case of a crash (which shouldn't be a big issue, as in the worse case the user will have to set some entity again). Maybe we should just have something on the docs around this, but at the same time, ESPHome documentation is there for this... 😉

edwardtfn commented 1 month ago

So, I'm not gonna implement any change related to this for now, so I would close this.

You can always add this change directly to your panel's yaml to overwrite the default settings:

preferences:
  flash_write_interval: 5min

Please feel free to reopen if you disagree. 😉