From f04d48063d171f57d3a914288e536e7376b465b3 Mon Sep 17 00:00:00 2001 From: brindosch Date: Fri, 10 Jun 2016 18:32:39 +0200 Subject: [PATCH] [DO NOT MERGE] Preperation for V1.03.0 (#672) Preperation for V1.03.0 Former-commit-id: d3ef9dbe74df304dd0653818415f10401ac72af4 --- CMakeLists.txt | 4 - bin/create_release.sh | 8 +- bin/install_hyperion.sh | 114 +++-- bin/remove_hyperion.sh | 18 +- ...nfig.json => hyperion.config.json.example} | 94 ++-- config/hyperion_x86.config.json | 430 ------------------ 6 files changed, 124 insertions(+), 544 deletions(-) rename config/{hyperion.config.json => hyperion.config.json.example} (91%) delete mode 100644 config/hyperion_x86.config.json diff --git a/CMakeLists.txt b/CMakeLists.txt index b94e3068..388aab0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,10 +172,6 @@ if(ENABLE_OSX) set(CMAKE_EXE_LINKER_FLAGS "-framework CoreGraphics") endif() -configure_file(bin/install_hyperion.sh ${LIBRARY_OUTPUT_PATH} @ONLY) -configure_file(config/hyperion.config.json ${LIBRARY_OUTPUT_PATH} @ONLY) -configure_file(config/hyperion_x86.config.json ${LIBRARY_OUTPUT_PATH} @ONLY) - # Add the source/lib directories add_subdirectory(dependencies) add_subdirectory(libsrc) diff --git a/bin/create_release.sh b/bin/create_release.sh index 94f90e81..d06024c0 100644 --- a/bin/create_release.sh +++ b/bin/create_release.sh @@ -23,14 +23,14 @@ tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-re --transform "s:$builddir/bin/:hyperion/bin/:" \ --transform "s:$repodir/effects/:hyperion/effects/:" \ --transform "s:$repodir/config/:hyperion/config/:" \ - --transform "s:$repodir/bin/service/hyperion.init.sh:hyperion/init.d/hyperion.init.sh:" \ - --transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/init.d/hyperion.systemd.sh:" \ - --transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/init.d/hyperion.initctl.sh:" \ + --transform "s:$repodir/bin/service/hyperion.init.sh:hyperion/services/hyperion.init.sh:" \ + --transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/services/hyperion.systemd.sh:" \ + --transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/services/hyperion.initctl.sh:" \ --transform "s://:/:g" \ "$builddir/bin/hyperion"* \ "$repodir/effects/"* \ "$repodir/bin/service/hyperion.init.sh" \ "$repodir/bin/service/hyperion.systemd.sh" \ "$repodir/bin/service/hyperion.initctl.sh" \ - "$repodir/config/hyperion.config.json" + "$repodir/config/hyperion.config.json.example" diff --git a/bin/install_hyperion.sh b/bin/install_hyperion.sh index 7777f303..05d0515a 100755 --- a/bin/install_hyperion.sh +++ b/bin/install_hyperion.sh @@ -23,7 +23,7 @@ fi #Set welcome message if [ $BETA -eq 1 ]; then WMESSAGE="echo This script will update Hyperion to the latest BETA" -else WMESSAGE="echo This script will install/update Hyperion Ambilight" +else WMESSAGE="echo This script will install/update Hyperion Ambient Light" fi #Welcome message @@ -74,24 +74,34 @@ if [ $BOBLIGHT_PROCNR -eq 1 ]; then exit 1 fi -# Stop hyperion daemon if it is running +#set service script path +SERVICEL="/usr/share/hyperion/services" + +# Stop hyperion daemon if it is running and set service path echo '---> Stop Hyperion, if necessary' if [ $OS_OPENELEC -eq 1 ]; then killall hyperiond 2>/dev/null elif [ $USE_INITCTL -eq 1 ]; then /sbin/initctl stop hyperion 2>/dev/null -elif [ $USE_SERVICE -eq 1 ]; then - /usr/sbin/service hyperion stop 2>/dev/null + SERVICEP="/etc/init" elif [ $USE_SYSTEMD -eq 1 ]; then service hyperion stop 2>/dev/null + SERVICEP="/etc/systemd/system" #many people installed with the official script and this just uses service, if both registered -> dead /usr/sbin/service hyperion stop 2>/dev/null + #Bad workaround for Jessie (systemd) users that used the old official script for install + update-rc.d -f hyperion remove 2>/dev/null + rm /etc/init.d/hyperion 2>/dev/null +elif [ $USE_SERVICE -eq 1 ]; then + /usr/sbin/service hyperion stop 2>/dev/null + SERVICEP="/etc/init.d" fi -#Install dependencies for Hyperion +#Install dependencies for Hyperion and setup preperation if [ $OS_OPENELEC -ne 1 ]; then echo '---> Install/Update Hyperion dependencies (This may take a while)' apt-get -qq update && apt-get -qq --yes install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0 ca-certificates + mkdir /etc/hyperion 2>/dev/null fi #Check, if dtparam=spi=on is in place (not for OPENELEC) @@ -119,15 +129,29 @@ if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then fi fi fi - -#Backup the .conf files, if present -echo '---> Backup Hyperion configuration(s), if present' -rm -f /tmp/*.json 2>/dev/null -if [ $OS_OPENELEC -eq 1 ]; then - cp -v /storage/.config/*.json /tmp 2>/dev/null -else cp -v /opt/hyperion/config/*.json /tmp 2>/dev/null -fi +# compatibility layer to move old configs to new config dir +if [ -f "/opt/hyperion" ]; then + echo '---> Old installation found, move configs to /etc/hyperion/ and move hyperion to /usr/share/hyperion/' + mv /opt/hyperion/config/*.json /etc/hyperion 2>/dev/null + sed -i "s|/opt/hyperion/effects|/usr/share/hyperion/effects|g" /etc/hyperion/*.json + if [ $USE_INITCTL -eq 1 ]; then + sed -i "s|/etc/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion.conf + sed -i "s|/opt/hyperion/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion.conf + initctl reload-configuration + elif [ $OS_OPENELEC -eq 1 ]; then + sleep 0 + elif [ $USE_SYSTEMD -eq 1 ]; then + sed -i "s|/etc/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion.service + sed -i "s|/opt/hyperion/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion.service + systemctl -q daemon-reload + elif [ $USE_SERVICE -eq 1 ]; then + sed -i "s|/etc/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion + sed -i "s|/opt/hyperion/hyperion.config.json|/etc/hyperion/hyperion.config.json|g" $SERVICEP/hyperion + update-rc.d hyperion defaults 98 02 + fi +fi + # Select the appropriate download path if [ $BETA -eq 1 ]; then HYPERION_ADDRESS=https://sourceforge.net/projects/hyperion-project/files/beta @@ -191,32 +215,25 @@ if [ $OS_OPENELEC -eq 1 ]; then curl -# -L --get $OE_DEPENDECIES | tar -C /storage/hyperion/bin -xz #set the executen bit (failsave) chmod +x -R /storage/hyperion/bin - - # /storage/.config is available as samba share. A symbolic link would not be working - false | cp -i /storage/hyperion/config/hyperion.config.json /storage/.config/hyperion.config.json 2>/dev/null else - wget -nv $HYPERION_RELEASE -O - | tar -C /opt -xz - #set the executen bit (failsave) - chmod +x -R /opt/hyperion/bin + BINSP=/usr/share/hyperion/bin + BINTP=/usr/bin + wget -nv $HYPERION_RELEASE -O - | tar -C /usr/share -xz + #set the executen bit (failsave) and move config to /etc/hyperion + chmod +x -R $BINSP # create links to the binaries - ln -fs /opt/hyperion/bin/hyperiond /usr/bin/hyperiond - ln -fs /opt/hyperion/bin/hyperion-remote /usr/bin/hyperion-remote - ln -fs /opt/hyperion/bin/hyperion-v4l2 /usr/bin/hyperion-v4l2 - ln -fs /opt/hyperion/bin/hyperion-dispmanx /usr/bin/hyperion-dispmanx 2>/dev/null - ln -fs /opt/hyperion/bin/hyperion-x11 /usr/bin/hyperion-x11 2>/dev/null -fi - -# Restore backup of .conf files, if present -echo '---> Restore Hyperion configuration(s), if present' -if [ $OS_OPENELEC -eq 1 ]; then - mv -v /tmp/*.json /storage/.config/ 2>/dev/null -else mv -v /tmp/*.json /opt/hyperion/config/ 2>/dev/null + ln -fs $BINSP/hyperiond $BINTP/hyperiond + ln -fs $BINSP/hyperion-remote $BINTP/hyperion-remote + ln -fs $BINSP/hyperion-v4l2 $BINTP/hyperion-v4l2 + ln -fs $BINSP/hyperion-dispmanx $BINTP/hyperion-dispmanx 2>/dev/null + ln -fs $BINSP/hyperion-x11 $BINTP/hyperion-x11 2>/dev/null + ln -fs $BINSP/hyperion-aml $BINTP/hyperion-aml 2>/dev/null fi -# Copy the service control configuration to /etc/int (-n to respect user modified scripts) +# Copy the service control configuration to /etc/init (-n to respect user modified scripts) if [ $USE_INITCTL -eq 1 ]; then echo '---> Installing initctl script' - cp -n /opt/hyperion/init.d/hyperion.initctl.sh /etc/init/hyperion.conf 2>/dev/null + cp -n $SERVICEL/hyperion.initctl.sh $SERVICEP/hyperion.conf 2>/dev/null initctl reload-configuration elif [ $OS_OPENELEC -eq 1 ]; then #modify all old installs with a logfile output @@ -237,34 +254,35 @@ elif [ $OS_OPENELEC -eq 1 ]; then elif [ $USE_SYSTEMD -eq 1 ]; then echo '---> Installing systemd script' #place startup script for systemd and activate - #Problem with systemd to enable symlinks - Bug? Workaround cp -n (overwrite never) - #Bad workaround for Jessie (systemd) users that used the official script for install - update-rc.d -f hyperion remove 2>/dev/null - rm /etc/init.d/hyperion 2>/dev/null - cp -n /opt/hyperion/init.d/hyperion.systemd.sh /etc/systemd/system/hyperion.service + cp -n $SERVICEL/hyperion.systemd.sh $SERVICEP/hyperion.service systemctl -q enable hyperion.service if [ $OS_OSMC -eq 1 ]; then echo '---> Modify systemd script for OSMC usage' - # Wait until kodi is sarted (for kodi checker) - sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service - sed -i '/Unit/a After = mediacenter.service' /etc/systemd/system/hyperion.service - sed -i 's/User=osmc/User=root/g' /etc/systemd/system/hyperion.service - sed -i 's/Group=osmc/Group=root/g' /etc/systemd/system/hyperion.service + # Wait until kodi is sarted + sed -i '/After = mediacenter.service/d' $SERVICEP/hyperion.service + sed -i '/Unit/a After = mediacenter.service' $SERVICEP/hyperion.service systemctl -q daemon-reload fi elif [ $USE_SERVICE -eq 1 ]; then echo '---> Installing startup script in init.d' # place startup script in init.d and add it to upstart (-s to respect user modified scripts) - ln -s /opt/hyperion/init.d/hyperion.init.sh /etc/init.d/hyperion 2>/dev/null - chmod +x /etc/init.d/hyperion + ln -s $SERVICEL/hyperion.init.sh $SERVICEP/hyperion 2>/dev/null && chmod +x $SERVICEP/hyperion update-rc.d hyperion defaults 98 02 fi +#remove unwanted files/dirs +if [ $OS_OPENELEC -eq 1 ]; then + rm -r /storage/hyperion/services +else + rm -r /usr/share/hyperion/services + rm -r /opt/hyperion 2>/dev/null +fi + #chown the /config/ dir and all configs inside for hypercon config upload for non-root logins if [ $OS_OSMC -eq 1 ]; then - chown -R osmc:osmc /opt/hyperion/config + chown -R osmc:osmc /etc/hyperion/config elif [ $OS_RASPBIAN -eq 1 ]; then - chown -R pi:pi /opt/hyperion/config + chown -R pi:pi /etc/hyperion/config fi # Start the hyperion daemon @@ -311,4 +329,4 @@ if [ $CPU_RPI -eq 1 ] && [ $SPIOK -ne 1 ]; then reboot fi -exit 0 \ No newline at end of file +exit 0 diff --git a/bin/remove_hyperion.sh b/bin/remove_hyperion.sh index b6bf9d1b..da3defe6 100644 --- a/bin/remove_hyperion.sh +++ b/bin/remove_hyperion.sh @@ -40,9 +40,9 @@ if [ "$1" = "" ]; then *) echo "-> Please enter only y or n" esac done - echo "---> You entered \"$CONFIRM\". Remove Hyperion!" fi + # Find out if we are on OpenElec or RasPlex OS_OPENELEC=`grep -m1 -c 'OpenELEC\|RasPlex\|LibreELEC' /etc/issue` @@ -64,10 +64,6 @@ elif [ $USE_SERVICE -eq 1 ]; then /usr/sbin/service hyperion stop 2>/dev/null elif [ $USE_SYSTEMD -eq 1 ]; then service hyperion stop 2>/dev/null -# while [ $SERVICEC -le 20 ]; do -# service hyperion_fw$SERVICEC stop 2>/dev/null -# ((SERVICEC++)) -# done fi #reset count @@ -87,19 +83,11 @@ elif [ $USE_SYSTEMD -eq 1 ]; then # Delete and disable Hyperion systemd script echo '---> Delete and disable Hyperion systemd script' systemctl disable hyperion.service -# while [ $SERVICEC -le 20 ]; do -# systemctl -q disable hyperion_fw$SERVICEC.service 2>/dev/null -# ((SERVICEC++)) -# done rm -v /etc/systemd/system/hyperion* 2>/dev/null elif [ $USE_SERVICE -eq 1 ]; then # Delete and disable Hyperion init.d script echo '---> Delete and disable Hyperion init.d script' update-rc.d -f hyperion remove -# while [ $SERVICEC -le 20 ]; do -# update-rc.d -f hyperion_fw$SERVICEC remove 2>/dev/null -# ((SERVICEC++)) -# done rm /etc/init.d/hyperion* 2>/dev/null fi @@ -117,11 +105,15 @@ else rm -v /usr/bin/hyperion-v4l2 2>/dev/null rm -v /usr/bin/hyperion-dispmanx 2>/dev/null rm -v /usr/bin/hyperion-x11 2>/dev/null + rm -v /usr/bin/hyperion-aml 2>/dev/null rm -v /etc/hyperion.config.json 2>/dev/null echo "---> Remove binaries" rm -rv /opt/hyperion 2>/dev/null + rm -rv /etc/hyperion 2>/dev/null + rm -rv /usr/share/hyperion 2>/dev/null fi echo '*******************************************************************************' echo 'Hyperion successful removed!' echo '*******************************************************************************' exit 0 + \ No newline at end of file diff --git a/config/hyperion.config.json b/config/hyperion.config.json.example similarity index 91% rename from config/hyperion.config.json rename to config/hyperion.config.json.example index 5d549075..0f854473 100644 --- a/config/hyperion.config.json +++ b/config/hyperion.config.json.example @@ -1,12 +1,12 @@ -// Automatically generated configuration file for 'Hyperion daemon' -// Generated by: HyperCon (The Hyperion deamon configuration file builder) -// Created with HyperCon V1.02.0 (30.04.2016) +// This is a example config (hyperion.config.json) with comments, in any case you need to create your own one with HyperCon! +// Webpage: https://www.hyperion-project.org + { /// Device configuration contains the following fields: /// * 'name' : The user friendly name of the device (only used for display purposes) /// * 'type' : The type of the device or leds (known types for now are - /// ---------SPI---------, APA102, WS2801, P9813, LPD6803, LPD8806, ---------PWM---------, WS2812b (just RPi1), WS281X (RPi1, RPi2, RPi3), --------OTHER--------, PhilipsHUE, AtmoOrb, PiBlaster, Tinkerforge, FadeCandy, RawHID (USB), UDP, SEDU, TPM2, USBASP-WS2801, USBASP-WS2812, ------3rd PARTY------, Adalight, AdalightAPA102, AmbiLed, Atmo, Lightpack, Multi-Lightpack, Paintpack, Test (file), None) + /// APA102, WS2801, P9813, LPD6803, LPD8806, ---------PWM---------, WS2812b (just RPi1), WS281X (RPi1, RPi2, RPi3), --------OTHER--------, PhilipsHUE, AtmoOrb, PiBlaster, Tinkerforge, FadeCandy, RawHID (USB), UDP, SEDU, TPM2, USBASP-WS2801, USBASP-WS2812, ------3rd PARTY------, Adalight, AdalightAPA102, AmbiLed, Atmo, Lightpack, Multi-Lightpack, Paintpack, Test (file), None) /// * [device type specific configuration] /// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.). "device" : @@ -41,6 +41,7 @@ /// tuning parameters: /// - 'saturationGain' The gain adjustement of the saturation /// - 'luminanceGain' The gain adjustement of the luminance + /// - 'luminanceMinimum' The minimum luminance (backlight) /// * 'red'/'green'/'blue' : The manipulation in the Red-Green-Blue color domain with the /// following tuning parameters for each channel: /// - 'threshold' The minimum required input value for the channel to be on @@ -102,7 +103,8 @@ "hsl" : { "saturationGain" : 1.0000, - "luminanceGain" : 1.0000 + "luminanceGain" : 1.0000, + "luminanceMinimum" : 0.0000 }, "red" : { @@ -178,11 +180,11 @@ /// * json : Json server adress and port of your target. Syntax:[IP:PORT] -> ["127.0.0.1:19446"] or more instances to forward ["127.0.0.1:19446","192.168.0.24:19448"] /// HINT: If you redirect to "127.0.0.1" (localhost) you could start a second hyperion with another device/led config! /// Be sure your client(s) is/are listening on the configured ports. The second Hyperion (if used) also needs to be configured! (HyperCon -> External -> Json Server/Proto Server) -// "forwarder" : -// { -// "proto" : ["127.0.0.1:19447"], -// "json" : ["127.0.0.1:19446"] -// }, + "forwarder" : + { + "proto" : ["127.0.0.1:19447"], + "json" : ["127.0.0.1:19446"] + }, /// The configuration for the frame-grabber, contains the following items: /// * width : The width of the grabbed frames [pixels] @@ -205,19 +207,21 @@ /// * grabPictures : Flag indicating that the frame-grabber is on(true) during picture show /// * grabAudio : Flag indicating that the frame-grabber is on(true) during audio playback /// * grabMenu : Flag indicating that the frame-grabber is on(true) at the Kodi menu + /// * grabPause : Flag indicating that the frame-grabber is on(true) at player state "pause" /// * grabScreensaver : Flag indicating that the frame-grabber is on(true) when Kodi is on screensaver /// * enable3DDetection : Flag indicating that the frame-grabber should switch to a 3D compatible modus if a 3D video is playing -// "xbmcVideoChecker" : -// { -// "xbmcAddress" : "127.0.0.1", -// "xbmcTcpPort" : 9090, -// "grabVideo" : true, -// "grabPictures" : true, -// "grabAudio" : true, -// "grabMenu" : false, -// "grabScreensaver" : true, -// "enable3DDetection" : true -// }, + "xbmcVideoChecker" : + { + "xbmcAddress" : "127.0.0.1", + "xbmcTcpPort" : 9090, + "grabVideo" : true, + "grabPictures" : true, + "grabAudio" : true, + "grabMenu" : false, + "grabPause" : false, + "grabScreensaver" : true, + "enable3DDetection" : true + }, /// The configuration of the Json server which enables the json remote interface /// * port : Port at which the json server is started @@ -236,11 +240,11 @@ /// The configuration of the boblight server which enables the boblight remote interface /// * port : Port at which the boblight server is started /// * priority: Priority of the boblight server (Default=900) HINT: lower value result in HIGHER priority! -// "boblightServer" : -// { -// "port" : 19333, -// "priority" : 900 -// }, + "boblightServer" : + { + "port" : 19333, + "priority" : 900 + }, /// Configuration for the embedded V4L2 grabber /// * device : V4L2 Device to use [default="/dev/video0"] @@ -259,25 +263,25 @@ /// * redSignalThreshold : Signal threshold for the red channel between 0.0 and 1.0 [default=0.0] /// * greenSignalThreshold : Signal threshold for the green channel between 0.0 and 1.0 [default=0.0] /// * blueSignalThreshold : Signal threshold for the blue channel between 0.0 and 1.0 [default=0.0] -// "grabber-v4l2" : -// { -// "device" : "/dev/video0", -// "input" : 0, -// "standard" : "no-change", -// "width" : -1, -// "height" : -1, -// "frameDecimation" : 2, -// "sizeDecimation" : 8, -// "priority" : 900, -// "mode" : "2D", -// "cropLeft" : 0, -// "cropRight" : 0, -// "cropTop" : 0, -// "cropBottom" : 0, -// "redSignalThreshold" : 0.0, -// "greenSignalThreshold" : 0.0, -// "blueSignalThreshold" : 0.0 -// }, + "grabber-v4l2" : + { + "device" : "/dev/video0", + "input" : 0, + "standard" : "no-change", + "width" : -1, + "height" : -1, + "frameDecimation" : 2, + "sizeDecimation" : 8, + "priority" : 900, + "mode" : "2D", + "cropLeft" : 0, + "cropRight" : 0, + "cropTop" : 0, + "cropBottom" : 0, + "redSignalThreshold" : 0.0, + "greenSignalThreshold" : 0.0, + "blueSignalThreshold" : 0.0 + }, /// The configuration for each individual led. This contains the specification of the area /// averaged of an input image for each led to determine its color. Each item in the list diff --git a/config/hyperion_x86.config.json b/config/hyperion_x86.config.json deleted file mode 100644 index 329ff248..00000000 --- a/config/hyperion_x86.config.json +++ /dev/null @@ -1,430 +0,0 @@ -// Automatically generated configuration file for 'Hyperion daemon' -// Generated by: HyperCon (The Hyperion deamon configuration file builder - -{ - /// Device configuration contains the following fields: - /// * 'name' : The user friendly name of the device (only used for display purposes) - /// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806', - /// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none') - /// * 'output' : The output specification depends on selected device. This can for example be the - /// device specifier, device serial number, or the output file name - /// * 'rate' : The baudrate of the output to the device - /// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.). - "device" : - { - "name" : "MyPi", - "type" : "adalight", - "output" : "/dev/ttyUSB0", - "rate" : 115200, - "colorOrder" : "rgb" - }, - - /// Color manipulation configuration used to tune the output colors to specific surroundings. - /// The configuration contains a list of color-transforms. Each transform contains the - /// following fields: - /// * 'id' : The unique identifier of the color transformation (eg 'device_1') /// * 'leds' : The indices (or index ranges) of the leds to which this color transform applies - /// (eg '0-5, 9, 11, 12-17'). The indices are zero based. /// * 'hsv' : The manipulation in the Hue-Saturation-Value color domain with the following - /// tuning parameters: - /// - 'saturationGain' The gain adjustement of the saturation - /// - 'valueGain' The gain adjustement of the value - /// * 'red'/'green'/'blue' : The manipulation in the Red-Green-Blue color domain with the - /// following tuning parameters for each channel: - /// - 'threshold' The minimum required input value for the channel to be on - /// (else zero) - /// - 'gamma' The gamma-curve correction factor - /// - 'blacklevel' The lowest possible value (when the channel is black) - /// - 'whitelevel' The highest possible value (when the channel is white) - /// - /// Next to the list with color transforms there is also a smoothing option. - /// * 'smoothing' : Smoothing of the colors in the time-domain with the following tuning - /// parameters: - /// - 'type' The type of smoothing algorithm ('linear' or 'none') - /// - 'time_ms' The time constant for smoothing algorithm in milliseconds - /// - 'updateFrequency' The update frequency of the leds in Hz - "color" : - { - "transform" : - [ - { - "id" : "default", - "leds" : "*", - "hsv" : - { - "saturationGain" : 1.0000, - "valueGain" : 1.0000 - }, - "red" : - { - "threshold" : 0.0000, - "gamma" : 1.0000, - "blacklevel" : 0.0000, - "whitelevel" : 1.0000 - }, - "green" : - { - "threshold" : 0.0000, - "gamma" : 1.0000, - "blacklevel" : 0.0000, - "whitelevel" : 1.0000 - }, - "blue" : - { - "threshold" : 0.0000, - "gamma" : 1.0000, - "blacklevel" : 0.0000, - "whitelevel" : 1.0000 - } - } - ], - "smoothing" : - { - "type" : "none", - "time_ms" : 200, - "updateFrequency" : 20.0000 - } - }, - - /// The configuration for each individual led. This contains the specification of the area - /// averaged of an input image for each led to determine its color. Each item in the list - /// contains the following fields: - /// * index: The index of the led. This determines its location in the string of leds; zero - /// being the first led. - /// * hscan: The fractional part of the image along the horizontal used for the averaging - /// (minimum and maximum inclusive) - /// * vscan: The fractional part of the image along the vertical used for the averaging - /// (minimum and maximum inclusive) - "leds" : - [ - { - "index" : 0, - "hscan" : { "minimum" : 0.4375, "maximum" : 0.5000 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 1, - "hscan" : { "minimum" : 0.3750, "maximum" : 0.4375 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 2, - "hscan" : { "minimum" : 0.3125, "maximum" : 0.3750 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 3, - "hscan" : { "minimum" : 0.2500, "maximum" : 0.3125 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 4, - "hscan" : { "minimum" : 0.1875, "maximum" : 0.2500 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 5, - "hscan" : { "minimum" : 0.1250, "maximum" : 0.1875 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 6, - "hscan" : { "minimum" : 0.0625, "maximum" : 0.1250 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 7, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0625 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 8, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 9, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.8571, "maximum" : 1.0000 } - }, - { - "index" : 10, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.7143, "maximum" : 0.8571 } - }, - { - "index" : 11, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.5714, "maximum" : 0.7143 } - }, - { - "index" : 12, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.4286, "maximum" : 0.5714 } - }, - { - "index" : 13, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.2857, "maximum" : 0.4286 } - }, - { - "index" : 14, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.1429, "maximum" : 0.2857 } - }, - { - "index" : 15, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.1429 } - }, - { - "index" : 16, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 17, - "hscan" : { "minimum" : 0.0000, "maximum" : 0.0625 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 18, - "hscan" : { "minimum" : 0.0625, "maximum" : 0.1250 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 19, - "hscan" : { "minimum" : 0.1250, "maximum" : 0.1875 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 20, - "hscan" : { "minimum" : 0.1875, "maximum" : 0.2500 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 21, - "hscan" : { "minimum" : 0.2500, "maximum" : 0.3125 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 22, - "hscan" : { "minimum" : 0.3125, "maximum" : 0.3750 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 23, - "hscan" : { "minimum" : 0.3750, "maximum" : 0.4375 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 24, - "hscan" : { "minimum" : 0.4375, "maximum" : 0.5000 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 25, - "hscan" : { "minimum" : 0.5000, "maximum" : 0.5625 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 26, - "hscan" : { "minimum" : 0.5625, "maximum" : 0.6250 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 27, - "hscan" : { "minimum" : 0.6250, "maximum" : 0.6875 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 28, - "hscan" : { "minimum" : 0.6875, "maximum" : 0.7500 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 29, - "hscan" : { "minimum" : 0.7500, "maximum" : 0.8125 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 30, - "hscan" : { "minimum" : 0.8125, "maximum" : 0.8750 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 31, - "hscan" : { "minimum" : 0.8750, "maximum" : 0.9375 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 32, - "hscan" : { "minimum" : 0.9375, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 33, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 } - }, - { - "index" : 34, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.0000, "maximum" : 0.1429 } - }, - { - "index" : 35, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.1429, "maximum" : 0.2857 } - }, - { - "index" : 36, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.2857, "maximum" : 0.4286 } - }, - { - "index" : 37, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.4286, "maximum" : 0.5714 } - }, - { - "index" : 38, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.5714, "maximum" : 0.7143 } - }, - { - "index" : 39, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.7143, "maximum" : 0.8571 } - }, - { - "index" : 40, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.8571, "maximum" : 1.0000 } - }, - { - "index" : 41, - "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 42, - "hscan" : { "minimum" : 0.9375, "maximum" : 1.0000 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 43, - "hscan" : { "minimum" : 0.8750, "maximum" : 0.9375 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 44, - "hscan" : { "minimum" : 0.8125, "maximum" : 0.8750 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 45, - "hscan" : { "minimum" : 0.7500, "maximum" : 0.8125 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 46, - "hscan" : { "minimum" : 0.6875, "maximum" : 0.7500 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 47, - "hscan" : { "minimum" : 0.6250, "maximum" : 0.6875 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 48, - "hscan" : { "minimum" : 0.5625, "maximum" : 0.6250 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - }, - { - "index" : 49, - "hscan" : { "minimum" : 0.5000, "maximum" : 0.5625 }, - "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 } - } - ], - - /// The black border configuration, contains the following items: - /// * enable : true if the detector should be activated - /// * threshold : Value below which a pixel is regarded as black (value between 0.0 and 1.0) - "blackborderdetector" : - { - "enable" : true, - "threshold" : 0.01 - }, - - /// The configuration of the effect engine, contains the following items: - /// * paths : An array with absolute location(s) of directories with effects - /// * bootsequence : The effect selected as 'boot sequence' - "effects" : - { - "paths" : - [ - "/opt/hyperion/effects" - ] - }, - - "bootsequence" : - { - "effect" : "Rainbow swirl fast", - "duration_ms" : 3000 - }, - - /// The configuration for the frame-grabber, contains the following items: - /// * width : The width of the grabbed frames [pixels] - /// * height : The height of the grabbed frames [pixels] - /// * frequency_Hz : The frequency of the frame grab [Hz] -// "framegrabber" : -// { -// "width" : 64, -// "height" : 64, -// "frequency_Hz" : 10.0 -// }, - - /// The configuration of the XBMC connection used to enable and disable the frame-grabber. Contains the following fields: - /// * xbmcAddress : The IP address of the XBMC-host - /// * xbmcTcpPort : The TCP-port of the XBMC-server - /// * grabVideo : Flag indicating that the frame-grabber is on(true) during video playback - /// * grabPictures : Flag indicating that the frame-grabber is on(true) during picture show - /// * grabAudio : Flag indicating that the frame-grabber is on(true) during audio playback - /// * grabMenu : Flag indicating that the frame-grabber is on(true) in the XBMC menu - /// * grabScreensaver : Flag indicating that the frame-grabber is on(true) when XBMC is on screensaver - /// * enable3DDetection : Flag indicating that the frame-grabber should switch to a 3D compatible modus if a 3D video is playing -// "xbmcVideoChecker" : -// { -// "xbmcAddress" : "127.0.0.1", -// "xbmcTcpPort" : 9090, -// "grabVideo" : true, -// "grabPictures" : true, -// "grabAudio" : true, -// "grabMenu" : false, -// "grabScreensaver" : true, -// "enable3DDetection" : true -// }, - - /// The configuration of the Json server which enables the json remote interface - /// * port : Port at which the json server is started - "jsonServer" : - { - "port" : 19444 - }, - - /// The configuration of the Proto server which enables the protobuffer remote interface - /// * port : Port at which the protobuffer server is started - "protoServer" : - { - "port" : 19445 - }, - - /// The configuration of the boblight server which enables the boblight remote interface - /// * port : Port at which the boblight server is started -// "boblightServer" : -// { -// "port" : 19333 -// }, - - "endOfJson" : "endOfJson" -}