Skip to content

miguelfrde/roomcontrol_backend

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Room Control Backend

TravisCI Coverage Status

WARNING: Under development... WIP!

Application built with nameko that interconnects the Raspberry Pi with the mobile application to control a room's lights, music, alarm and more.

Requirements

  • A Spotify app key is needed and it can be obtained here. Remember to choose binary, not C-Code.

  • libspotify (I suggest to follow this)

  • RabbitMQ

Setup for development

$ pip install -e '.[dev]'
$ pip install pyaudio --allow-unverified=pyaudio --allow-external=PyAudio
$ pip install tox

Usage

$ roomcontrol run

Testing

$ tox

Routes

POST /login
GET /settings
POST /settings

GET /light
POST /light

GET /alarm
POST /alarm

GET /music/volume
POST /music/volume/<int:level>

GET /music/status
POST /music/pause
POST /music/play
POST /music/next
POST /music/previous

GET /music/trcks/current
GET /music/playlists/current
GET /music/playlists
GET /music/playlists/<int:id>
POST /music/playlists/<int:id>

storage.cfg format

This data corresponds directly to the data saved in the mobile device.

[settings]
serverip=ip
notify=boolean
sendpic=boolean

[light]
intensity=int
status=boolean
color=hexadecimal

[alarm]
hour=int (epochs)
sound=int (id)
light=int (id)
active=boolean

[music]
playlist=int (id)
track=int (id)
volume=int

About

Room control app backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages