Sonoff NSPanel by ITead - Smart Scene Wall Switch based on ESP32 and custom Nextion Touch Screen Panel Display (non-Pro variant)

sounds like your timezone in homeassistant general config isn’t correct (you need to restart the HA host after the chage)

Using nspanel-lovelace-ui interface and having trouble getting time in am/pm.

I have looked at the theme settings and tried a few things my apps.yaml looks like this

nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/nspanel/RESULT"
    panelSendTopic: "cmnd/nspanel/CustomSend"
    updateMode: "auto-notify"
    sleepTimeout: 30
    #sleepBrightness: 10
    sleepBrightness:
      - time: "6:00:00"
        value: 10
      - time: "23:00:00"
        value: 2
    locale: "en_CA" # used for translations in translations.py and for localized date if babel python package is installed
    model: "us-p"
    screensaver:
      entity: weather.nanaimo
      defaultCard: cardThermo_thermostat
      theme: !include /config/appdaemon/apps/screensaver-theme.yaml

I downloaded the screensaver-theme.yaml and uncommented the am/pm

#Uncomment by deleting the '#' and configure as you see fit.
#Colors are in the format [Red, Green, Blue] and can be numbers from 0-255
#The items shoud be self-explanatory but tMRIcon affects the humidity icon and tMR affects the humidity text.

#background:       [220, 0, 0]
#time:             [220, 0, 255]
timeAMPM:         [220, 0, 255]
#date:             [220, 0, 255]
#tMainIcon:        [220, 0, 255]
#tMainText:        [220, 0, 255]
#tForecast1:       [220, 0, 255]
#tForecast2:       [220, 0, 255]
#tForecast3:       [220, 0, 255]
#tForecast4:       [220, 0, 255]
#tF1Icon:          [220, 0, 255]
#tF2Icon:          [220, 0, 255]
#tF3Icon:          [220, 0, 255]
#tF4Icon:          [220, 0, 255]
#tForecast1Val:    [220, 0, 255]
#tForecast2Val:    [220, 0, 255]
#tForecast3Val:    [220, 0, 255]
#tForecast4Val:    [220, 0, 255]
#bar:              [220, 0, 255]
#tMRIcon:          [220, 0, 255]
#tMR:              [220, 0, 255]

#autoWeather automatically colors the screensaver weather icons based upon weather. Uncomment the following line to enable.
#autoWeather: true

Tried adding true after it no go. tried uncommenting autoweather and did not see color changes either.
screensaver-theme.yaml is in the same folder as app.yaml

Any help appreciated.

Craig

Figured it out for any one else who may have trouble here is what I did.

nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/nspanel/RESULT"
    panelSendTopic: "cmnd/nspanel/CustomSend"
    updateMode: "auto-notify"
    timeFormat: "%I:%M   ?%p"
    sleepTimeout: 30
    #sleepBrightness: 10
    sleepBrightness:
      - time: "6:00:00"
        value: 10
      - time: "23:00:00"
        value: 2
    locale: "en_CA" # used for translations in translations.py and for localized date if babel python package is installed
    model: "us-p"

You only need to configure the time format

timeFormat: "%I:%M ?%p"

https://docs.nspanel.pky.eu/config-overview/

Thanks I figured it out, not being a coder it wasn’t immediately obvious to me.
Craig

hi!

I have flashed the NSPanel today with the files from https://github.com/marcfager/nspanel-mf and after trying to upload the hmi.tft file via the service in dev options, I get the same error like others , but was not able to resolve it following the comments by myself.

I think it’s a problem within the download of the HMI-file, but I can’t sort it out… . If I click on the link from the log-output, the hmi.tft is downloaded properly.

[11:32:33][W][nextion:072]: Nextion is not connected! 
[11:32:34][W][nextion:072]: Nextion is not connected! 
[11:32:34][W][nextion:072]: Nextion is not connected! 
[11:32:35][W][nextion:072]: Nextion is not connected! 
[11:32:35][D][nextion_upload:169]: Connected
[11:32:35][D][nextion_upload:175]: Requesting URL: https://192.168.1.100:8123/local/hmi.tft
[11:32:38][D][nextion_upload:209]: Updating Nextion ...
[11:32:38][D][nextion_upload:235]: Waiting for upgrade response
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:39][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][E][uart:015]: Reading from UART timed out at byte 0!
[11:32:40][D][nextion_upload:239]: Upgrade response is  19
[11:32:40][D][nextion_upload:242]: Available 0 : 0x00
[11:32:40][D][nextion_upload:242]: Available 1 : 0x00
[11:32:40][D][nextion_upload:242]: Available 2 : 0x00
[11:32:40][D][nextion_upload:242]: Available 3 : 0x00
[11:32:40][D][nextion_upload:242]: Available 4 : 0x00
[11:32:40][D][nextion_upload:242]: Available 5 : 0x00
[11:32:40][D][nextion_upload:242]: Available 6 : 0x00
[11:32:40][D][nextion_upload:242]: Available 7 : 0x00
[11:32:40][D][nextion_upload:242]: Available 8 : 0x00
[11:32:41][D][nextion_upload:242]: Available 9 : 0x00
[11:32:41][D][nextion_upload:242]: Available 10 : 0x00
[11:32:41][D][nextion_upload:242]: Available 11 : 0x00
[11:32:41][D][nextion_upload:242]: Available 12 : 0x00
[11:32:41][D][nextion_upload:242]: Available 13 : 0x00
[11:32:41][D][nextion_upload:242]: Available 14 : 0x00
[11:32:41][D][nextion_upload:242]: Available 15 : 0x00
[11:32:41][D][nextion_upload:242]: Available 16 : 0x00
[11:32:41][D][nextion_upload:242]: Available 17 : 0x00
[11:32:41][D][nextion_upload:242]: Available 18 : 0x00
[11:32:41][D][nextion_upload:248]: preparation for tft update failed 0 ""
[11:32:41][D][nextion_upload:310]: Restarting Nextion
[11:32:42][D][nextion_upload:313]: Restarting esphome

