RaspberryPi Management

In my setup I’ve choose the image from Libreelec for the best solution for using. My concern is getting a full synkronized setup, Where I can stop a movie in the livingroom, and go tpo bed and continue the movie from where I stopped it.The only important thing here – is all Raspberry Pi should be on the same version of libreelec for this to work.

Installing:

Download the latest image to fit your model from here https://libreelec.tv/downloads/
Use win32imagewriter to write the image to a SD card.  –> Thats actually installing your image – now boot it up and configure it for your settings.
My Setup include the plugin Mythbox – which is connecting to MythTV and streaming from my Backend.

Central Management

For making the installation allround – you’ll start only with configuring the first RaspberryPi. Create the input sources etc – and copy out the file /storage/.kodi/userdata/sources.xml and save the file sources.xml.

The other file for using this setup i the advancedsettings.xml which contains the information on how to connect to a MySQL database for all information etc. This setup expect your have an already running MySQL server with user and passwd etc. Create the DB anbd the users for kodi.

# create database kodi;
# create user ‘kodi’@’%’ identified by ‘PASSWORD’;
# Grant all privileges on kodi.* to ‘kodi’@’%’;

These 2 files advancedsettings.xml and sources.xml you’ll copy to all your new Devices – and from boot they will have the exact same sources and access the same MySQL DB for information regarding views movies info etc.

Thats it and enjoy your setup. When setting the Sources etc up the first time – only one Raspberry Pi should be connected – copy the files from the master PI – and insert them to the other Pi’s and they will start up all looks the same on all Pi’s.

Advanced_settings.xml_

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>172.16.10.60</host>
<port>3306</port>
<user>kodi</user>
<pass>PASSWORD</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>172.16.10.60</host>
<port>3306</port>
<user>kodi</user>
<pass>PASSWORD</pass>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>

Sources.xml

<sources>
<programs>
<default pathversion=”1″></default>
</programs>
<video>
<default pathversion=”1″></default>
<source>
<name>Vores Koncerter</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Concerts/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Vores boernefilm</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Boernefilm/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Vores bluray</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Bluray/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Vores Download</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Downloads/</path>
<allowsharing>true</allowsharing>
</source>
</video>
<music>
<default pathversion=”1″></default>
<source>
<name>Vores Musik</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Musik/</path>
<allowsharing>true</allowsharing>
</source>
</music>
<pictures>
<default pathversion=”1″>Vores Billeder</default>
<source>
<name>Pictures</name>
<path pathversion=”1″>/storage/pictures/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Vores Billeder</name>
<path pathversion=”1″>nfs://172.16.20.100/mnt/Disc/Pictures/</path>
<allowsharing>true</allowsharing>
</source>
</pictures>
<files>
<default pathversion=”1″></default>
</files>
<games>
<default pathversion=”1″></default>
</games>
</sources>

These 2 files are located at /storage/.kodi/userdata in the normal Libreelec setup – the procedure would be like:

  1. create the database and user for kodi
  2. Create the files – both the Settings foir the MySQL server – and the attached sopurces
  3. upload the files to the correct location: /storage/.kodi/userdata 
  4. reboot the RaspberryPi
  5. Now you have to update all files within the sources.
  6. Enjoy