This maybe a silly question, and I’msorry if it is.
Isn’t this just a Nextion display in there? Is there no way you can use the Nextion editor to create custom screen and then access those? Obviously way outside the scope of Tasmota, but if Tasmota can give you the frame work to intetact with the panel and you may be able to change the screens it opens up way more scope to play with it.
It should be possible. In esphome there is even a method to flash a new firmware on a nextion display. The problem at the moment is, that esphome will not connect to nextion displays that are in reparse mode.
I have not got my hands on a NSPanel yet, but I definitely plan to customize the display firmware and use it with esphome as soon as it arrives.
Itead = Nextion You are supposed to be able to use Nextion Editor to design your layout and then upload in screen (is possible with Tasmosta, not yet possible as far as I know with ESPhome) and then ESPHome interacts with panel to refresh display, switch pages, etc… Have to play a little with NSPanel I have in hand to confirm you !
This Sonoff NS Panel seems awesome, although there seems to be some issues, especially with the feeling/feedback and size of the buttons.
I would have done it differently even though I understand that Sonoff wanted it to be squared 86x86mm (EU version) as regular switches.
I would have made those modifications like on this picture I have modified on paint
A. I would have chosen bigger buttons (40x32mm at least) and without borders, only to make them more easily accessible. The original buttons look like buttons of a laptop’s touch pad, they are too tiny.
Quality switches with real feedback would be nice.
B. I would have used a cheap LED to indicate the state of the relay instead of using precious surface on the screen. The behavior of the LEDs should be adjustable over software of course.
And as said in some reviews, a distance or even a gesture sensor would be nice too.
I hope there will be an improved version in a year from Sonoff.
No beta anymore! Just use external_components: as described in the PR (see the example code provided). It will download the code and compile the firmware.
Just received my NSPanel and flashed it with the custom firmware from @blakadder - super simple process! - but now I’m at a loss how to update the buttons and sensors on it - is there a simple guide somewhere that I can use? - I was looking through Blakadder’s Github, but I really don’t know where to start!
Should be the same you should get some switch circuits created for that in HA once linked with it, same for the two relays, temperature sensor… After all config has to be done in HA for automations/actions/management of display !
So I’ve got it added into Home Assistant - but I can’t see any way to update the screens from Home Assistant itself - I can see from Blakadder’s pages that you can fire commands at it - but they look like JSON rather than MQTT
When you press a switch on the screen, you need Home assistant to reply with a JSON reply telling the NS PANEL to update the widget on the screen with the change, otherwise every second, tasmota updates the NSPanel with its weather and time, the widget resets.
So you need to respond using the following automation.
alias: nspanel send data back
description: ''
trigger:
- platform: state
entity_id: sensor.ns_panel_raw_data
condition: []
action:
- service: mqtt.publish
data_template:
topic: cmnd/LoungeRoomSwitch/NSPSend
payload: |
{{'{{"relation":{}}}'.format(trigger.to_state.state)}}
mode: single
I use the following automation that runs when the RAW item is updated, and it grabs information from each of my other items.
I use this automation to update a CCT lightbulb
alias: NSPanel CCT Light ON
description: ''
trigger:
- platform: state
entity_id: sensor.ns_panel_raw_data
condition: []
action:
- service: light.turn_on
target:
entity_id: |
{% if states.sensor.ns_panel_id.state == "1" %}
light.tall_lamp
{% elif states.sensor.ns_panel_id.state == "2" %}
light.small_lamp
{% elif states.sensor.ns_panel_id.state == "5" %}
light.christmas_lights
{% endif %}
data_template:
brightness_pct: |
{% if states.sensor.ns_panel_light_type.state == "white" %}
{% if states.sensor.ns_panel_brightness.state | int >= 0 %}
{{ states.sensor.ns_panel_brightness.state | int }}
{% else %}
100
{% endif %}
{% elif states.sensor.ns_panel_light_type.state == "color" %}
{% if states.sensor.ns_panel_colour_brightness.state | int >= 0 %}
{{ states.sensor.ns_panel_colour_brightness.state | int }}
{% else %}
100
{% endif %}
{% else %}
100
{% endif %}
rgb_color:
- '{{ states.sensor.ns_panel_red.state | int }}'
- '{{ states.sensor.ns_panel_green.state | int }}'
- '{{ states.sensor.ns_panel_blue.state | int }}'
mode: single
This one to update an LED strip
alias: NSPanel LED Light ON
description: ''
trigger:
- platform: state
entity_id: sensor.ns_panel_raw_data
condition: []
action:
- service: light.turn_on
target:
entity_id: |
{% if states.sensor.ns_panel_id.state == "3" %}
light.tasmota
{% endif %}
data_template:
brightness_pct: |
{% if states.sensor.ns_panel_led_brightness.state | int >= 0 %}
{{ states.sensor.ns_panel_led_brightness.state | int }}
{% else %}
100
{% endif %}
rgb_color:
- '{{ states.sensor.ns_panel_led_red.state | int }}'
- '{{ states.sensor.ns_panel_led_green.state | int }}'
- '{{ states.sensor.ns_panel_led_blue.state | int }}'
mode: single
I haven’t set up automations yet to update the panel with the colour or temp yet, but im sure you could figure that out with this information.
This is also my autoexec.be file. The beginning section is where you set your widgets
# index "name ", "ctype", uiid | name max 8 characters, rest will be truncated)
1: ["TallLmp", "group", 69],
2: ["SmllLmp", "group", 69],
3: ["LEDStrip", "group", 33],
4: ["Blinds", "group", 11],
5: ["Xmastree", "group", 1],
6: [],
7: [],
8: [],
}
To add, something that blakadder has not documented is a device UIID of 11 is Blinds control.
I also have all of my items as a ‘group’ rather than a ‘device’ so i dont have to update the device with ‘online’.
if any part of this is not clear let me know.
Im loving my panel. and with the current setup of tasmota, and automations you can do anything. Even use the thermostat page to turn on or off air con in your house.
i have also had to tune my ADCPARAM1 with the following to get the temp to actually match what is in my house
again, im sure i can use attributes of the RAW data entity to send information instead of breaking down each JSON item into its own entity, but this was how i got mine working for now.