TapHome

Shelly Plus RGBW PM

Packet Parser → HTTP
Submitted by
Last updated: 03. 2026
Shelly Plus RGBW PM

The Shelly Plus RGBW PM is a Gen2+ Wi-Fi RGBW LED controller with built-in power metering on every output channel. It drives LED strips or individual LED channels at 12/24 VDC with up to 4 x 4.5 A per channel (18 A total). The device supports three switchable profiles — light (4 independent dimmers), rgb (3-channel color), and rgbw (3-channel color + white) — each exposing different devices in TapHome. TapHome communicates with the device locally over Wi-Fi using the Gen2+ RPC API — no cloud connection is required.

The TapHome template is an HTTP template that polls the device’s RPC endpoints. A single template handles all three profiles; TapHome detects the active profile at runtime and activates the corresponding devices.

Configuration

Import parameters

The template requires only the device’s IP address (default placeholder 192.168.0.1). TapHome connects to port 80 and polls multiple RPC endpoints for system state and device data.

At the module level, TapHome polls /rpc/Sys.GetStatus, /rpc/Sys.GetConfig, /rpc/WiFi.GetStatus, and /rpc/PlusRGBWPM.GetConfig at a 3-second interval. The Sys.GetConfig response provides the current profile (device.profile) which determines which device-level endpoints are active.

Profile selection

The Shelly Plus RGBW PM operates in one of three profiles at a time. You can switch profiles directly from TapHome using the Set Profile service action on the module, or from the Shelly web UI.

ProfileDevices in TapHomeUse case
light4 independent dimmers (O1–O4)Single-color LED strips, 4 separate lighting zones
rgb1 RGB lightRGB LED strips (3-channel color mixing)
rgbw1 RGBW lightRGBW LED strips (RGB + dedicated white channel)

After switching the profile, the device reboots and TapHome automatically detects the new profile. Devices belonging to the inactive profile will report an error (“Profile is not set to …”) — this is expected and can be ignored.

Device capabilities

RGB Light (profile = rgb)

When the device is set to the rgb profile, TapHome exposes a single HSB Light device. The template reads /rpc/RGB.GetStatus?id=0 for on/off state, brightness (0–100%), and RGB color values, and writes via /rpc/RGB.Set?id=0 to control the light.

Color control uses HSB (Hue-Saturation-Brightness):

  • Hue (0–360 degrees) and Saturation (0.0–1.0) are converted between HSB and RGB internally
  • Brightness (0.0–1.0) maps to the Shelly’s 0–100% range
  • Setting brightness to 0 turns the light off; any non-zero brightness turns it on

The RGB light exposes five service attributes:

AttributeUnitDescription
TemperatureCInternal device temperature
Energy consumptionWhCumulative energy for the RGB output
PowerWInstantaneous power draw
VoltageVRMS voltage
CurrentACurrent draw
RGBW Light (profile = rgbw)

When set to the rgbw profile, TapHome exposes a single HSB Light with an additional white channel. The template reads /rpc/RGBW.GetStatus?id=0 and writes via /rpc/RGBW.Set?id=0.

The RGBW profile adds a white channel (0–255) controlled via CCT (Correlated Color Temperature) at a fixed 4500 K:

  • When the white channel is active (white != 0), brightness is derived from the white level (linear 0–255 mapped to 0.0–1.0)
  • When the white channel is inactive, brightness comes from the standard brightness field (0–100%)
  • Switching to color temperature mode in TapHome activates the white channel; switching to RGB mode deactivates it

The RGBW light exposes the same five service attributes as the RGB light (temperature, energy, power, voltage, current), reading from the RGBW.GetStatus response.

Dimmable LED Outputs (profile = light)

When set to the light profile, TapHome exposes 4 independent dimmer channels (O1–O4), each controlling one LED output. Each channel reads from /rpc/Light.GetStatus?id={0-3} and writes via /rpc/Light.Set?id={0-3}.

Brightness is mapped from TapHome’s 0.0–1.0 range to the Shelly’s 0–100% range. Setting the level to 0 turns the output off; any non-zero level turns it on and sets the brightness.

