NxPanel - Replacement Firmware for Sonoff NSPanel

I can’t see anything in the logs that shows a pid and play being published? If I press the play button it seems to output
{"media":{"action":"pause","volume":29}}

The web server was not serving the file. Reason: the .tft mime type was not known to the web server and so I could see the file but I could not read the content. After adding the .tft mime type in the IIS configuration, flashing finished without errors. Thank you for your help! Now I can switch between my own design and the stock nspanel screens. :slightly_smiling_face:

glad it’s working

It’s what I was trying to say! :slight_smile: I forget to add pid. It shouldn’t make any difference for you now, just make your channel trigger only look for play, and another trigger for pause. That should work fine as no other commands have those words. But then I fix it and add pid, would be safer to go back and edit your triggers to be pid AND play.

Just to clarify a bit more, you want with the play or pause button to do the same thing on your sonos item? like a switch? play is on, pause if off kind of thing?

If so, you need a regex that matched either play or pause and chain the to a jsonpath to get the value, then you can set custom on/off values on your channel to be play/pause… Assusing that’s what you mean by mapping it to a single channel, check my syntax for OR, it’s something like that,

REGEX:(.*((play)|(pause)).*)∩JSONPATH:$.media.action

Try this channel

  - id: nxpanel_play_pause
    channelTypeUID: mqtt:switch
    label: NxPanel Play/Pause
    description: ""
    configuration:
      commandTopic: cmnd/nspanel/nxpanel
      formatBeforePublish: '{"sync":{"pid":20,"mode":"%s"}}'
      stateTopic: tele/nspanel/RESULT
      transformationPattern: REGEX:(.*\"pid\":20,.*((play)|(pause)).*)∩JSONPATH:$.media.action
      off: pause
      on: play

I’ve tested and works linked to a normal switch item

i have installen Tasmota 11.0.0 an the lastes version of NXpanel.be. I delete the BEC Files, restart many times and try to install the last tft - think 1.0.4?

How ever i get the starting flaching Screen but Zero Bytes an thi in tne konsole

18:39:16.949 BRY: GC from 31522 to 20392 bytes, objects freed 253/348 (in 9 ms)
18:39:20.241 CMD: installnxpanel
18:39:20.243 SRC: WebConsole from 192.168.2.97
18:39:20.246 CMD: Grp 0, Cmnd 'INSTALLNXPANEL', Idx 1, Len 0, Data ''
18:39:20.265 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"InstallNxPanel":"Done"}
18:39:20.351 FLH: host: proto.systems, port: 80, get: /nxpanel/nxpanel-latest.tft
18:39:23.391 FLH: Connected:true
18:39:23.497 FLH: Retry 1
18:39:23.600 FLH: Retry 2
18:39:23.702 FLH: Retry 3
18:39:23.708 NXP: Nextion command sent = bytes('4452414B4A485355594447424E434A48474A4B534842444EFFFFFF')
18:39:23.715 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF')
18:39:23.721 NXP: Nextion command sent = bytes('7265636D6F643D30FFFFFF')
18:39:23.726 NXP: Nextion command sent = bytes('636F6E6E656374FFFFFF')
18:39:23.739 NXP: Received Raw = bytes('636F6D6F6B20322C33303631342D302C4E5834383332463033355F303131432C...')
18:39:23.745 FLH: Send (High Speed) flash start
18:39:23.751 NXP: Nextion command sent = bytes('77686D692D7772697320302C3131353230302C72657330FFFFFF')
18:39:24.184 NXP: Received Raw = bytes('05')
18:39:24.188 FLH: Read block
18:39:24.202 BRY: GC from 30717 to 20114 bytes, objects freed 180/336 (in 9 ms)
18:39:24.206 BRY: Exception> 'type_error' - unsupported operand type(s) for <: 'nil' and 'int'
18:39:24.284 BRY: Exception> 'import_error' - module 'debug' not found
18:39:24.287 stack traceback:
18:39:24.290 	<unknown source>: in function `event`
18:39:33.894 BRY: GC from 30365 to 20215 bytes, objects freed 248/343 (in 9 ms)
18:39:36.512 WIF: Prüfe Verbindung...

i flash the german version from tasmota.

Any Idear?

