Adding to @kabelochkaffe 's post, for anyone looking at setting up swipe detection and other gestures on NSPanels, there is a detailed guide hereincluding a demo HMI file that you can play with in the Nextion Editor debug simulator to illustrate how everything works (and when it doesn’t). (It shows how system variables change in realtime during a gesture to help you use that data in code reliably, and anticipate cases where it will trip your HMI code up.)
The guide covers simple and more complex ways of doing swipe detection, the relative pros and cons of each, some of the traps you need to program around (particularly non-obvious interactions between your swipe detection code and sliders or other UI components), and examples of some of the key pieces of code. The full code is in the HMI file (each page demonstrates different options and features), so you can test, cut, paste and adapt that into your own projects as needed.
If you are using @kabelochkaffe 's code (which uses the touch-cap approach in the Realtime Swipe and Press Gestures part of the guide), then you might want to check out some of the traps (with solutions) you need to be aware of and program around in your HMI code with this approach.
There are some other useful tips there too for designing custom NSPanel interfaces such as some more advanced ways of using gestures to create circular/round sliders (like the original firmware has), creating some essential (but missing) geometric functions, and tips and templates for creating attractive graphics to use in your UI.
All of these features work directly in the Nextion Editor code (HMI) directly (no ESP code required for them to work).
I just watched your video - nice clear explanations .
Another tip though for anyone programming in the Nextion Editor - the default (variable-width) font is terrible for reading and writing code. Do yourself a favour and change the settings to to a proper programming mono-spaced font - it makes reading and editing and spotting errors in your code much easier. (Then do the same for all your code editors.)
@jobraun loving your work sir. Following your guides I got my NSPanel up and running in no time! Even setting up MQTT and AppDaemon from scratch. Thank you for all your time on this. Look forward to future enhancements.
Good day everyone
Johannes Braun thank you again , everything working like a charm. Is it possible to make a time font size smaller and weather font size bigger on US portrait version? Thank you
you cannot rescale font sizes dynamically on nextion, fonts are pre rendered in the firmware, furthermore it’s not possible to move or resize elements on runtime
for adding more fonts in different sizes into the firmware there is just not enough space
plus file sensor and a few other tweaks works for now. what I have is not very pretty and I could possible use some help with someone who is a bit more experienced with HA than I, but I have managed to get around a big limitation on big a yaml file could get and not being to upload it to nspanel because of the size. not having to code buttons in side the nspanel saves a ton of space.
if you mean the issue with uploading the hmi.tft file, I did the following to get it working:
installed a HTTP-Server on a separate raspberry pi and created a public share with the tft-file (http only)
tested the download via wget
added the URL to the config and reflashed / restarted everything
invoked the upload tft service via home assistant (important → don’t make a debugging connection, that will break it, just run the service without any other connection to the panel)
the display should switch to the uploading / validating screen. I had to run that 2-3 times, then everything worked without issues and it’s still working so far.
if you have the NSPanel already mounted in another room, you could use a webcam or second smartphone to see if the upload starts and then run to the display
I hope there will be news about the Nspanel Pro soon. I like it because of the optional case and it has a bigger screen. What I found funny on the website is the fact that there was the Home assistant logo, works with… Maybe we Start a Fundraising for kritz and jobro:)
I had no idea there was a pro version.
Doing a search for it and I even found some videos of the device.
Sadly only in Italian. Was not dedicated enough to watch them though.
Widget UI has had what should be the last 0.7beta update, adding Widget card support for all 36 standard entity types after filling the remaining few with custom dashboard information and/or interactive controls (and improvements to the gesture interactions for both Widget cards and ‘popup’ pages). This includes a detailed ‘popup’ page for controlling HVAC (climate.*) devices. There is now also a new US (portrait) version that has all the latest features of the EU (landscape) version.
Thanks to @zigomatic, the new HVAC features and controls have been tested and debugged. But I’m still looking to test the other devices I don’t own ( fan.*, humidifier.*, lock.*, water_heater.*) before I update the docs and release this version. I’m happy to help any new or existing testers get this installed and set up.
The US version of the new climate/HVAC control ‘popup’ page:
@jobraun I have an issue when exiting screensaver the NSPANEL seems to reboot. I am getting the message to exit screensaver in APPDaemon but the panel reboots with a blank screen then the screen saver comes back on. Any ideas please?