LightberryEu / lightberry-config-downloader

Simple plugin to easily download hyperion/boblight config files.
lightberry.eu
Other
2 stars 2 forks source link

Change between two preconfigured hyperion.config.json files to activate XBMC or TV grabber sources #1

Open cmvac opened 9 years ago

cmvac commented 9 years ago

I am loving the Lightberry kit with grabber, but I noticed that you cannot use the grabber activated and XBMC as LED source at the same time. They simplest way I found was to manually replace the hyperion.config.json with the "Configuration for the embedded V4L2 grabber" added file to turn the grabber on, and without it to turn it off.

It would be nice if the config downloader had a file search option, so we could change between files and not overwriting them, but making a backup from the .json file used before.

Even better would be an addon for switching between grabber and XBMC!

tszczerba commented 9 years ago

That's a nice idea, I'll try to implement it although I cannot commit to any date :)

cmvac commented 9 years ago

I copied an hyperion2.config.json with the grabber configured to the /configfile directory and ran: OpenELEC:~ # killall hyperiond OpenELEC:~ # /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion2.config.json </dev/null >/dev/null 2>&1 &

That didn't fire up the leds, so the overwrite option looks like the way to go.

tszczerba commented 9 years ago

check with ps if there aren't any hyperion processes, if I remember correctly there are two and both have to be killed.

cmvac commented 9 years ago

I am trying to make two scripts, one called grabberoff.sh running

killall hyperiond /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json </dev/null >/dev/null 2>&1 &

and the other, called grabberon.sh, running

killall hyperiond /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion2.config.json </dev/null >/dev/null 2>&1 &

Both commands work on ssh... It didn't before because of a spelling mistake of mine. All I had to do was copy hyperion2.config.json with the V4L2 grabber added to /storage/.config and run the commands.

After the scripts are done, do you know how to execute them through XBMC?

Also, how do I make the scripts executable on Openelec?

tszczerba commented 9 years ago

chmod +x [scriptname] makes them executable

That's fairly easy, check out my other script lightberry constant, feel free to clone it and modify to run your scripts instead of commands. Let me know in case you need any help :)