Tasmota Version	11.0.0(tasmota)
Erstellungs-Datum & -Uhrzeit	2022.02.12 14:18:48
Core-/SDK-Version	2_0_2_2/v4.4-3-g6afb23d90a
Laufzeit	0T00:04:19
Anz. Flash-Schreibzyklen	113
Anzahl Startvorgänge	34
Grund für Neustart	Vbat power on reset
Name [Friendly Name] 1	NSPanel_01
Name [Friendly Name] 2	
 
AP1 SSID (RSSI)	Starbase2020 (100%, -49 dBm) 11n
Hostname	NSPanel01-7E00BC-0188
MAC-Adresse	44:17:93:7E:00:BC
IP-Adresse (wifi)	192.168.2.82
Gateway	192.168.2.1
Subnetzmaske	255.255.255.0
DNS-Server1	192.168.2.1
DNS-Server2	0.0.0.0
 
HTTP API	aktiviert
 
MQTT Host	192.168.2.215
MQTT Port	1883
MQTT TLS	deaktiviert
MQTT Benutzer	DVES_USER
MQTT Client	DVES_7E00BC
MQTT Topic	NSPanel01_%06X
MQTT Group Topic 1	Smarthome/NSPanel01_7E00BC/cmnd/
MQTT Full Topic	Smarthome/NSPanel01_7E00BC/cmnd/
MQTT Fallback-Topic	cmnd/DVES_7E00BC_fb/
MQTT No Retain	deaktiviert
 
Emulation	keine
 
ESP Chip ID	8257724 (ESP32-D0WD-V3)
Größe Flash-Chip	4096 kB
Größe Programm	1341 kB
Flash frei	1856 kB
Freier Arbeitsspeicher	125.4 kB (frag. 8%)

the log after restart

