Nice! For years I've wanted something that does this, yet I've still not bought a fitbit. I used to have a REM alarm thing on my phone years ago, but it wasn't quite accurate enough.

Your images there look pretty damn accurate. Roughly 90 mins between each REM stage. It's definitely accurate enough data to use for waking you up during REM. Have you found an alarm for the fitbit that uses that data?