Just to be curious, do you know what that line we deleted in python code was for? (The one which contained port 80?)
Thanks
Just to be curious, do you know what that line we deleted in python code was for? (The one which contained port 80?)
Thanks
I finally got it! I recall I installed the Hyperion Service manually in LibreElec when I first set up the ISO (see screenshot attached). I disabled there and now it works!!
The python code is right as you suggested, I un-commented the python call in autostart.sh and now hyperion starts automatically after I reboot!!
You are the man, I owe you some beers. Thank you so much!!
Thanks I deleted that line in the script, rebooted and leds remain off.
I run the script
This is what I get
LibreELEC:~ # python /storage/hyperion/scripts/ledon.py
hyperion-remote:
version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
build time: Apr 5 2018 01:57:05
Connected to localhost:19444
Start effect Rainbow Swirl
LibreELEC:~ #
Seems no error, but nothing happened, leds remained off :_(
Thanks
Connection refused.. u.u
LibreELEC:~/hyperion/scripts # python /storage/hyperion/scripts/ledon.py
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to 127.0.0.1 port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
hyperion-remote:
version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
build time: Apr 5 2018 01:57:05
Connected to localhost:19444
Start effect Rainbow Swirl
LibreELEC:~/hyperion/scripts #
OK, I set back port to 80, edit autostart.sh by adding # and reboot
After reboot I tried /storage/.kodi/addons/service.hyperion/bin/hyperiond.start
Think I got the same.. :_(
LibreELEC:~ # /storage/.kodi/addons/service.hyperion/bin/hyperiond.start
LibreELEC:~ # Hyperion Ambilight Deamon (639)
Version : 1c21232
Build Time: Oct 12 2017 09:47:51
INFO: Selected configuration file: /storage/.kodi/userdata/addon_data/service.hy perion/hyperion.config.json
HYPERION INFO: ColorTransform 'default' => [0; 45]
HYPERION INFO: ColorCorrection 'default' => [0; 45]
HYPERION INFO: ColorAdjustment 'default' => [0; 45]
LEDDEVICE INFO: configuration:
{
"colorOrder" : "rgb",
"name" : "MyHyperionConfig",
"output" : "/dev/null",
"rate" : 1000000,
"type" : "file"
}
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/servic e.hyperion/effects
EFFECTENGINE INFO: Initializing Python interpreter
INFO: Hyperion started and initialised
INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow s wirl fast on channel 0
BLACKBORDER INFO: threshold set to 0 (0)
BLACKBORDER INFO: mode:default
started
terminate called after throwing an instance of 'std::runtime_error'
what(): JSONSERVER ERROR: could not bind to port
LibreELEC:~ #
Running the ledon.py gets also the same
LibreELEC:~ # cd /storage/hyperion/scripts
LibreELEC:~/hyperion/scripts # python ledon.py
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to 127.0.0.1 port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
hyperion-remote:
version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
build time: Apr 5 2018 01:57:05
Connected to localhost:19444
Start effect Rainbow Swirl
LibreELEC:~/hyperion/scripts #
LibreELEC:~ # /storage/.kodi/addons/service.hyperion/bin/hyperiond.start
LibreELEC:~ # Hyperion Ambilight Deamon (666)
Version : 1c21232
Build Time: Oct 12 2017 09:47:51
INFO: Selected configuration file: /storage/.kodi/userdata/addon_data/service.hy perion/hyperion.config.json
HYPERION INFO: ColorTransform 'default' => [0; 45]
HYPERION INFO: ColorCorrection 'default' => [0; 45]
HYPERION INFO: ColorAdjustment 'default' => [0; 45]
LEDDEVICE INFO: configuration:
{
"colorOrder" : "rgb",
"name" : "MyHyperionConfig",
"output" : "/dev/null",
"rate" : 1000000,
"type" : "file"
}
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/servic e.hyperion/effects
EFFECTENGINE INFO: Initializing Python interpreter
INFO: Hyperion started and initialised
INFO: Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFO: run effect Rainbow s wirl fast on channel 0
BLACKBORDER INFO: threshold set to 0 (0)
BLACKBORDER INFO: mode:default
started
terminate called after throwing an instance of 'std::runtime_error'
what(): JSONSERVER ERROR: could not bind to port
LibreELEC:~ #
Hmm I get this, do I miss some params?
LibreELEC:~ # /storage/hyperion/bin/hyperiond.sh
Hyperion Ambilight Deamon (643)
Version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
Build Time: Apr 5 2018 01:57:25
ERROR: Missing required configuration file. Usage:
hyperiond <options ...> [config.file ...]
LibreELEC:~ #
Hm I get this
LibreELEC:~ # find / -name "hyperion*" -print
/storage/hyperion
/storage/hyperion/config/hyperion.config.json.example
/storage/hyperion/bin/hyperiond
/storage/hyperion/bin/hyperion-v4l2
/storage/hyperion/bin/hyperion-dispmanx
/storage/hyperion/bin/hyperion-remote.sh
/storage/hyperion/bin/hyperion-v4l2.sh
/storage/hyperion/bin/hyperiond.sh
/storage/hyperion/bin/hyperion-remote
/storage/logfiles/hyperion.log
/storage/.kodi/addons/plugin.program.hyperion.configurator/hyperion.config.json.temp
/storage/.kodi/addons/service.hyperion/config/hyperion.config.json.sample
/storage/.kodi/addons/service.hyperion/bin/hyperiond
/storage/.kodi/addons/service.hyperion/bin/hyperion-v4l2
/storage/.kodi/addons/service.hyperion/bin/hyperion-dispmanx
/storage/.kodi/addons/service.hyperion/bin/hyperiond.start
/storage/.kodi/addons/service.hyperion/bin/hyperion-remote
/storage/.kodi/userdata/addon_data/service.hyperion/hyperion.config.json
/storage/.config/hyperion.config.json
LibreELEC:~ #
I edited the syntax error, I corrected it. Now seems I get connection refused. See edited last post
Thankss
Thanks I’ll try but how do I copy that scripts in that folder? Or how I create ledon.py file to copy the script? Noob question
And seems ledon.py script only makes the rainbow swirl, after that it will run hyperion normally?
EDIT: Hmm seems does not work..
Good, I created the file
cd /storage/hyperion/scripts
nano ledon.py
Copied the code, and saved,
In autostart.sh I copied your code and reboot the Pi.. Leds are not on.. :_((
Do I need to install some Python interface or something to get Rpi enable to run it?
Hm I tried to run the script from putty, this is what I get.. seems no connection..?..
LibreELEC:~ # cd /storage/hyperion/scripts
LibreELEC:~/hyperion/scripts # python ledon.py
* Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to 127.0.0.1 port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused
hyperion-remote:
version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
build time: Apr 5 2018 01:57:05
Connected to localhost:19444
Start effect Rainbow Swirl
Tried editing script and changing port 22 instead of 80..
LibreELEC:~/hyperion/scripts # python ledon.py
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 22 (#0)
* Server auth using Basic with user 'kodi'
> POST /jsonrpc HTTP/1.1
> Host: 127.0.0.1:22
> Authorization: Basic a29kaTprb2Rp
> User-Agent: curl/7.58.0
> Accept: application/json
> Content-type: application/json
> Content-Length: 148
>
* upload completely sent off: 148 out of 148 bytes
SSH-2.0-OpenSSH_7.3
Protocol mismatch.
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
hyperion-remote:
version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
build time: Apr 5 2018 01:57:05
Connected to localhost:19444
Start effect Rainbow Swirl
LibreELEC:~/hyperion/scripts #
Thanks!
I found this, but I'm still not quite sure is what I need
Start and Stop Hyperion using Python - Jamie Jones
How do I set this script on? Could this script be executed when Rpi boots up?
Also tried to add something like this in autostart.sh file but has no effect, just to try
/storage/.config/system.d/service.hyperion.service start
Thanks!
OK, I will have a look at the LibreELEC add-on repository. If I find it, I can install it to see what shell commands it provides. Maybe adding the right command to autostart.sh is all you need.
That would be great, thank you so much!
Yes I’m using the addon. I burnt lightberry libreelec iso which brings hyperion creator addon pre-installed.
Also tried hypercon on windows but had some issues, I read it is not very well debugged. Addon is much more simple and i get pretty good results.
I need to start “hyperion creator” in libreelec and set up it again, luckily is quite fast. Don’t know any other way to “restart”. As you can see it is not practical.
Thanks, any help is much appreciated
Thanks, I looked around but I don’t see any specific tip. Many concepts and I’m too noob. Python script? GPIO? Do GPIO pins have anything to do when it comes to set hyperion autostart? I thought it might be related to send some command via putty or just edit autostart.sh file. Sorry I’m quite lost here.
Thanks for your responds
Thank you so much but I think is quite laborious at this moment. Even so good point. I see I can turn leds off in Hyperion mobile app sending color black. So that, I would keep Rpi always on. But anyway I’d like to script hyperion automatically starts after power off in case there is an outage or something. Can you help me with that? Do I need to edit autostart.sh? Or sending via putty? Which command/script?
Thank you so much!
Thank you for answering.
I'm powering both leds and Rpi with a single 5V 4A Power Adapter. I plug 5V Power adapter to 5V GPIO pin. See diagram below.
These options would solve the problem but I'm so newbie for the scripts, how can I script in LibreElec? Is it possible in win10 or do I need linux?
If I can only set Hyperion autostarts when LibreElec starts would be great. Do I need to edit autostart.sh file?
Thanks!
Hi everyone,
I could finally set lighberry up with libreelec/hyperion and Rpi3 but I have some concerns.
- My hdmi source is always on (satellite tv) so even when I switch tv off the leds remain up. I could handle cutting off the power with smart plug or whatever, but I found out that if I cut power (I am powering Rpi through Leds via Gpio), hyperion does not start automatically when I power on again. Leds remain off.
- Is there any way hyperion can start automatically after power off?
- And, is there any easy way to shut leds down? I saw some threads where they write some scripts to turn leds on/off via remote tv or keyboard but I’m too noob. Some help would be much appreciated.
Than you so much!