NxPanel - Replacement Firmware for Sonoff NSPanel

Try it within the Tasmota console and type
FlashNextion http://url_of_file

You might also want to download the Nextion editor and compile your own .tft file. I am currently busy with other things and haven’t checked anything else beside the home screen and grid page. If you don’t like to work on the project file better use the original Lovelace project and stick with it’s native and well documented functionality.

Hi, is appdaemon needed to run it? I m geting content loading screen only


Able to see update from nsplane when i touch. But time and date not updating.

I followed the steps mentioned above

Created rule
Updated autoexe.be file from github.

But not able to update content. No errors in log

2022-10-24 00:06:55.243 [INFO ] [org.openhab.core.automation.nspanel ] - CURRENT SCREEN screensaver - PREV. SCREEN screensaver

2022-10-24 00:06:55.251 [INFO ] [org.openhab.core.automation.nspanel ] - NSPanel Script(83) Send command: nspanel_7BF20C/cmnd/CustomSend/time~0:06?55~

2022-10-24 00:06:55.258 [INFO ] [org.openhab.core.automation.nspanel ] - NSPanel Script(87) Send command: nspanel_7BF20C/cmnd/CustomSend/date~Monday, 24. October

2022-10-24 00:06:55.266 [INFO ] [org.openhab.core.automation.nspanel ] - NSPanel Script(38) Trigger Event: Cron

2022-10-24 00:06:55.270 [INFO ] [org.openhab.core.automation.nspanel ] - rule done

Have you checked with MQTT Explorer or similar if your topics are correct? In my setup it’s topic/prefix (like NSPanel_xxxx/cmnd) while tasmota standard is prefix/topic (cmnd/NSPanel_xxxx). If you send this to the cmnd topic it should work und you should get a response {“CustomSend”:“Done”} at the /stat topic.


Thanks for your help I’ve managed to get this up and running.
I agree this probably needs a separate thread, plus I’d quite like to help evolve the code/script.

I found it worked the tasmota way cmnd/nspanel_xxxxx/CustomSend

The rules needs to come from trigger channel fired.
Page one was the same as Mikes, with a mqtt topic of tele/nspanel_xxxxx/RESULT
The relay ones needed to also be trigger channels, these are new, not the same as the ones Mike had with trigger mqtt topics of stat/nspanel_xxxxx/POWER1 (and 2).
I originally used the old ones I had setup and the script got really upset.

The page doesn’t come of that content loading screen until the screensaver page is sent correctly. For me this was getting the icons right.
The map files need to go into the transform folder.
OpenHAB has a MAP transformation Add on that is needed to be installed.
The weather icons need to link to a Icon-ID (not an icon), this is only visible on the Local Weather and Forecast Channels when Show Advanced is ticked.

I found a small error in the script with some of the icons, at the time I had a lot of errors and warnings coming up, I’m not sure this is 100% necessary to fix.

        weatherIcon[1] = "thermometer"        // Transformation.transform("MAP", "OpenWeatherIcons.map", "thermometer")
        weatherIcon[2] = "weather-pouring"    // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-pouring")
        weatherIcon[3] = "weather-windy"      // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-windy")
        weatherIcon[4] = "weather-cloudy"    // Transformation.transform("MAP", "OpenWeatherIcons.map", "weather-cloudy")

I also managed to get a lot of null errors at one point. I think there’s a chance the updateCount can hit that if test before being initialised. I added the first line below to solve

