Using Serial2 results in undefined behaviour

Yes, plus you’ll need to run off the RGB led.

RGB.control(true);
RGB.color(0,0,0);

The Photon firmware at present doesn’t officially support Serial2 - we’re providing this information in the hope that it useful, but operation isn’t guaranteed. If it does work for you please let us know!