[GUIDE] Kodi on Volumio 2.x -> Install on a nonvolumio image

ok, check the Odroid forum and search for Mauro’s C2_init.sh (or C1_init.sh) as this contains display setup and monitor unblank which needs to be done in the boot process as early as possible. HK placed it in initramfs, for us that would mean an Odroid-specific change to volumio’s initrd. This has not been planned yet.
There are some references as to where to place this as a script, you could consider /etc/init.d

yes, you’re absolutely right, my bad

Thanks, i will look for that

Hello,

Sorry for a stupid noob question, but I tried whatyou described and the upgrade didn’t succeed (I also flashed the 979), because one package didn’t upgrade:

The following packages have unmet dependencies: libpam-systemd : Depends: systemd (= 215-17+deb8u5) but 215-17+deb8u4 is installed systemd : Depends: libsystemd0 (= 215-17+deb8u4) but 215-17+deb8u5 is installed E: Unmet dependencies. Try using -f.

I also tried to force but it is not working. I’m sure it’s a pretty simple issue, but could you help me fix this?

To be more specific, Actually each time I start an upgrade command, it doesn’t finish with the previous status, but after rebooting, mpd doesn’t start and neither UI. I have to reflash after this. I have no doubt I miss something obvious but it doesn’t appear in the list of command provided.
I move back and installed back kodi on a Pi3. kodi is able to display movies on HDMI and music on the USB DAC. I was happy with volumio but having 2 devices for movies and music is not reasonable - even if these are 2 pi.

Hi Greg,

I will see if I can get a script compiled, I know I promised I’d look into that before… but you know… priorities and stuff :stuck_out_tongue:
I’ve ordered a Pi3B for the project, been wanting one for some time now… So I thought I’d order one finally.

Maybe the Pi3B has different behaviour compared to the Pi2B. I expect the pi to be delivered tomorrow, so testing will not commence before tomorrow evening.

It took me a while, but I think I’ve found a way to do it all in one script… will test a bit again this weekend.

The script is:

[code]#!/bin/bash

Kodi plugin installation script

echo “deb http://archive.mene.za.net/raspbian jessie contrib” | sudo tee -a /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

Update repositories, install debugger and Kodi

apt-get update
apt-get -y install gdb
apt-get -y install kodi

Prepare usergroups and configure user

addgroup --system input
#adduser kodi
usermod -aG audio,video,input,dialout,plugdev,tty kodi

Enable auto-login

INITTAB="/etc/inittab"
if grep -q “1:2345:respawn:/sbin/getty 38400 tty1” $INITTAB;
then
sed -i – ‘s#1:2345:respawn:/sbin/getty 38400 tty1#1:2345:respawn:/sbin/getty --autologin volumio --noclear 38400 tty1#g’ $INITTAB
fi

Configure Kodi auto-launch

KODICONFIG="/etc/default/kodi"
if grep -q “ENABLED=0” $KODICONFIG;
then
sed -i – ‘s/ENABLED=0/ENABLED=1/g’ $KODICONFIG
fi

Add input rules

echo "SUBSYSTEM==“input”, GROUP=“input”, MODE=“0660”
KERNEL==“tty[0-9]*”, GROUP=“tty”, MODE=“0660"” | sudo tee -a /etc/udev/rules.d/99-input.rules

Add input permissions

echo "# input
KERNEL==“mouse*|mice|event*”, MODE=“0660”, GROUP=“input”
KERNEL==“ts[0-9]|uinput", MODE=“0660”, GROUP=“input”
KERNEL=="js[0-9]
”, MODE=“0660”, GROUP=“input”

tty

KERNEL==“tty[0-9]*”, MODE=“0666”

vchiq

SUBSYSTEM==“vchiq”, GROUP=“video”, MODE=“0660"” | sudo tee -a /etc/udev/rules.d/10-permissions.rules

Map the EGL libraries

echo “/opt/vc/lib/” | sudo tee /etc/ld.so.conf.d/00-vmcs.conf
ldconfig

Update the gpu_mem parameter