if (this.updateCount == null)                             { this.updateCount = 0 }

    // Call WeatherUpdate - switch between current & forecast
    if (this.updateCount % 2 == 0) { 

There’s lots of logger.info commented out in the script, un-commenting and reviewing logs really helped me track down problems. Along with what was being sent, in a program like MQTT Explorer.

Does anyone know of a link to documentation on what message should be sent?
I found the biggest issue I had was icons, either blank or sending text. It needs to be a byte that’s not readable in the string, and not blank.

To program I compiled in the Nextion editor, to get my own tft file. The openhab/static, html folder didn’t work for me. I’ve had issues using this to host for tasmota flashing too. So I installed Apache and used this to host the file.

I found some issues with the events when I had programmed with the standard lovelace tft. Every time a relay button was pressed the cron event then continually appeared as a button trigger, and hence had no more updates. This issue has gone away with the provided hmi, is there any change there?
It was leading me down a route of possibly splitting up the script into multiple ones.

I haven’t got round to the swipeRight/Left part yet.

Going forward with openHAB, does anyone know the best way to do this?
So seeing how they have done it in HomeAssitant was to use yaml files to configure.
openHAB has a lot of yaml configuration files but I’m not sure you can feed one into a script to configure it?
Is this better written as a binding?

Thanks for the reply. I m sending messages in same format as nspanel_xxxx/cmnd as in the logs above.
I was just trying to update date and time. I actually commented out everything else.

I also tried to move to card page. That did not work.

Will enable more debugging to find more errors.


@Mathew_Fisher @InTim

An overview on the icons supported by the firmware is here: hxxps://docs.nspanel.pky.eu/icon-cheatsheet.html
There is also a json with the icons.


Aswell as generated files for getting the char from the name for different languages (happy to generate you one, if you have a template how such a file should look like, but I guess the map file is already doing this)


The serial messages are listed here:
nspanel-lovelace-ui/HMI at main · joBr99/nspanel-lovelace-ui (github.com)

For questions to the serial protocol please ask me directly on discord.

Sorry for the links, I’m only allowed to use two of them …

I tried to create a .tft file with Nextion editor, but it gives the same error.

I tried these:
FlashNextion http://nspanel.pky.eu/lui-release.tft
FlashNextion http://nspanel.pky.eu/lui.tft
FlashNextion http://buddeberg.us/files/nspanel_ampm_backgroundimg.tft

but only get bExit.

How to get out of screensaver?
What do you to for it to not send bExit?

Is there any change in autoexec.be file too? I too getting same event.

@tizen @Andreas_Pircher

bExit is the normal behaviour of the firmware, “screensaver,swipeRight/Left” are only implemented in the custom version from InTim.

The backend has to answer with navigation to a different page on bExit, for example to the GridPage. Without looking too deep into that script, try to replace “swipeRight” with “bExit”.

The appdaemon and ioBroker backend allowing you to switch through a set of pages after exiting screensaver with bPrev/bNext, looks like this isn’t implemented on this script and it is going back to the screensaver with the navigation button instead.

Thanks! Moved bit more. Can see the screensaver and first page.

Now trying to update state of one button on page from item. Any pointers?


Does anyone know where to get the HMI file for NxPanel?

InTim’s post at 374, has an hmi link for the one with swipeRight and Left in.
The original lovelace one can be found in the github, InTim also linked that in post 370

To update an item on a live page may be a bit tricky with the way the script is written at the moment.
The pages are sent once on the page change (from button press or swipe).
If the item needs to be updated whilst that page is showing then the script would firstly need to know its changed with a trigger, and adjusted to resend that page information.

If you just mean displaying a different Icon for On/Off when the page is opened, that should be a lot easier

I have the Lovelace … HMI, but I can’t find the HMI for NxPanel

Ah sorry.
It looks like Mike wasn’t too keen on releasing it.
Post 225

Oh, ok. It’s been a while since someone asked, so:
@m-home, can you please share the HMI file?

Thanks for the reply.

How to send the different icon for onoff if state changes? Icons can work for button as there is no state.

I m still playing with it. Actually trying to configure using node red so that I have to write less code and can link pages easily. Do time based updates etc. But it is far from complete.

How can i change the Sleep Time of Display? Dimming works with “{“dim”: {“low”:n, “normal”:n}}”


Try this message

timeout~15 - timeout after 15 seconds

timeout~0 - disable

Command like {“dim”: {“low”:10, “normal”:80, “timeout”:45}} does not work, only “low” and “normal” are set.