NxPanel - Replacement Firmware for Sonoff NSPanel

Currently, you still need the java app to split the file. I’m changing nxpanel to do auto updates, now they have fixed the tcp bug so I can flash it that way, it’s just a time matter. For now I’m just trying to get all the components working fully. Then I’ll upgrade the flashing part. And yes, it has taken a lot of effort, more that I intended, but almost there now! :slight_smile:

I don’t quite understand what you mean? If you are referring to the page ID switch statement you just add another case to that for the page number. Then add more switch statements for the buttons in the page. I hate double switch statements

It’s the 10 in this section I don’t understand

it’s the base, as in base 10. could be 2 for binary or 16 for hex. I don’t think it’s need. If omitted, it should default to decimal.

1 Like

Trying to get 1 decimal temperature for local room temperature. Sending { “summary”: { “title”: “18.5°C”, “text”: “Humidity: 60%”}} to the screen but displaying 18.5°C

I think this is because you are passing a 2 byte unicode character. The ascii for the degree sysmbol is 0xB0, but it’s putting 0xC2B0 in. I think this the OS and openhab because of it’s encoding. I think by the time the Berry layer gets it from MQTT is’s aready got the C2 there which is just passed to the Nextion. The nextion is just single ascii, so for it, its 2 character.

Might be worth google the general openhab subjects for sending things at 1 byte not 2. If it can’t be done, it might be possible for the Berry layer to strip it out before sending. But I’d rather do that as a last resort, because I’d need to add logic to looks at all strings it passed.

If no one can find a way to pass in the single byte 0xB0, I will look at it, as it’s a valid use case. But I’ll come back to it later.

v1.0.0-beta13

  • Kind of bug fixed. Some issues around pressing buttons on pages before they are refreshed. This is only an issue where people seem to call refresh on all button pages and not refresh, then sync, which is the design. Seems ok now.
  • RGB/CT Dimmer complete. This is now duel purpose. I am not sure how other use it, but this seems the best for me. Feedback welcome. This is complete, unless it has bugs.

image

Dimmer 1 needs some work, short of that I think it’s pretty much complete now. Unless people have issues I am not aware of.

Let me know.

Ok, I’ve done a fix to strip these out in berry. I might revert it if it causes problems. I removing chars sent in, which I’m not too keen on, but I think it might be the only way.

You need the latest nxpanel.be.

Fixes it , Thanks.

Hi there,

every time i try to flash nextion, i get the message:

Model does not match
Device Model
NX8232F035_0110

Is there a chance to fix this ?

Greetings

1 Like

Not ever seem that before.

Can you send the tasmota log with “weblog 4” set. When you try the flash?

Mi Mike,

13:31:15.610 CMD: weblog 4
13:31:15.617 RSL: RESULT = {“WebLog”:4}
13:31:16.410 CFG: Saved, Count 43, Bytes 4096
13:31:17.801 BRY: GC from 27622 to 13821 bytes, objects freed 355/238 (in 20 ms)
13:31:24.448 WIF: Checking connection…
13:31:26.782 BRY: GC from 27689 to 13635 bytes, objects freed 360/233 (in 15 ms)
13:31:36.800 BRY: GC from 27299 to 13709 bytes, objects freed 350/236 (in 14 ms)
13:31:44.443 WIF: Checking connection…
13:31:46.781 BRY: GC from 27452 to 13635 bytes, objects freed 357/233 (in 19 ms)
13:31:56.807 BRY: GC from 27297 to 13720 bytes, objects freed 350/237 (in 15 ms)
13:32:00.971 NSP: Time and date synced with { “clock”: { “date”:12,“month”:2,“year”:2022,“weekday”:6,“hour”:13,“min”:32 } }
13:32:01.047 BRY: GC from 27476 to 14613 bytes, objects freed 284/244 (in 13 ms)
13:32:01.077 NSP: payload sent = bytes(‘5053004F007B2022636C6F636B223A207B202264617465223A31322C226D6F6E…’)
13:32:04.442 WIF: Checking connection…
13:32:07.788 BRY: GC from 29240 to 13789 bytes, objects freed 359/239 (in 21 ms)
13:32:18.802 BRY: GC from 27593 to 13723 bytes, objects freed 357/235 (in 15 ms)
13:32:22.897 CMD: flashnextion http://192.168.xxx.xxx:xxxx/static/chunks
13:32:22.901 SRC: WebConsole from 192.168.xxx.xxx
13:32:22.904 CMD: Grp 0, Cmnd ‘FLASHNEXTION’, Idx 1, Len 38, Data ‘http://192.168.xxx.xxx:xxxx/static/chunks’
13:32:22.917 RSL: RESULT = {“FlashNextion”:“Done”}
13:32:23.097 HTP: Connected in 108 ms, stack low mark 3812
13:32:23.111 NSP: Nextion command sent = bytes(‘4452414B4A485355594447424E434A48474A4B534842444EFFFFFF’)
13:32:23.118 NSP: Nextion command sent = bytes(‘7265636D6F643D30FFFFFF’)
13:32:23.123 NSP: Nextion command sent = bytes(‘7265636D6F643D30FFFFFF’)
13:32:23.130 NSP: Nextion command sent = bytes(‘636F6E6E656374FFFFFF’)
13:32:23.144 NSP: Received Raw = bytes(‘636F6D6F6B20322C33303631342D302C4E5834383332463033355F303131432C…’)
13:32:23.150 comok 2,30614-0,NX4832F035_011C,50,61744,49653401FFB75560,16777216
13:32:23.155 NSP: Nextion command sent = bytes(‘77686D692D777269203137343834342C3131353230302C72657330FFFFFF’)
13:32:23.589 NSP: Received Raw = bytes(‘05’)
13:32:23.592
13:32:23.869 HTP: Connected in 269 ms, stack low mark 3812
13:32:23.935 BRY: GC from 34139 to 21825 bytes, objects freed 246/230 (in 14 ms)
13:32:24.309 RSL: RESULT = {“Flashing”:{“complete”: 2}}
13:32:25.102 WIF: Checking connection…
13:32:34.429 BRY: GC from 43658 to 13908 bytes, objects freed 445/242 (in 19 ms)
13:32:45.106 WIF: Checking connection…
13:32:45.421 BRY: GC from 27835 to 13980 bytes, objects freed 357/242 (in 15 ms)
13:32:55.412 BRY: GC from 28014 to 13754 bytes, objects freed 367/236 (in 15 ms)

Thats working

it’s 2% through and going.

where is the error?

Hi Mike,

I thought that was a mistake, then I’ll continue, thank you very much!

Dirk

Hi Mike,

sorry but i thint the flashing isn´t finished. There is still the message on the Display and the Nspanel does not restart. How long does the flashing take normaly ?

Dirk

There should be a percentage bar on the display. it goes up at a steady speed, when 100% the unit will auto reboot.

I’ve never know it stop. but it’s possible if there were any serial issues. I would just try again. what is the last % it got to?

Major Update Coming Soon…

Install process for a new device will be;

  • Flash Tasmota
  • Copy nxpanel.be
  • InstallNxPanel (in tasmota console)

That’s it!

To install a new version you will need to do this;

  • Nothing.

It will auto update to current version itself if you enable it in settings.

Complete!

3 Likes

I have a strange problem with setting the button on OH
I see a change of state of the button
But when I refresh the unit I do not see the situation change
Although I see the command in OH

`

  • id: NXPanel_B1
    channelTypeUID: mqtt:switch
    label: NXPanelB1
    description: null
    configuration:
    stateTopic: tele/tasmota_7DDCCC/RESULT
    transformationPattern: JSONPATH:$.button.[?(@.pid==“10”)].[?(@.bid==“1”)].state
    off: “0”
    on: “1”

`

GenericMQTTThing_NxPanelCommand’ predicted to become {“sync”:{“pid”:10,buttons:[{“bid”:1,“state”:0}]}}

what are you seeing in the tasmota log on the panel, when this happens?
If it’s sending to the Nextion;

{“sync”:{“pid”:10,buttons:[{“bid”:1,“state”:0}]}}

I would expect that to turn button 1 off on that page, if the page was showing.

If you are talking about moving to the page after you’ve sent the message. Then you should be sending that state again, either in the refresh or sync message, you send in response to the page message you are sent as the page is made active.

This process seems to work fine for me.

Mapping an NxPanel event directly to the item, without Rules

This is very nice way to get the item updated directly from the mtqq messge without using a rule to map it? :slight_smile: I like that. It’s definitely worth bringing to the attention of other users!

Thank you @jonny211

Do you need to add a regex at the start to stop spam error messaged in logs? I had to do that for other RF item events. Maybe yours is a more sophisticated regex and works better.