Luup Requests: Complete Guide for Vera Developers

What Are Luup Requests?

A Luup Request is an instruction sent from a Lua script or plugin to a device or service within the Vera controller. These requests tell devices what action to perform, retrieve information, or update internal values.

For example, when a smart light is switched on through a script, the script sends a request to the lighting service associated with that device. The Vera controller processes the request and communicates with the physical hardware using the appropriate wireless protocol, such as Z-Wave or Zigbee.

Requests allow developers to automate tasks that go beyond the standard graphical interface, making them one of the most powerful features of the Luup framework.


Why Requests Are Important

Nearly every advanced automation relies on requests.

Developers use them to:

  • Control devices
  • Read sensor values
  • Trigger automation scenes
  • Update variables
  • Execute plugin functions
  • Communicate with services

Without requests, Lua scripts would have no way to interact with the smart home system.


Understanding the Request Flow

Every request follows a predictable sequence:

  1. A Lua script or plugin creates a request.
  2. The request specifies a device and service.
  3. An action is identified.
  4. The Luup engine validates the request.
  5. The controller communicates with the target device.
  6. Device status is updated.
  7. Variables refresh if necessary.
  8. Additional automation may be triggered.

This event-driven workflow allows Vera to process commands efficiently while maintaining synchronization between devices and the controller.


Components of a Luup Request

Every request typically includes several important elements.

Device

The target device receiving the command.

Examples:

  • Living room light
  • Front door lock
  • Hallway motion sensor
  • Smart thermostat

Each paired device has a unique identifier that allows Luup to locate it.


Service

The service defines the functionality available for that device.

Examples include:

  • Switch service
  • Door lock service
  • Temperature service
  • Motion sensor service

Different manufacturers may expose the same service, allowing automation to remain consistent across compatible hardware.


Action

An action tells the service what to do.

Examples:

  • Turn On
  • Turn Off
  • Lock
  • Unlock
  • Set Target Temperature
  • Arm Sensor
  • Bypass Alarm

Actions are the heart of every Luup Request.


Parameters

Many actions require additional information.

Examples:

  • Desired temperature
  • Brightness level
  • Lock state
  • Timer duration
  • Notification message

Parameters provide the values needed for the action to execute correctly.


Local Processing

One advantage of Luup Requests is that they are processed locally on the Vera controller whenever possible.

Benefits include:

  • Faster response times
  • Lower latency
  • Improved privacy
  • Reduced dependence on cloud services
  • Reliable operation during internet outages

This local-first architecture is one of Vera’s key strengths.


Common Request Types

Developers frequently create requests for tasks such as:

Lighting

  • Turn lights on
  • Turn lights off
  • Adjust brightness
  • Activate scenes

Security

  • Lock doors
  • Unlock doors
  • Arm sensors
  • Disarm alarms

Climate Control

  • Change temperature
  • Switch HVAC mode
  • Read thermostat status
  • Schedule heating or cooling

Notifications

Requests can also:

  • Send alerts
  • Trigger email notifications
  • Generate mobile app notifications
  • Log automation events

Similar Posts