• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 12
[LINUX] HOW-TO get AmbX with X11 working using Boblight and CombustD
#16
Code:
boblight-X11 1.3

Usage: boblight-x11 [OPTION]
Start the X11 grabber for boblight

  -s    set the saturation
  -v    set the value
  -i    set the interpolation, use "-i on" or "-i off"
  -a    set the proportional
  -p    set the priority, default is 128
  -t    set the timer interval, default is 0.5 second,
  -u    set the lights to use, comma separated list
  -e    set the server address[:port]
  -g    grab n pixels on n lines
        default is 100 for XShmGetImage and 16 for XGetImage
  -m    grab method, use "-m average" or "-m median"
  -x    use XGetImage instead of XShmGetImage (slow!)
  -b    set the black threshold

You need the -t and -a flags.
Reply
#17
Awesome, thanks, i'm using
Code:
boblight-X11 -s 10 -t 0.03 -a 20
which seems to be working really well, not sure how well it would work without VDPAU though, the CPU goes up to max 56% with -t 0.03, though -t 0.1 it only goes up to around a max of 22% and still seems responsive enough (from 5-10% without the -t option), but thats fine for me as VDPAU is doing the video decoding.
Reply
#18
Code:
boblight-X11 -s 10 -t 0.1 -a 20

Is what I'm running right now. With a -t value lower than 0.1 my lights start to flicker when I'm in the xbmc movie database (I think it's caused of the scrolling text).

Anyway, the improvement in reaction speed was dramatic using this command. Thanks bobo1on1!
Reply
#19
And another thing I noted:

When starting the boblightd daemon I get the following output:

Code:
xbmc@macmini:~$ sudo boblightd
Nr of devices: 1
Nr of lights: 1
Nr of colors: 3

But the Ambx has 3 lights instead of 1. Is this correct?
Reply
#20
I have been running boblight+combustd for a while now with Boxee. Works perfectly. I have also modified some files to allow the light to works seperately from each other.

My boblight.conf
Code:
[global]
interface 127.0.0.1
port 19333

[device]
name AmbX_Combust
output "ruby /usr/local/combustd/applications/boblight/boblight.rb"
channels 15
type popen
interval 20000

[color]
name red
rgb FF0000

[color]
name green
rgb 00FF00

[color]
name blue
rgb 0000FF

[light]
name left
color red AmbX_Combust 1
color green AmbX_Combust 2
color blue AmbX_Combust 3
hscan 0 50
vscan 25 100

[light]
name right
color red AmbX_Combust 4
color green AmbX_Combust 5
color blue AmbX_Combust 6
hscan 50 100
vscan 25 100

[light]
name wwleft
color red AmbX_Combust 7
color green AmbX_Combust 8
color blue AmbX_Combust 9
hscan 0 50
vscan 0 40

[light]
name wwright
color red AmbX_Combust 10
color green AmbX_Combust 11
color blue AmbX_Combust 12
hscan 50 100
vscan 0 40

[light]
name wwcenter
color red AmbX_Combust 13
color green AmbX_Combust 14
color blue AmbX_Combust 15
hscan 33 66
vscan 0 50

And boblight.rb
Code:
REQUIREMENTS = File.dirname(__FILE__)

require REQUIREMENTS + "/../../libcombustd/libcombustd"

puts "\nboblight - a small tool to listen to the output of boblight popen to control a set of Philips Ambx lights.\n"
puts "See README and docs/ for faq, usage and support.\n\n"
puts "Looking for support ?\nChat: irc.oceanius.com #dev\nMail: [email protected]\n\n"

if Ambx.connect
  if Ambx.open
      while true
    r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4, r5, g5, b5 = gets.split(" ",15)
          Ambx.write([0xA1, Lights::LEFT, 0x03, Float(r1)*255, Float(g1)*255, Float(b1)*255])
          Ambx.write([0xA1, Lights::RIGHT, 0x03, Float(r2)*255, Float(g2)*255, Float(b2)*255])
          Ambx.write([0xA1, Lights::WWLEFT, 0x03, Float(r3)*255, Float(g3)*255, Float(b3)*255])
          Ambx.write([0xA1, Lights::WWRIGHT, 0x03, Float(r4)*255, Float(g4)*255, Float(b4)*255])
          Ambx.write([0xA1, Lights::WWCENTER, 0x03, Float(r5)*255, Float(g5)*255, Float(b5)*255])
      end
      Ambx.close
  else
    puts "Unable to open the discovered device"
  end
else
  puts "Unable to find a ambx device"
end

Hope this helps somebody.
Reply
#21
Wow, this is getting better and better. Thanks for the modifications jaaps. I'm going to try them out asap and report back here.

There are way more people using ambx than I thought.
Reply
#22
You may have to mod the hscan and vscan values a bit to your liking. I tried lot of different values but I find these the best for my setup.

Ambx has 5 lights by the way. Left and Right light and the wallwasher has 3 lights.
Reply
#23
I noticed the 5 lights when starting boblightd and wondered a bit, thanks for the explanation.

How COOL is that?! The lights really react independent to each other and it looks so sweet. Many many thanks jaaps.
Reply
#24
jaaps, thats freaking awesome, thanks so much for that! last line of boblight.rb should be end though shouldn't it, yours just says en, anyway, thanks again Smile
Reply
#25
Kode Wrote:jaaps, thats freaking awesome, thanks so much for that! lastlight of boblight.rb should be end though shouldn't it, yours just says en, anyway, thanks again Smile

Hehe, went wrong with copy/paste. I changed it, thanks!
Reply
#26
jaaps Wrote:You may have to mod the hscan and vscan values a bit to your liking. I tried lot of different values but I find these the best for my setup.

what do the lines actually mean? I'm guessing % so left gets its value from 0 to 50% of the screen and right from 50 to 100%, so vertically do those values mean it gets it from the top three quarters or the bottom three quarters (vscan 25 100)? I have my side light on my speakers so the bottom of where the light part starts is about half way up (picture below), where are yours in relation? And do you think i would need to change the vscan lines for my setup?

Image

Image

Image
Reply
#27
Its all a matter of personal taste.
The top of my side lights start at about 1/4 from the TV (from top to bottom). So colors that are in the top corner don't show at the side lights but colors below that do. I like it that way but maybe others like more something like 0-50% horizontal and 0-100% vertical. Just try some different values and pick the one you like the most.
Reply
#28
Ok so from looking at your reply, i take it 0 is the top and 100 is the bottom, and as mine is closer to the top something like 0 - 75 might be better for me.

For example, if you look at the left light in the 3rd pic, it appears to be using the bottom three quarters to get the color, so it goes with orange, but its actually located closer to the top three quarters, so blue would probably have been more appropriate
Reply
#29
Maybe I should get one of these ambx sets and add native support in boblight for it.
Reply
#30
bobo1on1 Wrote:Maybe I should get one of these ambx sets and add native support in boblight for it.

They're utterly cheap now. I got my starterkit for 25 Euros! Native support would rock! Though it already works nicely using jaaps configs. Smile
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 12

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO get AmbX with X11 working using Boblight and CombustD0