         lastAliveCheck = millis();
         connected = false;        
     }
-    if (Serial.find("[(")) {
-        Serial.readBytes(cb, 1);
+    if (esp8266Serial.find("[(")) {
+        esp8266Serial.readBytes(cb, 1);
         if (cb[0] == 'r') {
             //ready
             if (connected) {

void onMessage(String topic, String message) {
  if (topic == String(MQTTid) + "/Led/c") {
    setLed(message);
    mqttPublish(String(MQTTid) + "/Led", message, 1);    
  } else if (topic == String(MQTTid) + "/Allarme/c") {
    if (message == "1" && !alarmOn) {
      abilitaAllarme(true);

    if (!connected)
        return;
    success = false;
    esp8266Serial.println("mqttPublish(\"" + topic + "\", \"" + message + "\",  " + MQTTqos + ", " + retain + ")");                
    esp8266Serial.flush();
    waitForSuccess();
}
void mqttSubscribe(String topic) {
    if (!connected)
        return;
    success = false;
    esp8266Serial.println("mqttSubscribe(\"" + String(topic) + "\", " + MQTTqos + ")");
    esp8266Serial.flush();
    waitForSuccess();
}

