Kodi Community Forum

Full Version: [RELEASE] Official XBMC boblight Addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I will pitch in whatever info I can to the tutorial too. It took me 6 hours to get my setup going... the learning curve is HUGE... but simple when you know what steps to take.
As i understand it. Depending on what software you have downloaded to your arduino, prefix is used to define how many leds you have.
Look at http://forums.adafruit.com/viewtopic.php?f=47&t=23972 a few posts down you have a little program to calculate the prefix for any number of leds. When i started i had the wrong prefix and only the first 25 of my 100 leds worked. Changed the prefix and everyone worked.

Back to my problem, it was a configuration problem. The Fast/Slow presets were way wrong, even the config i got from schumi2004 was way wrong. But at least it got me started to experiment with the values in custom mode. I needed both saturation and value to be very low. So now it works almost as good as boblight-X11. But it feels like the saturation value is kind of a big gun. Don't know how but it feels like it would be good with the possibility to change individual colors would be good. Because it seems that the color changes in boblight.conf don't matter much to the XBMC addon.

Now i only hope that it will be possible to have a setting and disable the addon for LiveTV/recordings. Hmm, even for TVShows would be good. Only really at movies i would like the lights turned on.
@raptorjr nice that you got it going.

Just for the future. Statements like

Quote:Since boblight-x11 works it must be something with the addon.

Are demotivating for us - especially when i told you multiple times that there is no difference between x11 and boblight addon and it must be a configuration issue.

And we can't give sane default values because of the billions of different hardware setups and leds.
For Adalight users to calculate the prefix:
Regarding the checksum, here's the relevant bit from the Processing sketch:


buffer[0] = 'A'; // Magic word
buffer[1] = 'd';
buffer[2] = 'a';
buffer[3] = byte((coord.length - 1) >> 8); // LED count high byte
buffer[4] = byte((coord.length - 1) & 0xff); // LED count low byte
buffer[5] = byte(buffer[3] ^ buffer[4] ^ 0x55); // Checksum

Calculation with examples:
Prefix for 25 LEDS: 41 64 61 00 18 4D
Prefix for 50 LEDS: 41 64 61 00 31 64
Prefix for 100 LEDS: 41 64 61 00 63 36
Prefix for 48 LEDS: 41 64 61 00 2F 7A


00 = led number 0

25 LED = 25-1=24 in hex is = 18
50 LED = 50-1=49 in hex is = 31
100 LED = 100-1=99 in hex is = 63
48 LED = 48-1=47 in hex is = 2F

(Microsoft Scientific calc in hex mode)
25 LED = 55 * Xor 18 = 4D
50 LED = 55 * Xor 31 = 64
100 LED = 55 * Xor 63 = 36
48 LED = 55 * Xor 2F = 7A
(2012-11-21, 13:38)Memphiz Wrote: [ -> ]@raptorjr nice that you got it going.

Just for the future. Statements like

Quote:Since boblight-x11 works it must be something with the addon.

Are demotivating for us - especially when i told you multiple times that there is no difference between x11 and boblight addon and it must be a configuration issue.

And we can't give sane default values because of the billions of different hardware setups and leds.

It wasn't my intention to put anyone down. More that it wasn't anything wrong with my hardware or boblight setup. And in a way there was a problem with the addon, but the configuration of the addon.
And there is a difference between the addon and boblight-X11, the addon has it own settings and in some way seems to ignore the settings of boblightd. Maybe consider to let boblight handle all the color configuration? Or maybe have the same kind of configuration in the addon as it is in boblight.conf, would make it easier to understand that the addon settings overrides the boblight.conf settings. In some way, settings should only be in one place, not some things in one place and other in another.

When there is profiles to choose from they should be very "safe" and be on the safe side when it comes to the values of saturation, value etc. Better with to low values in my opinion. I understand that there is a lot of different setups and hard to find good default values. But with the adalight project i guess that many that try this and the addon will have the same problems as i have if the choose any of the default profiles fast/slow, thinking it is the safe way to get decent values. Or maybe no default profiles if they only work for some? Then they could do more harm than good.

