2016-01-22, 12:27
Should work if I understood koying correctly.
But I can't get boblightd to work for me
http://xbmclogs.com/pzqvxl8pw
But I can't get boblightd to work for me
http://xbmclogs.com/pzqvxl8pw
Kodi Boblight] - connection to boblightd failed: SO_ERROR 127.0.0.1:19333 Connection refused
(2016-01-22, 16:15)Memphiz Wrote:- you know about boblightd and stuff like that? ^^Code:Kodi Boblight] - connection to boblightd failed: SO_ERROR 127.0.0.1:19333 Connection refused
(2013-01-31, 16:51)F0x123 Wrote: I thought as no HD content is stuttering without boblight that the Radeon HD 6310 is fast enough and the boblight calculation is done by the CPU.
(2013-01-31, 18:03)Memphiz Wrote: The problem is shrinking and grabbing the frames from the GPU - this stalls to gl/les pipeline and makes it stutter (at least on low power gpu.
(2016-01-23, 16:08)Memphiz Wrote: that is libboblight which is the client part (and as of your log was loaded fine already) - but you also need a boblightd (daemon/server) running in your network somewhere (it must be where the leds are physically connected to)...
Only openelec provides a boblightd addon afaik - but thats oe specific. Normally installing and configuring boblightd is in the scope of the admin...
Reading my first post again i have this topic covered and made it clear that the addon is only the client...
Quote:For this addon to be working you need a library for communicating with the boblightd - daemon. It should get automagically downloaded for you on the first run of the addon for Windows and OSX.
(2016-01-23, 21:52)cirkator Wrote: Hi, I have another question. Since i installed Boblight i experience stuttering and skipping when watching HD material. That was not the case before i used boblight. That led me to this post by memphiz:
(2013-01-31, 16:51)F0x123 Wrote: I thought as no HD content is stuttering without boblight that the Radeon HD 6310 is fast enough and the boblight calculation is done by the CPU.
(2013-01-31, 18:03)Memphiz Wrote: The problem is shrinking and grabbing the frames from the GPU - this stalls to gl/les pipeline and makes it stutter (at least on low power gpu.
My hardware is an AMD A6-3500 APU with a built-in Radeon HD 6530D.
Enough GPU power for smooth playback, but apparently not enough for playback and frame grabbing by boblight.
My question now is, what GPU Card is recommended for running boblight?
Which cards are the minimum? Any special recommendations? Should be futureproof if possible.
I want to stay on Linux, if that matters for the decision.
Thanks in advance!
// Arduino "bridge" code between host computer and WS2801-based digital
// RGB LED pixels (e.g. Adafruit product ID #322). Intended for use
// with USB-native boards such as Teensy or Adafruit 32u4 Breakout;
// works on normal serial Arduinos, but throughput is severely limited.
// LED data is streamed, not buffered, making this suitable for larger
// installations (e.g. video wall, etc.) than could otherwise be held
// in the Arduino's limited RAM.
// Some effort is put into avoiding buffer underruns (where the output
// side becomes starved of data). The WS2801 latch protocol, being
// delay-based, could be inadvertently triggered if the USB bus or CPU
// is swamped with other tasks. This code buffers incoming serial data
// and introduces intentional pauses if there's a threat of the buffer
// draining prematurely. The cost of this complexity is somewhat
// reduced throughput, the gain is that most visual glitches are
// avoided (though ultimately a function of the load on the USB bus and
// host CPU, and out of our control).
// LED data and clock lines are connected to the Arduino's SPI output.
// On traditional Arduino boards, SPI data out is digital pin 11 and
// clock is digital pin 13. On both Teensy and the 32u4 Breakout,
// data out is pin B2, clock is B1. LEDs should be externally
// powered -- trying to run any more than just a few off the Arduino's
// 5V line is generally a Bad Idea. LED ground should also be
// connected to Arduino ground.
// --------------------------------------------------------------------
// This file is part of Adalight.
// Adalight is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
// Adalight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with Adalight. If not, see
// <http://www.gnu.org/licenses/>.
// --------------------------------------------------------------------
#include <SPI.h>
// LED pin for Adafruit 32u4 Breakout Board:
//#define LED_DDR DDRE
//#define LED_PORT PORTE
//#define LED_PIN _BV(PORTE6)
// LED pin for Teensy:
//#define LED_DDR DDRD
//#define LED_PORT PORTD
//#define LED_PIN _BV(PORTD6)
// LED pin for Arduino:
#define LED_DDR DDRB
#define LED_PORT PORTB
#define LED_PIN _BV(PORTB5)
// A 'magic word' (along with LED count & checksum) precedes each block
// of LED data; this assists the microcontroller in syncing up with the
// host-side software and properly issuing the latch (host I/O is
// likely buffered, making usleep() unreliable for latch). You may see
// an initial glitchy frame or two until the two come into alignment.
// The magic word can be whatever sequence you like, but each character
// should be unique, and frequent pixel values like 0 and 255 are
// avoided -- fewer false positives. The host software will need to
// generate a compatible header: immediately following the magic word
// are three bytes: a 16-bit count of the number of LEDs (high byte
// first) followed by a simple checksum value (high byte XOR low byte
// XOR 0x55). LED data follows, 3 bytes per LED, in order R, G, B,
// where 0 = off and 255 = max brightness.
static const uint8_t magic[] = {'A','d','a'};
#define MAGICSIZE sizeof(magic)
#define HEADERSIZE (MAGICSIZE + 3)
#define MODE_HEADER 0
#define MODE_HOLD 1
#define MODE_DATA 2
// If no serial data is received for a while, the LEDs are shut off
// automatically. This avoids the annoying "stuck pixel" look when
// quitting LED display programs on the host computer.
static const unsigned long serialTimeout = 15000; // 15 seconds
void setup()
{
// Dirty trick: the circular buffer for serial data is 256 bytes,
// and the "in" and "out" indices are unsigned 8-bit types -- this
// much simplifies the cases where in/out need to "wrap around" the
// beginning/end of the buffer. Otherwise there'd be a ton of bit-
// masking and/or conditional code every time one of these indices
// needs to change, slowing things down tremendously.
uint8_t
buffer[256],
indexIn = 0,
indexOut = 0,
mode = MODE_HEADER,
hi, lo, chk, i, spiFlag;
int16_t
bytesBuffered = 0,
hold = 0,
c;
int32_t
bytesRemaining;
unsigned long
startTime,
lastByteTime,
lastAckTime,
t;
LED_DDR |= LED_PIN; // Enable output for LED
LED_PORT &= ~LED_PIN; // LED off
Serial.begin(115200); // Teensy/32u4 disregards baud rate; is OK!
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV16); // 1 MHz max, else flicker
// Issue test pattern to LEDs on startup. This helps verify that
// wiring between the Arduino and LEDs is correct. Not knowing the
// actual number of LEDs connected, this sets all of them (well, up
// to the first 25,000, so as not to be TOO time consuming) to red,
// green, blue, then off. Once you're confident everything is working
// end-to-end, it's OK to comment this out and reprogram the Arduino.
uint8_t testcolor[] = { 0, 0, 0, 255, 0, 0 };
for(char n=3; n>=0; n--) {
for(c=0; c<25000; c++) {
for(i=0; i<3; i++) {
for(SPDR = testcolor[n + i]; !(SPSR & _BV(SPIF)); );
}
}
delay(1); // One millisecond pause = latch
}
Serial.print("Ada\n"); // Send ACK string to host
startTime = micros();
lastByteTime = lastAckTime = millis();
// loop() is avoided as even that small bit of function overhead
// has a measurable impact on this code's overall throughput.
for(;;) {
// Implementation is a simple finite-state machine.
// Regardless of mode, check for serial input each time:
t = millis();
if((bytesBuffered < 256) && ((c = Serial.read()) >= 0)) {
buffer[indexIn++] = c;
bytesBuffered++;
lastByteTime = lastAckTime = t; // Reset timeout counters
} else {
// No data received. If this persists, send an ACK packet
// to host once every second to alert it to our presence.
if((t - lastAckTime) > 1000) {
Serial.print("Ada\n"); // Send ACK string to host
lastAckTime = t; // Reset counter
}
// If no data received for an extended time, turn off all LEDs.
if((t - lastByteTime) > serialTimeout) {
for(c=0; c<32767; c++) {
for(SPDR=0; !(SPSR & _BV(SPIF)); );
}
delay(1); // One millisecond pause = latch
lastByteTime = t; // Reset counter
}
}
switch(mode) {
case MODE_HEADER:
// In header-seeking mode. Is there enough data to check?
if(bytesBuffered >= HEADERSIZE) {
// Indeed. Check for a 'magic word' match.
for(i=0; (i<MAGICSIZE) && (buffer[indexOut++] == magic[i++]););
if(i == MAGICSIZE) {
// Magic word matches. Now how about the checksum?
hi = buffer[indexOut++];
lo = buffer[indexOut++];
chk = buffer[indexOut++];
if(chk == (hi ^ lo ^ 0x55)) {
// Checksum looks valid. Get 16-bit LED count, add 1
// (# LEDs is always > 0) and multiply by 3 for R,G,B.
bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L);
bytesBuffered -= 3;
spiFlag = 0; // No data out yet
mode = MODE_HOLD; // Proceed to latch wait mode
} else {
// Checksum didn't match; search resumes after magic word.
indexOut -= 3; // Rewind
}
} // else no header match. Resume at first mismatched byte.
bytesBuffered -= i;
}
break;
case MODE_HOLD:
// Ostensibly "waiting for the latch from the prior frame
// to complete" mode, but may also revert to this mode when
// underrun prevention necessitates a delay.
if((micros() - startTime) < hold) break; // Still holding; keep buffering
// Latch/delay complete. Advance to data-issuing mode...
LED_PORT &= ~LED_PIN; // LED off
mode = MODE_DATA; // ...and fall through (no break):
case MODE_DATA:
while(spiFlag && !(SPSR & _BV(SPIF))); // Wait for prior byte
if(bytesRemaining > 0) {
if(bytesBuffered > 0) {
SPDR = buffer[indexOut++]; // Issue next byte
bytesBuffered--;
bytesRemaining--;
spiFlag = 1;
}
// If serial buffer is threatening to underrun, start
// introducing progressively longer pauses to allow more
// data to arrive (up to a point).
if((bytesBuffered < 32) && (bytesRemaining > bytesBuffered)) {
startTime = micros();
hold = 100 + (32 - bytesBuffered) * 10;
mode = MODE_HOLD;
}
} else {
// End of data -- issue latch:
startTime = micros();
hold = 1000; // Latch duration = 1000 uS
LED_PORT |= LED_PIN; // LED on
mode = MODE_HEADER; // Begin next header search
}
} // end switch
} // end for(;;)
}
void loop()
{
// Not used. See note in setup() function.
}
[global]
timeout 20
interface 127.0.0.1
port 19333
interpolation on
proportional 100.0
saturation 1.5
value 1.2
valuerange 0.0 1.0
use yes
method average
threshold 10
[device]
name ambilight
type atmo
output /dev/ttyACM0
rate 115200
channels 150
interval 20000
prefix 41 64 61 00 18 4D
[color]
name red
rgb FF0000
gamma 1.0
adjust 1.0
blacklevel 0.0
[color]
name green
rgb 00FF00
gamma 1.0
adjust 1.0
blacklevel 0.0
[color]
name blue
rgb 0000FF
gamma 1.0
adjust 1.0
blacklevel 0.0
[light]
name Right_9
color red ambilight 1
color green ambilight 2
color blue ambilight 3
hscan 85 100
vscan 88.88 100
[light]
name Right_8
color red ambilight 4
color green ambilight 5
color blue ambilight 6
hscan 85 100
vscan 77.77 88.88
[light]
name Right_7
color red ambilight 7
color green ambilight 8
color blue ambilight 9
hscan 85 100
vscan 66.66 77.77
[light]
name Right_6
color red ambilight 10
color green ambilight 11
color blue ambilight 12
hscan 85 100
vscan 55.55 66.66
[light]
name Right_5
color red ambilight 13
color green ambilight 14
color blue ambilight 15
hscan 85 100
vscan 44.44 55.55
[light]
name Right_4
color red ambilight 16
color green ambilight 17
color blue ambilight 18
hscan 85 100
vscan 33.33 44.44
[light]
name Right_3
color red ambilight 19
color green ambilight 20
color blue ambilight 21
hscan 85 100
vscan 22.22 33.33
[light]
name Right_2
color red ambilight 22
color green ambilight 23
color blue ambilight 24
hscan 85 100
vscan 11.11 22.22
[light]
name Right_1
color red ambilight 25
color green ambilight 26
color blue ambilight 27
hscan 85 100
vscan 0 11.11
[light]
name Top_16
color red ambilight 28
color green ambilight 29
color blue ambilight 30
hscan 93.75 100
vscan 0 15
[light]
name Top_15
color red ambilight 31
color green ambilight 32
color blue ambilight 33
hscan 87.5 93.75
vscan 0 15
[light]
name Top_14
color red ambilight 34
color green ambilight 35
color blue ambilight 36
hscan 81.25 87.5
vscan 0 15
[light]
name Top_13
color red ambilight 37
color green ambilight 38
color blue ambilight 39
hscan 75 81.25
vscan 0 15
[light]
name Top_12
color red ambilight 40
color green ambilight 41
color blue ambilight 42
hscan 68.75 75
vscan 0 15
[light]
name Top_11
color red ambilight 43
color green ambilight 44
color blue ambilight 45
hscan 62.5 68.75
vscan 0 15
[light]
name Top_10
color red ambilight 46
color green ambilight 47
color blue ambilight 48
hscan 56.25 62.5
vscan 0 15
[light]
name Top_9
color red ambilight 49
color green ambilight 50
color blue ambilight 51
hscan 50 56.25
vscan 0 15
[light]
name Top_8
color red ambilight 52
color green ambilight 53
color blue ambilight 54
hscan 43.75 50
vscan 0 15
[light]
name Top_7
color red ambilight 55
color green ambilight 56
color blue ambilight 57
hscan 37.5 43.75
vscan 0 15
[light]
name Top_6
color red ambilight 58
color green ambilight 59
color blue ambilight 60
hscan 31.25 37.5
vscan 0 15
[light]
name Top_5
color red ambilight 61
color green ambilight 62
color blue ambilight 63
hscan 25 31.25
vscan 0 15
[light]
name Top_4
color red ambilight 64
color green ambilight 65
color blue ambilight 66
hscan 18.75 25
vscan 0 15
[light]
name Top_3
color red ambilight 67
color green ambilight 68
color blue ambilight 69
hscan 12.5 18.75
vscan 0 15
[light]
name Top_2
color red ambilight 70
color green ambilight 71
color blue ambilight 72
hscan 6.25 12.5
vscan 0 15
[light]
name Top_1
color red ambilight 73
color green ambilight 74
color blue ambilight 75
hscan 0 6.25
vscan 0 15
[light]
name Left_1
color red ambilight 76
color green ambilight 77
color blue ambilight 78
hscan 0 15
vscan 0 11.11
[light]
name Left_2
color red ambilight 79
color green ambilight 80
color blue ambilight 81
hscan 0 15
vscan 11.11 22.22
[light]
name Left_3
color red ambilight 82
color green ambilight 83
color blue ambilight 84
hscan 0 15
vscan 22.22 33.33
[light]
name Left_4
color red ambilight 85
color green ambilight 86
color blue ambilight 87
hscan 0 15
vscan 33.33 44.44
[light]
name Left_5
color red ambilight 88
color green ambilight 89
color blue ambilight 90
hscan 0 15
vscan 44.44 55.55
[light]
name Left_6
color red ambilight 91
color green ambilight 92
color blue ambilight 93
hscan 0 15
vscan 55.55 66.66
[light]
name Left_7
color red ambilight 94
color green ambilight 95
color blue ambilight 96
hscan 0 15
vscan 66.66 77.77
[light]
name Left_8
color red ambilight 97
color green ambilight 98
color blue ambilight 99
hscan 0 15
vscan 77.77 88.88
[light]
name Left_9
color red ambilight 100
color green ambilight 101
color blue ambilight 102
hscan 0 15
vscan 88.88 100
[light]
name Bottom_1
color red ambilight 103
color green ambilight 104
color blue ambilight 105
hscan 0 6.25
vscan 0 15
[light]
name Bottom_2
color red ambilight 106
color green ambilight 107
color blue ambilight 108
hscan 6.25 12.5
vscan 0 15
[light]
name Bottom_3
color red ambilight 109
color green ambilight 110
color blue ambilight 111
hscan 12.5 18.75
vscan 0 15
[light]
name Bottom_4
color red ambilight 112
color green ambilight 113
color blue ambilight 114
hscan 18.75 25
vscan 0 15
[light]
name Bottom_5
color red ambilight 115
color green ambilight 116
color blue ambilight 117
hscan 25 31.25
vscan 0 15
[light]
name Bottom_6
color red ambilight 118
color green ambilight 119
color blue ambilight 120
hscan 31.25 37.5
vscan 0 15
[light]
name Bottom_7
color red ambilight 121
color green ambilight 122
color blue ambilight 123
hscan 37.5 43.75
vscan 0 15
[light]
name Bottom_8
color red ambilight 124
color green ambilight 125
color blue ambilight 126
hscan 43.75 50
vscan 0 15
[light]
name Bottom_9
color red ambilight 127
color green ambilight 128
color blue ambilight 129
hscan 50 56.25
vscan 0 15
[light]
name Bottom_10
color red ambilight 130
color green ambilight 131
color blue ambilight 132
hscan 56.25 62.5
vscan 0 15
[light]
name Bottom_11
color red ambilight 133
color green ambilight 134
color blue ambilight 135
hscan 62.5 68.75
vscan 0 15
[light]
name Bottom_12
color red ambilight 136
color green ambilight 137
color blue ambilight 138
hscan 68.7 75
vscan 0 15
[light]
name Bottom_13
color red ambilight 139
color green ambilight 140
color blue ambilight 141
hscan 75 81.25
vscan 0 15
[light]
name Bottom_14
color red ambilight 142
color green ambilight 143
color blue ambilight 144
hscan 81.25 87.5
vscan 0 15
[light]
name Bottom_15
color red ambilight 145
color green ambilight 146
color blue ambilight 147
hscan 87.5 93.75
vscan 0 15
[light]
name Bottom_16
color red ambilight 148
color green ambilight 149
color blue ambilight 150
hscan 93.75 100
vscan 0 15