Each dimmer channel exposes six service attributes:

AttributeUnitDescription
TemperatureCInternal device temperature
Energy consumptionWhCumulative energy for this channel
PowerWInstantaneous power draw
VoltageVRMS voltage
CurrentACurrent draw
FlagsInternal status flags

Each dimmer channel also exposes a Calibrate service action that sends /rpc/Light.Calibrate?id={N} to calibrate the output for the connected LED load.

Module diagnostics and actions

The module exposes five service attributes for device diagnostics:

AttributeDescription
WiFi SSIDConnected wireless network name
IP AddressDevice IP address
Signal Strength (dB)WiFi RSSI
MAC AddressDevice hardware address
ProfileCurrently active profile (light, rgb, or rgbw)

Three service actions are available at the module level:

ActionDescription
Firmware UpdateTriggers OTA update to the stable firmware channel
RebootRestarts the device
Set ProfileSwitches between light, rgb, and rgbw profiles (device reboots)

The module script also checks for available firmware updates and pending reboot requirements, displaying warnings in TapHome when either condition is detected.

Additional capabilities

The Shelly Plus RGBW PM also exposes physical input state, night mode configuration with brightness limits and schedule, transition duration for color/brightness changes, and minimum brightness on toggle through its RPC API. These capabilities can be added in a future template update.

Troubleshooting

Device not responding
  1. Verify the Shelly is connected to Wi-Fi and has a valid IP address
  2. Try using the mDNS hostname (shellyplusrgbwpm-AABBCCDDEE.local) instead of the IP address — the IP may have changed after a DHCP renewal
  3. Open http://{device-ip}/rpc/Shelly.GetDeviceInfo in a browser — if it responds with JSON, the device is reachable
  4. Check that TapHome CCU and Shelly are on the same network / VLAN
  5. Ensure HTTP Digest Authentication is disabled in the Shelly web UI — TapHome does not support authenticated requests
Profile error on devices

If a device shows “Profile is not set to rgb/rgbw/light” — this is expected. The template contains devices for all three profiles, but only the devices matching the currently active profile will function. The other devices will report this error and can be ignored.

To switch the active profile, use the Set Profile service action on the module or change it in the Shelly web UI. The device will reboot and TapHome will detect the new profile within one poll cycle.

Colors appear incorrect in RGB/RGBW mode
  1. Verify the LED strip wiring matches the output terminal order (R, G, B, W) — swapped wires produce wrong colors
  2. The template converts between HSB and RGB color spaces internally. If colors appear washed out, check the saturation value — low saturation produces pastel tones
  3. In RGBW mode, the white channel and RGB channels are controlled independently. When switching from white to color or vice versa, TapHome sends the appropriate command to zero out the other mode
Dimmer outputs not responding in light mode
  1. Confirm the profile is set to light — dimmer devices only work in light mode
  2. Check that each channel has an LED load connected — unloaded channels may not report correct status
  3. Try running the Calibrate action on the channel — this optimizes the dimming curve for the connected LED load
  4. Gen2+ devices support up to 6 concurrent HTTP connections — avoid polling from multiple systems simultaneously
Power readings show zero
  1. Confirm the LED load is connected and the channel is turned on
  2. Poll the appropriate endpoint manually (/rpc/Light.GetStatus?id=0, /rpc/RGB.GetStatus?id=0, or /rpc/RGBW.GetStatus?id=0) and verify apower returns a non-zero value
  3. Very low-power LED loads may report 0 W due to metering resolution — this is normal for small indicator LEDs

How to install in TapHome

Prerequisites

  • Shelly device installed and powered on
  • Local Wi-Fi network (2.4 GHz)
  • TapHome CCU on the same network

Step 1 — Connect Shelly to Wi-Fi

Option A — Shelly app (recommended):

  1. Download the Shelly app (iOS / Android)
  2. Tap +Add Device and follow the Bluetooth pairing wizard
  3. Enter your Wi-Fi credentials when prompted

Option B — AP mode (no app):

  1. On first power-up the device creates a hotspot: ShellyXXX-AABBCCDDEE
  2. Connect your phone/PC to that hotspot
  3. Open http://192.168.33.1Internet & SecurityWi-Fi Mode - Client
  4. Enter SSID and password → Save

Shelly only supports 2.4 GHz networks. 5 GHz networks will not appear in the scan.

Step 2 — Find the device address

Shelly Gen1 devices support mDNS (Zeroconf). You can reach the device using a hostname instead of an IP address:

1
shelly<model>-<MAC>.local

For example: shelly1pm-AABBCCDDEE.local (MAC address in uppercase hex, no colons).

Recommended: use the TapHome IP Scanner. Open the TapHome app and use the IP Scanner (Settings → Network → Scan). The scanner will discover devices on your network and show both the IP address and the mDNS hostname. Use the hostname instead of the IP address for a more reliable connection — it stays the same even if the device’s IP changes after a router reboot.

Alternative methods to find the IP address:

  • Shelly app: Device detail → Device info → IP address
  • Shelly web UI: Connect to the device AP before Wi-Fi setup — the IP is shown after saving
  • Router DHCP table: Look for a hostname like shelly1pm-AABBCCDDEE

Step 3 — Configure in TapHome

  1. In TapHome, add a new Packet Parser (HTTP) module
  2. Address: enter the mDNS hostname (e.g., shelly1pm-AABBCCDDEE.local) or IP address from Step 2
  3. Port: 80 (default, no change needed)
  4. Import the template — TapHome will poll /status to read device state

HTTP authentication is disabled by default on Shelly devices. If you have enabled login protection, TapHome does not support HTTP Basic Auth at this time — keep auth disabled for TapHome integration.

Available devices

Shelly Plus RGBW PM Module
Service Attributes
WiFi
IP address
Signal strength
MAC
Profile
Service Actions
Update firmware
Reboot
Set Profile
Custom Variables

Shelly Plus RGBW PM

Read (module)
VAR response := SENDHTTPREQUEST("/rpc/Sys.GetStatus");
IF response.IsSuccess
    Sys.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Sys.GetConfig");
IF response.IsSuccess
    Sys.GetConfig := response.Content;
END

response := SENDHTTPREQUEST("/rpc/WiFi.GetStatus");
IF response.IsSuccess
    WiFi.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/PlusRGBWPM.GetConfig");
IF response.IsSuccess
    PlusRGBWPM.GetConfig := response.Content;
END

if ! ISNULL(parsejson(Sys.GetStatus, "available_updates.stable", true))
    addwarning("New firmware update is available");
end

if parsejson(Sys.GetStatus, "restart_required", true)
    addwarning("Restart required");
end
Service Attributes
Wifi
PARSEJSON(WiFi.GetStatus, "ssid")
${ipAddress}
PARSEJSON(WiFi.GetStatus, "sta_ip")
${xml_signal_strength} [dB]
PARSEJSON(WiFi.GetStatus, "rssi")
MAC
PARSEJSON(Sys.GetStatus, "mac")
Profile
PARSEJSON(Sys.GetConfig, "$.device.profile");
Service Actions
${xml_update_fw}
VAR response := SENDHTTPREQUEST("/rpc/Shelly.Update?stage=\"stable\"");
IF response.IsSuccess
    return("OK");
else
    return("Error");
END

${restart}
VAR response := SENDHTTPREQUEST("/rpc/Shelly.Reboot");
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Set Profile
Parameters: Profile
VAR response := SENDHTTPREQUEST("/rpc/Shelly.SetProfile?name=\"" + 
switch(prof,
0, "light",
1, "rgb",
2, "rgbw",
"")
+ "\"");
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
RGB Light HSB Light

HSB color light (rgb profile) with brightness, hue, saturation control and per-channel power metering

HSB
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current

RGB Light

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "rgb"
	adderror("Profile is not set to rgb (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/RGB.GetStatus?id=" + ID);