Anyway, i appreciate all the help I've gotten and the work you guys do. If i in any way sounds rude or not appreciate your help i blame it on that English is not my native language.
@raptorjr
What settings your using now? Since you say they are way off i'm wondering what settings your using since the colors match up perfectly here.
I'm not at the computer now, but in boblight.conf i have the values that i posted in a link previous. In saturation and value in the XBMC addon i think it was 0.9 and 1.1. These was the values that made the biggest impact when i changed them.
I couldn't find a explanation for what "value" did, but after a while it seems that it controls the brightness or something similar. It was because of a too high value in the presets i didn't get any dark areas when the edges of the movie was dark. Like in the pictures i posted earlier. Or is value something opposite to Threshold, pixels below will be considered white? Anyway, took some time to understand what it did.
It feels strange that i'm the only one with this problem, or everybody else is much smarter than me, since there isn't that many things you can do different with Adalight hardware. And i guess many is using that solutions since it is pretty easy to assemble.

But i should say thank you to you schumi2004, your values got me into testing custom values, which in the end worked.
@raptorjr

you can change the values of individual colors in the boblight.conf file:


[color]
name blue
rgb 0000FF
adjust 0.4

[color]
name green
rgb 00FF00
adjust 0.7

the adjust value will adjust the intensity of a color. You can set it from 0 to 1. I had to turn my blue to 0.4... I have cheap dealextreme lights. they have a lot of blue and too much green. They look great now. White looks white now, instead of blue. Hope that helps.

guys, thanks for the info on the prefix... mine was wrong but close. fixed now. =)
Hey guys, just put up a Tutorial/Guide for configuring Boblight on Windows here: http://forum.xbmc.org/showthread.php?tid=145908

Hope it helps everyone!
raptorjr. And.i tell you that the addon doesn't ignore the settings in the boblight.conf (its not able to ignore it even if it wanted to). Both settings play a role in boblight configuration. In boblight.conf you tweak each color for fitting to the attached leds/hardware. Boblight addon is only able to tweak options which apply to all channels (saturation, treshhold and so on). Thats limited/intended by the client / server design of the whole boblight construct.

And thats why the defaults CAN'T be made more generic then they are. Because everyone can diddle in the boblight.conf as he wants and turning the defaults into crap.

TBH thats what you did...
(2012-11-20, 20:41)reaven Wrote: [ -> ]WOW, so many configuration and combination .

adalight, atmolight, lightpack, etc... combined with processing code, boblight, lightpack script, lightpack software, custom software, etc....

so far whats the benefits of one from the other?

