First of all I want to introduce myself in the forum, this being my first post. Greetings to all.
I want to present you my first installation with Nextion screen. A few days ago I bought an enhanced 4.3 "screen to control the heating in my home. A year ago I used a RasberryPi with a web interface for control from my smartphone, in addition to a console with LCD 16x4 with an ESP8266 Lolin), which is hanging in my living room, now replaced by Nextion, which connects the RaspberryPi via Wi-Fi via another ESP8266 programmed with the Arduino IDE, but this time it's an ESP-01 :-) As seen in the video, I use a small 3.3 volt controller for the ESP-01, and using the USB connector that comes with the screen, power the Nextion and the ESP8266. In the video I use an old PDA pen, as it is difficult to hold the smartphone and use the screen at the same time. You can use your finger perfectly.
At you can see a video of how it works. You will see that the text is in Catalan, which is the language we use in my region. Tomorrow or last I'll put a box that I'm making using a 3D printer.
Currently from the screen I can control the heating system (2 independent circuits), see the temperatures in each of the floors of my home and the garage. I can see the weather in my area (temperature, temperature trend, reel feel, humidity, pressure, speed and wind direction ...). I also have the forecast for the next three days. Another screen informs me of the average, maximum and minimum temperatures. I will soon replace it with a graph.
Other screens are calendar with the times of sunrise and sunset, moon state, pollen levels of my zone (I am asthmatic). The configuration page can change the speeds of the serial port, times of screensavers and levels of luminosity, automatic change between screens, etc.
I have some more ideas but in the next few days I will try to improve it.
I await your opinions.
I include the URL of the video here, as it appears that I have not inserted it correctly:
Not everyone can get YouTube
Please upload mp4 format, in smaller size.
The project is already in the box, working in my home. Finally I reduced circuitry by powering the ESP-01 with ESP8266 from the display itself, which has 3.3v. The ESP-01 has been left inside the box, where I connect it to a flat cable IDC connector, so I can remove the ESP-01 to program it if necessary.
The box is made with a 3D printer thanks to the model of Wotever that you can download from https://www.thingiverse.com/thing:1527472 without modifications. Thanks friend!
Upload a photo in case someone is interested.
Beautiful work. Can I have an example on how do you manage the communication between Raspberry and esp8266? I have a home automation system with "domoticz", can I use it to send data to the nextion display via Wi.Fi?
Sorry for the late reply. Too much work :-)
I'll see if I explain, but the system is simple. What the ESP8266 does is connect to a URL of the Raspberry, where the Raspberry generates a response with all the variables and values that the Nextion screen needs. In the Raspberry I generate all the information and I realize the temperature control through PHP and MySQL. So work discharge to ESP8266 and only asks for information, receives the complete chain of information and sends it to the screen. It is not necessary to parse the content since the Raspberry itself includes the \ xFF \ xFF \ xFF separating each of the variables. You can send color changes, texts, font sizes, etc.
I also add a random value at the beginning of the answer that I use as a watchdog, because if the screen does not update data every X seconds, I have it reset. That is useful in case of weak wifi signal.
I do not know if I've explained myself well, but if you need more information, let me know. I attach a file of those that download the ESP8266 from the Raspberry.