the nextion update url is definied as below in secrets.yaml from esphome

nextion_update_url: "https://192.168.1.100:8123/local/hmi.tft"

I tried a few different things like changing the settings in “external_components” to different pr-numbers, components (nextion, nspanel), quoted them etc, but nothing made a difference.

on the NSPanel is a white screen with the following error-message shown:

Model does not match
Device Model:
NX4832F035_011C

I’m not sure, but I think is an issue due the invalid HMI_file upload and can be ignored for the moment.

I used the NSPanel before with Tasmota following blackadders manual, where everything worked so far via mqtt. Due that I think it’s not a physical hardware issue like not properly connected cables or something else as I flashed everything via WiFi.

this is the current yaml-file which I use in ESPhome:

esphome:
  name: nspanel
  comment: $device_name

esp32:
  board: esp32dev
  framework:
    type: arduino

substitutions:
  # Name the device and it's entities
  device_name: nspanel
  
# Logger. Disable the temperature sensor etc. to focus on the HMI development
logger:
  baud_rate: 0
  level: DEBUG
  logs:
    sensor: WARN
    resistance: WARN
    text_sensor: WARN
    ntc: WARN


# Uart for the Nextion display
uart:
  tx_pin: 16
  rx_pin: 17
  baud_rate: 115200
  id: tf_uart
  

# Functionality for the Nextion display
external_components:
  - source: github://pr#2702
    components: [nextion]
    refresh: 1h
  
# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  services:
    # Service to play a rtttl tone
    - service: play_rtttl
      variables:
        song_str: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return song_str;'
    # Service to update the HMI file
    - service: upload_tft
      then:
        - lambda: 'id(disp1)->upload_tft();'
    # Service to control the visible page from Home Assistant
    - service: set_page
      variables:
        page: int
      then:
        - lambda: id(disp1).send_command_printf("page %i", page);
    # Service to show a notification on the screen for 15 s. Tap or wait to close
    - service: notification
      variables:
        header: string
        message: string
      then:
        - lambda: |-
            id(disp1).set_component_text_printf("Notifications.head", "%s", header.c_str());
            id(disp1).set_component_text_printf("Notifications.body", "%s", message.c_str());
            id(disp1).send_command_printf("page 6");
        - rtttl.play: "twobits:d=4,o=5,b=220:c6,8g,8g,a,g,p,b,c6"
        - delay: 15s
        - lambda: |-
            id(disp1).send_command_printf("page 0");
            id(disp1).set_component_text_printf("Notifications.head", " ");
            id(disp1).set_component_text_printf("Notifications.body", " ");
            id(disp1).send_command_printf("page 0");
    # Service to send a command directly to the display. Useful for testing
    - service: send_command
      variables:
        cmd: string
      then:
        - lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());'
    # Service to show a QR code on the display (ex. for WiFi password)
    - service: display_qr
      variables:
        qrdata: string
      then:
        - lambda: |-
            id(disp1).set_component_text_printf("QR.qr0", "%s", qrdata.c_str());
            id(disp1).send_command_printf("page 7");
        - delay: 15s
        - lambda: |-
            id(disp1).send_command_printf("page 0");
            id(disp1).send_command_printf("QR.qr0.txt=");
            id(disp1).send_command_printf("page 0");
    # Service to wake up screen
    - service: wakeup_screen
      then:
        - lambda: |-
            id(disp1).send_command_printf("page 0");


ota:
  password: "xxxxxxxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Nspanel Fallback Hotspot"
    password: "xxxxxxxxxxxxxxxx"

captive_portal:


# NSPanel YAML by marcfager. Please check github for credits: https://github.com/marcfager/nspanel-mf
# Version 2022-01-19



  
# Time component that fetches time from Home Assistant and updates the display once a minute and when the display is ready at bootup (and time is available).
time:
  - platform: homeassistant
    id: homeassistant_time
    on_time:
      - seconds: 0
        minutes: /1
        then:
          - lambda: id(disp1).set_component_text_printf("Home.time", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute);
          - lambda: id(disp1).set_component_text_printf("Home.date", "%i-%02i-%02i", id(homeassistant_time).now().year, id(homeassistant_time).now().month, id(homeassistant_time).now().day_of_month);
    on_time_sync:
        then:
          - wait_until:
              switch.is_on: nextion_init
          - lambda: id(disp1).set_component_text_printf("Home.time", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute);
          - lambda: id(disp1).set_component_text_printf("Home.date", "%i-%02i-%02i", id(homeassistant_time).now().year, id(homeassistant_time).now().month, id(homeassistant_time).now().day_of_month);
          



