@krizkontrolz Hello Kriz, After a restart of NSPanel, I get all running. States are populated. From demo point of view, it’s all functionnal and react perfectly.
Python code, HMI code, ESHhome code + automation + markdown for lovelace. Everything is working. Again I found really impressive all the work done.
It may be interesting to have example with 2 pages if possible in order to see where the code need to be implemented. I’m still not fully understand HA_Set1…5 and how it works. [edit: OK I see other HMI files with more than one page, that will help]
Example: int dim_default=20 seems to be able to be managed in HA but I don’t find how to change that dynamicaly for isntance
For EU version, The orientation is different of US Version. Buttons are below the screen. I also see people putting this in the program.s → lcd_dev fffb 0002 0000 0020 to solve a calibration issue apparently. Also I see people using image with 455*287 as definition.
Now, I will try to start with a simple hmi version but my final version would have:
More than one page
temperature + group of light of a room
temperature + light of a room + increase / decrease luminosity
one row with some informations from some sensors (lux, humidity, % etc)
wifi status
wled support
domestic hot water + boiler states
notifications → visual or/and via a song with config different based daytime / night / sleep
Thanks @lovejoy777. Are the ‘missing’ column of 28 pixels on the RIGHT of the display in the HMI editor (to match the typical physical mounting of EU versions)?
That’s great to hear. I take it you have used the demo HMI from the the old v0-4 folder on GitHub to get started (and have now found the current_version (v0.5) folder with the latest multi-page HMI example - the newer Python script and HMI boilerplate adds quite a lot of improvements). I’ve just uploaded my latest working HMI (with a neon-blue theme and more demo/debug pages to demonstrate and test gestures - the circular slider code is working, but I still have to add the sequence of images for it to crop). Swipe down on any non-popup page to get the Setting/CFG page with sliders to control screen dimming and other Program.s variables that control the UPDATE_LOOP behaviour.
To get to the debug pages tap on the words Rain delay at the bottom of the irrigation page.
(On regular ‘main’ pages, swipe left/right to cycle through them.)
The HA_Set1…5 strings store the sequence of commands to pull all the data you want into each page by specifying what Home Assistant (HA) data is written to which Nextion variables. The Post Init Event boilerplate code on each page writes these strings to ESPHome, which passes them on to HA. The HMI UPDATE_LOOP (a timer, with behaviour controlled by the settings above) then toggles a TRIGGER value to tell HA when to run the Python service to execute the instructions in the HA_Set strings (which writes updated HA data to the specified Nextion variables - then it execute the APPLY_VARS subroutine on the Nextion - you put all the code you use to visualise data updates on the Nextion display in this subroutine so that HA can control the timing of display refreshes to apply the new data immediately after it is sent.) For example, in the screenshot of the settings above, the UPDATE_LOOP is set to fetch HA data every 15 seconds when there is no user activity and then sleep after 5 mins (and the screen will gradually dim from 100% to 80% over that period, as per slider settings). The ‘Fast repeats’ tells it that whenever a UI Event sends an action instruction to HA, it should do 3 fast updates (slowing down by an extra 2 seconds each update) - this allows the Nextion to capture both rapid and laggy responses in state changes in HA. I hope that answers your query.
Thank you for your answer, very helpfull.
Yes, I was starting with the demo HMI. Now, I’m exploring the content of other HMI which have a lot of new functions
Thanks for sharing the new version V0.5. It is so great that you continue to improve.
On my side, I’m understanding more Nextion UI but I will need some days to start with my own test based on your solution
Hello friends I need some help with my NSPANEL with the TASMOTA firmware, I managed to perform all the configurations and integrate it with MQTT but I am having difficulties connecting other devices through its widget, in my scenario I have eight more sonoff TX switches all also with tasmota and connected in MQTT
Here is what my panel looks like at the moment.
All actions are carried out in Home Assistant. The ESP is just a messenger between the two.
The panel sets a variable and this is listened for in ESP-Home and passed on to Home Assistant as a sensor and I use a normal automation to do the actions.
I have some areas that can be made better, but I don’t have a full flash memory yet so I can keep it for now.