Giter Club home page Giter Club logo

Comments (15)

noproto avatar noproto commented on June 5, 2024

Hey. I have the exact same issue as you with the same RAM. This doesn't look like an issue in openrgb-python, but OpenRGB itself. I can also get it to work just like you -- by enumerating each one individually (like for i in {0..7}; do ./OpenRGB.AppImage -d $i -c FFFFFF -m 'Direct'; done). Quite a mystery.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

Huh that is indeed odd. Maybe I'll have to post about this in the OpenRGB discord or in git labs. Hoping Jath03 has some insight as well.

from openrgb-python.

jath03 avatar jath03 commented on June 5, 2024

I agree with @noproto that this issue with not setting all of the LEDs seems like a problem with OpenRGB itself. In the OpenRGB GUI, does clicking the "Device" button have the same effect?

Also, since you asked about examples, I am currently writing some actual documentation, which should get pushed within a few days.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

When I use the OpenRGB interface itself it seems to work as expected. My main reason for even messing with the python script was to be able to do a "set all to x color", something that isn't possible in openRGB right now. The idea was that eventually if I could change all the colors at once I could work my way to synchronized effects that aren't possible with RGB fusion (slower breathing effect, cycling between two colors, changing the color every hour, etc).

Great news about the examples though. I'll be looking out for those.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

I should also add that the color cycle script seems to work just fine but if I attempt to use the color setting line of code outside of a loop it does the same thing.

from openrgb-python.

jath03 avatar jath03 commented on June 5, 2024

Well, the only difference between the two situations should be the fast argument. Try adding fast=True to your set_color calls. I have no idea why that would make a difference, but it's something to try. What do you mean setting all isn't possible in OpenRGB? What about the "Set All Devices" button?

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

Ah that was a mistake on my part, I meant setting and syncing effects across all devices. The "set all devices" works well for a single color but does not work if you want to synchronize all the devices to a specific effect.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

I also added fast=true but it still skipped the first LED on the RAM. Using set all devices does set them appropriately, however.

from openrgb-python.

jath03 avatar jath03 commented on June 5, 2024

Check if everything looks right in memory_module_x.leds (right number of leds... ) and if not, paste the output of print(memory_module_x.data)

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

It appears to be detecting 8 LED's which should be correct. Also the amount of LED's that don't work is random. Sometimes it's two sometimes it's one. If i run the command several times in a row it just randomly switches between the two. Here is a printout of the memory_module_x.data. It was one super long string so I did some basic formating:

ControllerData(
name='ASUS Aura DRAM', 
metadata=MetaData(
      description='ASUS Aura SMBus Device', 
      version='AUDA0-E6K5-0101', serial='', 
      location='AMD SMBus at 0x0B00, 
      address 0x3B'), 
device_type=<DeviceType.DEVICE_TYPE_DRAM: 1>,
               
leds=[
      LEDData(name='Unknown LED 1', value=0),
      LEDData(name='Unknown LED 2', value=1),
      LEDData(name='Unknown LED 3', value=2),
      LEDData(name='Unknown LED 4', value=3),
      LEDData(name='Unknown LED 5', value=4),
      LEDData(name='Unknown LED 6', value=5),
      LEDData(name='Unknown LED 7', value=6),
      LEDData(name='Unknown LED 8', value=7)
      ],
zones=[
    ZoneData(name='Unknown', zone_type=<ZoneType.ZONE_TYPE_LINEAR: 1>,
        leds_min=8,
        leds_max=8,
        num_leds=8,
        mat_height=0,
        mat_width=0,
        matrix_map=[[]],
        leds=[
            LEDData(name='Unknown LED 1', value=0),
            LEDData(name='Unknown LED 2', value=1),
            LEDData(name='Unknown LED 3', value=2),
            LEDData(name='Unknown LED 4', value=3),
            LEDData(name='Unknown LED 5', value=4),
            LEDData(name='Unknown LED 6', value=5),
            LEDData(name='Unknown LED 7', value=6),
            LEDData(name='Unknown LED 8', value=7)
            ],
        colors=[
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0),
            RGBColor(red=0, green=0, blue=0)
            ],
        start_idx=0)
        ],
modes=[
    ModeData(
        id=0,
        name='Direct',
        value=65535,
        flags=<ModeFlags.MODE_FLAG_HAS_PER_LED_COLOR: 32>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=1,
        name='Off',
        value=0,
        flags=<ModeFlags.0: 0>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_NONE: 0>,
        colors=[]),
    ModeData(
        id=2,
        name='Static',
        value=1,
        flags=<ModeFlags.MODE_FLAG_HAS_PER_LED_COLOR: 32>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=3,
        name='Breathing',
        value=2,
        flags=<ModeFlags.MODE_FLAG_HAS_RANDOM_COLOR|MODE_FLAG_HAS_PER_LED_COLOR: 160>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=4,
        name='Flashing',
        value=3,
        flags=<ModeFlags.MODE_FLAG_HAS_PER_LED_COLOR: 32>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=5,
        name='Spectrum Cycle',
        value=4,
        flags=<ModeFlags.0: 0>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_NONE: 0>,
        colors=[]),
    ModeData(
        id=6,
        name='Rainbow',
        value=5,
        flags=<ModeFlags.0: 0>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_NONE: 0>,
        colors=[]),
    ModeData(
        id=7,
        name='Chase Fade',
        value=7,
        flags=<ModeFlags.MODE_FLAG_HAS_RANDOM_COLOR|MODE_FLAG_HAS_PER_LED_COLOR: 160>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=8,
        name='Chase',
        value=9,
        flags=<ModeFlags.MODE_FLAG_HAS_RANDOM_COLOR|MODE_FLAG_HAS_PER_LED_COLOR: 160>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_PER_LED: 1>,
        colors=[]),
    ModeData(
        id=9,
        name='Random Flicker',
        value=13,
        flags=<ModeFlags.0: 0>,
        speed_min=None,
        speed_max=None,
        colors_min=None,
        colors_max=None,
        speed=None,
        direction=None,
        color_mode=<ModeColors.MODE_COLORS_NONE: 0>,
        colors=[])],
    colors=[
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0),
        RGBColor(red=0, green=0, blue=0)],
active_mode=0)

Everything seems correct and it does appear to function correctly so long as I use OpenRGB to set a static color. Using the python script causes it to skip 1 LED in Module 0 and 2 LEDs on module 1.

from openrgb-python.

jath03 avatar jath03 commented on June 5, 2024

TBH, I have no idea what the issue could be on the python client side. At this point, I'd recommend trying bahorn's python client just to see if you can replicate the behavior there. If the issue happens there too, then it is definitely a problem with OpenRGB itself.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

The plot thickens ... If I use a while loop ... it works fine.

So this:

while True:
    motherboard.set_color(RGBColor(155, 25, 40))
    memory_module_0.set_color(RGBColor(155, 25, 40))
    memory_module_1.set_color(RGBColor(155, 25, 40))
    sleep(.7)
    motherboard.set_color(RGBColor(0, 25, 40))
    memory_module_0.set_color(RGBColor(0, 25, 40))
    memory_module_1.set_color(RGBColor(0, 25, 40))
    sleep(.7)

Appears to work correctly

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

Also Rube Goldberg-ian logic like this works too:

latch = 0

while latch < 5:
    memory_module_0.set_color(RGBColor(155, 25, 40))
    memory_module_1.set_color(RGBColor(155, 25, 40))
    latch = latch + 1
    print(latch)
    sleep(.005)

It seems that it needs some time to pass before exiting the script for it to set correctly. If I decrease sleep time to 0.00005 for instance ... it goes back to skipping LED's. Does that make any sense? All of your examples appear to be loops of some kind. Can you test with just a singular command?

from openrgb-python.

jath03 avatar jath03 commented on June 5, 2024

Well, after some testing, I replicated your problem, and am a little confused. A fix is to remove the client.clear call at the beginning of the or just put a short sleep (roughly >=.02) after the client.clear call, but I'll need to investigate further to find the bug. I was doing all of my testing on the python console, so I didn't notice this sooner.

from openrgb-python.

juerujin avatar juerujin commented on June 5, 2024

Hey! That worked! Honestly, that's a far more elegant fix that what I came up with and it works alright. I guess I can close this issue for now since it pretty much solves the problem I was having. Thanks for looking into it!

from openrgb-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.