# A reboot button is always useful
button:
  - platform: restart
    name: $device_name Restart

# Binary sensors
binary_sensor:
  # Left button below the display
  - platform: gpio
    name: $device_name Left Button
    pin:
      number: 14
      inverted: true
    on_click:
      - switch.toggle: relay_1

  # Right button below the display
  - platform: gpio
    name: $device_name Right Button
    pin:
      number: 27
      inverted: true
    on_click:
      - switch.toggle: relay_2


  # Buttons on the Music page    
  - platform: nextion
    name: $device_name Music previous
    page_id: 1
    component_id: 1

  - platform: nextion
    name: $device_name Music play pause
    page_id: 1
    component_id: 2

  - platform: nextion
    name: $device_name Music next
    page_id: 1
    component_id: 3

  - platform: nextion
    name: $device_name Music cast
    page_id: 1
    component_id: 4

  - platform: nextion
    name: $device_name Music voldown
    page_id: 1
    component_id: 7
    
  - platform: nextion
    name: $device_name Music volup
    page_id: 1
    component_id: 8
    
  - platform: nextion
    name: $device_name Playlist cocktail
    page_id: 1
    component_id: 9

  - platform: nextion
    name: $device_name Playlist food
    page_id: 1
    component_id: 10
    
  - platform: nextion
    name: $device_name Playlist dance
    page_id: 1
    component_id: 11

  - platform: nextion
    name: $device_name Playlist note
    page_id: 1
    component_id: 12    
    
  # Buttons on the Lights page
  - platform: nextion
    name: $device_name Light 0 button
    page_id: 2
    component_id: 17
    on_click:
      - homeassistant.service:
          service: light.toggle
          data:
            entity_id: light.secto

  - platform: nextion
    name: $device_name Light 1 button
    page_id: 2
    component_id: 18
    on_click:
      - homeassistant.service:
          service: light.toggle
          data:
            entity_id: light.sarfatti
            
  - platform: nextion
    name: $device_name Light 2 button
    page_id: 2
    component_id: 19
    on_click:
      - homeassistant.service:
          service: light.toggle
          data:
            entity_id: light.kok_lillabanken

  - platform: nextion
    name: $device_name Light 3 button
    page_id: 2
    component_id: 20
    on_click:
      - homeassistant.service:
          service: switch.toggle
          data:
            entity_id: switch.tamburslampan

  - platform: nextion
    name: $device_name Light 4 button
    page_id: 2
    component_id: 21
    on_click:
      - homeassistant.service:
          service: light.toggle
          data:
            entity_id: light.pentiklampa

  - platform: nextion
    name: $device_name Light 5 button
    page_id: 2
    component_id: 22
    on_click:
      - homeassistant.service:
          service: switch.toggle
          data:
            entity_id: switch.kontorsfonster

  - platform: nextion
    name: $device_name Light 6 button
    page_id: 2
    component_id: 23
    on_click:
      - homeassistant.service:
          service: light.toggle
          data:
            entity_id: light.kontorspentik
            
  - platform: nextion
    name: $device_name Light 7 button
    page_id: 2
    component_id: 24
    on_click:
      - homeassistant.service:
          service: switch.toggle
          data:
            entity_id: switch.oscars


output:
  # Buzzer for playing tones
  - platform: ledc
    id: buzzer_out
    pin:
      number: 21
      
switch:
  # Physical relay 1
  - platform: gpio
    name: $device_name Relay 1
    id: relay_1
    pin:
      number: 22

  # Physical relay 2
  - platform: gpio
    name: $device_name Relay 2
    id: relay_2
    pin:
      number: 19

  # Turn screen power on/off. Easy way to configure the screen power control, but this should not be used from HA, as all components must be re-initialized afterwards. For lights, names of lights etc. this practically means that the state must change once to happen.
  - platform: gpio
    name: $device_name Screen Power
    id: screen_power
    entity_category: config
    pin:
      number: 4
      inverted: true
    restore_mode: ALWAYS_ON

  # Basically a global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display.
  - platform: template
    name: $device_name Nextion inited
    id: nextion_init
    entity_category: config
    restore_state: false
    assumed_state: off
    optimistic: true
    
  # Show alarm screen on the display and disable it (except for physical buttons).
  - platform: template
    name: $device_name Alarm screen
    id: alarm_activated
    restore_state: false
    assumed_state: off
    optimistic: true
    on_turn_on:
      - lambda: id(disp1).send_command_printf("page 5");
    on_turn_off:
      - lambda: id(disp1).send_command_printf("page 0");

  # Disable Dim-down-function on screen
  - platform: template
    name: $device_name Disable dim-down
    id: disp1_disdim
    restore_state: true
    assumed_state: off
    optimistic: true
    on_turn_on:
      - lambda: id(disp1).send_command_printf("Home.disdim.val=1");
    on_turn_off:
      - lambda: id(disp1).send_command_printf("Home.disdim.val=0");

  # Disable Screensaver-function on screen
  - platform: template
    name: $device_name Disable screensaver
    id: disp1_dissleep
    restore_state: true
    assumed_state: off
    optimistic: true
    on_turn_on:
      - lambda: id(disp1).send_command_printf("Home.dissleep.val=1");
    on_turn_off:
      - lambda: id(disp1).send_command_printf("Home.dissleep.val=0");

  # Disable Go to Home page-function on screen
  - platform: template
    name: $device_name Disable go to home
    id: disp1_disgth
    restore_state: true
    assumed_state: off
    optimistic: true
    on_turn_on:
      - lambda: id(disp1).send_command_printf("Home.disgth.val=1");
    on_turn_off:
      - lambda: id(disp1).send_command_printf("Home.disgth.val=0");


# Rtttl function for buzzer
rtttl:
  id: buzzer
  output: buzzer_out

sensor:
  # Internal temperature sensor, adc value
  - platform: adc
    id: ntc_source
    pin: 38
    update_interval: 10s
    attenuation: 11db

  # Internal temperature sensor, adc reading converted to resistance (calculation) 
  - platform: resistance
    id: resistance_sensor
    sensor: ntc_source
    configuration: DOWNSTREAM
    resistor: 11.2kOhm

  # Internal temperature sensor, resistance to temperature (calculation)
  - platform: ntc
    id: temperature
    sensor: resistance_sensor
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: $device_name Temperature

  # Uptime for the display. Also updates a human readable one (further down)
  - platform: uptime
    name: $device_name Uptime Sensor
    id: uptime_sensor
    update_interval: 60s
    on_raw_value:
      then:
        - text_sensor.template.publish:
            id: uptime_human
            state: !lambda |-
                int seconds = round(id(uptime_sensor).raw_state);
                int days = seconds / (24 * 3600);
                seconds = seconds % (24 * 3600);
                int hours = seconds / 3600;
                seconds = seconds % 3600;
                int minutes = seconds /  60;
                seconds = seconds % 60;
                return (
                  (days ? to_string(days) + "d " : "") +
                  (hours ? to_string(hours) + "h " : "") +
                  (minutes ? to_string(minutes) + "m " : "") +
                  (to_string(seconds) + "s")
                ).c_str();

  # WiFi signals strength sensor
  - platform: wifi_signal
    name: $device_name WiFi Signal Sensor
    update_interval: 60s

  # Current page displayed on the HMi
  - platform: nextion
    name: $device_name Current display page
    id: disp1_current_page
    variable_name: dp
    update_interval: 1s

  # Temperature outside, fetched from HA
  - platform: homeassistant
    id: current_temperature
    entity_id: weather.home
    attribute: temperature
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Home.temp", "%.1f", id(current_temperature).state);

  # Temperature outside feels like, fetched from HA
  - platform: homeassistant
    id: temp_feelslike
    entity_id: sensor.home_temperature_feels_like
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Home.tempfl", "%.1f", id(temp_feelslike).state);