18:47:15.884 MQT: Verbindungsversuch...
18:47:20.437 MQT: Verbindung fehlgeschlagen aufgrund von 192.168.2.215:1883, rc -4. Wiederversuch in 10 s
18:47:20.543 NXP: Received Raw = bytes('7B22696E6974223A207B226E782D70616E656C223A2022312E302E30222C2022...')
18:47:20.560 RSL: RESULT = {"init": {"nx-panel": "1.0.0", "berry": "1.1.3" }}
18:47:20.597 BRY: GC from 30784 to 20726 bytes, objects freed 237/348 (in 9 ms)
18:47:22.480 QPC: Reset
18:47:24.477 APP: Anzahl Startvorgänge 35
18:47:25.110 CFG: Saved, Anzahl 114, Bytes 4096
18:47:32.892 MQT: Verbindungsversuch...
18:47:32.921 MQT: verbunden
18:47:32.930 MQT: Smarthome/NSPanel01_7E00BC/LWT = Online (beibehalten)
18:47:32.946 MQT: Smarthome/NSPanel01_7E00BC/cmnd/POWER = 
18:47:32.949 MQT: abonniere Smarthome/NSPanel01_7E00BC/cmnd/#
18:47:32.957 MQT: löse abo. von homeassistant/status
18:47:32.975 MQT: Smarthome/NSPanel01_7E00BC/INFO1 = {"Info1":{"Module":"NSPanel","Version":"11.0.0(tasmota)","FallbackTopic":"cmnd/DVES_7E00BC_fb/","GroupTopic":"Smarthome/NSPanel01_7E00BC/cmnd/"}}
18:47:33.021 MQT: Smarthome/NSPanel01_7E00BC/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"NSPanel01-7E00BC-0188","IPAddress":"192.168.2.82"}}
18:47:33.062 BRY: GC from 30974 to 20786 bytes, objects freed 246/354 (in 9 ms)
18:47:33.085 MQT: Smarthome/NSPanel01_7E00BC/INFO3 = {"Info3":{"RestartReason":"Vbat power on reset","BootCount":36}}
18:47:33.118 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"POWER1":"OFF"}
18:47:33.132 MQT: Smarthome/NSPanel01_7E00BC/POWER1 = OFF
18:47:33.144 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"POWER2":"OFF"}
18:47:33.152 MQT: Smarthome/NSPanel01_7E00BC/POWER2 = OFF
18:47:33.166 TFS: File 'autoexec.bat' not found
18:47:33.267 SRC: MQTT
18:47:33.271 CMD: Grp 0, Cmnd 'NXPANEL', Idx 1, Len 536, Data '{"refresh":{"pid":10,"name":"Smarthome","format":6, buttons:[{"bid":1,"label":"Essen", "type":1,"state":1,"icon":1},{ "bid":2, "label":"Musik","type":1,"state":0,"icon":1 },"bid":3, "label":"Haustuer", "type":2, "icon":6},{"bid":4,"label":"Schlummer","type":10,"next":11,"state":5,"icon":5},{"bid":5,"label":"Temp","type":10,"next":12,"state":9,"icon":9},{"bid":6,"label":"Chillen","type":1,"icon":3},{"bid":7,"label":"OG aus","type":10,"next":13,"state":8,"icon":3},{"bid":8,"label":"Status","type":10,"next":17,"state":15,"icon":16}]}'
18:47:33.453 BRY: GC from 31038 to 22552 bytes, objects freed 160/340 (in 7 ms)
18:47:33.540 BRY: GC from 32800 to 22528 bytes, objects freed 214/339 (in 8 ms)
18:47:33.632 BRY: GC from 32800 to 22528 bytes, objects freed 214/339 (in 8 ms)
18:47:33.720 BRY: GC from 32800 to 22528 bytes, objects freed 214/339 (in 8 ms)
18:47:33.808 BRY: GC from 32800 to 22528 bytes, objects freed 214/339 (in 8 ms)
18:47:33.925 NXP: payload sent = bytes('50530018027B2272656672657368223A7B22706964223A31302C226E616D6522...')
18:47:33.945 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
18:47:33.968 BRY: GC from 32772 to 20497 bytes, objects freed 207/344 (in 9 ms)
18:47:34.054 SRC: MQTT
18:47:34.057 CMD: Grp 0, Cmnd 'SCREEN', Idx 1, Len 115, Data '{"status": {"page_id":0, "items": [ { "id":4, "label": "Temperature", "status": "Hot" }, { "id":8, "clear":1} ] } }'
18:47:34.143 BRY: GC from 30747 to 21406 bytes, objects freed 198/355 (in 8 ms)
18:47:34.198 NXP: payload sent = bytes('50530073007B22737461747573223A207B22706167655F6964223A302C202269...')
18:47:34.209 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Screen":"Done"}
18:47:34.312 SRC: MQTT
18:47:34.317 CMD: Grp 0, Cmnd 'NXPANEL', Idx 1, Len 64, Data '{"weather":{"temp":2.8,"icon":"01n","feels":2.1200000000000045}}'
18:47:34.359 BRY: GC from 31647 to 20864 bytes, objects freed 210/347 (in 9 ms)
18:47:34.413 NXP: payload sent = bytes('50530040007B2277656174686572223A7B2274656D70223A322E382C2269636F...')
18:47:34.426 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
18:47:34.656 SRC: MQTT
18:47:34.659 CMD: Grp 0, Cmnd 'NXPANEL', Idx 1, Len 45, Data '{"summary":{"temp":4.1,"text":"Feuchte 75%"}}'
18:47:34.694 BRY: GC from 31176 to 20806 bytes, objects freed 205/347 (in 9 ms)
18:47:34.734 NXP: payload sent = bytes('5053002D007B2273756D6D617279223A7B2274656D70223A342E312C22746578...')
18:47:34.747 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
18:47:36.232 BRY: GC from 31056 to 20558 bytes, objects freed 228/347 (in 9 ms)
18:47:37.461 BRY: GC from 20644 to 20287 bytes, objects freed 7/340 (in 2 ms)
18:47:37.476 MQT: Smarthome/NSPanel01_7E00BC/STATE = {"Time":"2022-02-21T18:47:37","Uptime":"0T00:00:27","UptimeSec":27,"Heap":129,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":37,"MqttCount":1,"Berry":{"HeapUsed":19,"Objects":340},"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Starbase2020","BSSId":"B6:39:56:90:2A:05","Channel":11,"Mode":"11n","RSSI":90,"Signal":-55,"LinkCount":1,"Downtime":"0T00:00:04"}}
18:47:37.563 MQT: Smarthome/NSPanel01_7E00BC/SENSOR = {"Time":"2022-02-21T18:47:37","ANALOG":{"Temperature1":5.9},"ESP32":{"Temperature":63.9},"TempUnit":"C"}
18:47:41.527 WIF: Prüfe Verbindung...
18:47:42.498 MQT: tasmota/discovery/4417937E00BC/config = {"ip":"192.168.2.82","dn":"NSPanel_01","fn":["NSPanel_01","",null,null,null,null,null,null],"hn":"NSPanel01-7E00BC-0188","mac":"4417937E00BC","md":"NSPanel","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"11.0.0","t":"NSPanel01_7E00BC","ft":"Smarthome/NSPanel01_7E00BC/","tp":["cmnd","stat","tele"],"rl":[1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"ver":1} (beibehalten)
18:47:42.527 MQT: tasmota/discovery/4417937E00BC/sensors = {"sn":{"Time":"2022-02-21T18:47:42","ANALOG":{"Temperature1":6.0},"ESP32":{"Temperature":63.3},"TempUnit":"C"},"ver":1} (beibehalten)
18:47:45.115 BRY: GC from 30580 to 20513 bytes, objects freed 225/345 (in 8 ms)

The 2nd log looks mostly right to me.

{"init": {"nx-panel": "1.0.0", "berry": "1.1.3" }}

This message comes back from nxpanel, so it’s running.
But it does look a bit odd. When you right swipe the home screen, the panel should send a page request to your backend. I can’t see that message. There should be something like this;

18:11:56.761 MQT: tele/nspanel/RESULT = {"page": {"format": 6, "pid": 10, "type": "sync"}}

but I can see you sending your reply;

'{"refresh":{"pid":10,"name":"Smarthome","format":6, buttons:[{"bid":1,"label":"Essen", "type":1,"st ...

How is you backend doing this then??

Also, it you swipe up on home screen, you’ll get to config page. Enable Auto updates, and Test Updates. Then you can do

autoflash

which will get you to 1.0.5 and make updates easier going forward.

Anyway, to me it looks like you are just sending the page message, without being asked. so it’s being processed by the home screen and it means nothing to that. If you are just testing your backend, swipe to the 8 button, then manually send your config message. as the message is meant for the page.

The flow is, you move to a page, nxpaenl asks for the config/sync for the page, you send the config.

You can’t just send random config messages,

Hope that helps.

Version 1.0.5

  • Fixes to media screens to add missing pid values.

To Update
9998+Red in Alarm screen, autoflash in tasmota conole, or wait 24 hours.
(assuming auto update enabled in config screen)
Will stop reminding of this going forward :slight_smile:

Okay. I work with node-red and i read set refresh command and only send the refresh.

maybe it is missing in the log - do not know. This may be to set up write. But at the moment i try to flash a new version. So the flash process is not working.

20:18:52.385 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
20:18:52.423 NXP: Received Raw = bytes('7B226572726F72223A7B22653A223A322C2273223A3533362C2268223A222274...')
20:18:52.450 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"error":{"e:":2,"s":536,"h":""t"}}{"page": {"format": 6, "pid": 10, "type": "refresh"}}
20:18:52.457 BRY: ERROR, bad json: {"error":{"e:":2,"s":536,"h":""t"}}{"page": {"format": 6, "pid": 10, "type": "refresh"}}
20:18:52.536 SRC: MQTT
20:18:52.540 CMD: Grp 0, Cmnd 'NXPANEL', Idx 1, Len 536, Data '{"refresh":{"pid":10,"name":"Smarthome","format":6, buttons:[{"bid":1,"label":"Essen", "type":1,"state":1,"icon":1},{ "bid":2, "label":"Musik","type":1,"state":0,"icon":1 },"bid":3, "label":"Haustuer", "type":2, "icon":6},{"bid":4,"label":"Schlummer","type":10,"next":11,"state":5,"icon":5},{"bid":5,"label":"Temp","type":10,"next":12,"state":9,"icon":9},{"bid":6,"label":"Chillen","type":1,"icon":3},{"bid":7,"label":"OG aus","type":10,"next":13,"state":8,"icon":3},{"bid":8,"label":"Status","type":10,"next":17,"state":15,"icon":16}]}'
20:18:52.705 BRY: GC from 32900 to 21941 bytes, objects freed 144/339 (in 7 ms)
20:18:52.786 BRY: GC from 32226 to 22528 bytes, objects freed 202/339 (in 7 ms)

if i try auto flash

20:22:49.772 CMD: autoflash
20:22:49.776 SRC: WebConsole from 192.168.2.97
20:22:49.779 CMD: Grp 0, Cmnd 'AUTOFLASH', Idx 1, Len 0, Data ''
20:22:49.788 NXP: Triggering update check
20:22:49.812 NXP: payload sent = bytes('5053000E007B22636F6E666967223A2022227D4570')
20:22:49.823 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"AutoFlash":"Done"}
20:22:50.027 NXP: Received Raw = bytes('7B22636F6E666967223A7B2276223A22312E302E30222C226175223A312C2261...')
20:22:50.065 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"config":{"v":"1.0.0","au":1,"at":0,"sm":0,"st":30,"wp":6,"ar":0,"ah":0,"dl":10,"dn":51}}
20:22:50.079 BRY: GC from 30680 to 20739 bytes, objects freed 207/344 (in 9 ms)
20:22:50.115 NXP: persist msg: {'config': {'ar': 0, 'dn': 51, 'st': 30, 'dl': 10, 'wp': 6, 'v': '1.0.0', 'at': 0, 'au': 1, 'ah': 0, 'sm': 0}}
20:22:50.208 NXP: persist saved
20:22:50.212 NXP: Update check for 'release'
20:22:52.235 HTP: Connected in 2018 ms, stack low mark 3796
20:22:52.247 NXP: Current version 1.0.0 is latest
20:22:53.801 WIF: Prüfe Verbindung...

i love this project, great work really. So i want to keep us-to date. Any idear what the problem is? may be there is not internet connection?

as I said before, you need to swipe up on main screen to get to config, then enable auto update and TEST UPDATES. If you don’t it will only check release versions, not testing

if you do that, you will see this;

image

This error;

is nothing major, but was fixed in later versions.

puh. Reflosh Tasmota, setup again, setup your setting - do auto flash.

i went wrong :frowning:

21:12:26.682 CMD: autoflash
21:12:26.691 NXP: Triggering update check
21:12:26.723 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"AutoFlash":"Done"}
21:12:26.987 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"config":{"v":"1.0.0","au":1,"at":1,"sm":0,"st":30,"wp":1,"ar":0,"ah":0,"dl":10,"dn":100}}
21:12:27.137 NXP: Update check for 'testing'
21:12:29.055 NXP: Newer version available - 1.0.5
21:12:29.212 FLH: host: proto.systems, port: 80, get: /nxpanel/nxpanel-1.0.5.tft
21:12:30.012 FLH: Send (High Speed) flash start
21:12:30.444 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 0}}
21:12:32.521 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 1}}
21:12:38.737 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 2}}
21:12:45.409 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 3}}
21:12:51.069 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 4}}
21:13:08.332 BRY: Exception> 'timeout_error' - Berry code running for too long
21:13:08.336 stack traceback:
21:13:08.339 	<unknown source>: in function `log`
21:13:08.343 	<unknown source>: in function `write_block`
21:13:08.348 	<unknown source>: in function `<lambda>`
21:13:08.351 	<unknown source>: in function `run_deferred`
21:13:08.354 	<unknown source>: in function `event`

