[App] libAmbiLight E/F/H (MST-only)

Here are software that related with Samsung H series TVs.
Please don't create any new topic here unless you have software to post/release.

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Tue Oct 30, 2018 7:25 pm

My APA102 led-strip finally arrived. It took me hours to figure out why I couldn't control it properly with the Arduino. I didn't know I had to connect the GND from the led-strip not only to the GND from the power supply but also from the arduino (which I am powering via usb atm).

Now that I got that out of the way, I'm facing a new problem:

I'm using a strip of ten leds for testing. That's also what I configured in the app.ino, which I attached to this post. Now before I start the injection the leds are on, dimmed but clearly on (white in color), which is not the behavior I expected.

Then I start the injection via putty:
samyGOso -d -T -B -r -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:3 V_LEDS:2 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 SLEEP:1 REVERSE COLOR

The leds go off briefly (for a second or so) and then go back to the same dimmed white, they were before. When I look in the log (which I attached) I see a lot of [0,0,0] with 10 non-000-colors inbetween and then "Ambilight ended". I'm not sure why it behaves this way.

Does anybody see where I went wrong?
You do not have the required permissions to view the files attached to this post.

adonis
SamyGO Project Donor
Posts: 40
Joined: Tue Dec 19, 2017 8:59 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by adonis » Wed Oct 31, 2018 9:25 am

The leds go off briefly (for a second or so) and then go back to the same dimmed white
They don't go off, they show the first 10 pixel-values that they receive from your tv, so since your values are nearly all[0,0,0] that means, that the strip has nothing to show.

After not receiving any data from the TV, the strip goes to it's standby-state, which I set to a light dimmed white. You can turn that of, if you want.

Did you project (cast, whatever) the example image I provided to your TV? Make sure to project it in full-screen so the image reaches from edge to edge.

Please test your config like this:

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:3 V_LEDS:2 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 SLEEP:1 REVERSE COLOR TEST
Otherwise, the script will be injected multiple times, and your TV might crash.

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Wed Oct 31, 2018 11:13 am

adonis wrote:
Wed Oct 31, 2018 9:25 am
The leds go off briefly (for a second or so) and then go back to the same dimmed white
They don't go off, they show the first 10 pixel-values that they receive from your tv, so since your values are nearly all[0,0,0] that means, that the strip has nothing to show.

After not receiving any data from the TV, the strip goes to it's standby-state, which I set to a light dimmed white. You can turn that of, if you want.

Did you project (cast, whatever) the example image I provided to your TV? Make sure to project it in full-screen so the image reaches from edge to edge.

Please test your config like this:

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:3 V_LEDS:2 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 SLEEP:1 REVERSE COLOR TEST
Otherwise, the script will be injected multiple times, and your TV might crash.
Sorry, I forgot to mention, that I did use the test image in fullscreen. That's why I don't quite understand all the black-values. Also why should the strip be turned off when the Arduino receives some black values? As long as it does receive values, it should display what it receives, shouldn't it? The picture might be black for a couple of seconds on purpose.

However I still don't understand why it does receive black values after all (despite using the example picture). Could it have something to do with my "minimal-led-test-approach"? When I get home I will try it with a larger led-strip.

Good to know that dimmed-white is the default color on purpose. I should be able to change that to black by simply editing "LEDS.showColor(CRGB(10, 10, 10));" in the ino then fairly easily, I guess.

Thank you for your quick feedback. I really love that there finally is a source-independent ambilight!

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Wed Oct 31, 2018 10:51 pm

When I got home from work I tried it with a bigger number of leds. Turns out your test example from page 1 works for me:

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:18 SERVER_IP:192.168.1.32 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR TEST
However when I try it with bigger values for H_LEDS and V_LEDS the tv crashes (does not react anymore to the remote). However it does seem to complete the test usually, as the led-strip does show colors and the log looks normal:

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:74 V_LEDS:41 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 SLEEP:1 REVERSE COLOR TEST
I've tried different numbers of leds, different offsets and different sleep values. The bigger the number of leds the more likely the tv is to crash. The log does not show anything out of the ordinary.


Edit: I reduced the number of pixels to H_LEDS:36 and V_LEDS:20 and then "doubled" them in the sketch. Now the test command works a couple of times. But when I call it for the 4th or 5th time the tv freezes again.
When I use the init-script, the tv freezes on start without even putting out any colors on the led-strip.

When I use

Code: Select all

samyGOso -d -A -B -r -l
instead of

Code: Select all

samyGOso -d -T -B -r -l
it does not seem to crash. However when I use the init-script the led-strip still only turns on briefly. The log says

Code: Select all

[AmbiLight] AmbiLight ended
. It seems like it is still some kind of test mode or something.
You do not have the required permissions to view the files attached to this post.

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Thu Nov 01, 2018 10:53 am

I screwed up: I copied the init-script to the tv and rebooted. The tv did not freeze but the ambilight did not work. So I rebooted to try again. Then it froze. I could not even ftp into it, so I unplugged it and replaced the files on my samy-go-usb-drive with a backup from a couple of months ago. It did not help: The tv freezes no matter if I start it with or without the samygo-stick.

I am puzzled, since I did not change anything, that should be permanent, when not using samygo, did I?

I did have to unplug it a couple of times during testing. Could that have caused a defect?

Edit:
I managed to perform a factory reset before it froze. That fixed it.
I rerooted and got everything setup again. Now I'm somewhat afraid to keep on testing.

Edit:
I'm sorry that I'm spamming the thread with all my stuff. I just figured my failures might keep someone from making the same mstakes :)

Now that I reset the tv the watchdog is on, which makes testing way more comfortable. I did not think to activate it before. I tried some more:

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR TEST
crashes

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR TEST
does not crash

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 SLEEP:1 REVERSE COLOR TEST
crashes

Code: Select all

samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR
does not crash, but leds are only on briefly just like when using "TEST".

Code: Select all

samyGOso -d -A -B -r -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR 
crashes


So version two seems to be working for me. What do I have to do, to make it work permanently and not stop after a second with "[AmbiLight] AmbiLight ended" in the log?

adonis
SamyGO Project Donor
Posts: 40
Joined: Tue Dec 19, 2017 8:59 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by adonis » Mon Nov 05, 2018 11:04 am

aimaim wrote:
Thu Nov 01, 2018 10:53 am
So version two seems to be working for me. What do I have to do, to make it work permanently and not stop after a second with "[AmbiLight] AmbiLight ended" in the log?
Do you have MST or non-MST device? Script only works for MST-devices.

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Mon Nov 05, 2018 11:05 am

adonis wrote:
Mon Nov 05, 2018 11:04 am
aimaim wrote:
Thu Nov 01, 2018 10:53 am
So version two seems to be working for me. What do I have to do, to make it work permanently and not stop after a second with "[AmbiLight] AmbiLight ended" in the log?
Do you have MST or non-MST device? Script only works for MST-devices.
MST. The Script does work. It just works for a short period of time.

adonis
SamyGO Project Donor
Posts: 40
Joined: Tue Dec 19, 2017 8:59 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by adonis » Tue Nov 06, 2018 6:00 pm

aimaim wrote:
Mon Nov 05, 2018 11:05 am
MST. The Script does work. It just works for a short period of time.
Aaah, sorry... I just realized I uploaded the TEST-lib with TEST set default to 1.
Please use the new libAmbiLight.zip provided in my first post.

aimaim
SamyGO Project Donor
Posts: 31
Joined: Wed Jan 02, 2013 10:46 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by aimaim » Tue Nov 06, 2018 7:14 pm

adonis wrote:
Tue Nov 06, 2018 6:00 pm
Aaah, sorry... I just realized I uploaded the TEST-lib with TEST set default to 1.
Please use the new libAmbiLight.zip provided in my first post.
Ah thanks, that explains it. Unfortunately it crashes now that I use the non-TEST-lib without the "TEST" parameter:
samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR TEST
With "TEST" works
samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libAmbiLight.so H_LEDS:36 V_LEDS:20 SERVER_IP:192.168.1.131 SERVER_PORT:5050 OFFSET:17 REVERSE COLOR
Without "TEST" flashes some colors, just like when using TEST, but crashes. I attached the log, which does not even include colors for some reason, despite the led-strip showing some for about one or two seconds.

Edit:
When I change the led numbers to H_LEDS:36 and V_LEDS:18 it does work, sort of. The colors don't seem right and somehow alternate between two colors even if I show the test image. But that might have something to do with the changes I made to the sketch in order to duplicate leds, or the fact that led numbers don't match up now.

I reduced the led number in the sketch now, to match the number in the lib-call. The colors look better now. I still have the strip on the roll, so I don't know, if they match up with the tv, for sure.
Anyhow, it's strange, that H_LEDS:36 V_LEDS:20 crashes the tv and H_LEDS:36 V_LEDS:18 doesn't. Might it have to be a 2:1 ratio?
You do not have the required permissions to view the files attached to this post.
Last edited by aimaim on Wed Nov 07, 2018 10:55 pm, edited 1 time in total.

Allodo
Posts: 23
Joined: Thu Feb 21, 2013 8:00 pm

Re: [App] libAmbiLight E/F/H (MST-only)

Post by Allodo » Tue Nov 06, 2018 8:58 pm

Well I have the same problem too, when I change the number of LED's (H-LEDS: 53 V_LEDS:29) the TV crashes :(
My TV's: UE50H6470 and UE75H6470

Post Reply

Return to “[H] Software”