I’m working in my project for an Aquarium Controller.
Blynks solved in a fantastic way all internet access to control my Aquarium (Lights, Pumps, Wave Makers, Dosing…), even if I’m not in home.
But, my project includes a Nextion HMI to control the same but in home.
The problem I found is that the widgets used in Blynk (sliders and buttons), does’t include a way to take the initial status from ESP8266, in order to avoid collisions with any change made locally in the nextion HMI.
It is all in the code. You need to take and synchronize the data inputs and feedback to the controls via your written code.
For example, say you have a value of 128 (half intensity) coming from your Nextion for a PWM pin connected to an LED and you want the corresponding slider (set on V0 and a range of 0-255) in Blynk App to register that value. You use the Blynk.virtualWrite(vPin, value):
int LEDvalue = 128; // or however you get that value into your code
Blynk.virtualWrite(V0, LEDvalue); // Set a Slider on V0 to the setting determined by LEDvalue
This is just a simple reference, your code may get a bit complex if you are mixing and matching from two different input sources and structure.
This concept is also the same as synchronizing a physical Button with a button Widget: