Hi,
I'd like to tell you about my implementation of Roomware.
I use MPD (
http://www.musicpd.org) on my mediacenter to play music
without an interface. I connect to this MPD daemon with some PC
clients and two phone clients, one using Bluetooth and one using Wifi.
I run the Roomware server on my Ubuntu Jaunty mediacenter. This
mediacenter has an USB bluetooth stick. It scans the room every 120
seconds. We wrote an script (PHP CLI) and run this in Cron. This
script reads out an .ini file describing different playlists and the
devices associated with them. It also reads an file in /tmp and
connects to the Roomware server to get the current devices.
The script compares the ini file with the current devices it knows
about and only remembers the devices which are "important" (linked to
an playlist).
Now it compares the important devices from the /tmp file and the
important devices from the Roomware server. If there is no change
nothing happens. If there is an change it will clear the current MPD
playlist, read out the ini file and seek the most matching playlist
for the people in the room and puts that in the current playlist. Last
but not least it presses Play on the MPD daemon.
When there are no important devices left in the room it will pause the
music. The script doesn't change playlists and doesn't press Play if
the current MPD status is STOPPED. So we manually control the running
of MPD by pressing the STOP and PLAY button. If the state is PAUSE or
PLAY the script will take ownership of the playlist every two minutes.
The .ini file looks like this:
[<playlistname>]
<devicename>=required
So my file looks like this:
[gertjandeboer]
Tleilax=required
[mariekedeboer]
Arrakis=required
[gezelligsamen]
Tleilax=required
Arrakis=required
[noggezelligersamen]
Tleilax=required
Arrakis=required
Bigachu=required
In MPD you obviously need to create these playlists.
On my wishlist for this script:
1) Nested playlists. For example when there are two people together in
the room and "gezelligsamen" gets hit and someone enters which isn't
in any of the multiple user playlists but has is own playlist defined
it shouldn't clear the current playlist but join the two playlists.
I'll post the script to this wiki.
Kind regards,
Gert-Jan de Boer
Roomware enthousiast.