Skip to content
Simon Leiner edited this page Dec 29, 2016 · 9 revisions

102shows version: 0.2

The 102shows server can be controlled completely via MQTT. On this page, you see the commands it responds to.

Paths

The general scheme is led/{sys_name}/show/{show_name}/{command}

General commands

The MQTT controller listens for the commands startand stop for all shows, and all shows (should) respond to the brightness command. Any other commands (so all except for start, stop and brightness) are up to the individual lightshow.

start

The MQTT controller stops (see below) any running show. Then it checks if the given parameters (the JSON payload of the MQTT start message) are valid by invoking show.check_runnable(). If the show calls the parameters valid, the controller starts a new process where show.run(strip, parameters).

stop

The MQTT controller asks the lightshow process kindly to join by sending SIGINT to the show process. The Lightshow base template implements a handler for this signal and usually saves the current strip state and joins after a few milliseconds.
However, if the process does not join after 1 second, it is terminated by the controller.

brightness

This command is handled by lightshows (in earlier versions, the controller handled brightness changes - but two processes accessing the same strip at the same time causes a lot of trouble). They change the brightness of a strip. Payload is a float from 0 to 100.

Lightshow-specific commands

Each lightshow can implement its own commands, like foo-color, velocity (of an animation) etc.