Skip to main content

lua devices

Manage connected devices from the command line.
lua devices [action] [options]

Actions

ActionDescription
(none)Interactive device management
listList all connected devices
statusCheck the status of a specific device
enableEnable a device
disableDisable a device (stops receiving commands)
removeRemove a device from the agent
testInteractively test a device command
test-triggerTest a device trigger

Options

FlagDescription
--device-name <name>Target device name
--group <group>Filter by device group
--payload <json>JSON payload for test commands (default: {})
--forceSkip confirmation prompts

Examples

# Interactive management
lua devices

# List all connected devices
lua devices list

# List devices in a specific group
lua devices list --group warehouse-floor

# Check device status
lua devices status --device-name label-printer

# Enable a device
lua devices enable --device-name label-printer

# Disable a device
lua devices disable --device-name label-printer

# Remove a device (with confirmation)
lua devices remove --device-name label-printer

# Remove without confirmation
lua devices remove --device-name label-printer --force

# Test a command interactively
lua devices test --device-name label-printer

# Test a trigger
lua devices test-trigger --device-name label-printer

lua push device-trigger

Push a compiled device trigger to the server.
lua push device-trigger [name]
Device triggers are agent-side primitives that handle events fired by devices. They are compiled, versioned, and pushed like other Lua primitives (skills, webhooks, jobs).
1

Compile

lua compile
The compiler detects defineDeviceTrigger() calls and bundles them.
2

Push

# Push a specific device trigger
lua push device-trigger temperature-alert

# Push all primitives (including device triggers)
lua push
3

Deploy

lua deploy
Activates the pushed version.

lua compile

The compiler automatically detects device-related primitives in your source code:
  • defineDeviceTrigger() calls are compiled as device trigger primitives
  • defineDevice() calls define device metadata (commands and inline triggers)
No special flags are needed — lua compile handles everything.
lua compile
Output includes device triggers alongside other primitives:
Compiled:
  Skills: 2
  Webhooks: 1
  Device Triggers: 3
  Jobs: 0

lua chat

Test device interactions through the chat interface:
lua chat
When devices are connected, the agent has access to their commands as tools. You can test device interactions by chatting naturally:
> What devices are connected?
> Read the temperature from pico-sensor
> Turn on the LED on my device
The device must be running and connected for its tools to appear. If you do not see device tools, check that your device is online with lua devices list.

Next Steps

Quickstart

Connect your first device

Triggers

Device trigger development guide

Node.js Client

Full device client reference

Overview

Device Gateway architecture