 
 // CoAP server endpoint url callback
 void callback_light(CoapPacket &packet, IPAddress ip, int port);
-void callback_switch(CoapPacket &packet, IPAddress ip, int port);
 
 // CoAP client response callback
 void callback_response(CoapPacket &packet, IPAddress ip, int port);

void setup() {
    Serial.begin(9600);

    // add server url endpoints
    coap.server(callback_light, "light");
    coap.server(callback_switch, "switch");

    // client response callback
    coap.response(callback_response);

    // start coap server/client

    coap.sendResponse(ip, port, packet.messageid, (uint8_t *)"1", 1);
}

// CoAP client response callback
void callback_response(CoapPacket &packet, IPAddress ip, int port) {
    Serial.println("[Coap Response got]");
