Skip to main content

LED

led library allows controlling built-in red LED on all UCM models. This LED is exclusively controlled by the Lua script and can be used for custom indications.

led.on#

function led.on()
end

Turns on the built-in red LED.

led.off#

function led.off()
end

Turns off the built-in red LED.

led.blink#

-- @param duration number
function led.blink(duration)
end

Starts blinking with the built-in red LED.

LED blinks with equal intervals. duration defines the duration of LED being off and on in milliseconds.

Example#

-- Blink with "1 second on, 1 second off" intervals.
led.blink(1000)
Hardware diversity is welcome. Integrate any device into a unified energy network.
© 2021 Enapter
Developer toolkit
DocumentationReference
Community
GithubTindie