1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + LibreELEC [Kodi addon] Hyperion on LibreELEC, jsonserver error (not RPi, but a NUC)

Discussion in 'Software Support' started by soder82, 4 November 2016.

  1. soder82

    soder82 New Member

    Messages:
    8
    OK, I'm running LibreELEC (Krypton) v7.90.008 ALPHA and I've installed the Hyperion addon from the LibreELEC repo. I'm using the kickstarter version Lightpack, and I've been using Boblighd and the Boblight Kodi on OpenELEC before I upgraded to LibreELEC and wanted to try Hyperion instead.

    This was my setting for the daemon för BobLight:
    Code:
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures} span.Apple-tab-span {white-space:pre}
    
    #################################################################
    
    # boblight.conf
    
    #
    
    # Designed for LightPack with Speedy?s boblight daemon
    
    #
    
    # https://code.google.com/p/light-pack/
    
    # https://github.com/timsat/boblight-lightpack/wiki/Configuration
    
    #
    
    # Andrew Pawelski
    
    # 4th October 2013
    
    #
    
    #################################################################
    
    
    [global]
    
    #timeout20
    
    #interface127.0.0.1
    
    #port19333
    
    #interpolationon
    
    #proportional100.0
    
    #saturation1.5
    
    #value1.2
    
    #valuerange0.0 1.0
    
    #useyes
    
    #methodaverage
    
    #threshold10
    
    
    [device]
    
    nameLP1
    
    typelightpack
    
    #output/dev/ttyUSB0
    
    channels30
    
    #prefix
    
    interval20000
    
    #rate115200
    
    #bus3
    
    #address2
    
    debugtrue
    
    #delayafteropen0
    
    
    [color]
    
    namered
    
    rgbFF0000
    
    gamma1.8
    
    adjust0.7
    
    blacklevel0.0
    
    
    [color]
    
    namegrn
    
    rgb00FF00
    
    gamma1.8
    
    adjust1.0
    
    blacklevel0.0
    
    
    [color]
    
    nameblu
    
    rgb0000FF
    
    gamma1.9
    
    adjust0.7
    
    #adjust1.0
    
    blacklevel0.0
    
    
    # Lights seen from front
    
    # Bottom left
    
    
    [light]
    
    nameL01
    
    colorredLP1 28
    
    colorgrnLP1 29
    
    colorbluLP1 30
    
    #hscan0 25
    
    hscan0 33.33
    
    vscan95 100
    
    
    # Left bottom
    
    
    [light]
    
    nameL02
    
    colorredLP1 25
    
    colorgrnLP1 26
    
    colorbluLP1 27
    
    hscan0 5
    
    vscan50 100
    
    
    # Left top
    
    
    [light]
    
    nameL03
    
    colorredLP1 22
    
    colorgrnLP1 23
    
    colorbluLP1 24
    
    hscan0 5
    
    vscan0 50
    
    
    #Top from left to right
    
    
    [light]
    
    nameL04
    
    colorredLP1 19
    
    colorgrnLP1 20
    
    colorbluLP1 21
    
    hscan0 25
    
    vscan0 5
    
    
    [light]
    
    nameL05
    
    colorredLP1 16
    
    colorgrnLP1 17
    
    colorbluLP1 18
    
    hscan25 50
    
    vscan0 5
    
    
    [light]
    
    nameL06
    
    colorredLP1 13
    
    colorgrnLP1 14
    
    colorbluLP1 15
    
    hscan50 75
    
    vscan0 5
    
    
    [light]
    
    nameL07
    
    colorredLP1 10
    
    colorgrnLP1 11
    
    colorbluLP1 12
    
    hscan75 100
    
    vscan0 5
    
    
    #Right top
    
    
    [light]
    
    nameL08
    
    colorredLP1 7
    
    colorgrnLP1 8
    
    colorbluLP1 9
    
    hscan95 100
    
    vscan0 50
    
    
    #Right bottom
    
    
    [light]
    
    nameL09
    
    colorredLP1 4
    
    colorgrnLP1 5
    
    colorbluLP1 6
    
    hscan95 100
    
    vscan50 100
    
    
    #Bottom right
    
    
    [light]
    
    nameL10
    
    colorredLP1 1
    
    colorgrnLP1 2
    
    colorbluLP1 3
    
    #hscan75 100
    
    hscan66.66 100
    
    vscan95 100

    And this is my configfile for Hyperion now, created with HyperCon and manuell edited...

    Code:
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures} span.Apple-tab-span {white-space:pre}
    
    // Automatically generated configuration file for Hyperion ambilight daemon
    
    // Notice: All values are explained with comments at our wiki: wiki.hyperion-project.org (config area)
    
    // Generated by: HyperCon (The Hyperion deamon configuration file builder)
    
    // Created with HyperCon V1.03.1 (11.06.2016)
    
    
    {
    
    // DEVICE CONFIGURATION
    
    "device" :
    
    {
    
    "name"       : "soder1",
    
    "type"       : "lightpack",
    
    "output"     : "",
    
    "colorOrder" : "rgb"
    
    },
    
    
    // COLOR CALIBRATION CONFIG
    
    "color" :
    
    {
    
    "channelAdjustment" :
    
    [
    
    {
    
    "id"   : "default",
    
    "leds" : "*",
    
    "pureRed" :
    
    {
    
    "redChannel": 255,
    
    "greenChannel": 0,
    
    "blueChannel": 0
    
    },
    
    "pureGreen" :
    
    {
    
    "redChannel": 0,
    
    "greenChannel": 255,
    
    "blueChannel": 0
    
    },
    
    "pureBlue" :
    
    {
    
    "redChannel": 0,
    
    "greenChannel": 0,
    
    "blueChannel": 255
    
    }
    
    }
    
    ],
    
    "temperature" :
    
    [
    
    {
    
    "id"   : "default",
    
    "leds" : "*",
    
    "correctionValues" :
    
    {
    
    "red" : 255,
    
    "green": 255,
    
    "blue" : 255
    
    }
    
    }
    
    ],
    
    "transform" :
    
    [
    
    {
    
    "id"   : "default",
    
    "leds" : "*",
    
    "hsl" :
    
    {
    
    "saturationGain": 1.0000,
    
    "luminanceGain": 1.0000,
    
    "luminanceMinimum": 0.0000
    
    },
    
    "red" :
    
    {
    
    "threshold": 0.0900,
    
    "gamma": 1.8000,
    
                    "blacklevel": 0.0000,
    
                    "whitelevel": 1.0000
    
    },
    
    "green" :
    
    {
    
    "threshold" : 0.0900,
    
    "gamma"     : 1.8000,
    
                                            "blacklevel"    : 0.0000,
    
                                            "whitelevel"    : 1.0000
    
    },
    
    "blue" :
    
    {
    
    "threshold" : 0.0900,
    
    "gamma"     : 1.9000,
    
                                            "blacklevel"    : 0.0000,
    
                                            "whitelevel"    : 1.0000
    
    }
    
    }
    
    ],
    
    // SMOOTHING CONFIG
    
    "smoothing" :
    
    {
    
    "type"            : "linear",
    
    "time_ms"         : 200,
    
    "updateFrequency" : 20.0000,
    
    "updateDelay"     : 0
    
    }
    
    },
    
    
    // NO V4L2 GRABBER CONFIG
    
    // FRAME GRABBER CONFIG
    
    "framegrabber" :
    
    {
    
    "width" : 64,
    
    "height" : 64,
    
    "frequency_Hz" : 10.0,
    
    "priority" : 890
    
    },
    
    
    // BLACKBORDER CONFIG
    
    "blackborderdetector" :
    
    {
    
    "enable" : true,
    
    "threshold" : 0.015,
    
    "unknownFrameCnt" : 600,
    
    "borderFrameCnt" : 50,
    
    "maxInconsistentCnt" : 10,
    
    "blurRemoveCnt" : 1,
    
    "mode" : "default"
    
    },
    
    
    // KODI CHECK CONFIG
    
    "xbmcVideoChecker" :
    
    {
    
    "xbmcAddress" : "127.0.0.1",
    
    "xbmcTcpPort" : 9090,
    
    "grabVideo" : true,
    
    "grabPictures" : true,
    
    "grabAudio" : true,
    
    "grabMenu" : true,
    
    "grabPause" : true,
    
    "grabScreensaver" : false,
    
    "enable3DDetection" : true
    
    },
    
    
    // BOOTEFFECT CONFIG
    
    "bootsequence" :
    
    {
    
    "color" : [0,0,0],
    
    "effect" : "Rainbow swirl fast",
    
    "duration_ms" : 3000,
    
    "priority" : 700
    
    },
    
    
    // JSON SERVER CONFIG
    
    "jsonServer" :
    
    {
    
    "port" : 19444
    
    },
    
    
    // PROTO SERVER CONFIG
    
    "protoServer" :
    
    {
    
    "port" : 19445
    
    },
    
    
    // BOBLIGHT SERVER CONFIG
    
    "boblightServer" :
    
    {
    
    "port" : 19333,
    
    "priority" : 900
    
    },
    
    
    // EFFECT PATH
    
    "effects" :
    
    {
    
    "paths" :
    
    [
    
    
    "/storage/.kodi/addons/service.hyperion/effects",
    
    "/usr/share/hyperion/effects"
    
    ]
    
    },
    
    
    // NO JSON/PROTO FORWARD CONFIG
    
    
    // LED CONFIGURATION
    
    "leds" :
    
    [
    
    {
    
    "index" : 0,
    
    "hscan" : { "minimum" : 0.0000, "maximum" : 0.2500 },
    
    "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
    
    },
    
    {
    
    "index" : 1,
    
    "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
    
    "vscan" : { "minimum" : 0.5000, "maximum" : 1.0000 }
    
    },
    
    {
    
    "index" : 2,
    
    "hscan" : { "minimum" : 0.0000, "maximum" : 0.0500 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.5000 }
    
    },
    
    {
    
    "index" : 3,
    
    "hscan" : { "minimum" : 0.0000, "maximum" : 0.2500 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    
    },
    
    {
    
    "index" : 4,
    
    "hscan" : { "minimum" : 0.2500, "maximum" : 0.5000 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    
    },
    
    {
    
    "index" : 5,
    
    "hscan" : { "minimum" : 0.5000, "maximum" : 0.7500 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    
    },
    
    {
    
    "index" : 6,
    
    "hscan" : { "minimum" : 0.7500, "maximum" : 1.0000 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.0800 }
    
    },
    
    {
    
    "index" : 7,
    
    "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
    
    "vscan" : { "minimum" : 0.0000, "maximum" : 0.5000 }
    
    },
    
    {
    
    "index" : 8,
    
    "hscan" : { "minimum" : 0.9500, "maximum" : 1.0000 },
    
    "vscan" : { "minimum" : 0.5000, "maximum" : 1.0000 }
    
    },
    
    {
    
    "index" : 9,
    
    "hscan" : { "minimum" : 0.7500, "maximum" : 1.0000 },
    
    "vscan" : { "minimum" : 0.9200, "maximum" : 1.0000 }
    
    }
    
    ],
    
    
    "endOfJson" : "endOfJson"
    
    }
    
    As I understand it, I shouldn't need to use a grabber as an extra addon, like the Hyperion addon for Kodi that is available. The problem is that I can't get it to work without that extra addon, but then I don't get all the settings working, like having light in the menus and for pictures..

    I tried to start Hyperion manually, not only on autostart with LibreELEC, and I then saw this.

    Code:
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #5230e1; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures; color: #34bc26} span.s2 {font-variant-ligatures: no-common-ligatures} span.s3 {font-variant-ligatures: no-common-ligatures; color: #000000} span.Apple-tab-span {white-space:pre}
    
    LibreELEC-NUC:~/.kodi/addons/service.hyperion/bin # ./hyperiond.start
    
    Hyperion Ambilight Deamon (9065)
    
    Version   : 355a324
    
    Build Time: Oct 27 2016 04:34:33
    
    INFO: Selected configuration file: /storage/.kodi/userdata/addon_data/service.hyperion/hyperion.config.json
    
    HYPERION INFO: ColorTransform 'default' => [0; 9]
    
    HYPERION INFO: ColorCorrection 'default' => [0; 9]
    
    HYPERION INFO: ColorAdjustment 'default' => [0; 9]
    
    LEDDEVICE INFO: configuration:
    
    {
    
    "colorOrder" : "rgb",
    
    "name" : "soder1",
    
    "output" : "",
    
    "type" : "lightpack"
    
    }
    
    
    USB context initialized
    
    Found a lightpack device. Retrieving more information...
    
    Lightpack device found: bus=1 address=2 serial=8523033323035131B132
    
    unable to claim interface(-6): LIBUSB_ERROR_BUSY
    
    Unable to open Lightpack device. Searching for other device(-6): LIBUSB_ERROR_BUSY
    
    No Lightpack device has been found
    
    INFO: Creating linear smoothing
    
    HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    
    EFFECTENGINE INFO: 27 effects loaded from directory /storage/.kodi/addons/service.hyperion/effects
    
    EFFECTENGINE INFO: Initializing Python interpreter
    
    INFO: Hyperion started and initialised
    
    INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
    
    BLACKBORDER INFO: threshold set to 0.015 (4)
    
    BLACKBORDER INFO: mode:default
    
    started
    
    INFO: Kodi checker created and started
    
    terminate called after throwing an instance of 'std::runtime_error'
    
      what():  JSONSERVER ERROR: could not bind to port
    
    Aborted (core dumped)
    
    First, it says it doesn't find any Lightpack, but I can confim that I get the rainbow effect on boot up. Second, the problem with JSON. I think that is what causing the Hyperion service not to be ablo to work without the extra grabber with the Kodi-addon.

    Does someone know of this problem, and might now what to do?

    EDIT: If I kill the Hyperion started from the service addon in LibreELEC, and then manually start the script I get some other info.

    Code:
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #5230e1; background-color: #ffffff} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures; color: #34bc26} span.s2 {font-variant-ligatures: no-common-ligatures} span.s3 {font-variant-ligatures: no-common-ligatures; color: #000000} span.Apple-tab-span {white-space:pre}
    
    LibreELEC-NUC:~/.kodi/addons/service.hyperion/bin # ./hyperiond.start 
    
    Hyperion Ambilight Deamon (9184)
    
    Version   : 355a324
    
    Build Time: Oct 27 2016 04:34:33
    
    INFO: Selected configuration file: /storage/.kodi/userdata/addon_data/service.hyperion/hyperion.config.json
    
    HYPERION INFO: ColorTransform 'default' => [0; 9]
    
    HYPERION INFO: ColorCorrection 'default' => [0; 9]
    
    HYPERION INFO: ColorAdjustment 'default' => [0; 9]
    
    LEDDEVICE INFO: configuration: 
    
    {
    
    "colorOrder" : "rgb",
    
    "name" : "soder1",
    
    "output" : "",
    
    "type" : "lightpack"
    
    }
    
    
    USB context initialized
    
    Found a lightpack device. Retrieving more information...
    
    Lightpack device found: bus=1 address=2 serial=8523033323035131B132
    
    Lightpack device successfully opened
    
    Lightpack device opened: bus=1 address=2 serial=8523033323035131B132 version=6.6
    
    INFO: Creating linear smoothing
    
    HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    
    EFFECTENGINE INFO: 27 effects loaded from directory /storage/.kodi/addons/service.hyperion/effects
    
    EFFECTENGINE INFO: Initializing Python interpreter
    
    INFO: Hyperion started and initialised
    
    INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow swirl fast on channel 0
    
    BLACKBORDER INFO: threshold set to 0.015 (4)
    
    BLACKBORDER INFO: mode:default
    
    started
    
    INFO: Kodi checker created and started
    
    INFO: Json server created and started on port 19444
    
    INFO: Proto server created and started on port 19445
    
    INFO: Boblight server created and started on port 19333
    
    QtHttpServer started on port 1 "Qt Static HTTP File Server"
    
    FRAMEBUFFERGRABBER INFO: opened with resolution: [email protected]
    
    BLACKBORDER INFO: threshold set to 0.015 (4)
    
    BLACKBORDER INFO: mode:default
    
    INFO: Framebuffer grabber created and started
    
    KODICHECK INFO: Kodi Connected
    
    KODICHECK INFO: switching to MENU mode
    
    EFFECTENGINE INFO: effect finished
    
    /Söder
     
    Last edited: 4 November 2016
  2. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,273
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    terminate called after throwing an instance of 'std::runtime_error'

    what(): JSONSERVER ERROR: could not bind to port

    Aborted (core dumped)

    this means, there is hyperion allready started wich uses the port
     
  3. soder82

    soder82 New Member

    Messages:
    8
    OK, then it already was running. OK.
    Anyway, if it was running, how come it didn't get what it should from Kodi? I guess that's how it work? It got an internal grabber and gets what's running from Kodi (movie, picture, meny, pause...).

    Since I see the rainbow on start I'm pretty sure it starts on my boot, but it will not start on playing a movie unless I use the Hyperion Kodi addon or the Boblight Kodi addon for grabbing...

    Can I provide some kind of log?

    /Söder
     
  4. soder82

    soder82 New Member

    Messages:
    8
    Bump? Someone?

    /Söder
     
  5. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Greetings,
    sorry for the late reply. Could you verify there is an additional entry for hyperion-x11 to start with hyperion in your autostart.sh?
    (If you wanna use the libreleec hyperion you need to add hyperion-x11 as additional service).

    Note: This is already fixed for the next version.
     
  6. soder82

    soder82 New Member

    Messages:
    8
    Hmm, can you specify what you mean with "my autostart.sh"? I haven't added anything myself.

    But, yesterday I found out that my Hyperion was working, even with the Kodi Hypersion grabber enabled. Was there an update or something?

    /Söder
     
  7. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Your issue (or of hyperion). You need to start "hyperion-x11" additional. (As it is not included in "hyperiond").
    In future this will be no longer necessary.
     
  8. soder82

    soder82 New Member

    Messages:
    8
    But, I've restarted LibreELEC many times now, and Hyperion works for me now, even without me startinge something additional?

    /Söder
     
  9. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    With boblight or the Kodi Addon?
     
  10. soder82

    soder82 New Member

    Messages:
    8
    Nothing with BobLight. With the Hyperion service addon available in the LibreELEC repo. (Not this grabber https://github.com/hyperion-project/hyperion.kodi).

    I just read this: We extended our install script with LibreELEC compatibility.

    Please take notice: We don´t use the LibreELEC Hyperion addon, please disable/remove it.

    Should I install with the script instead?

    /Söder
     
  11. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    If everything works, don't change anything :)