text_sensor:
  # IP address of device. Not really needed for HA (as HA already knows it), but for showing on the display during startup. The startup screen will leave on if no instance connects to the API.
  - platform: wifi_info
    ip_address:
      name: $device_name IP address
      id: ip_address
      on_value:
        then:
          - wait_until:
              switch.is_on: nextion_init
          - lambda: id(disp1).set_component_text_printf("Connecting.ip_addr", "%s", id(ip_address).state.c_str());

  # Uptime in a human readable form. Updated from the uptime sensor
  - platform: template
    name: $device_name Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

  # ESPHome version used to compile the app
  - platform: version
    name: $device_name ESPHome Version

  # Media player entity (or any text entity) to pull currently playing song name from
  - platform: homeassistant
    id: music_artist
    entity_id: media_player.sonos_vardagsrum
    attribute: media_artist
    on_value:
      then:
        - lambda: id(disp1).set_component_text_printf("Music.music_sn", "%s", id(music_artist).state.c_str());

  # Media player entity (or any text entity) to pull currently playing artist name from
  - platform: homeassistant
    id: music_title
    entity_id: media_player.sonos_vardagsrum
    attribute: media_title
    on_value:
      then:
        - lambda: id(disp1).set_component_text_printf("Music.music_an", "%s", id(music_title).state.c_str());

  # Sun sensor from HA. Used to decide whether a sun or moon weather symbol should be used.
  - platform: homeassistant
    id: sun_sun
    entity_id: sun.sun

  # Weather symbol, HA weather entity to pull data from
  - platform: homeassistant
    id: weather_symbol
    entity_id: weather.home
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol=5; // 5 is a empty box.
            if (id(weather_symbol).state == "clear-night") {
              symbol=6;
            } else if (id(weather_symbol).state == "cloudy") {
              symbol=7;
              if (id(sun_sun).state == "below_horizon") {
                symbol=8;
              }
            } else if (id(weather_symbol).state == "fog") {
              symbol=9;
            } else if (id(weather_symbol).state == "hail" || id(weather_symbol).state == "snowy-rainy") {
              symbol=10;
            } else if (id(weather_symbol).state == "lightning") {
              symbol=11;
            } else if (id(weather_symbol).state == "lightning-rainy" || id(weather_symbol).state == "exceptional") {
              symbol=12;
              if (id(sun_sun).state == "below_horizon") {
                symbol=13;
              }
            } else if (id(weather_symbol).state == "partlycloudy") {
              symbol=14;
              if (id(sun_sun).state == "below_horizon") {
                symbol=8;
              }
            } else if (id(weather_symbol).state == "pouring") {
              symbol=15;
            } else if (id(weather_symbol).state == "rainy") {
              symbol=16;
            } else if (id(weather_symbol).state == "snowy") {
              symbol=17;
            } else if (id(weather_symbol).state == "sunny") {
              symbol=18;
              if (id(sun_sun).state == "below_horizon") {
                symbol = 6;
              }
            } else if (id(weather_symbol).state == "windy" || id(weather_symbol).state == "windy-variant") {
              symbol=19;              
            }
            id(disp1).send_command_printf("Home.weather_symbol.pic=%i", symbol);

  # Light setup, first light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: secto
    entity_id: light.secto
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 23;
            if (id(secto).state == "off") {
              symbol=22;
            }
            id(disp1).send_command_printf("Lights.light0.pic=%i", symbol);

  # Light setup, first light's name
  - platform: homeassistant
    id: secto_name
    entity_id: light.secto
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light0t", "%s", id(secto_name).state.c_str());

  # Light setup, second light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: sarfatti
    entity_id: light.sarfatti
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 25;
            if (id(sarfatti).state == "off") {
              symbol=24;
            }
            id(disp1).send_command_printf("Lights.light1.pic=%i", symbol);

  # Light setup, second light's name
  - platform: homeassistant
    id: sarfatti_name
    entity_id: light.sarfatti
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light1t", "%s", id(sarfatti_name).state.c_str());

  # Light setup, third light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: kok_lillabanken
    entity_id: light.kok_lillabanken
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 29;
            if (id(kok_lillabanken).state == "off") {
              symbol=28;
            }
            id(disp1).send_command_printf("Lights.light2.pic=%i", symbol);

  # Light setup, third light's name
  - platform: homeassistant
    id: kok_lillabanken_name
    entity_id: light.kok_lillabanken
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light2t", "%s", id(kok_lillabanken_name).state.c_str());

  # Light setup, fourth light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: tamburslampan
    entity_id: switch.tamburslampan
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 27;
            if (id(tamburslampan).state == "off") {
              symbol=26;
            }
            id(disp1).send_command_printf("Lights.light3.pic=%i", symbol);

  # Light setup, fourth light's name
  - platform: homeassistant
    id: tamburslampan_name
    entity_id: switch.tamburslampan
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light3t", "%s", id(tamburslampan_name).state.c_str());

  # Light setup, fifth light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: tvpentik
    entity_id: light.pentiklampa
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 33;
            if (id(tvpentik).state == "off") {
              symbol=32;
            }
            id(disp1).send_command_printf("Lights.light4.pic=%i", symbol);

  # Light setup, fifth light's name
  - platform: homeassistant
    id: tvpentik_name
    entity_id: light.pentiklampa
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light4t", "%s", id(tvpentik_name).state.c_str());

  # Light setup, sixth light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: kontorsfonster
    entity_id: switch.kontorsfonster
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 33;
            if (id(kontorsfonster).state == "off") {
              symbol=32;
            }
            id(disp1).send_command_printf("Lights.light5.pic=%i", symbol);

  # Light setup, sixths light's name
  - platform: homeassistant
    id: kontorsfonster_name
    entity_id: switch.kontorsfonster
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light5t", "%s", id(kontorsfonster_name).state.c_str());

  # Light setup, seventh light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: kontorspentik
    entity_id: light.kontorspentik
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 33;
            if (id(kontorspentik).state == "off") {
              symbol=32;
            }
            id(disp1).send_command_printf("Lights.light6.pic=%i", symbol);

  # Light setup, seventh light's name
  - platform: homeassistant
    id: kontorspentik_name
    entity_id: light.kontorspentik
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light6t", "%s", id(kontorspentik_name).state.c_str());

  # Light setup, eighth light. If you want to leave a light out, just comment out the section for the light and name.
  - platform: homeassistant
    id: oscars
    entity_id: switch.oscars
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 31;
            if (id(oscars).state == "off") {
              symbol=30;
            }
            id(disp1).send_command_printf("Lights.light7.pic=%i", symbol);

  # Light setup, eighths light's name
  - platform: homeassistant
    id: oscarsdb_name
    entity_id: switch.oscars
    attribute: friendly_name
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Lights.light7t", "%s", id(oscarsdb_name).state.c_str());
       
  # Home page, text line 1 (lower right part of screen)
  - platform: homeassistant
    id: home_text1
    entity_id: sensor.nspanel_v90_range
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Home.text1", "%s", id(home_text1).state.c_str());
        
  # Home page, text line 2 (lower right part of screen)
  - platform: homeassistant
    id: home_text2
    entity_id: sensor.nspanel_id4_range
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Home.text2", "%s", id(home_text2).state.c_str());


