Sonoff NSPanel Blueprint - Configure your own custom NSPanel easy via a Blueprint

no because nspanel pro is running under android

good work i have question is it possible tio use tasmota flash on nspanel?

Yes it is. I used it to flash a blank tft file for this project in the beginning.
more info in this nice video: Flashing the Sonoff NSPanel with Tasmota! - YouTube

I just have nspanel flash tasmota, that i reflash with tasmota using blanck tft, correct?

If you now run Tasmota om the panel i’d take the route of first flashing a blank TFT via Tasmota and then upload the TFT as outlined here: (EN) First Steps Installation and Setup · Blackymas/NSPanel_HA_Blueprint Wiki · GitHub

In my case this solved quit some issues with slow upload of the tft

Would someone be able to direct me on how to back-up the original NSPanel TFT/Configuration prior to making any changes to it?

Just trying to flash my NS panel and I get the following error using ESPhomeflasher. Any ideas what is going on?

Using 'COM4' as serial port.
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting...
Detecting chip type... ESP32
Connecting...

Chip Info:
 - Chip Family: ESP32
 - Chip Model: ESP32-D0WD-V3 (revision 3)
 - Number of Cores: 2
 - Max CPU Frequency: 240MHz
 - Has Bluetooth: YES
 - Has Embedded Flash: NO
 - Has Factory-Calibrated ADC: YES
 - MAC Address: C0:49:EF:FA:41:30
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 4MB
Unexpected error: The firmware binary is invalid (magic byte=FF, should be E9)

EDIT: the solution was to download the binary in ‘legacy’ format.

Next problem… After waiting for the TFT update to happen I then got an error on the NS panel and it doesn’t want to respond to anything now… On reboot I get a message on the NS panel “System Data ERROR!”

Also, how can I edit the ESPhome file to use a fixed IP address? I tried a few things but it didn’t work (wouldn’t compile)

Try the legacy download :slight_smile:

For the tft, please first try to upload the blank tft. The upload of this is quick. You can then upload the tft from the project. This solved the same issue for me.

Edit: And try to upload from your local ha machine.

Where do I do this? / get this from? I was trying to upload from my local HA machine. It got the 100% but then showed the error…

Right now I just have a panel showing the error ‘System Data ERROR!’ and I can’t seem to get anything else to happen. Through the integration in HA I can still turn the relays on and off so I know there is comms, just no joy on the screen.

EDIT: so I found the docs relating to the blank tft file. I tried flashing the ns panel again using the sam e esphome code but with the blank tft update url. Still no luck, The panel boots to “System Data ERROR!” and shows nothing else.

The last update has many problems.

I did an update to the newer version of the blueprint and newer panel version, but after I got it running, all info is show except the names above the left and right physical button.
Later on things began to become more buggy, display info being not updated all the time, leaving out weather info, the clock, parts missing, buttons not updating. in short lots of info is not displayed at times on the display, after a reboot it is there but after some time it gets lost.

I changed the update timing, but that did not help, so?

I had the same for the tft info uploaded in the old version is way to big to get a newer in memory too, the blank did not work anymore for there were these pesky errors and the tft became un- responding.
What I did after almost tearing the thing apaprt dor manual uploading to the screen is write a blank esphome code with the blank screen as base, and uploaded that, it had the uart code in it and that did work, I got the balnk on the display after which i was able to flash the newer even bigger code to the panel. and then the code of the blueprint and got it working that way.

This is a reply to sparkydave.
Not the problem I face now with no updating of the code untill a reboot

Not sure what is going on. But it looks like you display doesn’t get the right data it expects.

Do you by any chance have a dash ’ - ’ in the name of your panel? Like this:
image

I have replaced the dashes with an underscore ’ _ ’ like this to make it work:

I also read something with issues updating the TFT via https. Solved by updating from a local http address. local is also important.

Hope this might help. I’m no expert but had some similar issues as well. If this doesn’t help, maybe the logs of esphome might give us some insights. You could share them here if you want?

this is what happens and it seems after the update to the latest version the data is not being passed through indeed.:

And to answer no I have not any dashes or strange characters in the name or anywhere cause i read about that and saw the youtube video with the warning.

screen as it sometimes is:

screen as it is 90% of the rest of the time:

not getting updates as it should, as it was with previous version, there was never a hick up.

I will try your idea of local file update,maybe it helps

Could net get the blueprint locally running.

No, my device name is simply ‘nspanel1’.

could you please post this code for me?

I’m out of options Sparky. Hope someone else can help you. Good luck!

what is the problem? Have you create a issue on GitHub?

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

substitutions:
  # Name the device and it's entities
  device_name: nspanel1

# Example config.yaml
esphome:
  name: nspanel1
  comment: $device_name

esp32:
  board: esp32dev

# Wifi settings. Add these to your secrets.yaml. fast_connect must be true for a hidden ssid.
wifi:
  power_save_mode: none
  ssid: "own or !secret"
  password: "own or !secret"
  fast_connect: true

  manual_ip:
    static_ip: 
    dns1: 
    dns2: 
    gateway: 
    subnet: 

# Enable Web server.
web_server:
  port: 80
    
          
# API. Add api_pwd to your secrets.yaml.
api:


  services:

    # 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: notification
      variables:
        header: string
        message: string


# 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

# OTA (Over the air updates) password. Add to your secrets.yaml
ota:

# 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#2956
    components: [nextion]
    refresh: 1h

# A reboot button is always useful
button:
  - platform: restart
    name: $device_name Restart
  - platform: template
    name: $device_name TFT Upload
    device_class: update
    on_press:
      - lambda: 'id(disp1).upload_tft();'

output:

switch:
  # Physical relay 1
  # 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
    

sensor:

  # 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

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);'
      
      
# Configure the screen itself
display:
  - platform: nextion
    id: disp1
    uart_id: tf_uart
    tft_url: http://IP-address:8123/local/nspanel_blank.tft
    # A little fun...
    on_setup:
      then:
        - 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");

This is the code I used to get the not responding nspanel, back online again, plus you know there is the blank.tft in place.
After this I could upload tI placed the Blacky code in esphome “your nspanel1” update the blueprint, ran the automation and well that got it up and running.

O please do not forget to add your own IP address and credentials, I did remove mine :slight_smile: