Rpi3 + Arduino + libreELEC >> vendor preset: disabled

  • Ok, Moment ich glaub ich bring Pin und GPiO durcheinander.. ich hab Data an GPIO 18 angeschlossen, dann soll er aber für ws281x , an GPIO 24 (Pin 18), richtig?

    Und ja ich hatte es bisher so wie auf Bild angeschlossen, aber nach dem letzten Tipp es jetzt mal mit einem direkten Anschluss an RPI3 versucht, (Bild 2). Würd es allerdings, wenn ich ehrlich auch immer noch gern mit der Arduino Box hinkriegen....

  • Also, entweder die LEDs auf deinem Stripe sind keine Ws2812, oder du hast die GPIO-Nr. und Pins durcheinandergebracht.

    Nochmal, Ws2812 laufen über PWM, also GPIO 18 bzw. physikalischer Pin 12.

    Edit: Das hat mir schon ein paar mal geholfen...

    GPIO-Pdf_1.pdf

    Grüße aus Österreich / Greetings from Austria !

    - Don't wanna miss it anymore !

    Edited 2 times, last by Mike72 (July 5, 2021 at 2:08 AM).

  • Könnte sein, dass die zweite LED defekt ist. Leicht herauszufinden, indem du DO der ersten mit DI der dritten überbrückst, z.B. mit einem Male Jumperkabel. Dann verschiebt sich zwar die ganze LED-Konfig um eins, man kann das Problem aber zumindest einkreisen.

    Grüße aus Österreich / Greetings from Austria !

    - Don't wanna miss it anymore !

  • Ok, hab es versucht (einfach Kabel ran gehalten?), aber keine Reaktion. Zumal ich es auch nicht erwartet hätte, aber zum ursprünglichen Problem passt, da von Anfang an meist nur die erste anging. Aber zwischenzeitig durch Zufall dann auch eben wieder alle, auch vor nicht allzu langer Zeit. Weshalb ich nach wie vor davon ausgehe, dass die LEDs ok sind...

    Neu war, dass die erste jetzt auch angesteuert wurde, was jetzt allerdings leider wieder aufgehört hat.<<<

    Jetzt reagiert sie mal kurz, oder nimmt meist eine zufällige Farbe an wen ich sie bewege, oder Strom an aus stecke etc.

    Hattest du da noch eine Idee zur Arduino Box?? Das wollte ich ohnehin nochmal versuchen..

    Denke immer noch mehr eher Richtung Coding, (config.txt und cmdline.txt bzw. Arduino Sketch) unter anderem da ich von Anfang an auch andere "Probleme" seid Hyperion Installation hatte.

    ...

    Werd aber auch definitiv nochmal Hyperbian ausprobieren, sobald ich es schaffe....

    Edited once, last by luckyjacks (July 7, 2021 at 12:01 AM).

  • Ok, trotzdem vielen Dank!! hat mich trotzdem schon etwas weiter gebracht..!

    Mit Coding, oder cmdline etc. scheinen sich die meisten hier auch nicht so gern zu beschäftigen, oder denkst du es gibt hier noch jemanden, der unter Umständen noch mehr durchblicken könnte...?

    Die Probleme die mit den Stream Signal Aussetzern, bei Pause, Lautstärke, halt steuern und so, von Beginn der Hyperion Installation hatte, und später grundlose Verschwinden, der Externen Signalquellen, zeigen ja schon das da auch ein grundsätzliches Problem in der Signalkommunikation im RPI gibt... also ..

    Edited once, last by luckyjacks (July 7, 2021 at 11:29 PM).

  • Entweder haben die Entwickler dieses Sets einen eigenen Code, oder die LEDs eine andere Baudrate, Typ, oder, oder, oder… das artet alles in Vermutungen aus. Wenn es keine vernünftigen Unterlagen, Datenblätter usw. gibt, befürchte ich wird das nix. Die Chinesen haben da eine eigene Auffassung von Kundensupport, falls es den überhaupt gibt. War da eigentlich eine verständliche Anleitung dabei?

    Grüße aus Österreich / Greetings from Austria !

    - Don't wanna miss it anymore !

  • So eine Box habe ich, wie erwähnt, auch. Das sind ganz einfache WS2812-LED's. Auf der Box ist ein Adafruit-Sketch, damit kann man, per USB, die Box mit den LED's am PC anschließen, das entsprechene Programm laufen lassen und Zack, Ambilight für den PC-Monitor.

    Allerdings sind die Programme für den PC recht unkomfortabel.

    Ich habe einen Pi Zero W genommen und Hyperbian aufgespielt, das entsprechende Programm für den PC installiert und ein einwandfreies Ambilight am Monitor.

    luckyjacks

    Wenn Du aber Ambilight am TV haben willst, kommst Du um einen RPi nicht vorbei, da die Leistung von dem Arduino dafür nicht ausreicht!

    Versuche mal Hyperbian, damit bin ich bestens klar gekommen. Schnell und einfach.
    Möchtest Du jedoch Libreelec verwenden, musst Du daran denken, dass wohl die Neueste Version den internen Grabber nicht mehr unterstützt. Zumindest wurde darüber hier im Forum berichtet.

  • Ja, dass China LEDs anders programmiert sind, oder etwas in der Art war auch mein Gedanke. Aber danke, dass wollte auch sagen, eine relativ ausführliche Anleitung gab es schon, aber eben nur Windows und Co, sollte man sich dann das Ambibox Programm herunterladen, etc. Für den Raspi gab es dann nur den Hinweis, soll man sich Hyperion installieren. Und hat ja auch wie in meinem Tutorial, auch zB funktioniert.

    Außer das die LEDs definitiv WS2812b sind, kann Ich zu den technischen Details auch nicht mehr sagen..

    Und dann ist da ja auch immer noch das Phänomen mit den Aussetzern, was immer auftritt, sobald Hyperion mit dem Server verbunden ist. Dazu brauche ich gar nicht LEDS die sowieso nicht, mit Rpi kommunizieren zu anzuschließen. Das tritt also unabhängig von der Eigenheiten der LEDs auf...

    Und dem neueren Phänomen, das die Externe HDMI Quelle nicht mehr erkannt wird..


    Update:

    Habe jetzt nochmal alles anständig über die GPIO's an meinen RPi4 angeschlossen,

    und jetzt funktioniert die erste LED wieder konstant ...

    Und ich habe es auch irgendwie geschafft das mein Externes HDMI device wieder gefunden wurde, und Signale übertragen wurden, nur hielt das nicht lange, jetzt deaktiviert sich USB Aufnahme automatisch immer wieder, und das Device verschwindet dann wieder .. :S

    Edited 3 times, last by luckyjacks (July 11, 2021 at 12:31 AM).

  • Also es scheint das mit der Quelle lässt sich in Griff bekommen, ist ein Problem von meinem Vodafone Receivern zu einem gewissen Grad, und wie wo DC Volt (muss jetzt an meinen RPI angeschlossen werden …) und Data USB von meinem HDMI Splitter anschließe...

    Dann habe ich inzwischen auch noch eine neue Kette besorgt, die auch an PIN 18 etc., angeschlossen, die hat dann den Rainbow swirl gestartet, aber nicht mehr aufgehört, aber nach dem ich die externe Quelle wieder ordentlich zum Laufen gekriegt habe, leuchtet nur die erste und die letzte LED. Im Dashboard läuft aber immer nur durchgehend der Rainbow effect, die externe Quelle wird zwar angezeigt, aber man sieht nur Farbstreifen.. Regenbogen....(möglicherweise war es irgendein off Signal von einer Quelle, die nicht richtig erkannt wird).. Mit der anderen funktionierte die erste LED und Monitor zeigt auch die externe Quelle. Aber ich glaub die LED reagiert nur auf die Plattform... Habe mit der neuen LED noch mal Hyperbian probiert, und einen Instanz Error bekommen als das Dashboard öffnen wollte.....?

    Das Problem mit den Aussetzern ist unverändert..

    Ich hab immer noch das Gefühl das in der cmdline.txt oder so, in Libreelec irgendwas fehlt, und editiert werden müsste.

    Aber so wie es aussieht, ist hier ja keiner der sich damit besonders auskennt,

    ... oder würde euch da noch jemand einfallen?

    Edited 2 times, last by luckyjacks (July 15, 2021 at 3:35 AM).

  • Yea, WOW...

    I did a new raspberry Busta install now, to have a try on Hyperion.ng, with the new LED + OLD AMBIBOX setup Arduino and direct pin Connection. Old showed no reaction, the new one, first and last one lights up, that's it. Only that this time the puti status..service gives no errors, vendor is enabled, and says it's all running .. The external device is found and working on all devices. The start Rainbow does not show up at all anymore. ;(

    This is the sketch I'm currently running on my Arduino's

    Display Spoiler


    #include "FastLED.h"

    #define ANALOG_MODE_AVERAGE 0

    #define ANALOG_MODE_LAST_LED 1

    /**************************************

    S E T U P

    set following values to your needs

    **************************************/

    #define INITIAL_LED_TEST_ENABLED true

    #define INITIAL_LED_TEST_BRIGHTNESS 32 // 0..255

    #define INITIAL_LED_TEST_TIME_MS 500 // 10..

    // Number of leds in your strip. set to "1" and ANALOG_OUTPUT_ENABLED to "true" to activate analog only

    // As of 26/1/2017:

    // 582 leaves ZERO bytes free and this

    // 410 is ok

    // tested with 500 leds and is fine (despite the warning)

    #define MAX_LEDS 90 // depending on the strip 180

    // type of your led controller, possible values, see below

    #define LED_TYPE WS2812B

    // 3 wire (pwm): NEOPIXEL BTM1829 TM1812 TM1809 TM1804 TM1803 UCS1903 UCS1903B UCS1904 UCS2903 WS2812 WS2852

    // S2812B SK6812 SK6822 APA106 PL9823 WS2811 WS2813 APA104 WS2811_40 GW6205 GW6205_40 LPD1886 LPD1886_8BIT

    // 4 wire (spi): LPD8806 WS2801 WS2803 SM16716 P9813 APA102 SK9822 DOTSTAR

    // For 3 wire led stripes line Neopixel/Ws2812, which have a data line, ground, and power, you just need to define DATA_PIN.

    // For led chipsets that are SPI based (four wires - data, clock, ground, and power), both defines DATA_PIN and CLOCK_PIN are needed

    // DATA_PIN, or DATA_PIN, CLOCK_PIN

    #define LED_PINS 6 // 3 wire leds

    //#define LED_PINS 6, 13 // 4 wire leds

    #define COLOR_ORDER GRB // colororder of the stripe, set RGB in hyperion

    #define OFF_TIMEOUT 15000 // ms to switch off after no data was received, set 0 to deactivate

    // analog rgb uni color led stripe - using of hyperion smoothing is recommended

    // ATTENTION this pin config is default for atmega328 based arduinos, others might work to

    // if you have flickering analog leds this might be caused by unsynced pwm signals

    // try other pins is more or less the only thing that helps

    #define ANALOG_OUTPUT_ENABLED false

    #define ANALOG_MODE ANALOG_MODE_LAST_LED // use ANALOG_MODE_AVERAGE or ANALOG_MODE_LAST_LED

    #define ANALOG_GROUND_PIN 8 // additional ground pin to make wiring a bit easier

    #define ANALOG_RED_PIN 9

    #define ANALOG_GREEN_PIN 10

    #define ANALOG_BLUE_PIN 11

    // overall color adjustments

    #define ANALOG_BRIGHTNESS_RED 255 // maximum brightness for analog 0-255

    #define ANALOG_BRIGHTNESS_GREEN 255 // maximum brightness for analog 0-255

    #define ANALOG_BRIGHTNESS_BLUE 255 // maximum brightness for analog 0-255

    #define BRIGHTNESS 255 // maximum brightness 0-255

    #define DITHER_MODE BINARY_DITHER // BINARY_DITHER or DISABLE_DITHER

    #define COLOR_TEMPERATURE CRGB(255,255,255) // RGB value describing the color temperature

    #define COLOR_CORRECTION TypicalLEDStrip // predefined fastled color correction

    //#define COLOR_CORRECTION CRGB(255,255,255) // or RGB value describing the color correction

    // Baudrate, higher rate allows faster refresh rate and more LEDs

    #define serialRate 460800 // use 115200 for ftdi based boards

    //#define serialRate 115200 // use 115200 for ftdi based boards

    //#define serialRate 500000 // use 115200 for ftdi based boards


    /**************************************

    A D A L I G H T C O D E

    no user changes needed

    **************************************/

    // Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data

    uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i;

    unsigned long endTime;

    // Define the array of leds

    CRGB leds[MAX_LEDS];

    // set rgb to analog led stripe

    void showAnalogRGB(const CRGB& led) {

    if (ANALOG_OUTPUT_ENABLED) {

    byte r = map(led.r, 0,255,0,ANALOG_BRIGHTNESS_RED);

    byte g = map(led.g, 0,255,0,ANALOG_BRIGHTNESS_GREEN);

    byte b = map(led.b, 0,255,0,ANALOG_BRIGHTNESS_BLUE);

    analogWrite(ANALOG_RED_PIN , r);

    analogWrite(ANALOG_GREEN_PIN, g);

    analogWrite(ANALOG_BLUE_PIN , b);

    }

    }

    // set color to all leds

    void showColor(const CRGB& led) {

    #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false

    LEDS.showColor(led);

    #endif

    showAnalogRGB(led);

    }

    // switch of digital and analog leds

    void switchOff() {

    #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false

    memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));

    FastLED.show();

    #endif

    showAnalogRGB(leds[0]);

    }

    // function to check if serial data is available

    // if timeout occured leds switch of, if configured

    bool checkIncommingData() {

    boolean dataAvailable = true;

    while (!Serial.available()) {

    if ( OFF_TIMEOUT > 0 && endTime < millis()) {

    switchOff();

    dataAvailable = false;

    endTime = millis() + OFF_TIMEOUT;

    }

    }

    return dataAvailable;

    }

    // main function that setups and runs the code

    void setup() {

    Serial.begin(serialRate);

    // analog output

    if (ANALOG_OUTPUT_ENABLED) {

    // additional ground pin to make wiring a bit easier

    pinMode(ANALOG_GROUND_PIN, OUTPUT);

    digitalWrite(ANALOG_GROUND_PIN, LOW);

    pinMode(ANALOG_BLUE_PIN , OUTPUT);

    pinMode(ANALOG_RED_PIN , OUTPUT);

    pinMode(ANALOG_GREEN_PIN, OUTPUT);

    }

    int ledCount = MAX_LEDS;

    if (ANALOG_MODE == ANALOG_MODE_LAST_LED) {

    ledCount--;

    }

    #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false

    FastLED.addLeds<LED_TYPE, LED_PINS, COLOR_ORDER>(leds, ledCount);

    #endif

    // color adjustments

    FastLED.setBrightness ( BRIGHTNESS );

    FastLED.setTemperature( COLOR_TEMPERATURE );

    FastLED.setCorrection ( COLOR_CORRECTION );

    FastLED.setDither ( DITHER_MODE );

    // initial RGB flash

    #if INITIAL_LED_TEST_ENABLED == true

    for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)

    {

    showColor(CRGB(v,v,v));

    delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);

    }

    for (int v=0;v<INITIAL_LED_TEST_BRIGHTNESS;v++)

    {

    showColor(CRGB(v,v,v));

    delay(INITIAL_LED_TEST_TIME_MS/2/INITIAL_LED_TEST_BRIGHTNESS);

    }

    #endif

    showColor(CRGB(0, 0, 0));

    Serial.print("Ada\n"); // Send "Magic Word" string to host


    boolean transmissionSuccess;

    unsigned long sum_r, sum_g, sum_b;

    // loop() is avoided as even that small bit of function overhead

    // has a measurable impact on this code's overall throughput.

    for(;;) {

    // wait for first byte of Magic Word

    for (i = 0; i < sizeof prefix; ++i) {

    // If next byte is not in Magic Word, the start over

    if (!checkIncommingData() || prefix[i] != Serial.read()) {

    i = 0;

    }

    }

    // Hi, Lo, Checksum

    if (!checkIncommingData()) continue;

    hi = Serial.read();

    if (!checkIncommingData()) continue;

    lo = Serial.read();

    if (!checkIncommingData()) continue;

    chk = Serial.read();

    // if checksum does not match go back to wait

    if (chk != (hi ^ lo ^ 0x55)) continue;

    memset(leds, 0, MAX_LEDS * sizeof(struct CRGB));

    transmissionSuccess = true;

    sum_r = 0;

    sum_g = 0;

    sum_b = 0;

    int num_leds = min ( MAX_LEDS, (hi<<8) + lo + 1 );

    // read the transmission data and set LED values

    for (int idx = 0; idx < num_leds; idx++) {

    byte r, g, b;

    if (!checkIncommingData()) {

    transmissionSuccess = false;

    break;

    }

    r = Serial.read();

    if (!checkIncommingData()) {

    transmissionSuccess = false;

    break;

    }

    g = Serial.read();

    if (!checkIncommingData()) {

    transmissionSuccess = false;

    break;

    }

    b = Serial.read();

    leds[idx].r = r;

    leds[idx].g = g;

    leds[idx].b = b;

    #if ANALOG_OUTPUT_ENABLED == true && ANALOG_MODE == ANALOG_MODE_AVERAGE

    sum_r += r;

    sum_g += g;

    sum_b += b;

    #endif

    }

    // shows new values

    if (transmissionSuccess) {

    endTime = millis() + OFF_TIMEOUT;

    #if MAX_LEDS > 1 || ANALOG_OUTPUT_ENABLED == false

    FastLED.show();

    #endif

    #if ANALOG_OUTPUT_ENABLED == true

    #if ANALOG_MODE == ANALOG_MODE_LAST_LED

    showAnalogRGB(leds[MAX_LEDS-1]);

    #else

    showAnalogRGB(CRGB(sum_r/MAX_LEDS, sum_g/MAX_LEDS, sum_b/MAX_LEDS));

    #endif

    #endif

    }

    }

    } // end of setup

    void loop() {

    // Not used. See note in setup() function.

    }

    Edited 3 times, last by luckyjacks (July 24, 2021 at 2:13 AM).

  • I vote you send it to TPmodding

    All out everything you have tried and if you are still using the OLD AMBIBOX chinese thing, is it not safe to assume it just doenst work? and could possibly be more hassle than its worth? especially when you can get tons of other adruino like clones for as low as $3 and this could of been resolved and let you enjoy your Hyperion setup months ago :/

  • sorry mate i sidestepped once english was out the way :D

    genuinely gutted for you tho man as your putting in the effort.

    Looking at it from a diagnostic point of view I would be tempted to gather all the components and put them in a pile on the floor and start testing them.

    If i was in your shoes i would

    Start with the very basics - the Pi - install Etcher and burn a freshly downloaded v9 of libreelec and enable ssh during setup on screen

    use Paulchen-Panther tutorial and install Hyperion - do not install or do anything else except reboot after the libreelec tutorial

    You should be able to wire up the data line of the LED directly to the pi - just for testing purposes use default GPIO 18 (pin 12) make sure you are using the correct pin depending on your version of the Pi GPIO, you can then go to http://your-pi-ip-here:8090 then into

    Led Instances -> LED Output then in the LED Controller change that to RPI PWM - ws281x, set your led count and the GPIO pin that you used and save settings, You may need to go into LED Layout and define the led layout

    In theory you should then be able to use Hyperion webui at http://your-pi-ip-here:8090/#remote and toggle the LEDS on and off and set a solid colour in the Colors/Effects section - They may not all light up but you should be able to tell if the LEDS are actually working.

    Once you have a working Hyperion and LEDS, then you can introduce the Adriuno and go from there to see what works and what doesn't - as my concerns are is the clone thing compatible? will it work? have you flashed the other Adruino correctly?

    but yeah id like to see LEDS lighting up to rule all that out then go from there as what if those clone things are killing your LEDS, without going back to the basics and ruling things out its all a big time consuming guessing game

    Edited 2 times, last by davieboy (July 24, 2021 at 4:54 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!