[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: 58
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: 8
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: 5
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: 58
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: 5
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: 8
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).

Post Reply

Return to “[F] Software”