number:
  # Screen brightness
  - platform: template
    name: $device_name Brightness
    id: brightness
    entity_category: config
    unit_of_measurement: '%'
    min_value: 0
    max_value: 100
    step: 1
    initial_value: 30
    set_action:
      then:
        - lambda: 'id(disp1).set_backlight_brightness(x/100);'
        - lambda: 'id(disp1).send_command_printf("Home.brightness.val=%i", int(x));'

  # Screen brightness dimmed down
  - platform: template
    name: $device_name Brightness dimdown
    id: brightness_dim
    entity_category: config
    unit_of_measurement: '%'
    min_value: 0
    max_value: 100
    step: 1
    initial_value: 1
    set_action:
      then:
        - lambda: 'id(disp1).send_command_printf("Home.brightdd.val=%i", int(x));'

      
# Configure the screen itself
display:
  - platform: nextion
    id: disp1
    uart_id: tf_uart
    tft_url: !secret nextion_update_url
    # A little fun...
    on_setup:
      then:
        # Enable 1 light page (up to 4 available)
        - lambda: id(disp1).send_command_printf("Lights.pages.val=1");
        - number.set:
            id: brightness
            value: 30
        - lambda: id(disp1).send_command_printf("page 4");
        - wait_until:
            api.connected
        - switch.template.publish:
            id: nextion_init
            state: on
        - if:
            condition:
              - switch.is_on: alarm_activated
            then:
              - lambda: id(disp1).send_command_printf("page 5");
            else:
              - delay: 5s
              - lambda: id(disp1).send_command_printf("page 0");    

thx and regards

michael

try http instead of https

http isn’t working since I have switched everything to HTTPS on the home-assistant.

I’ve installed a small HTTP-server on my laptop and modified the update-url to point to this webserver for the hmi.tft download

the strange or funny thing is, now it disconnects after a few second (timeout) from the esphome api when I run the service-call and I don’t see any attempt to access the webserver / file in the logs. then the api connects again and it looks like as it skipped the download.

[14:00:35][D][nextion_upload:169]: Connected
[14:00:35][D][nextion_upload:175]: Requesting URL: http://192.168.1.221/hmi.tft
INFO nspanel.local: Ping timed out!
INFO Disconnected from ESPHome API for nspanel.local
WARNING Disconnected from API
WARNING Can't connect to ESPHome API for nspanel.local: Timeout while connecting to ('192.168.1.164', 6053)
INFO Trying to reconnect to nspanel.local in the background
INFO Successfully connected to nspanel.local
[14:01:31][W][nextion:078]: Nextion is not connected! 

tried another webserver on my mobile with port 8080 and when I run the service-call, it shows “unable to determine filesize” .

@jobraun - I am trying to configure a NSPanel that is remote, and at the remote location I have a camera at my disposal.

  1. Is it possible to trigger a screen to be displayed on the NSPanel from within HA ?
  2. Can I disable the screensaver page completely so that I can force it to display a specific page ?

installed today another webserver on my NAS with HTTP access and face the same issue.

[11:12:44][D][homeassistant.text_sensor:017]: 'sun.sun': Got state 'above_horizon'
[11:12:44][D][homeassistant.sensor:022]: 'weather.home::temperature': Got attribute state 20.20
[11:12:44][D][homeassistant.text_sensor:017]: 'weather.home': Got state 'partlycloudy'
[11:12:44][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:44][W][nextion:078]: Nextion is not connected! 
[11:12:45][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:45][W][nextion:078]: Nextion is not connected! 
[11:12:45][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:45][W][nextion:078]: Nextion is not connected! 
[11:12:46][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:46][W][nextion:078]: Nextion is not connected! 
[11:12:47][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:47][W][nextion:078]: Nextion is not connected! 
[11:12:47][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:47][W][nextion:078]: Nextion is not connected! 
[11:12:48][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:48][W][nextion:078]: Nextion is not connected! 
[11:12:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:49][W][nextion:078]: Nextion is not connected! 
[11:12:49][D][nextion_upload:169]: Connected
[11:12:49][D][nextion_upload:175]: Requesting URL: http://192.168.1.108/hmi.tft
[11:12:49][D][nextion_upload:209]: Updating Nextion ...
[11:12:49][D][nextion_upload:235]: Waiting for upgrade response
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:51][D][nextion_upload:239]: Upgrade response is  19
[11:12:51][D][nextion_upload:242]: Available 0 : 0x00
[11:12:52][D][nextion_upload:242]: Available 1 : 0x00
[11:12:52][D][nextion_upload:242]: Available 2 : 0x00
[11:12:52][D][nextion_upload:242]: Available 3 : 0x00
[11:12:52][D][nextion_upload:242]: Available 4 : 0x00
[11:12:52][D][nextion_upload:242]: Available 5 : 0x00
[11:12:52][D][nextion_upload:242]: Available 6 : 0x00
[11:12:52][D][nextion_upload:242]: Available 7 : 0x00
[11:12:52][D][nextion_upload:242]: Available 8 : 0x00
[11:12:52][D][nextion_upload:242]: Available 9 : 0x00
[11:12:52][D][nextion_upload:242]: Available 10 : 0x00
[11:12:52][D][nextion_upload:242]: Available 11 : 0x00
[11:12:52][D][nextion_upload:242]: Available 12 : 0x00
[11:12:52][D][nextion_upload:242]: Available 13 : 0x00
[11:12:52][D][nextion_upload:242]: Available 14 : 0x00
[11:12:52][D][nextion_upload:242]: Available 15 : 0x00
[11:12:52][D][nextion_upload:242]: Available 16 : 0x00
[11:12:52][D][nextion_upload:242]: Available 17 : 0x00
[11:12:52][D][nextion_upload:242]: Available 18 : 0x00
[11:12:52][D][nextion_upload:248]: preparation for tft update failed 0 ""
[11:12:52][D][nextion_upload:324]: Restarting Nextion
INFO nspanel.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for nspanel.local
WARNING Disconnected from API
INFO nspanel.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to nspanel.local
[11:12:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:12:59][W][nextion:078]: Nextion is not connected! 
[11:13:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:13:00][W][nextion:078]: Nextion is not connected! 
[11:13:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:13:01][W][nextion:078]: Nextion is not connected! 
[11:13:01][D][homeassistant.text_sensor:017]: 'sun.sun': Got state 'above_horizon'
[11:13:01][D][homeassistant.sensor:022]: 'weather.home::temperature': Got attribute state 20.20
[11:13:01][D][homeassistant.text_sensor:017]: 'weather.home': Got state 'partlycloudy'
[11:13:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:13:01][W][nextion:078]: Nextion is not connected! 
[11:13:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:13:02][W][nextion:078]: Nextion is not connected! 
[11:13:03][E][uart:015]: Reading from UART timed out at byte 0!

when I “power off” / “power on” the display via the button homeassistant, the nextion gets connected and shows that it’s queue is empty

[11:15:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:00][W][nextion:078]: Nextion is not connected! 
[11:15:00][D][switch:017]: 'nspanel Screen Power' Turning OFF.
[11:15:00][D][switch:037]: 'nspanel Screen Power': Sending state OFF
[11:15:00][W][nextion:078]: Nextion is not connected! 
[11:15:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:01][W][nextion:078]: Nextion is not connected! 
[11:15:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:02][W][nextion:078]: Nextion is not connected! 
[11:15:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:02][W][nextion:078]: Nextion is not connected! 
[11:15:02][D][switch:013]: 'nspanel Screen Power' Turning ON.
[11:15:02][D][switch:037]: 'nspanel Screen Power': Sending state ON
[11:15:03][W][nextion:078]: Nextion is not connected! 
[11:15:03][I][nextion:084]: Nextion is connected
[11:15:03][C][nextion:123]: Nextion:
[11:15:03][C][nextion:124]:   Device Model:     NX4832F035_011C
[11:15:03][C][nextion:125]:   Firmware Version: 50
[11:15:03][C][nextion:126]:   Serial Number:    0E663401274BCA55
[11:15:03][C][nextion:127]:   Flash Size:       16777216
[11:15:03][C][nextion:128]:   Wake On Touch:    True
[11:15:11][D][nextion:253]: Manually set nextion report ready
[11:15:11][D][nextion:330]: Nextion is setup
[11:15:11][D][number:054]: 'nspanel Brightness' - Setting number value
[11:15:11][D][number:113]:   New number value: 30.000000
[11:15:12][D][switch:037]: 'nspanel Nextion inited': Sending state ON
[11:15:12][E][nextion:502]: ERROR: Received numeric return but the queue is empty

when I then trigger the upload_tft service, it looks little bit better for a second and then shows the UART errors again and disconnects / timout the api

[11:15:03][I][nextion:084]: Nextion is connected
[11:15:03][C][nextion:123]: Nextion:
[11:15:03][C][nextion:124]:   Device Model:     NX4832F035_011C
[11:15:03][C][nextion:125]:   Firmware Version: 50
[11:15:03][C][nextion:126]:   Serial Number:    0E663401274BCA55
[11:15:03][C][nextion:127]:   Flash Size:       16777216
[11:15:03][C][nextion:128]:   Wake On Touch:    True
[11:15:11][D][nextion:253]: Manually set nextion report ready
[11:15:11][D][nextion:330]: Nextion is setup
[11:15:11][D][number:054]: 'nspanel Brightness' - Setting number value
[11:15:11][D][number:113]:   New number value: 30.000000
[11:15:12][D][switch:037]: 'nspanel Nextion inited': Sending state ON
[11:15:12][E][nextion:502]: ERROR: Received numeric return but the queue is empty
[11:15:46][D][nextion_upload:169]: Connected
[11:15:46][D][nextion_upload:175]: Requesting URL: http://192.168.1.108/hmi.tft
[11:15:47][D][nextion_upload:209]: Updating Nextion NX4832F035_011C...
[11:15:47][D][nextion_upload:235]: Waiting for upgrade response
[11:15:47][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:47][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:47][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:47][D][nextion_upload:239]: Upgrade response is  4
[11:15:47][D][nextion_upload:242]: Available 0 : 0x00
[11:15:47][D][nextion_upload:242]: Available 1 : 0x00
[11:15:47][D][nextion_upload:242]: Available 2 : 0x00
[11:15:47][D][nextion_upload:242]: Available 3 : 0x05
[11:15:47][D][nextion_upload:246]: preparation for tft update done
[11:15:47][D][nextion_upload:283]: Allocating buffer size 65536, Heap size is 211028
[11:15:47][D][nextion_upload:305]: Updating tft from "http://192.168.1.108/hmi.tft" with a file size of 127506 using 65536 chunksize, Heap Size 145452
[11:15:47][D][nextion_upload:044]: Requesting range: bytes=0-16383
[11:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:48][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:49][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:50][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:51][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:52][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:53][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:54][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:55][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:56][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:57][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:58][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:58][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:58][D][nextion_upload:316]: Heap Size 147300, Bytes left 111122
[11:15:58][D][nextion_upload:044]: Requesting range: bytes=16384-81919
[11:15:58][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:58][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:15:59][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:00][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:01][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:02][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:03][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:04][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:05][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:06][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:07][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:08][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:09][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:10][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:10][E][uart:015]: Reading from UART timed out at byte 0!
[11:16:10][E][uart:015]: Reading from UART timed out at byte 0!
INFO nspanel.local: Ping timed out!
INFO Disconnected from ESPHome API for nspanel.local
WARNING Disconnected from API

