 
 //  g_mqtt_client->subscribe(g_topic);
   g_mqtt_client->publish(",yali", g_devid); // set alias
+
+  g_connected_ms = millis();
 }
 
 void setup() {

  bytes[length] = 0;
  Serial.println(bytes);

  JsonObject& root = jsonBuffer.parseObject(bytes);
  if (!root.success()) {
    Serial.println("js");

char g_username[24];
char g_password[16];
bool g_need_report = true;

unsigned long g_connected_ms = 0;

EthernetClient *g_net_client;
MQTTClient *g_mqtt_client;
