Multiple data send to mit app

Dear friend,
I'm new to Mit app programming and I have a problem with sending multiple data to different labels. Actually, I don't know how my data is put on the Android application separately to different labels. Always I got group results in one label. Does anyone have idea how I do that ?
Thank you

here is my program

// NodeMcu
//#########################################################################################
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ctype.h> // for isNumber check

//#########################################################################################

#define NumOfEvents 7 // Number of events per-day, 4 is a practical limit
//#########################################################################################

// SoftAP
IPAddress local_IP(192,168,4,22);
IPAddress gateway(192,168,4,9);
IPAddress subnet(255,255,255,0);
// Web Server
WiFiServer server(80);

//#########################################################################################

String value = "-";
String Tvalue = "-";
String bvalue = "-";

struct settings {
String DoW; // Day of Week for the programmed event
String Start[NumOfEvents]; // Start time
String Stop[NumOfEvents]; // End time
};
settings Timer[7];

//#########################################################################################
void setup()
{
Serial.begin(115200);

delay(10);
Serial.println();

Serial.print("Setting soft-AP configuration ... ");
Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed!");

Serial.print("Setting soft-AP ... ");
Serial.println(WiFi.softAP("ESPsoftAP_01") ? "Ready" : "Failed!");

Serial.print("Soft-AP IP address = ");
Serial.println(WiFi.softAPIP());

delay(10);
/**************************************************************************************************************/
#ifndef ESP8266
while (!Serial); // wait for serial port to connect. Needed for native USB
#endif

Serial.println (Timer[0].Stop[0]);
Serial.println (Timer[0].Stop[1]);
Serial.println (Timer[0].Stop[2]);
Serial.println (Timer[0].Stop[3]);

server.begin();
}

void loop() {

WiFiClient client = server.available();
if (!client) {
return;
}

Serial.println("new client.");
while(!client.available()){
delay(1);
}

String request = client.readStringUntil('\r');
Serial.println(request);
client.flush();

if (request.startsWith("sender=1", 5)) { value = "Pump_1";}
if (request.startsWith("sender=2", 5)) { value = "Pump_2";}
if (request.startsWith("sender=3", 5)) { value = "Pump_3";}
if (request.startsWith("sender=4", 5)) { value = "Pump_4";}
if (request.startsWith("x", 15)) {
value = request.substring(17);
value.replace("+", " ");
value.replace(" HTTP/1.1", " ");
}

Serial.println(Tvalue);
Timer[0].Stop[0]="11:11";
Timer[0].Stop[1]="12:15";
Timer[0].Stop[2]="15:18";

Timer[1].Stop[0]="22:22";
Timer[1].Stop[1]="23:23";
Timer[1].Stop[2]="15:15";

value =Timer[0].Stop[0];
Tvalue =Timer[1].Stop[0];
bvalue =Timer[1].Stop[1];

client.println("HTTP/1.1 200 OK");

client.println("Content-Type:text/html");
client.println("");
client.print(Timer[0].Stop[0]);
client.println("");
client.print(Timer[0].Stop[1]);
client.println("");
client.print(Timer[0].Stop[2]);
client.println("");
client.print(Timer[1].Stop[0]);
client.println("");
client.print(Timer[1].Stop[1]);
client.println("");
client.print(Timer[1].Stop[2]);

Serial.println("Client disconected.");

}

here is my result



Timer_esp.aia (182.5 KB)

split the responseContent and then get the different elements to set them into the different labels:

Hello Ramon,
Thank you for the answer. I'm doing exactly what you sent, but no difference.
Maybe I must change some code in the Arduino program to make a difference for variables?

may be you can add a special character (for example '|') between values and then, split the received response by that character '|', instead of '\n'.

Instead of

code

client.println("HTTP/1.1 200 OK");

client.println("Content-Type:text/html");
client.println("");
client.print(Timer[0].Stop[0]);
client.print("|");
client.print(Timer[0].Stop[1]);
client.print("|");
client.print(Timer[0].Stop[2]);
client.print("|");
client.print(Timer[1].Stop[0]);
client.print("|");
client.print(Timer[1].Stop[1]);
client.print("|");
client.println(Timer[1].Stop[2]);

That should give you all 6 values on one line, separated by '|'.

In the AI2 app, add an extra variable to catch the result of the split at '|', to give you a chance to test the length of list of the split result, to make sure you don't try to select non-existent items from the end of a short list.

Dear friend,
Thank you for your idea, finally, I found a solution.

Are you sure you will have leading zeroes, to insure each reading is exactly 5 characters long?

client.println("HTTP/1.1 200 OK");

client.println("Content-Type:text/html");
client.println("");

client.print(Timer[0].Stop[0]);
client.print(Timer[0].Stop[1]);
client.print(Timer[0].Stop[2]);
client.print(Timer[1].Stop[0]);
client.print(Timer[1].Stop[1]);
client.print(Timer[1].Stop[2]);
client.print(Timer[2].Stop[0]);
client.print(Timer[2].Stop[1]);
client.print(Timer[2].Stop[2]);
client.print(Timer[3].Stop[0]);
client.print(Timer[3].Stop[1]);
client.print(Timer[3].Stop[2]);

Serial.println("Client disconected.");

This looks like play data, just for testing.
How will it change value?

hello,
Hou = (String(sat.minut[0]) + String(sat.minut[1]));
Min = (String(sat.minut[3]) + String(sat.minut[4]));

Hou.toInt();
Min.toInt();

Timer[dow].Start[p] = String(dow) + "." + String(p) + ".Start";

I leave it to you to force 5 byte data.

Your C is better than mine, and you will find out soon enough if you use hours or minutes less than 10.