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

I did that with one of mine, actually. I put Tasmota on it first and then switched to ESPHome by uploading the new firmware through the Tasmota UI. (They’re both great, but ESPHome is more compatible with my brain)

1 Like

How is the viewing angle on these screens?
If one of these would sit at about 1 m height, how does it feel and look to use them?
Is it usable?

I was just playing around with a custom UI, trying to sync the screen to the album art of whatever music is playing on my Sonos. Going through the ESPHome Nextion API shows that every picture-related method (e.g. set_component_picture()) only accepts a picture_id parameter.

Does that mean you can only dynamically show images that are pre-baked into the TFT file?

Pretty much. The “Intelligent Series” displays have some extra commands to display images from files, and to upload files, but this is a Discovery Series. The https://unofficialnextion.com forum is probably the best place to go to discuss the actual programming of these things.

Bummer! That is definitely gonna limit the way we can build UI’s for these panels. Thanks for the forum link, will have a read there :slight_smile: .

There are instuctions to draw things. (lines, circles, text, etc.).
So theoretically it should be possible to render anything on this panel.
And since there’s also an mode where you get x,y cords of the touch events you could even react to touch events.
But in practice it might take way to long to paint thoose things, depending on complexity.

I’ve just flashed mine. Managed to get the time sorted and managed to get the temp in the lower right closer to actual.

The weather temp is weird. Displays -36C at the moment with 41C ~ 36C under that.

I have to say, I’m feeling completely out of my depth with this one.

If I could get one light switch to display on the panel controlling one light to turn on and off then I think I’d be on my way but I don’t know where to look to get started. Any pointer gratefully received!

Did you flash it with ESPHome or with Tasmota?

Tasmota. Reading this thread, I thought that might be easier.

If you look in the .be file, there is a location setting, currently set to North Pole I think

EDIT: Actually, just use NSPLocation as mentioned here:

In order to add custom widget to turn a light on/off, you need to edit the driver code via the Tasmota web interface. Specifically change the lines mentioned here: nspanel/nspanel.be at d7ec62c9a6991a83c46f5f22e63b6f8eff5f5e4c · blakadder/nspanel · GitHub

Touching these widgets will generate MQTT messages, which you can capture with Home Assistant and execute automations. Scroll through this thread for some examples :slight_smile:

1 Like

Aha! Found it.

Is there a list of locations? I tried London but it’s now just coming up 0 for the weather.

I just tried the nearest city to me and it worked. London might be 0 atm ?

Paste this into your browser (the weather site used in the .be file) and it seems to set to your city:

http://wttr.in/

And then use that for your location

For more accuracy you can also use a comma separated lat/lon as a location.

Hi Chris

Thanks for posting all this. I’ve copied and pasted the stuff from config.yaml into mine and the stuff for nspanel send data back. I’ve changed the topic. As far as the unique_id and name are concerned, do I need to change these to match anything at my end?

At the moment, if I toggle a switch on the screen, it sits there for a second and then goes back to Off. And if I look at the automations, it says that the send data back one has never been run.

I’m just looking to crack one device and then I’m sure I’ll be off and running.

You need to create the raw data item that listens to the topic I linked.
Any time that item received anything it will run the automation but yes you will need to check what mqtt message is being sent and update any topic that is relevant

Unique ID and name don’t matter, but definitely create the automations yourself that way you know they’ll work
Go into the automation for send data back and read the trace log to see if it had any errors

Give the automations a minute or so after updating for them to actually run. They take a while to update in the background before becoming active. You can usually tell if you look at the list of automatuons they will all turn off then back on again for a second. That’s how you know they have been updated

1 Like

Boom! You’re a genius. My switches are now staying on.

Now to control some devices.

Just to confirm I have this straight. The NSPanel just passes an ID back to HA. If I have 50 lights then I need 50 “if” statements to tie the id to an entity. Likewise, if I’m turning a light on with Alexa then I need to send 50 messages back to the panel to put the switch on the display in the right position.

Sorry, one more question. My goal would be to have a screen per room. At the moment, I have one screen with space for 8 widgets. I swipe and get a thermostat (which I don’t want). How do I make it so I can swipe and get another group of 8 widgets?

I’m assuming it’s the .be file but I can’t work out what I need to add

I would also like to revert to the stock ui