Shelly - fcorthay/xPL GitHub Wiki

The Shelly devices can be configured to join a local Wi-Fi network.

Table of Contents

RGBW controller

Connecting to the RGBW controller with a web browser provides a page where the LED strip can be controlled intuitively.

REST API

The REST API can be used either in a browser or a terminal.

RGBW2

The Shelly RGBW2 has an API which allows to control it over Ethernet using different protocols.

Using a browser, the URL http://[ipAddress]/light/0 shows the status of the light. The URL http://[ipAddress]/light/0?turn=on turns the light on. http://[ipAddress]/light/0?red=255&green=0&blue=0 selects the color. http://[ipAddress]/light/0?turn=off turns the light off. The commands can be combined.

The same can be done from a terminal (adapt the address):

SERVER=192.168.1.70
curl "http://$SERVER/light/0?red=255&green=255&blue=0&white=255&turn=on" && echo
curl http://$SERVER/light/0?turn=off && echo

RGBW Plus PM

The Shelly Shelly Plus RGBW PM uses the Gen 2+ API.

It is controlled via RPC (adapt the address):

SERVER=192.168.1.71
curl -w "\n" http://$SERVER/rpc/rgbw.getStatus?id=0
curl -w "\n" "http://$SERVER/rpc/rgbw.set?id=0&on=false"
curl -w "\n" "http://$SERVER/rpc/rgbw.set?id=0&on=true"
curl -w "\n" "http://$SERVER/rpc/rgbw.set?id=0&rgb=\[0,0,255\]"
curl -w "\n" "http://$SERVER/rpc/rgbw.set?id=0&on=true&rgb=\[255,0,0\]&white=0&transition_duration=0.5"

The possible parameters to be set are documented in the RGBW API.

xPL control

RGBW2

The RGBW2 curl commands can be sent by the xPL httpRequest service (adapt the address):

XPL_BASE_DIR=~/Controls/xPL
SERVER='192.168.1.70'
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=light/0 red=255 green=255 blue=0
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=light/0 turn=on
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=light/0 red=0 green=0 blue=255
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=light/0 turn=off
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=light/0 red=255 green=0 blue=0 turn=on

RGBW Plus PM

The previous RGBW Plus PM curl commands can be sent by the xPL httpRequest service (adapt the address):

XPL_BASE_DIR=~/Controls/xPL
SERVER='192.168.1.71'
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=rpc/rgbw.set id=0 on=false
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=rpc/rgbw.set id=0 on=true
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=rpc/rgbw.set id=0 rgb=[0,0,255]
$XPL_BASE_DIR/xPL-base/xpl-send.pl -v -c request.basic server=$SERVER path=rpc/rgbw.set id=0 on=true rgb=[255,0,0] white=0 transition_duration=0.5
⚠️ **GitHub.com Fallback** ⚠️