OSMC and Hyperion

I’ve been running 100 leds for years on a Teensy. It’s an old config but it still works fine.
I’ve checked the forum and the Teensy 3.1 can go up to 6Mbaud: PJRC (Teensy) Forum

Do you really need more than 10fps? It’s an ambilight, not a HD picture. I remember on my RPI’s I had configured the framebuffer at 10Hz and it gave a good ambilight experience.

1 Like

Found a fix. Looks like Debian is missing FindMbedTLS.cmake in the modules. I found one online and copied it to the modules directory which fixed the issue.

Thanks for the hint! :slight_smile: I will check that option. I guess the Teensy is Arduino compatible, you know by chance if I need to modify my sketch or use a different one? Currently the sketch from hyperion.ng/adalight.ino at master · hyperion-project/hyperion.ng · GitHub

Also as stated, I get more like 2-3 fps with my setup and more then 255 LEDS which is quite noticeable and makes no fun.

1 Like

No experience with Arduino’s. I’m using this: Adalight/LEDstream.pde at master · adafruit/Adalight · GitHub

The differences between Teensy and Arduino are in the code.

2 Likes

Hi Anthrax or anybody which can help

first of all thanks for you guide and advice.

Sorry to come back on the issue, I had the same problem as others and would like to learn what I did wrong while I am a for sure not a linux expert. also sorry for my english…

Doing the step " Running Hyperion.NG"
I get
root@osmc4k:/home/osmc/hyperion.ng/build# cp /root/hyperion.ng/assets/webconfig /root/.hyperion/
cp: cannot stat ‘/root/hyperion.ng/assets/webconfig’: No such file or directory

and of curse it turns out that hyperion.ng is installed the wrong place in home/osmc and not in root.

I did change to be root buy doing sudo -s (see #) while I understood from the suggested link that this was enough to become root. BUT I suspect this is exactly the problem because I remained in the osmc dir when I performed the compilation of the source files? However what I can see now afterwords is that when I do a fresh/new ssh login as root I end-up in the root dir. Is my assumption correct ?

Also what to do now? Can I just copy osmc/Hyperion.ng as suggest by Numiah too root or is there a more correct way doing this on linux ? or should I recompile from the root dir? also I did not manage to find .hyperion in the /home/osmc/ dir using ls -a ?

As a newbie I feel stupid to ask silly questions but would like to learn

1 Like

Hi @Peter_1969,

been away for the holidays for quite some time…

try to log in to the device as root via ssh before you are performing the steps from the guide again from the top. This should have you running in no time!

If you’re hitting another snag let me/us know and we’ll find a cure

Anthrax

Hi @rantanplan1,

this is my implementation of the Adalight protocol using the latest FastLED libs… I tried to go for maximum throughput :wink:

As you can see it’s less “meaty” than the other sketch, maybe it’ll perform a bit better.

#include "FastLED.h"
#define NUM_LEDS 160

CRGB leds[NUM_LEDS];

static const unsigned long frameTimeout = 15000; // 15 seconds
unsigned long    t, lastAckTime, lastFrameTime;

void setup() {
  //sanity check delay - allows reprogramming if accidently blowing power w/leds
  delay(3000);
  FastSPI_LED.addLeds<WS2801, 11, 13, BGR>(leds, NUM_LEDS); 
  FastSPI_LED.clear(true);
  FastSPI_LED.setBrightness(255);
}

void loop() {
    if(Serial.read() == 0x41) {     //A
      if(Serial.read() == 0x64) {   //d
        if(Serial.read() == 0x61) { //a
          int hi = Serial.read();
          int lo = Serial.read(); 
          if ((hi ^ lo ^ 0x55) == Serial.read()){
            Serial.readBytes((char*)leds, NUM_LEDS * 3);
            FastSPI_LED.show();
            lastFrameTime = millis();
            return;
          }
        }
      }
    }
    t = millis();
    if((t - lastAckTime) > 1000) {
      Serial.print("Ada\n"); // Send ACK string to host
      lastAckTime = t; // Reset counter  
    }
    if((t - lastFrameTime) > frameTimeout){
      FastSPI_LED.clear(true);
      lastFrameTime = millis();
    }
}

I’m running this on a Teensy 3.0…

cheers
Anthrax

1 Like

Just a heads up,

we can now control services like the hyperion one via scripts during standby/resume…

I just stop/start it via subprocess like so:

/home/osmc/.kodi/userdata/wake.py

import subprocess
subprocess.call(["systemctl", "start", "hyperion"])

/home/osmc/.kodi/userdata/standby.py

import subprocess
subprocess.call(["systemctl", "stop", "hyperion"])

I actually control 3 hyperion instances just copy/paste the .call line and adjust :wink:

cheers
Anthrax

1 Like

THX for the reply. I did as suggested but now doing the step " Running Hyperion.NG"

I get

root@osmc4k:~/hyperion.ng/build# cp /root/hyperion.ng/assets/webconfig /root/.hy perion/

cp: -r not specified; omitting directory ‘/root/hyperion.ng/assets/webconfig’

sorry keep asking

peter

Hi @Peter_1969,

make sure the folder is actually there. It might help to use a sftp browser like filezilla or winscp to get a better grasp on what the remote file structure actually is.
I bet you’ll still find everything under /osmc/hyperion.ng/…

Did you start over from the top? Including a fresh github checkout?

Anthrax

PS: Maybe someone could enlighten me on how to package hyperion.ng into an installable addon for osmc so it gets easier for the non linux heads (still is hard for me as well :wink: )

Thanks for the sketch Anthrax, but I guess this needs to be modified since I use a WS2812B stripe and this is a little over my head…

Thanks for the quick reply.

Yes I started from the start again and all seemed to go well.

Yes the folder is there and yes I normally use filezilla. I was actually thinking just to copy with out asking for help but …when I prefered to asked in the end.

in which dir should I bee when i issue cp comand ? /root or in /?

Peter

@Peter_1969,

scratch my comment above I think you were in the wrong folder when you tried your cp command…

you were in the hyperion.ng/build folder but the assets folder is actually parallel to that - pay close attention to the path you’re currently in.

This is the command from the guide:

cp /root/hyperion.ng/assets/webconfig /root/.hyperion/

this should work when copied and pasted…

Basically all that needs to happen is for the webconfig folder to end up in the .hyperion folder :wink:

Don’t give up when you’re this close :stuck_out_tongue_closed_eyes:

have a look at the FastLED documentation which is pretty good:

And this example should have everything you need adjust for your chipset…
FirstLight.ino
There you’ll find all the usable chipsets and how to configure them

check out this (commented) line of code here:
FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);

[Edit] I just saw, that my sketch still uses the old FastSPI_LED version which has since been renamed FastLED so don’t get mixed up :wink:

1 Like

Thanks for your Great and fast help! …I really feel so silly because i know this should be rather easy.

I got it to work :slight_smile:
doing first
cd …

and then
cp - avr /root/hyperion.ng/assets/webconfig /root/.hyperion/

best

Peter

Thanks for the moral support :smiley: I’ll guess give it a shot, sounds doable and will order a Teensy…

Hi sorry coming back

I have questions regarding the installation

I have this line repeatedly in my log file. Is that a problem?

“Unexpected reply signature: got “”, expected “a{sv}””

I just ignore it; been like that for over a year and it works so I ignore it :slight_smile:

Quick and short question.
Would it be safe to update my Vero without fubarring my Hyperion settings?

Yes