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

Mine is the US version and has been out of commission for months now. Can I assume that you are soldering to the pads marked 5V, GND, TF-TX, TF-RX?

I can Confirm this does work. I ended up rolling back to the OEM tft which is online. Revived after 4 months. Thanks @hiscorebob

Hi, I am trying to get this to work but I am unable to upload the TFT file. I have the nspanel1 device available in HA and I can see the temperature for instance. I can also switch the Relays and this is all working. But when I press the nsp1 TFT Upload function nothing happens on the panel. Only thing I notice is that after about 10 seconds the NSpanel becomes unavailable, looks like it reboots. Any ideas?

Thank you for this project @jobraun. Is there a way to get to the light details card from a cardGrid? Maybe a long Press?

If you change the filename in the secrets file of ESPHome, you have to reinstall the firmware of NSPanel in order to get the new filename reference.
To check that you have the correct location, put the link into a browser page.

example in secrets file :
nsp1_tft_url: http://blabla/local/NSPanel/NSP-EU_Widgets_Minim_2022-06-29_beta.tft

the location on the filesystem is under /config/www/NSPanel

The file can be accessed by the url to check that is available.

Here the beta on EU with the great work of @krizkontrolz

Link: https://github.com/krizkontrolz/Home-Assistant-nextion_handler

1 Like

you should already get the light detail page with a long press

1 Like

Hi, My nspanel flashed with esphome is also stuck on the “System Data Error” screen and if i flash tasmota nothing happens it is not booting. When trying to flash the screen directly it start then just timeouts, any ideas? Do you have the stock tft?

For those beta testing the EU Widget UI, I’ve just uploaded the latest (2022-07-04 beta) version. It has improvements to the gestures (and the popup indicator for feedback) and tighter local coupling between the ESP32 and Nextion.

Thanks to @zigomatic for testing and fixing a problem with ‘cover’ (blinds etc.) card (where the official documentation seems to be incorrect).

The ESPHome configuration has also had some improvements so you will need to update all 3 files this time (TFT, Python script and ESPHomne config template). Instructions for updating from a previous version are included at the top of the beta page.

1 Like

just a thought but couldn’t we use the log file to get around some of the partition size limits for the panel by not creating functions in the nspanel yaml but using HA with a folder watcher to execute automations? that way you are only using the yaml to populate info from HA to the nextion display? I have noticed that if you create an empty button on the display the log does pick it up. code or no code.

@Botap and others who have PMed with queries about configuring URLs to access local files in Home Assistant, I have posted more details on setting up and troubleshooting the TFT URL here.

One suggestion I make that differs from what @zigomatic noted, is that it is much easier to rename the TFT file after downloading it each time to match the configured tft_url: rather than changing that part of your ESPHome configuration each time.

(The reason I have to rename the TFT file each time is that Nextion uses binary file formats that are not friendly for version tracking on GitHub, whereas the Python and YAML files keep the same file names and GitHub tracks the history of changes across updates.)

Greetings everyone,

https://github.com/okaradim/nspanel/tree/main

Here is my attempt in creating a custom gui and configuration for my NSPanel, flashed with esphome.
Some interesting features I managed to add are:

  • sliders for red, green and blue colors seperately, that update dynamically both ways,
  • brightness and color temp sliders
  • dual state buttons, that also update dynamically both ways

Most of the code is commented out, since I was facing bootloops after adding too many components, so I removed as much processing as i could from the esp module itself and passed it to HA to handle.

If you need any more info or my automations code in HA, please let me know.

Hope this inspires you to build your own, and apologies to all those great guys whose code I adjusted for my enfiguration, if I haven’t mentioned anyone in my file.

Using the nextion platform with page id and component id will use up all the memory quick.
It’s far better to use a variable in the screen and just read the variable in ESP. That way one nextion platform section of the ESP code can handle an unlimited number of buttons on the screen.

Im sure you’re right, but I won’t bother modifying anything, at least for now. I see myself getting more NSPanels in the future, since it can control anything and has endless potential to be used in various cases. For exaple, apart from the lights, whith which i made some crazy scenarios, I use it to control warming bed blankets, fans, AC, even a small fountain in my yard.
So I can see myself placing a number of those in various places throughout the home, to control different electric appliances.

Thanks for your inputs though.

Btw, this lovelace gui for the device looks gorgeous, but I’m finished for now.

Hi, I hope this is not a question already asked, in case I apologize: I would like to know the pros and cons of the two methods to modify the Nspanel - Tasmota and Esphome. Thanks in advance

1 Like

Tldr:

With esphome you have the nextion library and a tighter integration between nextion display and esp.

With tasmota you have to use a custom serial protocol and an tasmota berry driver to control the screen.

1 Like

thank you very much.

Check the steps in the FAQ, if it’s still not working open an issue on Github with the requested information.

Tnx found my mistake

Just to follow up briefly on previous replies, there are 3 places that code is needed to link NSPanels to Home Assistant, and there is a range of approaches that put the emphasis (particularly the opportunities for customisation vs precompiled/template files) on different parts:

  • Tasmota/ESPHome just covers the options for the firmware on the ESP32 chip on the NSPanel (which allows Home Assistant to communicate with the Nextion display, buttons, etc.);
  • The Nextion Editor lets you build custom user interfaces (HMI files that you compile to TFT binaries and flash to the separate Nextion display MCU), or you can use standard precompiled Nextion files;
  • Home Assistant needs a Python script, custom component, AppDaemon, and/or automations to handle and respond to messages from the Nextion display (via the ESP32).

The simplest approaches let you use template or precompiled files for everything (with minimal user input required), while more complex approaches let you customise every detail of the display graphics and interactions with HA to your specific needs (a better end result, but a lot more effort required).

So, how much customisation would you like to do (just listing the entities you want to use in a preconfigured Nextion UI, fully customised interface, or somewhere in between) and, if you want detailed customisation, where are you most comfortable editing code/configs (ESP32, Nextion Editor, or Home Assistant YAML/Python)?

Thanks for the detailed answer, I have already used the Nextion editor on some small nextion displays, Esphome I use it for various components, including the management of the aquarium. Honestly, I would like to use the Nspanel in the living room to manage / check various components of the house, an example of the management of the aquarium parameters verification in addition to the classic thermostat, the physical buttons only for the management of the 2 lights in the living room …

I get system data error sometimes after an unsuccessful TFT upload. The solution for me that works every time is to upload a new TFT file. Not the same as the one that got me into trouble. Instead I use a super small basic TFT tile that I upload when this happens and it seems to solve the issue.