Skip to content

Berry Script for FW 0.12.11

Versioned overview of the Berry Script role in Spectoda controllers for firmware 0.12.11.

Berry Script is a scripting layer that runs directly inside a Spectoda controller. It lets advanced users add custom project logic without modifying the firmware itself.

In practice, it is a tool for advanced creators, integrators and luminaire manufacturers who need the controller to behave in a specific way for a specific project.

Berry Script is not:

  • cloud automation
  • logic running in a phone or browser
  • a replacement for basic configuration in Spectoda Studio

Berry Script is local logic running directly where lights, IO and events are controlled.

In the Spectoda ecosystem, Berry Script sits between:

  • Controller config and the project definition
  • TNGL / logic created in Studio
  • the controller runtime layer and its IO

This means Berry Script can build on controller settings and add custom behaviour on top of what is already defined in the project.

It typically works with these layers:

  • io for access to specific controller inputs and outputs
  • spectoda for events, messages and IO mapping
  • controller for information about the running controller
  • timeline for time and date information

Berry Script is useful when basic configuration is not enough and the project needs custom logic.

Typical scenarios:

  • reacting to buttons, sensors and other inputs
  • custom links between IO and EventState
  • converting external protocols into lighting behaviour in the Spectoda network
  • plugin logic that runs continuously inside the controller
  • adding support for non-standard peripherals or devices

In practice, Berry Script is often used for:

  • connecting physical inputs to lighting scenes
  • project logic over DALI, DMX, Art-Net or sACN integration
  • custom processing of data from connected devices
  • fine-tuning luminaire behaviour without changing the C++ firmware layer

Spectoda exposes several basic objects and helpers on top of the Berry layer:

  • VAL for typed value handling
  • EVS for EventState values
  • EVT for event emission
  • Plugin(...) for continuously evaluated controller logic

In simple terms:

  • VAL handles what value the script stores or sends
  • EVS handles what state is tracked in the network
  • EVT handles how to trigger an event
  • Plugin(...) handles what should be evaluated repeatedly

Berry Script is therefore not a separate mini language on the side. It is a direct part of the Spectoda control layer.

In the current Spectoda model, Berry Script can enter the controller through several paths:

  • as part of Controller config
  • as additional scripts connected to a project
  • as logic derived from the project definition and TNGL layer
  • as plugin logic that should stay active in the controller permanently

For users, the important part is:

  • Berry Script is part of the controller project
  • it is loaded into the running controller runtime
  • the resulting behaviour is executed locally on the device

This lets the system react quickly and independently of phone, browser or cloud connectivity.

Use Berry Script when:

  • you need custom logic directly inside the controller
  • you connect multiple technologies and need your own behaviour layer between them
  • you work on advanced integrations or an unusual device

Berry Script is often not needed when:

  • standard Spectoda Studio configuration is enough
  • you only need basic IO mapping
  • you do not need custom reactions or data transformation

A good rule of thumb:

First design the project through the standard configuration and Studio workflow. Add Berry Script when you know exactly what extra logic needs to be added.

Practical impact for creators and manufacturers

Section titled “Practical impact for creators and manufacturers”

Berry Script adds a layer that can turn a controller from a simple executor of prepared scenes into an active control element with its own logic.

This matters especially for:

  • luminaire manufacturers who need product-specific behaviour
  • integrators connecting Spectoda with other technologies
  • advanced creators who need finer control over the project

Berry Script is therefore not just an extra script. It is a practical way to extend controller capabilities inside the Spectoda ecosystem.

Firmware 0.12.11 also includes specialized APIs for external protocols and peripherals.

Continue to the dedicated pages if you need to:

  • map RGB data from sACN or Art-Net to one or more LED strips
  • read data from a custom I2C sensor
  • write registers of an external peripheral
  • build a device-specific driver directly inside the project

Available pages: