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

circular slider for target temperature :grin:
https://youtu.be/KqFpyDbmm_E

ok circular slider is finished, goes from 0-28 C. all code is on GitHub, I’ve included the svg images too incase anyone wants a different background.

the code for the variable given for target temperature is in a timer within the hmi.

1 Like

What is a yalm?
Or do you mean yaml?

I’m sure it’s a typo and should be yaml :joy:

While it looks really cool, I could never understand circular sliders on the flat-screen. It’s got to be the most user-unfriendly way of controlling the temperature, since it’s really hard to move your finger in a circle while seeing if you are actually doing something under that finger. It works wonderfully on nest, but that’s because it’s not a touch-screen and control is outside of the area that displays progress.

Hello @jobraun,

thanks for sharing. I tried it following the instructions in your repo and ended up being stuck in the “waiting for content, this is taking longer than usual” screen. I have already double and triple checked my configuration files but cannot see where I made an error.

This is my appdaemon.yaml:

---
secrets: /config/secrets.yaml
appdaemon:
  latitude: 52.0
  longitude: 4.0
  elevation: 2
  time_zone: Europe/Berlin
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_id: "appdaemon"
      client_host: 192.168.0.39
      client_port: 1883
      client_user: !secret mqtt_user
      client_password: !secret mqtt_password
      client_topics: NONE
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

and my apps.yaml:

---
nspanel-1:
  module: nspanel-lovelace-ui
  class: NsPanelLovelaceUIManager
  config:
    panelRecvTopic: "tele/tasmota_nspanel/RESULT"
    panelSendTopic: "cmnd/tasmota_nspanel/CustomSend"
    updateMode: "auto-notify"
    timeoutScreensaver: 20
    #brightnessScreensaver: 10
    brightnessScreensaver:
      - time: "7:00:00"
        value: 10
      - time: "23:00:00"
        value: 0
    locale: "de_DE" # only used if babel python package is installed
    dateFormatBabel: "full" # only used if babel python package is installed
                            # formatting options on https://babel.pocoo.org/en/latest/dates.html?highlight=name%20of%20day#date-fields
    timeFormat: "%H:%M"
    dateFormat: "%A, %d. %B %Y" # ignored if babel python package is installed
    weather: weather.home
    pages:
      - type: cardEntities
        heading: Example Page 1
        items:
          - cover.rollo_wohnzimmer
          - light.wohnzimmer_decke
          - binary_sensor.bewegungsmelder_kuche
          - sensor.bewegungsmelder_kuche
          - switch.steckdose_flurregal

And here’s what the information tab in tasmota says:

Can you or anybody else see what I made wrong? The nspanel is found in HA and all switches and sensors are working. HA receives messages on topic tasmota_nspanel that I send via my analyzer app and vice versa. Messages published on the topic in HA, can be received in the analyzer.

I seem to have a problem that I can’t get some kind of info from Home Assistant to my NSPanels.

I removed everything and tried Christopher Mastos intro Youtube video (Flashing the Sonoff NSPanel with ESPHome - how to get a custom UI for Home Assistant! - YouTube)
But I can’t get the temp on the screen, it just say nan F.

Could I have missed some configuration thing in Home Assistant or Nextion that should already been done?

This is now how my yaml look like, “sensor.temperature_158d000156d8c5” is my own Aqara Zigbee sensor

# Grab current temperature from Home Assistant
  - platform: homeassistant
    id: current_temperature
    entity_id: sensor.temperature_158d000156d8c5
    attribute: temperature
    on_value:
      # Push it to the display
      then:
        - lambda: 'id(disp1).set_component_text_printf("temp", "%.1f ""\xb0""c", x);'

all help I can get is appreciated :slight_smile:

Problem solved! Spent hours researching until I came up with the idea of restarting AppDaemon, which helped. That’s just great, @jobraun! But even though I have multiple pages in my apps.yaml, scrolling through them is not possible. I keep getting stuck on the first page in the Tasmota console even though the console says that the button are being pressed.

13:53:28.484 MQT: tele/tasmota_nspanel/RESULT = {“CustomRecv”:“event,buttonPress2,cardEntities,bNext”}
13:53:32.390 MQT: tele/tasmota_nspanel/RESULT = {“CustomRecv”:“event,buttonPress2,cardEntities,bPrev”}

@Zahnweh Most likely you’ve mixed up the development version of the display firmware with the current release in HACS.

Download the current main branch in HACS (Touching doesn't open cards. ¡ Issue #71 ¡ joBr99/nspanel-lovelace-ui ¡ GitHub) or flash the display firmware mentioned in the release notes of v1.7.3.

Just update in HACS to v1.8.3 and restart AppDaemon, just released v1.8.3

This did the trick! Thanks a lot! Also thanks for your great work!

  - platform: homeassistant
    id: hotwater_temperature
    entity_id: sensor.water_temp
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: id(disp1).set_component_text_printf("Thermostat.hwtemp_txt", "%.0f", id(hotwater_temperature).state);

try this format @DariBer

Thermostat is the page name & hwtemp_text the text field.

Hi, can you please share your code? I use domoticz and I want to control
nspanel over the MQTT. Greetings

Is sensor.water_temp sensor of a temp sensor in your Home Assistant?

yes it is, use your entity id and obviously your page name and text field id

thank you @lovejoy777 for your help.

got it to work now, both the temp and status for my lamps and spotlights.
I didn’t understand page_name.name_of_object in Nextion. When you described that, then I had a eureka moment :slight_smile:

Do you know how this thing (bellow) works, it feels little random if the picture in the panel updates or not,
The status in my Home Assistant changes quickly for the lamp/light entity. I have right pic (int symbol) as it changes the picture, not all the time and feels randomly if it changes or not. has it something to do how often it get’s the updates from Home Assistant?

I have only done this config (and the nextion_init), do I need to change anything else

## LIGHTS ##
  # Light window bedroom
  - platform: homeassistant
    id: first
    entity_id: light.window_bedroom
    on_value:
      then:
        - wait_until:
            switch.is_on: nextion_init
        - lambda: |-
            int symbol = 2;
            if (id(first).state == "on") {
              symbol=3;
            }
            id(disp1).send_command_printf("home.p_bed_window.pic=%i", symbol);  

your config entry looks good :thinking: do you have the on_press and on_release boxes ticked in the nextion editor? (highlight the button or hotspot, then in the bottom pane there should be the press/release command boxes, each has a checkbox).
edit: the update happens on state change with the code you posted so it can’t be an update problem…

I’m out today but if you still have problems later you could upload your yaml and hmi file and i could take a look for you.
@DariBer

I have uploaded my him, yaml and also the tft file to GitHub
https://github.com/DariBer/NSPanel

Have a @lovejoy777 look and see if you can see any problems.

Thank in advance :slight_smile:

:+1: like i mentioned, I’m out for the next 7 hours so i will look for you then.

1 Like

i am trying to flash esphome on this thing:
i have connected everything according to the ‘manual’, 3.3V, GND, TX and RX to 3.3V, GND RX and TX.
GPIO0 to GND.
But it is not entering bootloader. No connection in ESP home flasher. When i disconnect GPIO0 from GND, it starts correctly, as i can ping the ip adres of the device.
I completely removed the board from the nspanel, so the serial connection is not touching the metal

Anyone know what i am doing wrong?