I will try later that evening to connect the nspanel via my serial debugger directly to bypass the webapi. maybe the pull of the file + web api is the main issue in my case

yes, you can utilize the navigate items to do that (just send the payload the panel would send to the result topic, you will need to send something like this to the topic {"CustomRecv":"event,buttonPress2,navigate.cardGrid_test,button"} )

just set the timeout to zero and it will not open the screensaver page

I was able to flash the hmi-file properly and now everything looks fine.

I didn’t connect the log-output from esphome this time and that looks like the “fix” while running the tft-update service

Blockquote
Hi, I’m using nspanel-lovelace-ui interface and I’m having trouble with the time in the screensaver.
Ns panel tasmota time = 20:04
Appdeamon time = 20:04
Home assistant time = 20:04
Ns display time in the screensaver = 18:04
Does anyone know how to fix this.

Found the problem, the appdeamon docker container was running in the wrong time, added -v /etc/localtime:/etc/localtime:ro\ solved the problem.

Sorry, but I dont understand the syntax of the payload at all here:

ns_nav:
  alias: Navigate
  mode: single  
  sequence:
    - service: mqtt.publish
      data:
        topic: "cmnd/nspanel-4c18/Result"
        payload: '{"CustomRecv":"event,buttonPress2,navigate.cardGrid_d_lights,button"}'

can you help break down the payload syntax ?

When I send that, I don’t get any errors, but the screen does not switch to “navigate.cardGrid_d_lights”

does a configured entity of navigate.cardGrid_d_lights work on a cardGrid/cardEntity?

The config of your cardGrid needs to have “d_lights” configured as key for this to work.

Check the appdaemon log for details, cannot tell you anything more without the log.

Thanks, yes I copied it from the existing apps.yaml.

    cards:
      - type: cardGrid
        key: mainmenu
        title: Menu
        entities:
          - entity: navigate.screensaver_home
            icon: home
            name: Home

          - entity: navigate.cardGrid_d_lights
            icon: lightbulb-group

          - entity: navigate.cardGrid_u_lights
            icon: lightbulb-group

          - entity: navigate.cardGrid_heating
            icon: temperature-celsius
          
          - entity: navigate.cardEntities_refuse
            icon: trash-can-outline

          - entity: navigate.cardThermo_thermo
            icon: temperature-celsius

      - type: cardGrid
        title: Downstairs
        key: d_lights
        entities:
          - entity: light.jack
            name: Kitchen
            icon: lightbulb-group

config looks fine, need to see the appdaemon log after you are running this script

Hello,
How can I set the screensaver language from english to german?

you need add babel to the appdaemon python package config

Thanks;

There is absolutely not sign of the request or any response in the logs:

I sent the request to the following script at 7:25:45 using “Call Service” button in Developer Tools:

ns_nav:
  alias: Navigate
  mode: single  
  sequence:
    - service: mqtt.publish
      data:
        topic: "cmnd/nspanel-4c18/Result"
        payload: '{"CustomRecv":"event,buttonPress2,navigate.cardGrid_d_lights,button,1"}'

The services “Call Service” button turned green with a check-mark for about 2 seconds, and there was noting in the logs whatsoever.

2022-06-03 07:20:00.005397 INFO nspanel-1: Sending MQTT Message: time~07:20
2022-06-03 07:21:00.010204 INFO nspanel-1: Sending MQTT Message: time~07:21
2022-06-03 07:22:00.009484 INFO nspanel-1: Sending MQTT Message: time~07:22
2022-06-03 07:23:00.009031 INFO nspanel-1: Sending MQTT Message: time~07:23
2022-06-03 07:24:00.011575 INFO nspanel-1: Sending MQTT Message: time~07:24
2022-06-03 07:25:00.011058 INFO nspanel-1: Sending MQTT Message: time~07:25
2022-06-03 07:26:00.011589 INFO nspanel-1: Sending MQTT Message: time~07:26
2022-06-03 07:27:00.011122 INFO nspanel-1: Sending MQTT Message: time~07:27

never tried, but I thnk mqtt topics are case-sensitive try cmnd/nspanel-4c18/RESULT