IF response.IsSuccess
    RGB.GetStatus := response.Content;
	R := PARSEJSON(RGB.GetStatus, "$.rgb[0]", true);
	G := PARSEJSON(RGB.GetStatus, "$.rgb[1]", true);
	B := PARSEJSON(RGB.GetStatus, "$.rgb[2]", true);    
END

response := SENDHTTPREQUEST("/rpc/RGB.GetConfig?id=" + ID);
IF response.IsSuccess
    RGB.GetConfig := response.Content;
END

if ! ISNULL(parsejson(RGB.GetStatus, "errors", true))
    adderror("Error: " + parsejson(RGB.GetStatus, "errors"));
end
Read brightness
bool output := PARSEJSON(RGB.GetStatus, "$.output", true);
var brightness := PARSEJSON(RGB.GetStatus, "$.brightness", true);

if output
    return(brightness / 100);
else
    return(0);
end
Write brightness
SENDHTTPREQUEST("/rpc/RGB.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=" + round(Hb*100.0));
Read hue
VAR HSVColor := RGBTOHSV(R, G, B);
ROUND(HSVColor.Hue);
Write hue
VAR color := HSVTORGB(Hd, Sa, 1);
SENDHTTPREQUEST("/rpc/RGB.Set?id=" + ID + "&rgb=[" + color.RED + "," + color.GREEN + "," + color.BLUE + "]");
Read saturation
VAR HSVColor := RGBTOHSV(R, G, B);
ROUND(HSVColor.Saturation * 100.0) / 100.0;
Write saturation
VAR color := HSVTORGB(Hd, Sa, 1);
SENDHTTPREQUEST("/rpc/RGB.Set?id=" + ID + "&rgb=[" + color.RED + "," + color.GREEN + "," + color.BLUE + "]");
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(RGB.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(RGB.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(RGB.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(RGB.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(RGB.GetStatus, "$.current", true)
RGBW Light HSB Light

HSB color+white light (rgbw profile) with RGB, white channel (CCT at 4500K), and per-channel power metering

HSB
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current

RGBW Light

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "rgbw"
	adderror("Profile is not set to rgbw (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/RGBW.GetStatus?id=" + ID);
IF response.IsSuccess
    RGBW.GetStatus := response.Content;
	R := PARSEJSON(RGBW.GetStatus, "$.rgb[0]", true);
	G := PARSEJSON(RGBW.GetStatus, "$.rgb[1]", true);
	B := PARSEJSON(RGBW.GetStatus, "$.rgb[2]", true);    
END

response := SENDHTTPREQUEST("/rpc/RGBW.GetConfig?id=" + ID);
IF response.IsSuccess
    RGBW.GetConfig := response.Content;
END

if ! ISNULL(parsejson(RGBW.GetStatus, "errors", true))
    adderror("Error: " + parsejson(RGBW.GetStatus, "errors"));
end
Read brightness
bool output := PARSEJSON(RGBW.GetStatus, "$.output", true);
var brightness := PARSEJSON(RGBW.GetStatus, "$.brightness", true);
var white := PARSEJSON(RGBW.GetStatus, "$.white", true);

if output
	if white != 0
		return(linear(white, 0, 0, 255, 1));
	else
    	return(brightness / 100);
    end
else
    return(0);
end
Write brightness
if isnan(Ct)
	SENDHTTPREQUEST("/rpc/RGBW.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&white=0&brightness=" + round(Hb*100.0));
else
	SENDHTTPREQUEST("/rpc/RGBW.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=0&white=" + round(linear(Hb, 0, 0, 1, 255)));
end
Read hue
VAR HSVColor := RGBTOHSV(R, G, B);
ROUND(HSVColor.Hue);
Write hue
VAR color := HSVTORGB(Hd, Sa, 1);
SENDHTTPREQUEST("/rpc/RGBW.Set?id=" + ID + "&rgb=[" + color.RED + "," + color.GREEN + "," + color.BLUE + "]");
Read saturation
VAR HSVColor := RGBTOHSV(R, G, B);
ROUND(HSVColor.Saturation * 100.0) / 100.0;
Write saturation
VAR color := HSVTORGB(Hd, Sa, 1);
SENDHTTPREQUEST("/rpc/RGBW.Set?id=" + ID + "&rgb=[" + color.RED + "," + color.GREEN + "," + color.BLUE + "]");
Read color temperature
var white := PARSEJSON(RGBW.GetStatus, "$.white", true);
if white != 0 or !isnan(Ct)
	return(4500);
else
	return(NaN);
end
Write color temperature
IF !isnan(Ct)
	SENDHTTPREQUEST("/rpc/RGBW.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=0&white=" + round(linear(Hb, 0, 0, 1, 255)));
end
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(RGBW.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(RGBW.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(RGBW.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(RGBW.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(RGBW.GetStatus, "$.current", true)
Dimmable LED Output 2 Dimmer

Independent dimmer channel 2 (light profile, id=1) with brightness control, calibration, and per-channel power metering

numeric
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current
Flags
Service Actions
Calibration

Dimmable LED Output 2

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "light"
	adderror("Profile is not set to light (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/Light.GetStatus?id=" + ID);
IF response.IsSuccess
    Light.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Light.GetConfig?id=" + ID);
IF response.IsSuccess
    Light.GetConfig := response.Content;
END

if ! ISNULL(parsejson(Light.GetStatus, "errors", true))
    adderror("Error: " + parsejson(Light.GetStatus, "errors"));
end
Read level
bool output := PARSEJSON(Light.GetStatus, "$.output");
var brightness := PARSEJSON(Light.GetStatus, "$.brightness");

if output
    return(brightness / 100);
else
    return(0);
end
Write level
SENDHTTPREQUEST("/rpc/Light.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=" + round(Le*100.0));
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(Light.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(Light.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(Light.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(Light.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(Light.GetStatus, "$.current", true)
Flags
parsejson(Light.GetStatus, "$.flags", true)
Service Actions
${detail_deviceSettings_TemperatureSensor_categoryCalibration}
VAR response := SENDHTTPREQUEST("/rpc/Light.Calibrate?id=" + ID);
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Dimmable LED Output 1 Dimmer

Independent dimmer channel 1 (light profile, id=0) with brightness control, calibration, and per-channel power metering

numeric
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current
Flags
Service Actions
Calibration

Dimmable LED Output 1

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "light"
	adderror("Profile is not set to light (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/Light.GetStatus?id=" + ID);
IF response.IsSuccess
    Light.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Light.GetConfig?id=" + ID);
IF response.IsSuccess
    Light.GetConfig := response.Content;
END

if ! ISNULL(parsejson(Light.GetStatus, "errors", true))
    adderror("Error: " + parsejson(Light.GetStatus, "errors"));
end
Read level
bool output := PARSEJSON(Light.GetStatus, "$.output");
var brightness := PARSEJSON(Light.GetStatus, "$.brightness");

if output
    return(brightness / 100);
else
    return(0);
end
Write level
SENDHTTPREQUEST("/rpc/Light.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=" + round(Le*100.0));
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(Light.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(Light.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(Light.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(Light.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(Light.GetStatus, "$.current", true)
Flags
parsejson(Light.GetStatus, "$.flags", true)
Service Actions
${detail_deviceSettings_TemperatureSensor_categoryCalibration}
VAR response := SENDHTTPREQUEST("/rpc/Light.Calibrate?id=" + ID);
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Dimmable LED Output 3 Dimmer

Independent dimmer channel 3 (light profile, id=2) with brightness control, calibration, and per-channel power metering

numeric
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current
Flags
Service Actions
Calibration

Dimmable LED Output 3

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "light"
	adderror("Profile is not set to light (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/Light.GetStatus?id=" + ID);
IF response.IsSuccess
    Light.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Light.GetConfig?id=" + ID);
IF response.IsSuccess
    Light.GetConfig := response.Content;
END

if ! ISNULL(parsejson(Light.GetStatus, "errors", true))
    adderror("Error: " + parsejson(Light.GetStatus, "errors"));
end
Read level
bool output := PARSEJSON(Light.GetStatus, "$.output");
var brightness := PARSEJSON(Light.GetStatus, "$.brightness");

if output
    return(brightness / 100);
else
    return(0);
end
Write level
SENDHTTPREQUEST("/rpc/Light.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=" + round(Le*100.0));
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(Light.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(Light.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(Light.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(Light.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(Light.GetStatus, "$.current", true)
Flags
parsejson(Light.GetStatus, "$.flags", true)
Service Actions
${detail_deviceSettings_TemperatureSensor_categoryCalibration}
VAR response := SENDHTTPREQUEST("/rpc/Light.Calibrate?id=" + ID);
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Dimmable LED Output 4 Dimmer

Independent dimmer channel 4 (light profile, id=3) with brightness control, calibration, and per-channel power metering

numeric
Service Attributes
Temperature
Energy Consumption
Power
Voltage
Current
Flags
Service Actions
Calibration

Dimmable LED Output 4

Read (module)
if PARSEJSON(Sys.GetConfig, "$.device.profile") != "light"
	adderror("Profile is not set to light (" + PARSEJSON(Sys.GetConfig, "$.device.profile") + ")");
end

VAR response := SENDHTTPREQUEST("/rpc/Light.GetStatus?id=" + ID);
IF response.IsSuccess
    Light.GetStatus := response.Content;
END

response := SENDHTTPREQUEST("/rpc/Light.GetConfig?id=" + ID);
IF response.IsSuccess
    Light.GetConfig := response.Content;
END

if ! ISNULL(parsejson(Light.GetStatus, "errors", true))
    adderror("Error: " + parsejson(Light.GetStatus, "errors"));
end
Read level
bool output := PARSEJSON(Light.GetStatus, "$.output");
var brightness := PARSEJSON(Light.GetStatus, "$.brightness");

if output
    return(brightness / 100);
else
    return(0);
end
Write level
SENDHTTPREQUEST("/rpc/Light.Set?id=" + ID + "&on=" + if(St, "true", "false") + "&brightness=" + round(Le*100.0));
Service Attributes
${device_variable_realtemperature} [°C]
parsejson(Light.GetStatus, "$.temperature.tC", true)
${device_variable_electricityconsumption} [Wh]
parsejson(Light.GetStatus, "$.aenergy.total", true)
${device_variable_electricitydemand} [W]
parsejson(Light.GetStatus, "$.apower", true)
${valueLogType_ElectricVoltage} [V]
parsejson(Light.GetStatus, "$.voltage", true)
${valueLogType_ElectricCurrent} [A]
parsejson(Light.GetStatus, "$.current", true)
Flags
parsejson(Light.GetStatus, "$.flags", true)
Service Actions
${detail_deviceSettings_TemperatureSensor_categoryCalibration}
VAR response := SENDHTTPREQUEST("/rpc/Light.Calibrate?id=" + ID);
IF response.IsSuccess
    return("OK");
else
    return("Error");
END
Connection: Packet Parser → HTTP
Possible improvements (13)
  • Input State — Physical switch/button input state, available via /rpc/Input.GetStatus?id=0
  • WiFi SSID — Already exposed as module-level service attribute, not as standalone device
  • WiFi Signal Strength — Already exposed as module-level service attribute, not as standalone device
  • IP Address — Already exposed as module-level service attribute, not as standalone device
  • MAC Address — Already exposed as module-level service attribute, not as standalone device
  • Uptime — Seconds since last reboot, available in Sys.GetStatus response
  • RAM Usage — Total and free RAM in bytes, available in Sys.GetStatus response
  • Device Time — Current device time in HH:MM format, available in Sys.GetStatus response
  • Firmware Update — Already implemented as module-level service action
  • Reboot — Already implemented as module-level service action
  • Night Mode — Night mode configuration with brightness limits and schedule, available in component GetConfig
  • Transition Duration — Color/brightness transition time in ms, available as parameter in RGB.Set and RGBW.Set
  • Minimum Brightness on Toggle — Minimum brightness percentage when toggling on, available in Light component config

Sources