 #define DEBUG_PRINT 0
 
 // ****************
+time_t getNtpTime();
 void callback(char* intopic, byte* inpayload, unsigned int length);
 String macToStr(const uint8_t* mac);
-time_t getNtpTime();
 void run_lightcmd();
 void changelight();
 void sendmqttMsg(char* topictosend, String payload);


// pin 16 can't be used for Interrupts
/*
void motion_detection()
{
  if (DEBUG_PRINT) {
    Serial.println("motion_detection called");
  }
  //pirValue =
  pirValue = digitalRead(pir);
  pirSent = HIGH ;
}
*/

String macToStr(const uint8_t* mac)

int oldpirValue ;

/*
  volatile int relaystatus    = LOW;
  volatile int oldrelaystatus = LOW;
*/

volatile int relaystatus    = LOW;
int oldrelaystatus = LOW;