CONFIG="/boot/config.txt"
if grep -q gpu_mem=16 $CONFIG;
then
sed -i – ‘s/gpu_mem=16/gpu_mem=248/g’ $CONFIG
else
sed -i – ‘s/gpu_mem=/#gpu_mem=/g’ $CONFIG
echo “gpu_mem=248” | sudo tee -a $CONFIG
fi

echo “hdmi_force_hotplug=1” | sudo tee -a /boot/config.txt

#reboot[/code]

Remember to use UNIX EOL (end of line) as opposed to Windows!

Thanks to Saiyato, I installed kodi on Volumio 2.001. I had to change the http port for kodi I could access both from web URL.
However I could not set it to use hifibery digi. Volumio works as usual. Kodi works with hdmi or USB audio, but does not detect the hifiberry digi+
The work around is to use 2 DACs. One for volumio that uses input from hifiberry digi and another from USB. Both connect to same powered speakers .
2nd problem is, shut down or reboot takes very long. I see a shutdown process waiting for XBMC for 5 mins. Sometimes it completes in 2-3 minutes, but it’s way longer than what it would take with volumio without kodi.
Any idea?

Hi Saiyato,
great that i found your script - thank you for your work :slight_smile:

I am new to this, and i just want to get sure that i would do it right (no experience with linux) - my raspberry is on the way…

So my steps would be:
Write the image of Volumio2.0 to the SD-Card
Start it, login with putty
create a file, for instance “script.sh”, write your script in it (with nano)
start your script “bash”

Right?
BR, Lion

Thank you Saiyato for your script. It worked perfectly with my new Rasp3 + Hifiberry DAC+pro

But I found necessary to do it in order:

1- install Volumio in the SD card
2- config DAC according support.hifiberry.com/hc/en-us/ … -or-higher
3- check DAC’s configuration in Volumio
4- create Saiyato’s script, change permission CHMOD, and run

If you change the configuration in Volumio it will rewrite /boot/config.txt, and it will affect Kodi

Aye that is correct, I think it (volumio) even writes a complete (new) one (boot/config.txt) as opposed to editing it (like my script). Still working on finding the problem of rebooting and the LSB job “raise network interfaces” hang.

That is correct yes! :slight_smile:

What I mostly do is:

  • Install Volumio (write to SD and boot)
  • Configure Volumio hardware (like alsasi mentioned)
  • Configure Volumio for personal use (Spotify/load my music)
  • WinSCP into the Pi and place my script (I have it saved on my computer)
  • Run the script (sudo sh script.sh)

I might be easier to draw a new image since I’ve been installing so many times lately… :unamused: Oh well, if you have any questions, just ask :slight_smile:

Wouldn’t it be nice to wrap this install script (and mirrored uninstall) into a plugin.zip, eventually hosted on Volumio plugin “store”?
This will make install a breeze.

If someone is willing to make a plugin , I will include it :wink:

I tried to do this, not sure how to fix the errors I encountered… javascript is not so much my thing :stuck_out_tongue:

Attached the plugin zip-file I used (and created) and the volumio logfile (as zip, because log and txt are not allowed). In the process the zip is ‘downloaded’ thrice, exactly every two minutes… I might be able to figure out eventually why, but maybe someone sees it in a few seconds :unamused:

After the plugin is installed volumio doesn’t work anymore… at least… once I’ve ‘enabled’ the plugin and try to enter ‘settings’. Probably because there’s no index.js? But should I add an empty one then? I might fiddle some more in the weekend, to be continued :wink:

UPDATE: It seems… index.js is indeed missing

