Wled: Single LED color via API support

Created on 21 Sep 2019  路  7Comments  路  Source: Aircoookie/WLED

Would it be possible to add the ability to set the color of a certain LED(s) via MQTT or HTTP API? This is something I feel could be extremely useful for home automation folks

enhancement

Most helpful comment

Done! https://github.com/Aircoookie/WLED/wiki/JSON-API#per-segment-individual-led-control

All 7 comments

This should be doable in 0.9.0 with segment support, you can look at the JSON-API wiki for additional details. I think the idea is to allow 16 or 32 segments, possibly depending on hardware. Or you could use one of the real-time controls to facilitate this now with control over every LED. The number of max LEDs supported depends on the protocol selected, with DNRGB supporting the largest number by splitting control into multiple packets.

Of course segment support will be a perfect fit for this, but since the number of segments will be limited to at most 32 (for memory and performance reasons), it would be nice to have a solution for larger installations.

A potential idea would be adding support for JSON commands like:

{
    "seg": [{
        "single": [
            [255, 0, 0],
            [0, 255, 0],
            [0, 0, 255],
            [255, 255, 255]
        ]
    }]
}

amd with specifying the LED index:

{
    "seg": [{
        "single": {
            "0": [255, 0, 0],
            "52": [0, 255, 120]
        }
    }]
}

It would be of limited use to home automation though because it would be impossible to retrieve the values again. For that, segments are better suited.

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!

I would also love this feature! Any news on this?

Recently got reminded by another user as well! Time to add this soon :)

Done! https://github.com/Aircoookie/WLED/wiki/JSON-API#per-segment-individual-led-control

It seems that the JSON structure hat changed meanwhile? Trying the examples on the linked API-Page i'm not able to set a single LED via curl and the JSON API. Maybe you could post a working example (with curl)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoshWobbles picture JoshWobbles  路  3Comments

djhampson picture djhampson  路  3Comments

PKCubed picture PKCubed  路  4Comments

Brausmith picture Brausmith  路  4Comments

Aircoookie picture Aircoookie  路  4Comments