now “System Date ERROR!” in Display :-/

is there a way to flash again?

i try this

FlashNextion http://proto.systems/nxpanel/nxpanel-1.0.5.tft

get this

21:24:34.579 CMD: FlashNextion http://proto.systems/nxpanel/nxpanel-1.0.5.tft
21:24:34.597 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"FlashNextion":"Done"}
21:24:34.681 FLH: host: proto.systems, port: 80, get: /nxpanel/nxpanel-1.0.5.tft
21:24:35.610 FLH: Send (High Speed) flash start
21:24:40.994 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 0}}
21:24:47.561 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 1}}
21:24:52.318 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 2}}
21:25:02.222 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 3}}
21:25:14.760 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 4}}
21:25:15.791 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 5}}
21:25:18.295 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 6}}
21:25:21.491 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 7}}
21:25:22.643 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 8}}
21:25:24.374 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 9}}
21:25:25.296 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 10}}
21:25:26.699 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 11}}
21:25:32.517 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 12}}
21:25:35.131 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 13}}
21:25:41.797 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 14}}
21:26:36.163 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 15}}
21:26:40.540 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 16}}
21:26:45.295 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 17}}
21:26:51.380 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 18}}
21:26:58.728 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 19}}
21:27:17.116 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 20}}
21:27:19.698 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 21}}
21:27:21.459 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 22}}
21:27:25.415 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 23}}
21:27:27.324 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 24}}
21:27:30.134 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 25}}
21:27:31.241 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 26}}
21:27:43.839 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 27}}
21:27:55.335 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 28}}
21:28:05.827 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
21:28:06.584 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 29}}
21:28:11.208 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
21:28:31.359 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
21:28:32.024 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 30}}
21:28:32.169 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"NxPanel":"Done"}
21:28:34.426 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 31}}
21:28:36.741 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 32}}
21:28:39.842 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 33}}
21:28:41.894 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 34}}
21:28:45.324 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 35}}
21:28:48.439 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 36}}
21:28:55.569 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 37}}
21:29:03.681 MQT: Smarthome/NSPanel01_7E00BC/RESULT = {"Flashing":{"complete": 38}}

