๐โโ๏ธ WLED
An extension for MIT App Inventor 2.
Specifications
Package: io.th.wled
Size: 72.06 KB
Version: 1.0
Minimum API Level: 7
Updated On: 2025-07-13T18:30:00Z
Built & documented using: FAST v2.8.4
Download aix file on BuyMeCoffee Page.
Download aia/apk on GitHub
Multi-Components
WLED
This extension is developed by TechHamara using Fast.Extension to control WLED LED strips via HTTP API (Home ยท wled/WLED Wiki ยท GitHub) and WebSocket API (Home ยท wled/WLED Wiki ยท GitHub). It allows for seamless integration and control of WLED devices within the App Inventor environment, enabling users to create custom applications that interact with WLED LED strips.
Telegram | GitHub
BuyMeaCoffee | YouTube
Find More Extension
Terms & Conditions
Demo
YouTube Video
Blocks
WLED Documentation
Events:
WLED has total 7 events.
Response
Triggered when WLED returns a response.
Parameter | Type |
---|---|
response | text |
Error
Triggered when an error occurs.
Parameter | Type |
---|---|
error | text |
SyncResponse
Triggered when sync returns state.
Parameter | Type |
---|---|
response | text |
SyncError
Triggered when sync fails.
Parameter | Type |
---|---|
error | text |
InfoReceived
Triggered when WLED info JSON is received. Example: InfoReceived(info) receives WLED info JSON.
Parameter | Type |
---|---|
info | text |
Rebooted
Triggered when WLED device has rebooted.
ConnectionStatus
Triggered when connection test to WLED device completes.
Parameter | Type |
---|---|
connected | boolean |
message | text |
Methods:
WLED has total 21 methods.
Color
Set color. Provide R, G, B values (0-255).
Parameter | Type |
---|---|
r | number |
g | number |
b | number |
State
Fetch the current WLED JSON state.
ColorAndEffect
Quickly set color + effect + brightness
Parameter | Type |
---|---|
r | number |
g | number |
b | number |
fx | number |
bri | number |
SavePreset
Save current state to a preset. Example: SavePreset(1, 'MyPreset') saves current state to preset 1 with name 'MyPreset'.
Parameter | Type |
---|---|
presetId | number |
name | text |
ClearSegments
Clear all segments. Example: ClearSegments() clears all segments.
Segment
Set a segment with effect and color. Example: Segment(1, 0, 100, 1, 100, 100, [255, 0, 0]) sets segment 1 with effect 1, speed 100, intensity 100, and color [255, 0, 0].
Parameter | Type |
---|---|
id | number |
start | number |
stop | number |
fx | number |
speed | number |
intensity | number |
rgb | list |
Transition
Send transition effect with fade and segment JSON. Example: Transition(1000, '[{"id":1,"start":0,"stop":100,"col":[255,0,0]}]') sends a transition effect with fade of 1000ms and segment JSON.
Parameter | Type |
---|---|
fadeMillis | number |
jsonSegmentArray | text |
EnableAutoSync
Enable auto state sync. Example: EnableAutoSync(true, 5000) enables auto state sync with interval of 5000ms.
Parameter | Type |
---|---|
enable | boolean |
intervalMillis | number |
Toggle
Toggle WLED power state.
GetInfo
Fetch WLED info JSON. Fires OnInfoReceived event.
SegmentColor
Set color for a specific segment. Example: SegmentColor(1, 255, 0, 0) sets segment 1 to red.
Parameter | Type |
---|---|
segmentId | number |
r | number |
g | number |
b | number |
Reboot
Reboot the WLED device. Fires OnRebooted event. Example: Reboot() reboots the WLED device.
DefaultColor
Set default color for WLED. Example: DefaultColor(255, 0, 0) sets the default color to red.
Parameter | Type |
---|---|
r | number |
g | number |
b | number |
Preferences
Fetch current WLED preferences (state JSON).
Time
Get WLED device time.
UsermodeGPIO
Set usermode GPIO pin and mode. Example: UsermodeGPIO(1, 1) sets GPIO pin 1 to mode 1.
Parameter | Type |
---|---|
pin | number |
mode | number |
Playlist
Set the active playlist by ID. Example: SetPlaylist(1) activates playlist 1.
Parameter | Type |
---|---|
playlistId | number |
I2CPins
Set I2C SDA and SCL pins (requires WLED usermod that supports this API). Example: I2CPins(21, 22) sets SDA to GPIO 21 and SCL to GPIO 22.
Parameter | Type |
---|---|
sdaPin | number |
sclPin | number |
GetEffectsList
Returns a list of WLED effects with their IDs and names.
- Return type:
list
ShowWLED
Loads the WLED web interface inside a given arrangement using WebView (WLED must be running on the same network as the device and the IP address must be correct and running, otherwise the setup will not work).
Parameter | Type |
---|---|
arrangement | component |
wledIp | text |
ShowLivePreview
Show fast live WLED preview inside a given arrangement using optimized WebView (WLED must be running on the same network as the device and the IP address must be correct and running, otherwise the preview will not work).
Parameter | Type |
---|---|
arrangement | component |
wledIp | text |
Setters:
WLED has total 18 setter properties.
IP
Set the WLED IP address.
- Input type:
text
Power
Turn WLED on or off.
- Input type:
boolean
Brightness
Set brightness 0-255.
- Input type:
number
Effect
Set effect ID.
- Input type:
number
- Helper type:
EffectType
- Helper enums:
Solid
,Blink
,Breathe
,Wipe
,WipeRandom
,RandomColors
,Sweep
,Dynamic
,Colorloop
,Rainbow
,Scan
,DualScan
,Fade
,Chase
,ChaseRainbow
,Running
,Saw
,Twinkle
,Dissolve
,DissolveRnd
,Sparkle
,SparkleDark
,SparklePlus
,Strobe
,StrobeRainbow
,MultiStrobe
,BlinkRainbow
,ChaseWhite
,ChaseColor
,ChaseRandom
,ChaseFlash
,ChaseFlashRnd
,RainbowRunner
,Colorful
,TrafficLight
,SweepRandom
,Running2
,RedAndBlue
,Stream
,Scanner
,Lighthouse
,Fireworks
,Rain
,Meteors
,FireFlicker
,Paparazzi
,FireworksStarburst
,Fireworks1D
,Colorful1D
,FillNoise
,NoisePal
,SineWave
,Plasma
,Ripple
,Heartbeat
,Pacifica
,Ctwinkle
,SolidPattern
,TwinkleUp
,TwinkleFade
,ScannerDual
,Flow
,RandomTwinkles
,Sunset
,Police
,Fire2012
,CandyCane
,Blends
,PoliceAll
,TwoAreas
,HalloweenEyes
,SolidGlitch
,TriChase
,ICU
,Lighthouse2
,Stream2
,Matrix
,RippleRainbow
,StreamMulti
,WipeCenter
,SparklePulse
,Twinkle2
,TwinkleCustom
,ChaseGlow
,TwinkleFadeFast
Speed
Set effect speed (0-255).
- Input type:
number
Intensity
Set effect intensity (0-255).
- Input type:
number
Palette
Set palette ID. Example: Palette(1) sets the palette ID to 1.
- Input type:
number
ApplyPreset
Apply a preset. Example: ApplyPreset(1) applies preset 1.
- Input type:
number
DeletePreset
Delete a preset by ID. Example: DeletePreset(1) deletes preset 1.
- Input type:
number
SingleColor
Set a single color using an integer (0xRRGGBB or 0xAARRGGBB). Alpha is ignored.
- Input type:
number
ARGBColor
Set ARGB color using integer (0xAARRGGBB). Alpha channel blends with existing colors.
- Input type:
number
AutoSync
Get or set auto sync state.
- Input type:
boolean
SyncInterval
Get or set sync interval in milliseconds (default 5000).
- Input type:
number
White
Set white channel value (0-255).
- Input type:
number
DefaultBrightness
Set default brightness for WLED. Example: DefaultBrightness(100) sets the default brightness to 100.
- Input type:
number
Time
Set WLED device time (ISO 8601 string).
- Input type:
text
TriggerMacro
Trigger a WLED macro by ID. Example: TriggerMacro(1) triggers macro 1.
- Input type:
number
NumLEDs
Set the total number of LEDs for the main segment (segment 0). Example: NumLEDs(150) sets the total number of LEDs to 150.
- Input type:
number
Getters:
WLED has total 5 getter properties.
AutoSync
Get or set auto sync state.
- Return type:
boolean
SyncInterval
Get or set sync interval in milliseconds (default 5000).
- Return type:
number
IsConnected
Get the current connection status.
- Return type:
boolean
ConnectionMessage
Get the last connection message.
- Return type:
text
CurrentIP
Get the current IP address.
- Return type:
text
WheelColorPicker
A color picker component developed by TechHamara using Fast technology, offering a user-friendly interface for selecting colors with various options such as wheel type, density, and sliders for lightness and alpha.Telegram | GitHub
BuyMeaCoffee | YouTube
Find More Extension
Terms & Conditions
Blocks
Wheel Color Picker Documentation
Events:
WheelColorPicker has total 4 events.
ColorChanged
Event raised when the color is changed
Parameter | Type |
---|---|
newColor | number |
ColorSelected
Event raised when the color is selected
Parameter | Type |
---|---|
selectedColor | number |
WheelTypeChanged
Event raised when the wheel type is changed
Parameter | Type |
---|---|
newType | text |
ColorSelectedRGB
Event raised when the color is selected, returning separate R, G, B values
Parameter | Type |
---|---|
red | number |
green | number |
blue | number |
Methods:
WheelColorPicker has total 18 methods.
Create
Initialize inside an arrangement.
Parameter | Type |
---|---|
arrangement | component |
ColorHex
Get the color of the picker as a hex string
- Return type:
text
ColorRGB
Set the color from RGB values
Parameter | Type |
---|---|
red | number |
green | number |
blue | number |
ColorRGBA
Set the color from RGBA values
Parameter | Type |
---|---|
red | number |
green | number |
blue | number |
alpha | number |
Red
Get the red component of the current color
- Return type:
number
Green
Get the green component of the current color
- Return type:
number
Blue
Get the blue component of the current color
- Return type:
number
AlphaValue
Get the alpha component of the current color
- Return type:
number
ColorHSV
Set the color from HSV values
Parameter | Type |
---|---|
hue | number |
saturation | number |
value | number |
Hue
Get the hue component of the current color
- Return type:
number
Saturation
Get the saturation component of the current color
- Return type:
number
Value
Get the value component of the current color
- Return type:
number
FlowerWheel
Set the wheel type to FLOWER
CircleWheel
Set the wheel type to CIRCLE
WheelTypeString
Get the current wheel type as string
- Return type:
text
SelectColor
Select the current color
ShowDialog
Show the color picker dialog
ShowDialogWithButtons
Show the color picker dialog with custom buttons
Parameter | Type |
---|---|
positiveButtonText | text |
negativeButtonText | text |
Setters:
WheelColorPicker has total 14 setter properties.
Enabled
Get or set whether the color picker is enabled
- Input type:
boolean
Color
Get or set the current color
- Input type:
number
ShowAlpha
Get or set whether to show alpha channel
- Input type:
boolean
Lightness
Get or set the lightness value (0.0 to 1.0)
- Input type:
number
Alpha
Get or set the alpha value (0.0 to 1.0)
- Input type:
number
WheelType
Get or set the wheel type (0 for FLOWER, 1 for CIRCLE)
- Input type:
number
- Helper type:
Type
- Helper enums:
Flower
,Circle
Density
Get or set the density of the color wheel (2-12)
- Input type:
number
DialogTitle
Get or set the dialog title
- Input type:
text
ShowLightnessSlider
Get or set whether to show lightness slider
- Input type:
boolean
ShowAlphaSlider
Get or set whether to show alpha slider
- Input type:
boolean
ShowBorder
Get or set whether to show border
- Input type:
boolean
ShowColorEdit
Get or set whether to show color edit
- Input type:
boolean
ShowColorPreview
Get or set whether to show color preview
- Input type:
boolean
PickerCount
Get or set the number of color pickers (1-5)
- Input type:
number
Getters:
WheelColorPicker has total 14 getter properties.
Enabled
Get or set whether the color picker is enabled
- Return type:
boolean
Color
Get or set the current color
- Return type:
number
ShowAlpha
Get or set whether to show alpha channel
- Return type:
boolean
Lightness
Get or set the lightness value (0.0 to 1.0)
- Return type:
number
Alpha
Get or set the alpha value (0.0 to 1.0)
- Return type:
number
WheelType
Get or set the wheel type (0 for FLOWER, 1 for CIRCLE)
- Return type:
number
Density
Get or set the density of the color wheel (2-12)
- Return type:
number
DialogTitle
Get or set the dialog title
- Return type:
text
ShowLightnessSlider
Get or set whether to show lightness slider
- Return type:
boolean
ShowAlphaSlider
Get or set whether to show alpha slider
- Return type:
boolean
ShowBorder
Get or set whether to show border
- Return type:
boolean
ShowColorEdit
Get or set whether to show color edit
- Return type:
boolean
ShowColorPreview
Get or set whether to show color preview
- Return type:
boolean
PickerCount
Get or set the number of color pickers (1-5)
- Return type:
number
Thanks
Feel free to contact us any quarry or suggestions.