Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 979 Bytes

README.md

File metadata and controls

42 lines (36 loc) · 979 Bytes

gowaker

An alarm clock written in go. Plays spotify, reads out the weather and calendar events.

Deployment

Server

$ make deploy
$ ssh waker
j@waker$ sudo systemctl stop gowaker
j@waker$ make pi
j@waker$ sudo systemctl start gowaker

See scripts/README.md for instructions on installing the systemd service.

Testing

Clear the DB

rm waker.db

Set non-repeating alarm

curl -X POST localhost:8080/alarms -d '{"time":{"hour":9,"minute":52},"repeat":false}'

Set repeating alarm

curl -X POST localhost:8080/alarms -d '{"time":{"hour":9,"minute":52},"repeat":true,"days":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}'

Get alarms

curl -X GET localhost:8080/alarms

Set default playlist

curl -X GET localhost:8080/spotify/playlists
curl -X PUT localhost:8080/spotify/default_playlist -d '{"id":"3gMssemWp3VtdwMoZYSPc4"}'