volumio@volumio:~$ systemctl status volumio â volumio.service - Volumio Backend Module Loaded: loaded (/lib/systemd/system/volumio.service; enabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2016-12-14 20:09:06 UTC; 91ms ago Process: 4600 ExecStart=/usr/local/bin/node /volumio/index.js (code=exited, status=1/FAILURE) Main PID: 4600 (code=exited, status=1/FAILURE) CGroup: /system.slice/volumio.service

By the way I tried this on a Pi3, didn’t want to destroy my PiB+ installation (which is actually used).
log file.zip (12.5 KB)
kodi_1.0.1.zip (1.79 KB)

So, do you mean you installed Volumio on OSMC image??How do you access the volumio player?

I am doing a car media project with a rpi 3 with a justboom dac. and I am searching the best way to install volumio (I could just go for raspbian and kodi, but after some sound testings, volumio sounds better than kodi, rune or moode, to my ears) with a touch screen friendly environment and GPS navigator, or at least an vnc viewer client to send and manage my phone gps navigation app.

Tried to install navit on Volumio, but I can´t, I get a persistent gpsd error, so right now I am trying to installing Pixel on Volumio image, because Pixel have an vnc viewer installed too…but I have a lot of problems I am fighting with right now, from public keys to repositories issues, that I am solving step by step…

Well, the question is, If you installed volumio on OSMC, maybe it is possible to do it on raspbian Pixel image? How do you access to volumio player from OSMC?

Actually this was the case for Volumio 1.55, however Volumio 2.0 is a little bit beyond me to install on top of anything really. :wink:
The topic has been more the other way around -> install Kodi on top of Volumio (2.0).

Still working on the plugin, but due to personal activities I haven’t had much time to spend on it. Will be tending to it in februari I guess, since I have a short course this month.

Thanks @Saiyato, it’s a very interesting work.
A few questions:

  • is creating a new user mandatory?
    How about having it under volumio user, and actually put all files in /data/configuration/misc… (and eventually symlink from Volumio home directory)

  • how current install and settings migrate in case of volumio updates?
    Having all config file within /data as mentioned before may greatly help migrating data, upgrades, etc…

  • as noted by other users volumio shutdown/restart are delayed a lot once Kodi is there.
    Any idea to improve this?

Thanks again, it’s really looking good.

Thanks mate!

For the record I created a project for this: github.com/Saiyato/volumio-kodi-plugin
The latest version has a working config section :slight_smile: Yay me! Still needs more development obviously…

I’ve numbered your questions and will try to answer them best I can:

  1. No it is not mandatory, but I didn’t want to use the volumio user to keep things truly separated from the volumio installation. It’s open-source, so feel free to make your own install-script.

  2. See latest commit, it should work now afaik, it’s my first node js project, so be kind :unamused:

  3. This is an issue I cannot address at the moment, it’s embedded deep within Linux and my experience on the platform is less than moderate. The message is: “A stop job is running for LSB: XBMC media centre”. I have no clue whatsoever as to where to find a solution for this… sounds like a rights issue to me, but I’m no sysadmin, certainly not on Linux. Agreed this is poor performance, but mine does pull through in 2:30min… :stuck_out_tongue:

Maybe someone with more Linux (and maybe Kodi/NFS/SMB/NodeJS) experience could take a look?

Btw, the latest package is attached to this post, it should install rightaway, but I’ve have some trouble with a 2 minute timeout bug in volumio… Just install it again and the last dependencies will be there too. Enjoy!
volumio-kodi-plugin_1.0.12.zip (205 KB)

Hi,

I have a RPI2 and a Hifiberry DAC+ and ran into a small problem. I managed to use the script to install KODI. However it took me a long time to get the audio working, because on my setup KODI only worked with the default soundcard, set to 1 in:

/usr/share/alsa/alsa.conf

defaults.ctl.card 1
defaults.pcm.card 1

Should be set to 1 (it’s normally on 0, which is the onboard card). The setting seem to override normal /etc/asound.conf setting (setting card 1 as default).

Now, one could also turn off the onboard sound by commenting out the dtparam:

/boot/config.txt

#dtparam=audio=on

Which makes the Hifiberry card 0, but this breaks both MPD and shairport, since both expect the drive to be on hw:1,0 (and somehow changing these settings doesn’t work).

So the easiest way – if you might run into this problem – is to change the /usr/share/alsa/alsa.conf.

Hi Sjoerd,

Thanks for the research! Super, I was about to write this into the settings page, but having edited the setting; Volumio couldn’t use the soundcard anymore. Have you experienced the same behaviour? Disabling the soundcard for Volumio does not seem like a solid plan. Maybe I should’ve waited longer and the device would be released if no sound is played for some time…

At one point I did manage to have both Kodi and Volumio use the HifiBerry DIgi+, but I’m not sure this was Volumio 2… :unamused:

So I will keep looking for a solid solution, the dtparam=audio=on option does sound interesting… This way we might have both Kodi and Volumio use the Digi+ (or any other soundcard obviously).