hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.11k stars 384 forks source link

Blue-red color switched on grabber #517

Closed eerozeteen closed 6 years ago

eerozeteen commented 6 years ago

Hi, Im using hyperion with 2 different sources. One ("normal") with osmc, and second source with grabber and hdmi2av. unfortunately i have hdmi2av with "rainbow issue" so i had to use hyperion.ng branch with tweak to use it. But i have strange issue: when i use my hdmi input with grabber, red color on screen cause blue leds color and vice-versa. Green color are ok. With "normal" mode (source as osmc play) colors are ok. What should I do?

Here is my config (i remove "// LED CONFIGURATION")

{ // DEVICE CONFIGURATION "device" : { "name" : "MyHyperionConfig", "type" : "adalight", "output" : "/dev/ttyUSB0", "rate" : 500000, "delayAfterConnect" : 0, "colorOrder" : "grb" },

// COLOR CALIBRATION CONFIG "color" : { "channelAdjustment" : [ { "id" : "default", "leds" : "", "pureRed" : { "redChannel" : 255, "greenChannel" : 0, "blueChannel" : 0 }, "pureGreen" : { "redChannel" : 0, "greenChannel" : 255, "blueChannel" : 0 }, "pureBlue" : { "redChannel" : 0, "greenChannel" : 0, "blueChannel" : 255 } } ], "temperature" : [ { "id" : "default", "leds" : "", "correctionValues" : { "red" : 255, "green" : 255, "blue" : 255 } } ], "transform" : [ { "id" : "default", "leds" : "*", "hsl" : { "saturationGain" : 1.0000, "luminanceGain" : 1.0000, "luminanceMinimum" : 0.0000 }, "red" : { "threshold" : 0.0000, "gamma" : 2.5000 }, "green" : { "threshold" : 0.0000, "gamma" : 2.5000 }, "blue" : { "threshold" : 0.0000, "gamma" : 2.5000 } } ], // SMOOTHING CONFIG "smoothing" : { "type" : "linear", "time_ms" : 200, "updateFrequency" : 20.0000, "updateDelay" : 0 } },

// V4L2 GRABBER CONFIG

"grabber-v4l2" : { "device" : "/dev/video0", "input" : 0, "standard" : "PAL", "width" : 360, "height" : 240, "frameDecimation" : 2, "sizeDecimation" : 8, "priority" : 900, "mode" : "2D", "cropLeft" : 0, "cropRight" : 0, "cropTop" : 0, "cropBottom" : 0, "redSignalThreshold" : 1.0, "greenSignalThreshold" : 0.1, "blueSignalThreshold" : 0.1, "signalDetectionVerticalOffsetMin" : 0.65, "signalDetectionHorizontalOffsetMin" : 0.65, "signalDetectionVerticalOffsetMax" : 0.75, "signalDetectionHorizontalOffsetMax" : 0.70 },

// FRAME GRABBER CONFIG "framegrabber" : { "width" : 64, "height" : 64, "frequency_Hz" : 10.0, "priority" : 890 },

// BLACKBORDER CONFIG "blackborderdetector" : { "enable" : true, "threshold" : 0.0, "unknownFrameCnt" : 600, "borderFrameCnt" : 50, "maxInconsistentCnt" : 10, "blurRemoveCnt" : 1, "mode" : "default" },

// KODI CHECK CONFIG "xbmcVideoChecker" : { "xbmcAddress" : "127.0.0.1", "xbmcTcpPort" : 9090, "grabVideo" : true, "grabPictures" : true, "grabAudio" : true, "grabMenu" : false, "grabPause" : false, "grabScreensaver" : true, "enable3DDetection" : true },

// BOOTEFFECT CONFIG "bootsequence" : { "color" : [0,0,0], "effect" : "Rainbow swirl fast", "duration_ms" : 4000, "priority" : 700 },

// JSON SERVER CONFIG "jsonServer" : { "port" : 19444 },

// PROTO SERVER CONFIG "protoServer" : { "port" : 19445 },

// EFFECT PATH "effects" : { "paths" : [ "/storage/hyperion/effects", "/usr/share/hyperion/effects" ] },

// NO BOBLIGHT SERVER CONFIG // NO JSON/PROTO FORWARD CONFIG

"endOfJson" : "endOfJson" } `

Paulchen-Panther commented 6 years ago

I see that you use Adalight in your configuration. Which LEDs do you use? Have you ever tried using a different ColorOrder?

eerozeteen commented 6 years ago

Yes, i used arduino mini with adalight emulation. When i use osmc i need a grb order to work normal. Now i make some research, and when i change it to "gbr" grabber input works ok, by i have mess on osmc input. So there is some problem with color order.

The best solution will be opportunity to change color order on source use. I dont know if it can be done on working services, but if there is a way to detect which hyperion use now source, i can restart services with proper config of source.

Paulchen-Panther commented 6 years ago

have you an switch on your hdmi2av converter to switch between pal and ntsc?

eerozeteen commented 6 years ago

yes, but it works only on PAL. With ntsc i have only green leds behind TV, with no changes.

Paulchen-Panther commented 6 years ago

is the problem with the hdmi2av converter with the classic version of hyperion too? Do you have to change to grb?

eerozeteen commented 6 years ago

for second question - yes, i used ambilight for 2 years with standard hyperion and only osmc, and have to set grb for it. I dont remember about standard hyperion and grabber output - i will check it today.

Paulchen-Panther commented 6 years ago

If you already used hyperion 2 years ago and had to switch to grb instead of rgb, we assume that your led strip is grb. Did you change anything on Adalight Sketch?

edit: Can you give me the output of 'v4l2-ctl --all' ? edit2: hyperion.ng has a live view in the web browser. can you make a screenshot if the input is v4l2 and the ColorOrder is set to grb (OSMC)?

eerozeteen commented 6 years ago

I set up it a long time ago, but here is my sketch:

https://pastebin.com/DMEa9W2Y

i have tested normal build of hyperion, and GRB order is ok with both sources (osmc and grabber). So maybe there is some mess with ng build that change somewhere colors (red and blue).

eerozeteen commented 6 years ago

it is very strange... i used hypercon to remove ng version, and install normal hyperion. and now i see that my hdmi2av (or now ambilight) didnt show rainbow issue... is it possible that normal version of hyperion have implemented these lines(in config) for grabber?

"signalDetectionVerticalOffsetMin" : 0.65,
"signalDetectionHorizontalOffsetMin" : 0.65,
"signalDetectionVerticalOffsetMax" : 0.75,
"signalDetectionHorizontalOffsetMax" : 0.70 
Paulchen-Panther commented 6 years ago

it is very strange... i used hypercon to remove ng version, and install normal hyperion. and now i see that my hdmi2av (or now ambilight) didnt show rainbow issue... is it possible that normal version of hyperion have implemented these lines(in config) for grabber?

"signalDetectionVerticalOffsetMin" : 0.65,
"signalDetectionHorizontalOffsetMin" : 0.65,
"signalDetectionVerticalOffsetMax" : 0.75,
"signalDetectionHorizontalOffsetMax" : 0.70 

No

eerozeteen commented 6 years ago

so i dont know why is it working... no all source working on one color order, and i havent "rainbow" issue on no signal (leds didnt light when TV is off)... but i have (or maybe i do nice mess on raspberry pi) only normal hyperion version... so no its working as should... very thanks for your assist @Paulchen-Panther . Regards