     Serial.begin(9600);
 
     // Subscribe to the webhook response event
-    Particle.subscribe("hook-response/sendSocketInformation", photonRequestReturn , MY_DEVICES);
-    Particle.subscribe("hook-response/getServerInformation", serverRequestReturn , MY_DEVICES);
+    Particle.subscribe("hook-response/sendSocketInformation", sendSocketInformationReturn , MY_DEVICES);
+    Particle.subscribe("hook-response/getServerInformation", getServerInformationReturn , MY_DEVICES);
+    Particle.subscribe("hook-response/changeSocketStatus", changeSocketStatusReturn , MY_DEVICES);
 
     /* VOLTAGE SENSOR PIN */
     pinMode(voltage_pin, INPUT);     // Input Pin for the voltage sensor

         },
         "mydevices": true
     }
*/
/*  WEBHOOK SETUP - END */


    /* Function to toggle_relay2 when the interruption from the falling edge signal from pushbutton2 happens */
    if(digitalRead(pushbutton2) == LOW && digitalRead(pushbutton1) == HIGH){
        state_relay2 = !state_relay2;
        digitalWrite(relay2, state_relay2);     //Writes the state_relay2 to relay 2
        
        // Send auth data
        String jsonChangeSocketStatus = String(
          "{ \"apiKey\": \"" + String("{{{apiKey}}}") + "\"" +
           ",\"socketNum\": \"" + String(2) +  "\"}" );

        Particle.publish("changeSocketStatus", jsonChangeSocketStatus, PRIVATE);
    }
}

