Receiving junk values in Arduino serial monitor console
You have created a SoftwareSerial instance called XBee which is taking pins 17 and 18. You then use Serial1 which is pins 17 and 18.

You do not want, nor need, the XBee SoftwareSerial instance, since you are using hardware serial pins.  Delete it and all references to it.

Also, you are turning off Serial1 after using it, which means it will never work again:

Serial1.end();


You would only use that instruction in very very specific circumstances.  Delete it.

After checking to see if there is data available to read on Serial1 you then proceed to try and read it from Serial:

char recbyte=Serial.read();


That should be:

char recbyte=Serial1.read();


You are writing to EEPROM on every single iteration of loop:

EEPROM.write(addr, id);


It is likely that you have already killed your EEPROM.  C'est la vie...