on the display hangs on 65% 1835008 …

it;s working. it’s skipping 65% unchanged it doens’nt need to uploads. it will finish :slight_smile:
the count is % of file downloaded will reboot fine at 100%

1 Like

:smiley: Yes, my mistake. it takes over 8 minutes and count until 99. So sorry for me :slight_smile:

i am on version 1.0.5

Thanx a lot!

The regular dimmer does not publish anything when I press on power button
But if I move the bar of the dimmer it publish

{“dimmer”:{“pid”:18,“power”:1,“dimmer”:40}}

I set the button this way, what’s wrong? :innocent:

REGEX:(.*\"pid\":18,.*\"power\":%d.*)nJSONPATH:$.dimmer.[?(@.pid==18)].power

Version 1.0.6

  • Fixed missing publish for standard dimmer
REGEX:(.*\"dimmer\".*\"pid\":18,.*)∩JSONPATH:$.dimmer.power

The brightness dimmer is much the same;

REGEX:(.*\"dimmer\".*\"pid\":18,.*)∩JSONPATH:$.dimmer.dimmer

The regex part just need to match the page id really. as that’s enough to differentiate the event, but adding dimmer too makes it more readable i think (although not needed). Once that’s there you dont need anything in the jsonpath part, apart from getting your value.

and set custom on/off to 1/0

Continuing the discussion from NxPanel - Replacement Firmware for Sonoff NSPanel:

@Pentium4, nice work!

I want to use your script in iobroker and struggle at this point:

var event JSON fails, think my object is notin right notation:

Is the following what var str = expects?

{
“page”: {
“format”: 6,
“pid”: 10,
“type”: “refresh”
}
}

Regards
Hanz

@m-home , @Pentium4 really great job

Hanz in iobroker you have to adapt the javascript provided by @Pentium4. You can use a event trigger, something like this:

mqttCmndId = ‘mqtt.0.nspanel-wz.cmnd.NxPanel’;
on({id: mqttResultId, change: “any”, ack: true}, async function (obj) {
resultObj = (function () { try {return JSON.parse((obj.state ? obj.state.val : “”));} catch(e) {return {};}})();
var str = resultObj.toString();
// and for example
if (getAttr(resultObj, ‘page’)){ // do something}
else if (getAttr(resultObj, ‘button’)){ // do something else}
})

Great work Mike!!!
If would I edit the graphics with my custom light icons?
Bye
Sandro

There is not any way to add custom icons at runtime, unfortunately everything needs to be compiled in when it’s built, graphics even the fonts you want to use. I’m open to adding a few more useful icons people might need/want, that’s not too bad to do. But they still need built in where the tft is compiled.

Any ETA on a possible American portrait build?

Do you have any plans to release the HMI file as well, so that we can make small changes like this ourselves if someone wants to play around with the Nextion Editor?