Hi there,
I recently have setup all my hardware and it is working great
Setup:
RPi3 with LibreELEC running Hyperion installed via HyperCon
Now that everything is setup, I recognized the daemon always points to one single configuration file and the Hyperion App for Android doesn't provide an easy way to toggle between several configuration files.
So I wrote a little script (quick 'n dirty), which will read out my AVR's xml to see which hdmi-source is active (all in bash :sickxx: has been a pain in the ass...) and will allow me to toggle between internal and external grabber (if called with arguments). I named it 'htoggle'.
Since libreELEC is designed in a very restrictive way, I'm not sure if I somehow will be able to run this as a daemon, so I decided to toggle by hand via CEC remote for now.
This is my script, running nice from within ssh sessions:
#!/usr/bin/env bash
# get hdmi-source
# stdin workaround:
tmp="/storage/.kodi/temp/hdmisource.txt"
curl http://192.168.178.7/goform/formMainZone_MainZoneXmlStatusLite.xml >> $tmp 2>/dev/null
sed -ne '/InputFuncSelect/{s/.*<InputFuncSelect>\(.*\)<\/InputFuncSelect>.*/\1/p;q;}' -i $tmp
sed -ne '/value/{s/.*<value>\(.*\)<\/value>.*/\1/p;q;}' -i $tmp
snippet=$(cat $tmp)
if [ "$snippet" == "BD" ]; then # my kodi media center
conf="/storage/.config/int_ext_hyperion.config.json"
else
conf="/storage/.config/ext_only_hyperion.config.json"
fi
rm $tmp
# debug
echo $snippet --- $conf
# htoggle w/o arguments
if [ "$1" == "" ]; then
# if on, turn off
if [ `pidof hyperiond` > "0" ]; then
killall hyperiond 2>/dev/null
fi
/storage/hyperion/bin/hyperiond.sh $conf > /storage/logfiles/hyperion.log 2>&1 &
fi
# htoggle w/ argument 'off'
if [ "$1" == "off" ]; then
# if on, turn off
if [ `pidof hyperiond` > "0" ]; then
killall hyperiond 2>/dev/null
fi
fi
exit 0
Alles anzeigen
Now I barely understand, how to modify libreELECS remote keymapping. I cannot get access to these infos, because kodi.wiki is offline since a few days and all of my web search results point to this wiki.
I want to alter the mapping for my CEC Remote (the color keys which I don't need) to execute "htoggle" and "htoggle off".
I thought it would be enough, to modify .kodi/userdata/advancedsettings.xml and include a tag like this:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<keymap>
<global>
<remote>
<red>ActivateWindow(Videos)</red>
<green>ActivateWindow(Videos)</green>
<yellow>ActivateWindow(Videos)</yellow>
<blue>ActivateWindow(Videos)</blue>
</remote>
</global>
</keymap>
</advancedsettings>
Alles anzeigen
In this example I set everything to ActivateWindow(Videos) for testing purposes.
As long as I understand, now the original global part from original (untouched) remote.xml should be replaced by my modification.
But it does not work. kodi seems to ignore my advancedsettings.xml, even if I can see it loads:
LibreELEC:~ # cat .kodi/temp/kodi.log
[...]
16:45:30.660 T:1962662016 NOTICE: Contents of special://profile/advancedsettings.xml are...
<?xml version="1.0" encoding="UTF-8" ?>
<advancedsettings>
<keymap>
<global>
<remote>
<red>ActivateWindow(Videos)</red>
<green>ActivateWindow(Videos)</green>
<yellow>ActivateWindow(Music)</yellow>
<blue>ActivateWindow(Pictures)</blue>
</remote>
</global>
</keymap>
</advancedsettings>
[...]
Alles anzeigen
What am I missing? Isn't this the proper way to modify key actions on a CEC remote?