[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.

fromul
SamyGO Project Donor
Posts: 47
Joined: Sat Feb 01, 2020 11:07 am
Location: Czech Republic

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

Post by fromul »

kisspach wrote: Wed Nov 30, 2022 1:38 am I solved it. Between the various tests, I realized that the first LED burned out. I replaced it and made the connections correctly.
Then I modified the script to fit the nodeMCU Amica esp8266mod 12-f. For the WS2801 I put RGB colours as order.
Now everything works! Congrats on the superb work and thanks for the support!
I'm attaching the modified version of the .ino script if it helps anyone.

Code: Select all

//##### SETTINGS ############

#define BAUDRATE  921600  // Serial port speed
#define NUM_LEDS 86      // Number of leds
#define BRIGHTNESS 255   // Maximum brightness
#define LED_TYPE WS2801  // Led strip type for FastLED
#define COLOR_ORDER RGB  // Led color order
#define PIN_DATA 14      // Led data output pin
#define PIN_CLOCK 12     // Led data clock pin (uncomment if you're using a 4-wire LED type)

//###########################

#define FASTLED_ESP8266_RAW_PIN_ORDER


#include <Arduino.h>
#include <FastLED.h>

CRGB leds[NUM_LEDS];
uint8_t* ledsRaw = (uint8_t*)leds;

const uint8_t magic[] = { 'A', 'd', 'a' };
#define MAGICSIZE sizeof(magic)
#define HICHECK (MAGICSIZE)
#define LOCHECK (MAGICSIZE + 1)
#define CHECKSUM (MAGICSIZE + 2)

enum processModes_t { Header,
                      Data } mode = Header;

int16_t c, outPos, bytesRemaining;
unsigned long t, lastByteTime;
uint8_t headPos, hi, lo, chk;

void setup() {
  FastLED.addLeds<WS2801, PIN_DATA, PIN_CLOCK, COLOR_ORDER>(leds, NUM_LEDS);

  FastLED.setBrightness(BRIGHTNESS);
  FastLED.show();

#if defined(ESP8266) || defined(ESP32)
  Serial.setRxBufferSize(2048);
#endif

  Serial.begin(BAUDRATE);

#if defined(ESP8266)
  delay(500);
  Serial.swap();  // RX pin winoll be GPIO13 on ESP8266
  delay(500);
#endif

  lastByteTime = millis();
}

void loop() {
  t = millis();

  if ((c = Serial.read()) >= 0) {
    lastByteTime = t;

    switch (mode) {
      case Header:
        if (headPos < MAGICSIZE) {
          if (c == magic[headPos]) {
            headPos++;
          } else {
            headPos = 0;
          }
        } else {
          switch (headPos) {
            case HICHECK:
              hi = c;
              headPos++;
              break;
            case LOCHECK:
              lo = c;
              headPos++;
              break;
            case CHECKSUM:
              chk = c;
              if (chk == (hi ^ lo ^ 0x55)) {
                bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L);
                outPos = 0;
                memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
                mode = Data;
              }
              headPos = 0;
              break;
          }
        }
        break;
      case Data:
        if (outPos < sizeof(leds)) {
          ledsRaw[outPos++] = c;
        }
        bytesRemaining--;

        if (bytesRemaining == 0) {
          mode = Header;
          while (Serial.available() > 0) {
            Serial.read();
          }
          FastLED.show();
        }
        break;
    }
  } else if (((t - lastByteTime) >= (uint32_t)120 * 60 * 1000 && mode == Header) || ((t - lastByteTime) >= (uint32_t)1000 && mode == Data)) {
    memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
    FastLED.show();
    mode = Header;
    lastByteTime = t;
  }
}
great job ;)
UE46H7000 T-MST14DEUC 2130.0 rooted, OSCam r11704, Sambilight preparation in progress
kisspach
Posts: 11
Joined: Sun Nov 13, 2022 1:51 am

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

Post by kisspach »

It happens to me that during the night, when the tv is off, all the green LEDs light up. I turn off the power to the LEDs, put it back on and they stay off. Then when I turn on the tv, they initially work fine, but after a few minutes, everything that should be black is displayed in green. I have to turn the tv off and on again 3 or 4 times for the problem to go away. Has this happened to anyone before?
itajackass
Posts: 8
Joined: Tue Oct 08, 2019 12:57 pm

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

Post by itajackass »

Any chance to see it working on DEU firmware? ( ue48h8000 tv)
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

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

Post by brunogts77 »

Is it possible to make it work on the J series?
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
kisspach
Posts: 11
Joined: Sun Nov 13, 2022 1:51 am

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

Post by kisspach »

Hi everyone! I don't know if it's my problem or a bug. it happens to me that when I turn on the TV, after a few minutes, the LEDs remain fixed on the white colour, it always happens when the projected image is white. I noticed that the esp8266 is completely blocked and no longer responds to any command. I have to unplug the board and plug it back in. then it continues to work fine. the esp is powered by the same power supply as the leds. I also noticed that when I raise or lower the volume with the remote control, the LEDs seem to flash. I don't know if the two things are related. is it my problem? of power? or code or TV?
kisspach
Posts: 11
Joined: Sun Nov 13, 2022 1:51 am

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

Post by kisspach »

I think i fixed it!
From the power supply I made two different cables come out. Not as seen in the first post.
One to power the leds and one for the esp8266. Then I connected the GND PIN of the esp with the GND of the leds, so that there is no flickering. Now i have no more problems!
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

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

Post by brunogts77 »

Hello, Hello, Is it possible to make sambilight work on TVs with Tizzen operating system? I have a J series TV and would like to install sambilight on it. thanks.
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
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 »

brunogts77 wrote: Thu Apr 20, 2023 5:13 pm Hello, Hello, Is it possible to make sambilight work on TVs with Tizzen operating system? I have a J series TV and would like to install sambilight on it. thanks.
It is not possible.
User avatar
brunogts77
Posts: 768
Joined: Sat Feb 18, 2012 8:34 pm

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

Post by brunogts77 »

OK thanks. But now, what's the reason?
UE42F5570 T-MST12DEUC_1119] [OTN=OFF] [OSCAM=ON]
UE55JU6870 T-HKMDEUC-1480 [OSCAM=ON]
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 »

brunogts77 wrote: Sun Apr 23, 2023 2:38 pm OK thanks. But now, what's the reason?
Because i don't have a J series TV.

Post Reply

Return to “[F] Software”