README.md

Sunrise (a wake up alarm with light and sound)

A wakeup alarm to replicate the functionality of one of the Philips Wake Up lights, which has the ability to wake you up with gradually increasing light and sounds. Cool idea, but bad execution. See why at my blog post.

We'll use a bunch of cheap/old things, since I already own them. If you're here you probably already own them too.

A Philips Gen 1 Bridge and Bloom Starter Kit: custom-color lights to fade in (could use any Hue lights)

A Chromecast Audio: hooked up to speakers in the bedroom to play wake up sounds

A Raspberry Pi 1 Model B: to host the app and communicate with the Chromecast/Hue APIs

And some X10 hardware, a CM19A USB tranciever and some KR19A remotes:
(Optional, used to easily turn on/off lights and audio without a phone after waking up)

This project includes a Node app that runs on the Raspberry Pi to handle scheduling and executing the wake up routine which slowly fades in the sunrise-colored lights while playing the sounds of birds chirping and waves crashing.

Usage

Web App with Add-to-Homescreen

With the bookmark on your home screen, it's easy to turn on and off or change the time of the alarm:

At the time of the alarm, the lights will fade in and the sounds of birds chirping plays on your speakers to gradually wake you up refreshed!

Setup

Hue Light Configuration

Use the Hue app to make a scene

In the Philips Hue app, under Settings > Room setup, create a room (aka "group") with the lights you want to wake up with

In the app, under "Home", tap on the room you created and set the lights to the colors you want them to wake up with, then set the lights to the lowest possible brightness (we'll gradually brighten them later). Finally, under the "Scenes" tab, tap the "+" to create a new scene with "Current Light settings"

Use the Hue Bridge API to get an API Key and the IDs of the group and scene

Edit the scripts/x10listen.sh file. This sample is set up to set the bright/dim buttons to stop the audio playing, and the A2 On/Off buttons to turn the Hue light group on and off. If you already have X10 lights you'll probably want to customize this.