diff --git a/CrossCompileHowto.txt b/CrossCompileHowto.txt index 97e9db7c..884a88b7 100644 --- a/CrossCompileHowto.txt +++ b/CrossCompileHowto.txt @@ -16,7 +16,7 @@ export NATIVE_BUILD_DIR="$HYPERION_DIR/build" export TARGET_BUILD_DIR=HYPERION_DIR="$HYPERION_DIR/build-rpi" # install required packages -sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev +sudo apt-get install git rsync cmake build-essential libQt4-dev libusb-1.0-0-dev python-dev libxrender-dev sudo apt-get install git rsync cmake ia32-libs protobuf-compiler # On newer version of Ubuntu (and maybe other distros) the ia32-libs is not available, the following diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE new file mode 100644 index 00000000..7b2f9f22 --- /dev/null +++ b/ISSUE_TEMPLATE @@ -0,0 +1,8 @@ +**Please provide some information that we could help as fast as possible. +Please check the wiki in case your problem is already known/feature requested.** + +**1.** Used hardware and sofware (Wetek,RPi1,Rpi2,... Ubuntu 14.04(64bit),OSX,OpenELEC,OSMC,XBian,...) +**2.** Your LED device and additional hardware (if used) (WS2801,APA102,WS2812B,... connected through (direct,arduino uno,...)) +**3.** Please upload your Hyperion log to pastebin.com and insert the link. Have a look at the wiki how you get one. +**4.** Please upload your "Hyperion Configuration File" to www.jsoneditoronline.org and insert the link. + diff --git a/PULL_REQUEST_TEMPLATE b/PULL_REQUEST_TEMPLATE new file mode 100644 index 00000000..8cc2fde3 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE @@ -0,0 +1,4 @@ +**1.** Tell us something about your changes. +**2.** If this changes affect the .conf file. Please provide the changed section +**3.** Reference a issue (optional) + diff --git a/deploy/hyperion-remote.sh b/bin/hyperion-remote.sh similarity index 100% rename from deploy/hyperion-remote.sh rename to bin/hyperion-remote.sh diff --git a/bin/hyperion.initctl.sh b/bin/hyperion.initctl.sh index e533b14a..773c6e61 100644 --- a/bin/hyperion.initctl.sh +++ b/bin/hyperion.initctl.sh @@ -8,10 +8,4 @@ stop on (runlevel [!2345]) respawn -pre-start script -#comment out the following 2 lines for x32/64 -modprobe spidev -/usr/bin/gpio2spi -end script - exec /usr/bin/hyperiond /etc/hyperion.config.json \ No newline at end of file diff --git a/deploy/hyperiond.sh b/bin/hyperiond.sh similarity index 100% rename from deploy/hyperiond.sh rename to bin/hyperiond.sh diff --git a/config/hyperion.config.json b/config/hyperion.config.json index 5bc313c3..4d03a70d 100644 --- a/config/hyperion.config.json +++ b/config/hyperion.config.json @@ -1,13 +1,19 @@ // Automatically generated configuration file for 'Hyperion daemon' -// Generated by: HyperCon (The Hyperion deamon configuration file builder +// Generated by: HyperCon (The Hyperion deamon configuration file builder) +// Created with HyperCon V1.00.0 (11.03.2016) { /// 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 - /// APA102, Adalight, AmbiLed, Atmo, Hyperion-USBASP-WS2801, Hyperion-USBASP-WS2812, Lightberry, Lightpack, LPD6803, LPD8806, Multi-Lightpack, P9813, Paintpack, PhilipsHUE, PiBlaster, SEDU, Test, ThinkerForge, TPM2, WS2801, WS2812b, None) + /// APA102, Adalight, AdalightAPA102, AmbiLed, Atmo, Hyperion-USBASP-WS2801, Hyperion-USBASP-WS2812, Lightberry, Lightpack, LPD6803, LPD8806, Multi-Lightpack, P9813, Paintpack, PhilipsHUE, PiBlaster, SEDU, Test, ThinkerForge, TPM2, WS2801, WS2812b, None) /// * [device type specific configuration] /// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.). + /// + /// * 'Specific of Philips Hue: + /// * 'username' : The name of user registred on the Philips Hue Bridge + /// * 'switchOffOnBlack': Define if Hue light switch off when black is detected + /// * 'transitiontime' : Set the time of transition between color of Hue light "device" : { "name" : "MyPi", @@ -108,7 +114,7 @@ /// * color : Set static color after boot -> set effect to "" (empty) and input the values [R,G,B] and set duration_ms NOT to 0 (use 1) instead /// * effect : The effect selected as 'boot sequence' /// * duration_ms : The duration of the selected effect (0=endless) - /// * priority : The priority of the selected effect/static color (default=0) + /// * priority : The priority of the selected effect/static color (default=990) HINT: lower value result in HIGHER priority! "effects" : { "paths" : @@ -141,11 +147,14 @@ /// * 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] + /// * priority : The priority of the frame-gabber (Default=900) HINT: lower value result in HIGHER priority! + /// * ATTENTION : Power-of-Two resolution is not supported and leads to unexpected behaviour! "framegrabber" : { "width" : 80, "height" : 45, - "frequency_Hz" : 10.0 + "frequency_Hz" : 10.0, + "priority" : 900 }, /// The configuration of the Kodi connection used to enable and disable the frame-grabber. Contains the following fields: @@ -184,10 +193,12 @@ }, /// The configuration of the boblight server which enables the boblight remote interface - /// * port : Port at which the boblight server is started + /// * 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 +// "port" : 19333, +// "priority" : 900 // }, /// Configuration for the embedded V4L2 grabber diff --git a/deploy/HyperCon.jar.REMOVED.git-id b/deploy/HyperCon.jar.REMOVED.git-id deleted file mode 100644 index 40da520b..00000000 --- a/deploy/HyperCon.jar.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0074a4390b1d8d0c87488a3e7a13ec372786d140 \ No newline at end of file diff --git a/deploy/hyperion.conf b/deploy/hyperion.conf deleted file mode 100644 index c25f91f2..00000000 --- a/deploy/hyperion.conf +++ /dev/null @@ -1,17 +0,0 @@ -## Hyperion daemon - -description "hyperion" -author "poljvd & tvdzwan" - -start on (runlevel [2345]) -stop on (runlevel [!2345]) - -respawn - -pre-start script -modprobe spidev -/usr/bin/gpio2spi -end script - -exec /usr/bin/hyperiond /etc/hyperion.config.json - diff --git a/deploy/hyperion.xbian.conf b/deploy/hyperion.xbian.conf deleted file mode 100644 index fa14a327..00000000 --- a/deploy/hyperion.xbian.conf +++ /dev/null @@ -1,16 +0,0 @@ -## Hyperion daemon - -description "hyperion" -author "poljvd & tvdzwan" - -start on (runlevel [2345]) -stop on (runlevel [!2345]) - -respawn - -pre-start script -modprobe spi-bcm2708 -end script - -exec /usr/bin/hyperiond /etc/hyperion.config.json - diff --git a/deploy/update_hyperion.sh b/deploy/update_hyperion.sh deleted file mode 100644 index ff7494f6..00000000 --- a/deploy/update_hyperion.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh - -# Script for downloading and installing the latest Hyperion release - -# Make sure /sbin is on the path (for service to find sub scripts) -PATH="/sbin:$PATH" - -# Find out if we are on OpenElec -OS_OPENELEC=`cat /etc/issue | grep -m 1 OpenELEC | wc -l` - -# Find out if its an imx6 device -CPU_RPI=`cat /proc/cpuinfo | grep RPI | wc -l` -CPU_IMX6=`cat /proc/cpuinfo | grep i.MX6 | wc -l` -CPU_WETEK=`cat /proc/cpuinfo | grep Amlogic | wc -l` -CPU_X64=`uname -m | grep x86_64 | wc -l` -CPU_X32=`uname -m | grep x86_32 | wc -l` -# Check that we have a known configuration -if [[ $CPU_RPI -ne 1 && $CPU_IMX6 -ne 1 && $CPU_WETEK -ne 1 && $CPU_X64 -ne 1 && $CPU_X32 -ne 1 ]]; then - echo 'CPU information does not match any known releases' - exit -fi - -# check which init script we should use -USE_INITCTL=`which /sbin/initctl | wc -l` -USE_SERVICE=`which /usr/sbin/service | wc -l` - -# Make sure that the boblight daemon is no longer running -BOBLIGHT_PROCNR=$(pidof boblightd | wc -l) -if [ $BOBLIGHT_PROCNR -eq 1 ]; then - echo 'Found running instance of boblight. Please stop boblight via XBMC menu before installing hyperion' - exit -fi - -# Stop hyperion daemon if it is running -# Start the hyperion daemon -if [ $USE_INITCTL -eq 1 ]; then - /sbin/initctl stop hyperion -elif [ $USE_SERVICE -eq 1 ]; then - /usr/sbin/service hyperion stop -fi - -# Select the appropriate release -HYPERION_ADDRESS=https://raw.githubusercontent.com/tvdzwan/hyperion/master/deploy -if [ $CPU_RPI -eq 1 ]; then - HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_rpi.tar.gz - OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz -elif [ $CPU_IMX6 -eq 1 ]; then - HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_imx6.tar.gz - OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-imx6.tar.gz -elif [ $CPU_WETEK -eq 1 ]; then - HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_wetek.tar.gz - OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-rpi.tar.gz -elif [ $CPU_X64 -eq 1 ]; then - HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_x64.tar.gz - OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-x64.tar.gz -elif [ $CPU_X32 -eq 1 ]; then - HYPERION_RELEASE=$HYPERION_ADDRESS/hyperion_x32.tar.gz - OE_DEPENDECIES=$HYPERION_ADDRESS/hyperion.deps.openelec-x32.tar.gz -else - echo "Target platform unknown" - exit -fi - -# Get and extract the Hyperion binaries and effects -echo 'Downloading hyperion' -if [ $OS_OPENELEC -eq 1 ]; then - # OpenELEC has a readonly file system. Use alternative location - curl -L --get $HYPERION_RELEASE | tar -C /storage -xz - curl -L --get $OE_DEPENDECIES | tar -C /storage/hyperion/bin -xz - - # modify the default config to have a correct effect path - sed -i 's:/opt:/storage:g' /storage/hyperion/config/hyperion.config.json - - # /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 $HYPERION_RELEASE -O - | tar -C /opt -xz - - # 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 - -# Copy a link to the hyperion configuration file to /etc - ln -s /opt/hyperion/config/hyperion.config.json /etc/hyperion.config.json -fi - -# Copy the service control configuration to /etc/int -if [ $USE_INITCTL -eq 1 ]; then - echo 'Installing initctl script' - wget -N https://raw.githubusercontent.com/tvdzwan/hyperion/master/deploy/hyperion.conf -P /etc/init/ - initctl reload-configuration -elif [ $USE_SERVICE -eq 1 ]; then - echo 'Installing startup script in init.d' - # place startup script in init.d and add it to upstart - ln -fs /opt/hyperion/init.d/hyperion.init.sh /etc/init.d/hyperion - chmod +x /etc/init.d/hyperion - update-rc.d hyperion defaults 98 02 -elif [ $OS_OPENELEC -eq 1 ]; then - # only add to start script if hyperion is not present yet - if [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperiond | wc -l` -eq 0 ]; then - echo 'Adding Hyperion to autostart script' - echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /dev/null 2>&1 &" >> /storage/.config/autostart.sh - chmod +x /storage/.config/autostart.sh - fi -fi - -# Start the hyperion daemon -if [ $USE_INITCTL -eq 1 ]; then - /sbin/initctl start hyperion -elif [ $USE_SERVICE -eq 1 ]; then - /usr/sbin/service hyperion start -fi - diff --git a/libsrc/leddevice/LedDeviceFactory.cpp b/libsrc/leddevice/LedDeviceFactory.cpp index fed6d82d..d7136521 100755 --- a/libsrc/leddevice/LedDeviceFactory.cpp +++ b/libsrc/leddevice/LedDeviceFactory.cpp @@ -175,7 +175,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig) device = deviceLightpack; } - else if (type == "multi-lightpack") + else if (type == "multi-lightpack" || type == "multi_lightpack") { LedDeviceMultiLightpack* deviceLightpack = new LedDeviceMultiLightpack(); deviceLightpack->open(); @@ -288,7 +288,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig) #endif else { - std::cout << "Unable to create device " << type << std::endl; + std::cout << "Error: Unknown/Unimplemented device " << type << std::endl; // Unknown / Unimplemented device } return device;