How do I send a Slider numeric value over Wifi and read it in Arduino/ESP32?

I've searched for this and can't find any resources. I want to send a Slider's thumbPosition over Wifi and have it read in my Arduino/ESP32 code as a byte value. I can send the value using 'set Web1.URL' to 'get thumbPosition', but this just sends it as a random String. I want to identify this string as an important value and assign it to a byte variable in my Arduino code.
Questions:

  1. How do you send and receive numeric values like this, and differentiate them from other strings (like 'ButtonAWasPressed")? Numbers have different importance from Strings. fyi, I'm using 'client.readStringUntil('\r')' in my Arduino code to get the string value after the IP address.
  2. It seems like the only variable type you can send and receive are generic Strings, which means you have to identify the meaning of the String inside the String itself (like "ButtonAWasPressed"). Is the only way to identify numeric values to parse these strings, and therefore I need to add "identifiers" inside the strings in order to separate them into things like "Color Value" or "Brightness"? (Is this making sense??). It's weird because you can send a String value like "ButtonAWasPressed", and know exactly how to interpret it. But if you send a random number like "47", how do you know how to interpret it in the code?? :thinking: Thank you for any insight.

Encode your data as JSON text with appropriate tags identifying the data values.
JSON.org

OK thank you. So basically you can only send Strings to the MCU, and need to include identifiers in order to parse the data. :+1:

You may get a "random string" because the Slider is moving too fast. Use a Clock to send the data in 1 second intervals, for example.

BTW, here we have a code to move a Slider from a web page, not the Slider component.

How can I send a set value via WiFi?

I would beg for help
First of all sorry in bad English.
I have to send from the program I work in the app inventory the value set according to ESP32 via WiFi using the blynk function. My ESP receives the set value and displays the default value on the LCD screen, but only for 1-2 seconds after which it writes the default value of 0% again.
Attached is a picture

Thanks in advance

Hi- Assign the value to a Global Variable in your code, and only change the LCD display if the Global Variable changes. Does this work?

Hi David,

If I understood your question well.
I use the LCD display only to the show received information but i want to send the set value from app inventor. My LCD display receives and displays the sent set value for only 1-2 seconds and then the received set value is reset to 0. when i use the blynk app on the same device then everything works properly. I think the problem is highlighted in the picture.

Tnx