Skip to content

jshea2/OSC-for-WLED

Repository files navigation

osc for wled

OSC for WLED

Convert OSC Commands to the WLED JSON API

Screenshot 2022-12-27 at 2 16 52 AM

oscforwled-v3.mp4

Features:

  • Single OSC message supports muliple arguments (v1.0.0)
  • Bundle OSC messages are NOT supported (v1.0.0)
  • You can send OSC to different wled devices concurrently - However, sending multiple OSC commands simultaneously to the same device is NOT recommended. - Try delaying OSC messages apart by 200ms

OSC Commands:

OSC Message Syntax:

/wled/[device-ip]/[state] [value]

Nested Segments Syntax:

/wled/[device-ip]/seg/[seg-state] [value]

Reference JSON Key and Value Range API for state and value

Examples:

/on

/wled/192.168.99.64/on true

  • Toggles wled device on/off

/bri

/wled/192.168.99.64/bri 255

  • Turn wled device brightness to full

/ps

/wled/192.168.99.64/ps 4

  • Trigger preset 4 on wled device

Reference JSON Segment Key and Value Range API for seg-state and value

Examples:

/seg/sx

/wled/192.168.99.64/seg/sx 255

  • Change relative effect speed slider to full on wled device

/seg/ix

/wled/192.168.99.64/seg/ix 128

  • Change effect intensity slider to half on wled device

/seg/fx

/wled/192.168.99.64/seg/fx 7

  • Trigger effect 7 on wled device

Custom OSC Commands:

/rgb

/wled/[device-ip]/rgb [red 0-255] [green 0-255] [blue 0-255]

  • Set Color by RGB Values
  • example: /wled/192.168.99.64/rgb 255 0 128
    • This changes the wled device to purple

/info /wled/[device-ip]/info

  • Logs the wled devices info, effects, palettes, and presets to the dev console
  • example: /wled/192.168.99.64/info

OSC to JSON Example:

OSC Message: /wled/192.168.99.64/seg/fx 1

JSON Message to 192.168.99.64:

{
  seg: {
    fx: 1
  }
}

TouchDesigner Alternative

Screenshot 2024-10-15 at 5 28 12 PM

This TouchDesigner project listens for OSC messages using an OSC IN operator. When the OSC message with the address /wled/1 is received, it triggers a Web Client operator, which sends an HTTP GET request to activate the presets on the WLED device.

Credits:

Powered by npm wled-client & node-osc

Support The Project ❤️

If OSC for WLED helped you, consider helping the project by making a one time donation via PayPal

Join the Discord Community

chat on Discord