right now am using adalight with processing its working ok but don't like the fact of processing running all the time and that there isn't too much to tuning like how to tune to fix the fact that some color dont match (it could be the power supply since i been having difficulty finding the correct PS, right know am using to test a computer PS i think is 5v 2A but dont know if is the correct rate as per the WS2801 datasheet it can take 6v, but is running ok.

what i want to know is whats the benefits of trying to add boblight to my mix (ws2801 strip 150 leds, arduino uno R3, adalight code(ledstream.pde) )

*also am on MAC

If you can't get boblight working, you might go for lightpack. Processing is the worst solution and it's blowing up your java process. I have experienced that on Windows.

(2012-11-21, 21:05)quixand Wrote: [ -> ]
Code:
red adjustments:
gamma - 2.0
adjust - 0.65

green adjustments:
gamma - 2.0
adjust - 1.0

blue adjustments:
gamma - 2.1
adjust - 0.7
Above are adjustments for the colors of the LEDs if they are based on LPD6803 chip. I have WS8201 based LEDs. Did anyone already made adjusments? Want to spare me the time to figure them out by myself.

Also one big question:
Earlier in this thread, bobo1on1 wrote that boblight 1.31b is not working with his XBMC addon but the boblightd in quixand thread is working like a charm. Did I miss anything?
Hey Memphiz, is there any way to add a setting for hardcoded widescreen movies so that the top and bottom lights get used when they get played in xbmc? I never bothered ripping movies without them, and thus, a vast majority of my movies have the hardcoded bars, and boblight only captures the left and right side, leaving the top and bottom dark.

I cringe at the idea of re-encoding TB's worth of my movie collection. LOL
(2012-11-22, 01:23)MrHenky Wrote: [ -> ]
(2012-11-20, 20:41)reaven Wrote: [ -> ]WOW, so many configuration and combination .

adalight, atmolight, lightpack, etc... combined with processing code, boblight, lightpack script, lightpack software, custom software, etc....

so far whats the benefits of one from the other?

right now am using adalight with processing its working ok but don't like the fact of processing running all the time and that there isn't too much to tuning like how to tune to fix the fact that some color dont match (it could be the power supply since i been having difficulty finding the correct PS, right know am using to test a computer PS i think is 5v 2A but dont know if is the correct rate as per the WS2801 datasheet it can take 6v, but is running ok.

what i want to know is whats the benefits of trying to add boblight to my mix (ws2801 strip 150 leds, arduino uno R3, adalight code(ledstream.pde) )

*also am on MAC

If you can't get boblight working, you might go for lightpack. Processing is the worst solution and it's blowing up your java process. I have experienced that on Windows.

(2012-11-21, 21:05)quixand Wrote: [ -> ]
Code:
red adjustments:
gamma - 2.0
adjust - 0.65

green adjustments:
gamma - 2.0
adjust - 1.0

blue adjustments:
gamma - 2.1
adjust - 0.7
Above are adjustments for the colors of the LEDs if they are based on LPD6803 chip. I have WS8201 based LEDs. Did anyone already made adjusments? Want to spare me the time to figure them out by myself.

Also one big question:
Earlier in this thread, bobo1on1 wrote that boblight 1.31b is not working with his XBMC addon but the boblightd in quixand thread is working like a charm. Did I miss anything?

Mr. Henky, first of all, those color adjustments are for WS8201 LEDs. Not the LPD6803. They MAY work for the LPD6803's, but I have NO idea if they do. LOL

As for boblight 1.31b, it doesn't work. If you look at the files in my tutorial, you'll see that I call the 1.31b version of boblightd in the batch to open the communication to the serial device. Then I kill it, and relaunch an earlier version to do the communication with the boblight add-on inside Xbmc. I can't recall what compile version it was, but it was an earlier working version. So what is running in my tutorial "technically" isn't 1.31b, I just use it to open communication with the arduino.
@quixand - yes - just specify the activate part in your boblightd.conf

from the boblight wiki:

Code:
Specifies the horizontal scanrange for this light, this setting is optional, the default is 0.0 100.0
This setting only has an effect for clients that react to an image like boblight-X11 and boblight-v4l. The syntax is hscan begin end.
Begin and end specify the percentage of the horizontal range the light should react to. Example: hscan 0.0 50.0
•vscan
Specifies the vertical scanrange for this light, same as hscan.

So for the vscan instead of using 0-50 for top and 50-100 for bottom - go with 10-50 for top and 50-90 for bottom (this ignores the upper and lower 10% of video lines).
@Memphiz
Since your pretty active last days i'll ask it again since you could have missed my question Wink

Some time ago i asked if it was possible to modify XBMC Boblight to enable/disable Boblight with a single button on my remote, the answer was no.
But i was thinking maybe it's possible with a python script that changes a specific value or enable/disables addon , do you think such is possible?
(2012-11-22, 00:48)Memphiz Wrote: [ -> ]raptorjr. And.i tell you that the addon doesn't ignore the settings in the boblight.conf (its not able to ignore it even if it wanted to). Both settings play a role in boblight configuration. In boblight.conf you tweak each color for fitting to the attached leds/hardware. Boblight addon is only able to tweak options which apply to all channels (saturation, treshhold and so on). Thats limited/intended by the client / server design of the whole boblight construct.

And thats why the defaults CAN'T be made more generic then they are. Because everyone can diddle in the boblight.conf as he wants and turning the defaults into crap.

TBH thats what you did...

I don't really understand how you can say that? As my pictures show, when everything is set to default values it looks bad. How can that be my fault?
The changes that i made to boblight.conf afterwards made boblight-X11 look good, XBMC addon still looked bad with fast/slow preset. That was when i first tried to get help.

Sure, you can say it is not possible to make good default values in XBMC addon depending on different LED hardware, then you should remove the fast/slow presets, it makes the user think it is good default values. If you really should have some presets in XBMC addon, the values in that presets should be so neutral that they in no way interfere with the boblight.conf settings. So if things look bad you can refer to that the user has messed up boblight.conf. Now the presets totally mess up anything you try to change in boblight.conf. Even though it don't touch the same settings, the result looks like it does. No matter what i changed in boblight.conf the effect was minimal to the output when i thought that the presets was a decent way to start with. As can be seen in my pictures also.

So my suggestion would be if you want to have presets in the XBMC addon, don't let those settings in any way affect the colors. The presets colors should entirely rely on boblight.conf.(unless the presets have names like bright/dark/vivid or something) The presets can control other things, like the speed that don't affect the colors. And since the name of the presets is fast/slow that wouldn't be a bad start. Then when the user has that working, they can go to custom and adjust the other values.

But i guess it doesn't really matter what i say. In some way we got a bad start(probably my fault) and you probably won't listen to what i have to say looking at things from a user perspective. But that is okay, it works for me now, and if someone else have the same problem as i have at least they can find this thread and a solution.