Sonoff NSPanel Setup

I’ll add curtain and any other useful ones you can or others can think of

I’ve added vaccum and added to the demo version already as an expected flow.

I expect the levels to be unlimited! :slight_smile: it will be configure by a config file in OH that control how one links to another. You will say on the main button panel, button one goes to a 4 button page panel, with id 215. It will then connect back to OH to see what 215 looks like draw that. That page may have a nother button one that says go to a 6 button page with id 543. this goes back to OH and gets that. and on and on. So there should be no limit, although I doubt most will need more than 2. it will remeber the last page behind a button, so if it’s the same page Id for the 4 button page, it will be instant. if the id for the 4 button page is different, it will take a few moemets to go back to OH to get the layount. This is not workign yet. but it’s the design.

@Jens_Wensing

Can you define what you’d like the music player to work like for the sonus?

Show;
Album
Track
Time played of track

Controls;
Play/Pause
Previous
Next

That cover a version 1 and be usable?

Hi, I guess you confuse me with someone :wink:
I was just looking for template and MQTT only operation!
Thank you.

I did!! lol

it was @Julian_Divett , clicked the wrong damn button!!! :slight_smile:

Is there a way to send an alert to the NS Panel from OH?

Not the stock screen firmware. But my replacement nxpanel software will. it will support two versions.

One is this;
image

they appear on the home screen here. and will trigger the alert icon to turn red. you then press it to clear them.

and two;
image

you get this appear. it will stay and the unit will beep, until you press ok.

2 Likes

Is there a reference? I try to utilize the screen from Loxone purely by MQTT

@Jens_Wensing nxpanel will be controlled totally by mqtt.

1 Like

Re Sonos - those look fine as long as I will be able to code in some extra buttons for specific playlists. Ive been away, so back home and looking forward to having a play with this in the next week or so!

Added;

image

image

You’ll send and mqtt message like…
{ playlist: { page: 1, playlist: [ “Playlist…”, “…” ] } }

while will fill it.
When they press next, it will send a /stat/nspanel/RESULT “{ playlist: { next_page: 2 } }”
kind of thing, and you backend OH rule can serve next page back in json

3 Likes

Do you plan anything for free place at middle of bottom section? (Between outside weather and inside temp)

Maybe would be more ergonomic to SWAP clock with inside temp so then
Notofication could be wider and let the timestamp of the notification to be visible (f.e. “12:30 something happened”).

Please find one screenshot with clock issue. I know its Alpha and demo but looks funny:)

I had a little tile space left, but I was leaving it until someone thought of a really good use on home screen! :slight_smile: I think, going forward, I’ll have a few variants of home screen as it’s really the key screen. And you can choose in the config. But i didn’t really want to get draged into that at this stage. But I think you can assume that coming.

I’ve uploaded screen examples to the the first post and will try to keep them updated.

btw! :slight_smile: they is a bug in the nextion, which I’ve yet to fix.

x=“1”
x+=“0”
gives x=“10”

you are mean to be able to do;
x=“1”
x=“0”+x
giving “01”, but it does work. if you have the same variable it just does the same thing as first case! lol
hence, your time of “20:80” :slight_smile:

  • Fixed now
2 Likes

Hi! Thank you for your hard work. I still struggle to find the commands and the reference to the HMI TFT screen. Do you have some kind of description?
EG: I want to show the status of my gate and lights on the front screen.
Thank you!

yeah, some page for showing status of gates, windows or temperatures would be nice

@Jens_Wensing , @stonke

Hi, although absolutely not production ready, it can do this now. Actually, I do the very same in my house.

I log when the front door is opened and a few other key places. I’ve rule a to log when ‘member of…’ changes and just add things I want to that group;


With this script

import org.slf4j.LoggerFactory

def logger = LoggerFactory.getLogger("org.openhab.core.automation.alarm")

logger.info("Notifying NxPanel!")
events.sendCommand("NSPanel_NxPanelNotification", triggeringItem.label+" opened")

and have a channel/item set called “notification”, as used above

  - id: nx_panel_notify
    channelTypeUID: mqtt:string
    label: NxPanel Notification
    description: ""
    configuration:
      formatBeforePublish: '{ "notifications": {  "text": "%s" } }'
      commandTopic: cmnd/nspanel/screen

Then whenever you change the notification item to anything within OH it’s logged.

Same approach can be done for the little icons

Here are some examples to get the idea;

  { "warnings":[{"id":5,"type":"zap","state":1}] }"
  { "warnings":[{"id":5,"type":"zap","state":0}] }"
    { "weather": {  "temp": 27, "icon": "10d", "feels": 4 } }"
    { "warnings":[{"id":2,"type":"plug","state":1}] }"
    { "warnings":[{"id":2,"type":"speaker","state":2}] }"
    { "warnings":[{"id":4,"type":"robot","state":1}] }"
    { "warnings":[{"id":3,"type":"light","state":3}] }"
    { "warnings":[{"id":3,"type":"house","state":3}] }"
    { "weather": {  "temp": 18, "icon": "02d", "summary": "Very nice day" } }"
    { "warnings":[{"id":4,"type":"heat","state":2}] }"
    { "warnings":[{"id":3,"type":"zap","state":3}] }"
    { "warnings":[{"id":2,"type":"light","state":1}] }"
    { "warnings":[{"id":2,"type":"none","state":0},{"id":3,"type":"none","state":0},{"id":4,"type":"none","state":0},{"id":5,"type":"none","state":0}] }"

These are current ones;

Open to any suggestion to add a few more useful ones! :slight_smile:

I’ll obviously document the full list when complete. I think a week or so yet, until a working version is ready.

For your weather, I’d recommend added the openweather binding and having a rule to push these items when any change;


def weather = ir.getItem("weather_icon_id").state.toString()
def outdoorTemp = ir.getItem("outdoor_temp").state.intValue()
def apparentTemp = ir.getItem("apparent_temperature").state.intValue()

def json = String.format(
  "{ \"weather\": {  \"temp\": %d, \"icon\": \"%s\", \"feels\": %d } }",
  outdoorTemp, weather, apparentTemp)

events.sendCommand("ns_screen_command",json)

I’ve a channel for sending any command that’s not specific (as used above)

  - id: ns_screen_command
    channelTypeUID: mqtt:string
    label: NS Screen Command
    description: ""
    configuration:
      commandTopic: cmnd/nspanel/screen

Hope that help.

1 Like

Main buttons are currently;

Suggestions for any other key missing ones wlecome! :slight_smile:

1 Like

Great! my weekend is saved :wink:
Thanks a lot

Possible a generic status page to show key value pair, for label & value…

image

3 Likes

thats an amazing job :D, but how you will configure the playlist?
how about having a playlist with url from online Radios?

Another ideia is linking the sound to Google devices, like nest mini, nest hub, etc…