Skip to content

API Reference

intermittech edited this page Jul 15, 2026 · 1 revision

HTTP API

All responses are returned in JSON format.

  • Status Request: http://[device-ip]/relays
  • Switch Command: http://[device-ip]/relays?switch=1,0,1,1

The number of values behind the switch parameter must correspond to the number of relays. The value 1 switches the relay on, 0 switches it off.

  • Toggle Command: http://[device-ip]/relays?toggle=1,0,1,1

The number of values behind the parameter switch must correspond to the number of relays. The value 1 causes the relay to toggle, 0 leaves its state unchanged.

Examples:

  1. total of 4 relays, relay 2 will be toggled: http://[device-ip]/relays?toggle=0,1,0,0
  2. total of 3 relays, relay 1&3 will be switched on: http://[device-ip]/relays?switch=1,0,1

JSON API

You can toggle the relay state by sending the following JSON object to: http://[device-ip]/json

Switch relay 0 on: {"PowerManager":{"relay":0,"on":true}}

Switch relay 3 and 4 off: {"PowerManager":[{"relay":2,"on":false},{"relay":3,"on":false}]}

MQTT API

  • wled/deviceMAC/relay/0/command on|off|toggle
  • wled/deviceMAC/relay/1/command on|off|toggle

When a relay is switched, a message is published:

  • wled/deviceMAC/relay/0 on|off

This page is generated from the usermod's in-tree readme (usermods/PowerManager/readme.md) by sync_wiki.py - edit there, not here.

Clone this wiki locally