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

Danke Schon Johannes !

Where to put this? in the nspanel.be ??
I’m sorry I’m not sure

best regards

H

I’m not certain if you are actually using my project or something else.

https://docs.nspanel.pky.eu/

Thanks again Johannes,

I don’t think this is going to work?
I don’t use lovelace at my nspanel but tasmota

any ideas?

best regards

H

Set room temperature
temperature %d = up to 5 characters, decimals are ignored but can be in the parameter

Blakadder’s Documentation says that they are ignored and the stock firmware isn’t customizable.

Ok man, thanks again !

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

Hi ,
I have updated NsPanel from saiurus lovelace-ui to esphome, to v.3.9.4 and tested some new features with last tft firmware updated in Nspanel. I can confirm that new functions like screensaver runs directly in apps.yaml and with little changes in nspanel.yaml, Full Screen Notification works with icon, colors and font sizes.

This is my nspanel.yaml.

# Service to send a command To show the screen of a specific like
# interaction of the buttons are on implemented yet
# New Variables icon . Not all implemented. Icon must be "U" value (copy and paste).
- service: notify_fullscreen
  variables:
    title: string
    description: string
    button1: string
    button2: string
    time_secs: string
    icon: string
  then:
    # show notification screen
    - lambda: 'id(nspanel).send_custom_command("pageType~popupNotify");'
    # set values on notification screen
    # color defined as number created in binary and converted to decimal (rrrrggggbbbbaaaa)
    #- lambda: 'id(nspanel).send_custom_command("entityUpdateDetail~id~"+ title + "~65535~" + button1 +"~3840~" + button2 + "~61440~" + description + "~65535~" + time_secs);'
    # New funcionalities v 3.9.4
    #entityUpdateDetail~internalName~heading~headingColor~button1text~button1color~button2text~tB2Color~notificationText~textColor~sleepTimeout~fontIdText~icon~iconColor

    - lambda: 'id(nspanel).send_custom_command("entityUpdateDetail~id~"+ title + "~65535~" + button1 +"~3840~" + button2 + "~61440~" + description + "~65535~" + time_secs + "~3~" + icon + "~65535~");'
    - rtttl.play: "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b"

Enjoy it!

1 Like

Hello @jobraun and thank you so much for your wonderful support of NSpanel.

I have a US model and your code has been perfect.

The latest update introduced a glitch for me and it effects both landscape and portrait modes.

I even made the config file very basic

nspanel-3:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/St_FrontDoor/RESULT"
    panelSendTopic: "cmnd/St_FrontDoor/CustomSend"
    model: us-l
    locale: en_AU
    sleepTimeout: 20
    sleepBrightness:
      - time: "6:00:00"
        value: 35
      - time: "21:00:00"
        value: 0
    screensaver:
      entity: weather.inghamv2

Here are some pics of the current screen


Any guidance on what may be the issue?

All the best and thanks again !

Jason

Restart the AppDaemon Addon

@jobraun for President - so stupid on my part … thank you !

I am now trying to get the alternative layout to work in US Portrait mode by using 6 sensors… however the second large icon / sensor is not showing.

    screensaver:
      entities:
        - entity: weather.inghamv2
        - entity: weather.inghamv2
          type: 0
        - entity: weather.inghamv2
          type: 1
        - entity: weather.inghamv2
          type: 2
        - entity: sensor.ingham_consumption_energy
        - entity: sensor.tsoffice_analog_temperature1
          name: Office
          icon: mdi:home-thermometer-outline
      theme:
        autoWeather: true

It gives me this layout :

I was hoping to get a large External Weather and the Internal Weather sensors above the 4 sensors below.

Is that possible ?

I take a different approach that may work for you. I add a sensor above the Date

  config:
    panelRecvTopic: "tele/kitchen-nsp/RESULT"
    panelSendTopic: "cmnd/kitchen-nsp/CustomSend"
    model: "us-p"
    locale: "en_US"
    dateFormatBabel: "E d MMM yyyy"
    sleepTimeout: 30
    sleepBrightness: !include /config/appdaemon/apps/nsp_sleepbrt.yaml
    sleepOverride:
      entity: light.kitchen_lights
      brightness: 30
    #dateAdditionalTemplate: "test"
    timeAdditionalTemplate: '{{ "Kitchen - " + states("sensor.kitchen_nsp_temperature") + "° C"}}'
	weatherUnit: celsius
	statusIcon1:
	  entity: switch.kitchen_nsp_switch1
	  altFont: True
	  icon:
		"on": mdi:menu-up-outline
		"off": "text:"
	statusIcon2:
	  entity: switch.kitchen_nsp_switch2
	  altFont: True
	  icon:
		"on": mdi:menu-up-outline
		"off": "text:"

Claire - thanks for the reply and code sample. That looks really nifty !

I will have a play of that !

I was trying to achieve a similar effect to the below from Jobraun’s doco, but in US Portrait mode.

image

1 Like

There was an issue with the alternative Layout on US-P; fixed it in current dev version:

    screensaver:
      type: screensaver
      entities:
        - entity: weather.openweathermap
        - entity: weather.openweathermap
          type: 1
        - entity: weather.openweathermap
          type: 2
        - entity: weather.openweathermap
          type: 3
        - entity: weather.openweathermap
          type: 4
        - entity: sensor.outside_temperature

https://docs.nspanel.pky.eu/faq/#how-to-upgrade-from-a-release-to-the-current-development-version

2 Likes

I have the same problem as JJ6767, even after restarting appDeamon.

---
nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/nspanel-ui/RESULT"
    panelSendTopic: "cmnd/nspanel-ui/CustomSend"
    model: eu
    sleepTimeout: 20
    sleepBrightness:
      - time: "7:00:00"
        value: 10
      - time: "22:00:00"
        value: 1
    locale: "es_ES"
    screensaver:
      entity: weather.casa

To be sure what I do, does appDeamon restart around here?

Thank you very much for your work

Hi Ozono, I just did a full restart of HASS as there was some Core updates available. Fixed my issue.

Thank you JoBraun !

Can someone help with a basic question trying to change Ip and everything I try fails tried this:
image
Get this: Must be string, got <class ‘NoneType’>. did you forget putting quotes around the value?

Many thanks

yes, correct location; however cannot tell you more without the log from that location

Hello guys. :stuck_out_tongue:

First many thank is help.

This problem:

type or paste code here
``
code:

nspanel-1:
module: nspanel-lovelace-ui
class: NsPanelLovelaceUIManager
config:
panelRecvTopic: “tele/nspanel_1/RESULT”
panelSendTopic: “cmnd/nspanel_1/CustomSend”
model: eu
locale: “hu_HU”
updateMode: “auto-notify”
sleepTimeout: 20
sleepBrightness:
- time: “5:00:00”
value: 30
- time: “22:00:00”
value: 10
screensaver:
statusIcon1:
entity: input_boolean.working
icon:
“on”: mdi:power-sleep
“off”: mdi:weather-sunset
statusIcon2:
entity: alarm_control_panel.riaszto
entity: weather.725
theme:
autoWeather: true
cards:
- type: cardAlarm
title: Riasztó
entity: alarm_control_panel.riaszto
- type: cardGrid
title: Fürdőszoba
entities:
- entity: input_boolean.e_vent_button
name: Ventilátor
icon: mdi:fan
- entity: light.et1
name: Led fürdő
icon: mdi:led-strip-variant
- entity: script.home_leave
name: Összes le
icon: mdi:lightbulb-group-off-outline
- entity: input_boolean.relax
name: Relax
icon:
“on”: mdi:bathtub
“off”: mdi:shower
- entity: switch.e_mirror
name: Tűkör
icon:
“on”: mdi:mirror-rectangle
“off”: mdi:wall-sconce-flat
- type: cardGrid
title: Settings/Módók
entities:
- entity: input_boolean.a_b_c_night_button
icon:
“on”: mdi:weather-night
“off”: mdi:weather-sunny
color:
“on”: [128, 128, 128]
“off”: [255, 255, 0]
- entity: input_boolean.d_night_button
icon:
“on”: mdi:weather-night
“off”: mdi:weather-sunny
color:
“on”: [128, 128, 128]
“off”: [255, 255, 0]
- entity: input_boolean.e_night_button
icon:
“on”: mdi:weather-night
“off”: mdi:weather-sunny
color:
“on”: [128, 128, 128]
“off”: [255, 255, 0]
- entity: input_boolean.working
icon:
“on”: mdi:power-sleep
“off”: mdi:weather-sunset
color:
“on”: [128, 128, 128]
“off”: [255, 255, 0]
- entity: input_boolean.no_timer_mode
name: Időzités
icon:
“on”: mdi:timer-off-outline
“off”: mdi:timer-outline
color:
“on”: [255, 64, 20]
“off”: [191, 255, 0]

nspanel-2:
module: nspanel-lovelace-ui
class: NsPanelLovelaceUIManager
config:
panelRecvTopic: “tele/nspanel_2/RESULT”
panelSendTopic: “cmnd/nspanel_2/CustomSend”
model: eu
locale: “hu_HU”
# updateMode: “auto-notify”
sleepTimeout: 20
sleepBrightness:
- time: “5:00:00”
value: 30
- time: “22:00:00”
value: 10
screensaver:
statusIcon1:
entity: input_boolean.working
icon:
“on”: mdi:power-sleep
“off”: mdi:weather-sunset
statusIcon2:
entity: alarm_control_panel.riaszto
entity: weather.725
theme:
autoWeather: true

nspanel-3:
module: nspanel-lovelace-ui
class: NsPanelLovelaceUIManager
config:
panelRecvTopic: “tele/nspanel_3/RESULT”
panelSendTopic: “cmnd/nspanel_3/CustomSend”
model: eu
locale: “hu_HU”
updateMode: “auto-notify”
sleepTimeout: 20
sleepBrightness:
- time: “7:00:00”
value: 30
- time: “19:00:00”
value: 10
screensaver:
statusIcon1:
entity: input_boolean.working
icon:
“on”: mdi:power-sleep
“off”: mdi:weather-sunset
statusIcon2:
entity: alarm_control_panel.riaszto
entity: weather.725
theme:
autoWeather: true
‘’

this is good.

this is not weather and buttons.

and the same a nspanel-3

many thanks for help

I guess the firmware you’ve flashed to your 2nd and 3rd display is newer than on the other. Update the backend in HACS to the latest version and restart the appdaemon addon. However without any logs it’s hard to tell.

2023-02-04 15:58:00.175200 INFO nspanel_3: Sending MQTT Message: time~15:58~
2023-02-04 15:58:00.179938 INFO nspanel-2: Sending MQTT Message: time~15:58~
2023-02-04 15:58:01.136970 INFO nspanel-1: Sending MQTT Message: time~15:58~
2023-02-04 15:58:05.727419 INFO nspanel_3: MQTT callback for: {‘topic’: ‘tele/nspanel_2/RESULT’, ‘wildcard’: None, ‘payload’: ‘{“CustomRecv”:“event,buttonPress2,screensaver,bExit,1”}’}
2023-02-04 15:58:05.731413 INFO nspanel_3: Received Message from Screen: event,buttonPress2,screensaver,bExit,1
2023-02-04 15:58:05.735432 INFO nspanel_3: Button Press Event; entity_id: screensaver; button_type: bExit; value: 1
2023-02-04 15:58:05.740734 INFO nspanel-2: Sending MQTT Message: pageType~cardEntities
2023-02-04 15:58:05.782318 INFO nspanel-2: Sending MQTT Message: entityUpd~Setup successful~deletedeletetext~iText.~���~17299~MQTT Config successfultext~iText.~���~17299~Continue addingtext~iText.~���~17299~cards to yourtext~iText.~���~17299~apps.yaml~
2023-02-04 15:58:25.854023 INFO nspanel_3: MQTT callback for: {‘topic’: ‘tele/nspanel_2/RESULT’, ‘wildcard’: None, ‘payload’: ‘{“CustomRecv”:“event,sleepReached,cardEntities”}’}
2023-02-04 15:58:25.861206 INFO nspanel_3: Received Message from Screen: event,sleepReached,cardEntities
2023-02-04 15:58:25.868365 INFO nspanel_3: Button Press Event; entity_id: cardEntities; button_type: sleepReached; value: None
2023-02-04 15:58:25.886834 INFO nspanel-2: Sending MQTT Message: pageType~screensaver
2023-02-04 15:58:26.014238 INFO nspanel-2: Sending MQTT Message: weatherUpdate~���~2.8��C~V~���~1.1��C~H~���~1.2��C~K~���~2.1��C~Sze~���~3.8��C
~~~~~~
2023-02-04 15:58:26.030552 INFO nspanel-2: Sending MQTT Message: color~0~65535~65535~65535~35957~65535~65535~65535~65535~65535~63469~35957~63469~35957~65535~65535~65535~65535~65535~65535~65535~65535
2023-02-04 15:59:00.271188 INFO nspanel-2: Sending MQTT Message: time~15:59~
2023-02-04 15:59:00.316372 INFO nspanel_3: Sending MQTT Message: time~15:59~
2023-02-04 15:59:01.096695 INFO nspanel-1: Sending MQTT Message: time~15:59~
2023-02-04 16:00:00.211071 INFO nspanel-2: Sending MQTT Message: time~16:00~
2023-02-04 16:00:00.217067 INFO nspanel_3: Sending MQTT Message: time~16:00~
2023-02-04 16:00:00.379361 INFO nspanel-2: Sending MQTT Message: date~2023. febru��r 4., szombat
2023-02-04 16:00:00.561832 INFO nspanel_3: Sending MQTT Message: date~2023. febru��r 4., szombat
2023-02-04 16:00:01.137650 INFO nspanel-1: Sending MQTT Message: time~16:00~
2023-02-04 16:00:01.239622 INFO nspanel-1: Sending MQTT Message: date~2023. febru��r 4., szombat
2023-02-04 16:01:00.172942 INFO nspanel-2: Sending MQTT Message: time~16:01~
2023-02-04 16:01:00.211834 INFO nspanel_3: Sending MQTT Message: time~16:01~
2023-02-04 16:01:01.090261 INFO nspanel-1: Sending MQTT Message: time~16:01~
2023-02-04 16:02:00.182974 INFO nspanel-2: Sending MQTT Message: time~16:02~
2023-02-04 16:02:00.232238 INFO nspanel_3: Sending MQTT Message: time~16:02~
2023-02-04 16:02:01.086862 INFO nspanel-1: Sending MQTT Message: time~16:02~
2023-02-04 16:03:00.182479 INFO nspanel-2: Sending MQTT Message: time~16:03~
2023-02-04 16:03:00.226553 INFO nspanel_3: Sending MQTT Message: time~16:03~
2023-02-04 16:03:01.085714 INFO nspanel-1: Sending MQTT Message: time~16:03~