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

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

tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

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

Post by tasshack »

Chillout wrote: Thu Jul 14, 2022 12:09 pm Update: got it running with WLED without flickering. The only issues I have currently is not having a very persistent root on my tv... I guess I have to do something to delay the usb initiation. But that's unrelated to this awesome lib 8-)

Edit: finalized the hardware, installed it all in an old Raspberry Pi case :mrgreen:
Tests are succesful, although it's not yet running from startup, despite having 01_99_Sambilight.init in init.d, with executable rights.. I guess I must have slipped up somewhere, or does this sound familiar to anyone?
Edit2: fixed it :-) turned out there was some ux-windows issues with the file :lol:
Initiation delay is caused by TV not the samygo or the library. TV needs some time after booting to begin the smarthub. You can press smart button just after TV is booted and see that smart features are not available at that time too.
I you are not planning to use another samygo library you can rename the 01_99_Sambilight.init file to 01_03_Sambilight.init to move its initialization order to be a little early.
On my F leds will turn on about 30 seconds after TV is booted. At that time not even hdmi cec is working yet and i cannot control my android box from TV remote so it does not matter to me leds are on or off because i need to wait finish TV to boot anyway.
j0hnd03
Posts: 9
Joined: Sun Aug 04, 2019 5:15 pm

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

Post by j0hnd03 »

Chillout wrote: Thu Jul 14, 2022 12:09 pm Update: got it running with WLED without flickering. The only issues I have currently is not having a very persistent root on my tv... I guess I have to do something to delay the usb initiation. But that's unrelated to this awesome lib 8-)

Edit: finalized the hardware, installed it all in an old Raspberry Pi case :mrgreen:
Tests are succesful, although it's not yet running from startup, despite having 01_99_Sambilight.init in init.d, with executable rights.. I guess I must have slipped up somewhere, or does this sound familiar to anyone?
Edit2: fixed it :-) turned out there was some ux-windows issues with the file :lol:
Your initial struggle with the init file sounds familiar :lol: Linebreaks I assume

Interesting that you have no issues using wled. May I know what wled version and hardware / esp you're using? Also how many pixels (as mentioned, flicker only occurs beyond LED 85 with my esp32).

Great idea about the rpi case btw, made me realize I have a spare one I could use as well :geek:
Chillout
Posts: 7
Joined: Thu Jun 03, 2021 9:34 pm

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

Post by Chillout »

tasshack wrote: Fri Jul 15, 2022 4:42 pm Initiation delay is caused by TV not the samygo or the library. TV needs some time after booting to begin the smarthub. You can press smart button just after TV is booted and see that smart features are not available at that time too.
Yeah, that's not a problem, I already love how fast it starts up! The issues I was facing were related to the init file not having the right linebreaks :lol:


j0hnd03 wrote: Sun Jul 24, 2022 12:13 am Your initial struggle with the init file sounds familiar :lol: Linebreaks I assume
Yes, exactly this. I felt like a total noob when I found out :lol:
Interesting that you have no issues using wled. May I know what wled version and hardware / esp you're using? Also how many pixels (as mentioned, flicker only occurs beyond LED 85 with my esp32).
I did some additional tests, with various sources. It turns I'm suffering from the "blink" as well, although it can be hard to spot because it's just 1 frame. It's an occasional BLIP in a completely different color. I've made a video of this.

Playing very smoothly, but with a green blip at 0.06:
https://www.youtube.com/watch?v=tLNJduhruHc

And here, while I'm playing an ambilight test video on youtube:
https://www.youtube.com/shorts/-anZN15-4mU

Image

