Ambilight - Hyperion

Hi,

I’m using a x96 (S905X) 2G/16G box with CE 9.0.1 and I’ve been following the ‘hyperion.ng slow down’ topic on the forum for some weeks now. I’m pretty convinced that everything is working smooth now thanks to the relentless effort of the developers and testers. A big thumbs up to all of you.

As I would like to build my own ambilight installation, I’m wondering if someone can point me in the right direction. Is there an online guide to follow? I seem to find only projects where the RPI is used as mediaplayer. Can I use my X96 and which additional components do I need (Arduino, …)?

Thanks

I do use an Arduino UNO. I used this hardware guide: https://learn.adafruit.com/adalight-diy-ambient-tv-lighting/pieces
But for sure there are some more modern description somewhere. Just google “adalight ambient”

anyone knows if this hardware, i think its a androino uno runs with CE out of the box?
https://www.ebay.de/itm/Kit-LED-TV-Ambilight-Effekt-Zum-Nachrusten-RGB-WS2812B-Desktop-PC-Monitor-5V/113685515487?hash=item1a782f4cdf:m:mvdTuyx-DHRQlhpOzE30SiQ

Should work. I used the same software on windows. Also the description says “adalight”. So Hyperion is supporting it. I think I will get one if a new TV will arrive in my house :sunglasses:

I use Arduino Nano + APA102 leds and all works great. I used before Arduino UNO and the connection schema tfor the Nano is exactly the same.

I use the Arduino Uno, fastLED sketch and WS2812B LEDs.
Had this setup for years across RPI2, RPI3, Odroid C1, C2 and now N2.

2 Likes

Hi,

did you try this “Yinice lightning” with CE ? Does it work ?

yes, but you need not buying this complete kit.
the Yinice is only an Arduino Uno, so an Arduino Nano with fastled sketch is sufficient too!
the Powersupply does only have 40W (8A) in this Kit and if you are needing more (my Setup is ~3,4 m long) with 60 leds/m you need 12A Power-Supply.
So only the LED Strips in this Kit, ive buyed for 50€ (4meters) are for this price ok. have buyed an seperate Power Supply ( Mean Well LPV-100-5 for 28€)

so you need for Amilight on CE+Hyperion.ng:
Led Stripe (WS2812B)
An Arduino Nano with USB Kabel (FastLed Sketch as Software)
PowerSupply Mean Well LPV-100-5 (12A)
and an Resistor 510Ohm 1/4W
thats all :slight_smile:

well, i live in China and this kit is Chinese, so I ordered one with 60 leds /m and they provide the correct power supply.
To make it work, can you walk me thru the steps ?
I already installed hyperion-ng (v9.1.100.2, on CE 9.0.1) but when I go on my kodi server IP:8099, nothing is working.
Is there something else I need to install on Kodi or CE ?
Thank you

Please tell me why i need this?

Default port is 8090.

it is for protecting the first LED in the Strip from voltage peaks when plug in the power. often the first LED-IC break down

It’s been so long since I built mine. 5+ years
Think I have 470 ohm resistor on data and
1000µF capacitor between vcc and ground.

Can someone explain me how can i debug hyperion in 9.0.2 ??
I managed to make it work then I played with various settings to tune it to my liking. Then it crashed and I can’t restart it, even after reboot…

I manually launch hyperion service with below cmd:
/storage/.kodi/addons/service.hyperion.ng/bin/hyperiond name_of_my_config

but this actually create a new config file in /storage/.hyperion/config/ while my orignal (and normally working config file) is in /userdata/addon_data/service.hyperion.ng/config/

How can I start hyperiond with my config file ??

Thank you

You can either copy your config to where it’s expecting it when launching manually.
Or should be able to run manually with
/storage/.kodi/addons/service.hyperion.ng/bin/hyperiond --rootPath /storage/.kodi/userdata/addon_data/service.hyperion.ng hyperion.config.json --verbose

Thanks a lot !

last question: how do you manage to only have the leds on when watching movies ?

Deactivate the addon in Kodi. Then open a SSH connection and start hyperion like this:
hyperiond --rootPath /storage/.kodi/userdata/addon_data/service.hyperion.ng hyperion.config.json -d

To close it hit CTRL-C
Or with gdb debugger:
gdb --args hyperiond --rootPath /storage/.kodi/userdata/addon_data/service.hyperion.ng hyperion.config.json -d

ok, now I understand how to manually start it, but i want ambilight to only be active during movies. For other kodi features, I want them to be turned of.
I’ve checked hyperion.power script, it looks like I need to send SIGUSR1 to turn off and SIGUSR2 to turn on, but when I do, the lights still stays on (but no refresh) and it looks like hyperion is actually restarting (rainbow swirl)

I manually start and stop using python/bash scripts which I marked as favourites. For some reason you can’t run bash scripts from the UI but you can run a python script which calls a bash script.
I then just scroll the main menu to favourites. Pick the folder where I put the python scripts and choose either LEDs on our LEDs off.

LEDON.py
import os
os.system(‘sh /storage/hyperion/bin/ledson.sh’)

LEDOFF.py
import os
os.system(‘sh /storage/hyperion/bin/ledsoff.sh’)

ledson.sh
#!/bin/sh
/storage/.kodi/addons/service.hyperion.ng/bin/hyperiond hyperion.config.json >/dev/null 2>&1 &

ledsoff.sh
#!/bin/sh
/storage/hyperion/bin/hyperion-remote --brightness 0 >/dev/null 2>&1 &
sleep 2
killall hyperiond

Notice the off sh send a Hyperion command to turn the LEDs off, waits a couple of seconds for the fade out then kills hyperiond.

You have to have the add-on disabled for this to work.
If you use these you will need to modify the on sh command with the rootpath command I gave earlier.
I have my config in /storage/.Hyperion/config/ where it looks for it by default when launching manually