- keep your “history” in sync (watch a movie in room1, stop, start the same movie in room2 and resume)
- do not want to individually update every RPi/XBMC client if the content of your data storage changes
then this post might be for you.
The XBMC Wiki decribes this in detail. This post just describes an actual implementation using Raspberry Pi clients and server.
To do this you will need a MySQL database on a machine in your network which is always accessible from your Raspberry Pi/XBMC clients (called
RPI-Client from now on).
Since I didn’t have a machine like this in my network I decided to buy another RPi for this purpose (referred to as
RPi-Server from now on).
The content of the MySQL database only contains metadata for each entry, not the actual data (information like (a) the file path and (b) the last timestamp within the movie you were watching).
Here is a diagram showing my network setup for two Rasperry Pi clients running XBMC:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
- The clients
RPi-Client-Xare default OpenELEC installations.
- The server
RPi-Serveris a default Raspbian installation.
RPi-Server has to provide a MySQL database which can be accessed from each
Just follow the simple setup instructions on the XBMC-Wiki.
This is how you can check the status of your MySQL server:
rpi-server$ sudo /etc/init.d/mysql status
RPi-Client-X needs to be configured to use the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
The location of the file
advancedsettings.xml might very depending on your XBMC installation.
For OpenELEC the file is located at
XBMC Library Update (optional)
Once the above setup works you can install the XBMC Addon:Library Auto Update.
This plugin provides a GUI to setup a cron job to sync the content your
RPi-Client-X has acces to (i.e. your NAS) with your MySQL database.
Just install it on one of your
MySQL Backup (optional)
A bit overkill, but I also backup the MySQL Database from the
RPi-Server to my NAS using automysqlbackup.