(source of Amibilight test video: https://www.youtube.com/watch?v=8u4UzzJZAUg )
I'm using a Wemos D1 (ESP8266) with 112 WS2812 LEDs. The PSU is huge, I've used this with my Led matrix helmet and there it caused no issues. Also, the regular WLED animations don't cause any troubles.


Some findings:
- it appears to be occurring less when I lower the brightness of libSambilight by remote to 25%
- disabling auto brightness on WLED doesn't fix it
- disabling white balance correction on WLED doesn't fix it
- disabling all other sync sources and inputs on WLED doesn't fix it
- after about 10 to 15 minutes (haven't timed yet, it seems to be intermittent), it appears the ESP is rebooting. I need to do more testing here to find a pattern.
- when the image on the TV is not moving (for instance, during a closeup in some drama movie or so), the leds turn off after 1 second. Very annoying :shock: Probably because there's no data flow with new information going on.
- using an E-series tv, with the following settings:

Code: Select all

# Required Parameters
H_LEDS=52;				
V_LEDS=30;				
BOTTOM_GAP=52;			
START_OFFSET=82;		

# Optional Parameters
CLOCKWISE=1;			
BLACK_BORDER=1;			
TV_REMOTE=1;			
EXTERNAL=0;				
BAUDRATE=921600;		
GFX_LIB=1;				
CAPTURE_FREQ=40;		
CAPTURE_SIZE=2;			
OSD_CAPTURE=1;
I'm fairly certain it has something to do with a value that's not recognized by WLED, maybe some conversion between types or so. I'll check the WLED github and forums to see if someone has similar results.
Last edited by Chillout on Wed Jul 27, 2022 1:59 pm, edited 1 time in total.
tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

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

Post by tasshack »

Chillout wrote: Tue Jul 26, 2022 9:14 am Some findings:
- after about 10 to 15 minutes (haven't timed yet, it seems to be intermittent), it appears the ESP is rebooting. I need to do more testing here to find a pattern.
I have a wled device that i use for lighting purposes only and it occasionally crashes all the time. Wled is not a very stable project even from the start because esp hardware has very specific quirks that must be handled differently(not documented at all) than an arduino.
Chillout wrote: Tue Jul 26, 2022 9:14 am - when the image on the TV is not moving (for instance, during a closeup in some drama movie or so), the leds turn off after 1 second. Very annoying :shock: Probably because there's no data flow with new information going on.
Check this out https://github.com/Aircoookie/WLED/issu ... -731740619

I think the main reason of flickering is that WLED is not quite compatible with the adalight protocol and it expects TMP2 most of the time. Maybe WLED confuses the led data with TMP2 header/footer bytes (0xC9, 0x36).

I may need to implement TMP protocol to sambilight for solving the wled flickerin issue, but sadly i don't have time to do it anytime soon.
Chillout
Posts: 7
Joined: Thu Jun 03, 2021 9:34 pm

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

Post by Chillout »

I've done some more digging into this, and WLED should be able to handle the Adalight protocol, so that shouldn't be the problem. Thanks for suggesting the timeout. I'll try that :-)
If WLED stays shutting down, I'll replace it by a regular Adalight-capable sketch. As long as it can turn off automatically, I'll be happy (because my girlfriend totally hated it when the ambilight stayed on after the TV was off in the past :lol: )

Either way, I love this piece of software, and it's given me a renewed interest in doing stuff with LEDs again! Thanks 8-)
j0hnd03
Posts: 9
Joined: Sun Aug 04, 2019 5:15 pm

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

Post by j0hnd03 »

I've spent quite a bit of time in this WLED vs Sambilight rabbit hole, sharing my observations:

- Latest versions of WLED (>0.13.0b6) have a more broad issue with Adalight resulting in regular crashes, which I can reconstruct on ESP32, see https://github.com/Aircoookie/WLED/issues/2618 ; probably the issue was introduced with https://github.com/Aircoookie/WLED/pull/2517
- WLED <= 0.13.0b6 does not crash my ESP32 when receiving Adalight, but shows the same flicker issue as later versions
- I'm not convinced the flicker is a WLED specific thing. I found that it seems triggered by Wifi activity on the ESP. For example, watching the WLED "preview" triggers it nicely in my case. If you disable wifi on WLED (leaving the wireless AP field empty) the flicker is almost gone / neglectible.
- My experiment to butcher the basic adalight sketch from this thread into wled_serial.cpp supports this. The flicker persisted even w/o the complexity of TPM2 / outbound serial functionality / etc in wled_serial.cpp.
- To me, long time WLED user, WLED has always been rock solid. I only ever experienced crashes / problems in correlation with Adalight.

-> There might be something going wrong upstream which causes the interference between Wifi and Adalight. And I found other references with similar observations (linked here previously). I share the sentiment though that migrating Sambilight to TPM2 has a good chance to work around the issue (simply due to TPM2s binary nature).
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

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

Post by TorbenMue »

Is there any way to get this running on an UE55H6690 (T-GFS) or anything similar to this?

Had everthing running with rpi but now i use internal tv tuner which gives no hdmi signal.

Also I only have some ESP 32 and som ESP 8266. can they do the same like the arduino or do I need a new board?
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

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

Post by TorbenMue »

tasshack wrote: Mon Nov 08, 2021 6:36 pm
01_99_Sambilight.init
- H_LEDS: Horizontal leds count (Top Side)
- V_LEDS: Vertical leds count (Left/Right Side)
i ordered a FTDI Serial to USB Converter and connected it like mentioned in the first post. green led flickering on the FTDI and the blue led of my esp8266 also flickers blue. i think this means both are reading/writing alle the time.
I tested everything with primsatik before but when i try this command

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:39 V_LEDS:22 BOTTOM_GAP:11 START_OFFSET:0 CLOCKWISE:0 CAPTURE_POS:1 COLOR_ORDER:RGB BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:0 TEST_PROFILE:0 TEST_SAVE_CAPTURE:1
i only get 50 led to shine (H_LEDS:39+V_LEDS:22-BOTTOM_GAP:11=50)
Autostart does not work for me.

I have to mention that my TV is not a MST device. But it seems that it will kinda work, too. I want to test more but i don't know that to do anymore.

Can you help me?
tasshack
SamyGO Project Donor
Posts: 65
Joined: Thu Aug 23, 2018 5:54 am
Location: Istanbul, TURKEY

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

Post by tasshack »

TorbenMue wrote: Fri Sep 02, 2022 12:11 pm
tasshack wrote: Mon Nov 08, 2021 6:36 pm
01_99_Sambilight.init
- H_LEDS: Horizontal leds count (Top Side)
- V_LEDS: Vertical leds count (Left/Right Side)
i ordered a FTDI Serial to USB Converter and connected it like mentioned in the first post. green led flickering on the FTDI and the blue led of my esp8266 also flickers blue. i think this means both are reading/writing alle the time.
I tested everything with primsatik before but when i try this command

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:39 V_LEDS:22 BOTTOM_GAP:11 START_OFFSET:0 CLOCKWISE:0 CAPTURE_POS:1 COLOR_ORDER:RGB BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:0 TEST_PROFILE:0 TEST_SAVE_CAPTURE:1
i only get 50 led to shine (H_LEDS:39+V_LEDS:22-BOTTOM_GAP:11=50)
Autostart does not work for me.

I have to mention that my TV is not a MST device. But it seems that it will kinda work, too. I want to test more but i don't know that to do anymore.

Can you help me?
I don't know is it possible to run this library on non mst device because i don't have one but maybe we will figure it out.
Can you share the /dtv/sambilight.log and /dtv/sambilight.bmp files with an actual photo of the screen after you run that command and also without TEST_FRAMES:1 with a short video.
TorbenMue
Posts: 6
Joined: Mon Aug 29, 2022 6:41 am

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

Post by TorbenMue »

tasshack wrote: Sun Sep 04, 2022 8:43 pm
I don't know is it possible to run this library on non mst device because i don't have one but maybe we will figure it out.
Can you share the /dtv/sambilight.log and /dtv/sambilight.bmp files with an actual photo of the screen after you run that command and also without TEST_FRAMES:1 with a short video.
I tried to change to WLED from your script because i have some projects done with this and i wanted to know if WLED would work. When my ESP controls the LED with WLED everything works. all LEDs shine.

No i plugged my FTDI into the ESP (on RX and GND Pin) and i could control the lights via prismatic from my pc. all LEDs shine.

But when i plug the FTDI into my TV and run this command

Code: Select all

samyGOso -d -T -B -l /mnt/opt/privateer/usr/libso/libSambilight.so H_LEDS:44 V_LEDS:22 BOTTOM_GAP:11 START_OFFSET:75 CLOCKWISE:0 CAPTURE_POS:0 COLOR_ORDER:RGB BAUDRATE:921600 TEST_FRAMES:1 TEST_PATTERN:0 TEST_PROFILE:0 TEST_SAVE_CAPTURE:1
only 50 LEDs shine. They are changing a with different images on screen but it looks a bit off.

Colors and position is not correct but i think its a better to look at this when all LEDs shine and positioning is correct.

Log is attached but i even don't get a .bmp file when running this command.

Maybe its better to write in private message because we dont want to spam this topic?
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “[F] Software”