Download OpenAPI specification:Download
Official documention for MiLight Hub's REST API.
{- "firmware": "string",
- "version": "string",
- "ip_address": "string",
- "reset_reason": "string",
- "variant": "string",
- "free_heap": 0,
- "arduino_version": "string",
- "queue_stats": {
- "length": 0,
- "dropped_packets": 0
}, - "mqtt": {
- "configured": true,
- "connected": true,
- "status": "string"
}
}
Send commands to the system. Supported commands:
restart
. Restart the ESP8266.clear_wifi_config
. Clears on-board wifi information. ESP8266 will reboot and enter wifi config mode.command required | string Enum: "restart" "clear_wifi_config" |
{- "command": "restart"
}
{- "success": true,
- "error": "string"
}
{- "admin_username": "",
- "admin_password": "",
- "ce_pin": 4,
- "csn_pin": 15,
- "reset_pin": 0,
- "led_pin": -2,
- "packet_repeats": 50,
- "http_repeat_factor": 1,
- "auto_restart_period": 0,
- "mqtt_server": "example.com",
- "mqtt_username": "string",
- "mqtt_password": "string",
- "mqtt_topic_pattern": "milight/commands/:device_id/:device_type/:group_id",
- "mqtt_update_topic_pattern": "milight/updates/:device_id/:device_type/:group_id",
- "mqtt_state_topic_pattern": "milight/state/:device_id/:device_type/:group_id",
- "mqtt_client_status_topic": "milight/status",
- "mqtt_retain": true,
- "simple_mqtt_client_status": true,
- "radio_interface_type": "nRF24",
- "discovery_port": 48899,
- "listen_repeats": 3,
- "state_flush_interval": 10000,
- "mqtt_state_rate_limit": 500,
- "mqtt_debounce_delay": 500,
- "packet_repeat_throttle_threshold": 200,
- "packet_repeat_throttle_sensitivity": 0,
- "packet_repeat_minimum": 3,
- "enable_automatic_mode_switching": false,
- "led_mode_wifi_config": "Off",
- "led_mode_wifi_failed": "Off",
- "led_mode_operating": "Off",
- "led_mode_packet": "Off",
- "led_mode_packet_count": 3,
- "hostname": "milight-hub",
- "rf24_power_level": "MIN",
- "rf24_listen_channel": "LOW",
- "wifi_static_ip": "192.168.0.1",
- "wifi_static_ip_gateway": "192.168.0.1",
- "wifi_static_ip_netmask": "192.168.0.1",
- "packet_repeats_per_loop": 10,
- "home_assistant_discovery_prefix": "homeassistant/",
- "wifi_mode": "b",
- "rf24_channels": [
- "LOW"
], - "gateway_configs": [
- [
- [
- 1234,
- 5555,
- 6
]
]
], - "group_state_fields": [
- "state"
], - "group_id_aliases": {
- "alias1": [
- 1234,
- "rgb_cct",
- 1
], - "alias2": [
- 1234,
- "rgb_cct",
- 2
]
}, - "default_transition_period": 0
}
admin_username | string (HTTP Username) Default: "" If specified along with a password, HTTP basic auth will be enabled to access the web interface and the REST API. |
admin_password | string (HTTP Password) Default: "" If specified along with a username, HTTP basic auth will be enabled to access the web interface and the REST API. |
ce_pin | integer Default: 4 CE pin to use for SPI radio (nRF24, LT8900) |
csn_pin | integer Default: 15 CSN pin to use with nRF24 |
reset_pin | integer Default: 0 Reset pin to use with LT8900 |
led_pin | integer Default: -2 Pin to control for status LED. Set to a negative value to invert on/off status. |
packet_repeats | integer Default: 50 Number of times to resend the same 2.4 GHz milight packet when a command is sent. |
http_repeat_factor | integer Default: 1 Packet repeats resulting from REST commands will be multiplied by this number. |
auto_restart_period | integer Default: 0 Automatically restart the device after the number of specified minutes. Use 0 to disable. |
(string or null) or (string or null) MQTT server to connect to. Can contain port number in the form 'mqtt-hostname:1883'. Leave empty to disable MQTT. | |
mqtt_username | string If specified, use this username to authenticate with the MQTT server. |
mqtt_password | string If specified, use this password to authenticate with the MQTT server. |
mqtt_topic_pattern | string Topic pattern to listen on for commands. More detail on the format in README. |
mqtt_update_topic_pattern | string Topic pattern individual intercepted commands will be sent to. More detail on the format in README. |
mqtt_state_topic_pattern | string Topic pattern device state will be sent to. More detail on the format in README. |
mqtt_client_status_topic | string Topic client status will be sent to. |
mqtt_retain | boolean Default: true If true, messages sent to state and client status topics will be published with the retain flag. |
simple_mqtt_client_status | boolean Default: true If true, will use a simple enum flag ( |
radio_interface_type | string Default: "nRF24" Enum: "nRF24" "LT8900" Type of radio interface to use. NRF24 is better supported and more common. Only use LT8900 if you're sure you mean to! |
discovery_port | integer Default: 48899 UDP port used for milight's discovery protocol. Set to 0 to disable. |
listen_repeats | integer Default: 3 Controls how many cycles are spent listening for packets. Set to 0 to disable passive listening. |
state_flush_interval | integer Default: 10000 Controls how many miliseconds must pass between states being flushed to persistent storage. Set to 0 to disable throttling. |
mqtt_state_rate_limit | integer Default: 500 Controls how many miliseconds must pass between MQTT state updates. Set to 0 to disable throttling. |
mqtt_debounce_delay | integer Default: 500 Controls how much time has to pass after the last status update was queued. |
packet_repeat_throttle_threshold | integer Default: 200 Controls how packet repeats are throttled. Packets sent with less time (measured in milliseconds) between them than this value (in milliseconds) will cause packet repeats to be throttled down. More than this value will unthrottle up. |
packet_repeat_throttle_sensitivity | integer [ 0 .. 1000 ] Default: 0 Controls how packet repeats are throttled. Higher values cause packets to be throttled up and down faster. Set to 0 to disable throttling. |
packet_repeat_minimum | integer Default: 3 Controls how far throttling can decrease the number of repeated packets |
enable_automatic_mode_switching | boolean Default: false When making updates to hue or white temperature in a different bulb mode, switch back to the original bulb mode after applying the setting change. |
led_mode_wifi_config | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_wifi_failed | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_operating | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_packet | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_packet_count | integer Default: 3 Number of times the LED will flash when packets are changing |
hostname | string[a-zA-Z0-9-]+ Default: "milight-hub" Hostname that will be advertized on a DHCP request |
rf24_power_level | string Default: "MAX" Enum: "MIN" "LOW" "HIGH" "MAX" Power level used when packets are sent. See nRF24 documentation for further detail. |
rf24_listen_channel | string (RF24Channel) Enum: "LOW" "MID" "HIGH" |
wifi_static_ip | string <ipv4> If specified, the static IP address to use |
wifi_static_ip_gateway | string <ipv4> If specified along with static IP, the gateway address to use |
wifi_static_ip_netmask | string <ipv4> If specified along with static IP, the netmask to use |
packet_repeats_per_loop | integer Default: 10 Packets are sent asynchronously. This number controls the number of repeats sent during each iteration. Increase this number to improve packet throughput. Decrease to improve system multi-tasking. |
home_assistant_discovery_prefix | string Default: "homeassistant/" If specified along with MQTT settings, will enable HomeAssistant MQTT discovery using the specified discovery prefix. HomeAssistant's default is |
wifi_mode | string Default: "n" Enum: "b" "g" "n" Forces WiFi into the spcified mode. Try using B or G mode if you are having stability issues. Changing this may cause the device to momentarily lose connection to the network. |
rf24_channels | Array of strings (RF24Channel) Items Enum: "LOW" "MID" "HIGH" Defines which channels we send on. Each remote type has three channels. We can send on any subset of these. |
gateway_configs | Array of integers[ items ] List of UDP servers, stored as 3-long arrays. Elements are 1) remote ID to bind to, 2) UDP port to listen on, 3) protocol version (5 or 6) |
group_state_fields | Array of strings (GroupStateField) Items Enum: "state" "status" "brightness" "level" "hue" "saturation" "color" "mode" "kelvin" "color_temp" "bulb_mode" "computed_color" "effect" "device_id" "group_id" "device_type" "oh_color" "hex_color" "color_mode" |
group_id_aliases | object Deprecated DEPRECATED (use /aliases routes instead) Keys are aliases, values are 3-long arrays with same schema as items in 'device_ids'. |
default_transition_period | integer Default number of milliseconds between transition packets. Set this value lower for more granular transitions, or higher if you are having performance issues during transitions. |
{- "admin_username": "",
- "admin_password": "",
- "ce_pin": 4,
- "csn_pin": 15,
- "reset_pin": 0,
- "led_pin": -2,
- "packet_repeats": 50,
- "http_repeat_factor": 1,
- "auto_restart_period": 0,
- "mqtt_server": "example.com",
- "mqtt_username": "string",
- "mqtt_password": "string",
- "mqtt_topic_pattern": "milight/commands/:device_id/:device_type/:group_id",
- "mqtt_update_topic_pattern": "milight/updates/:device_id/:device_type/:group_id",
- "mqtt_state_topic_pattern": "milight/state/:device_id/:device_type/:group_id",
- "mqtt_client_status_topic": "milight/status",
- "mqtt_retain": true,
- "simple_mqtt_client_status": true,
- "radio_interface_type": "nRF24",
- "discovery_port": 48899,
- "listen_repeats": 3,
- "state_flush_interval": 10000,
- "mqtt_state_rate_limit": 500,
- "mqtt_debounce_delay": 500,
- "packet_repeat_throttle_threshold": 200,
- "packet_repeat_throttle_sensitivity": 0,
- "packet_repeat_minimum": 3,
- "enable_automatic_mode_switching": false,
- "led_mode_wifi_config": "Off",
- "led_mode_wifi_failed": "Off",
- "led_mode_operating": "Off",
- "led_mode_packet": "Off",
- "led_mode_packet_count": 3,
- "hostname": "milight-hub",
- "rf24_power_level": "MIN",
- "rf24_listen_channel": "LOW",
- "wifi_static_ip": "192.168.0.1",
- "wifi_static_ip_gateway": "192.168.0.1",
- "wifi_static_ip_netmask": "192.168.0.1",
- "packet_repeats_per_loop": 10,
- "home_assistant_discovery_prefix": "homeassistant/",
- "wifi_mode": "b",
- "rf24_channels": [
- "LOW"
], - "gateway_configs": [
- [
- [
- 1234,
- 5555,
- 6
]
]
], - "group_state_fields": [
- "state"
], - "group_id_aliases": {
- "alias1": [
- 1234,
- "rgb_cct",
- 1
], - "alias2": [
- 1234,
- "rgb_cct",
- 2
]
}, - "default_transition_period": 0
}
{- "success": true,
- "error": "string"
}
admin_username | string (HTTP Username) Default: "" If specified along with a password, HTTP basic auth will be enabled to access the web interface and the REST API. |
admin_password | string (HTTP Password) Default: "" If specified along with a username, HTTP basic auth will be enabled to access the web interface and the REST API. |
ce_pin | integer Default: 4 CE pin to use for SPI radio (nRF24, LT8900) |
csn_pin | integer Default: 15 CSN pin to use with nRF24 |
reset_pin | integer Default: 0 Reset pin to use with LT8900 |
led_pin | integer Default: -2 Pin to control for status LED. Set to a negative value to invert on/off status. |
packet_repeats | integer Default: 50 Number of times to resend the same 2.4 GHz milight packet when a command is sent. |
http_repeat_factor | integer Default: 1 Packet repeats resulting from REST commands will be multiplied by this number. |
auto_restart_period | integer Default: 0 Automatically restart the device after the number of specified minutes. Use 0 to disable. |
(string or null) or (string or null) MQTT server to connect to. Can contain port number in the form 'mqtt-hostname:1883'. Leave empty to disable MQTT. | |
mqtt_username | string If specified, use this username to authenticate with the MQTT server. |
mqtt_password | string If specified, use this password to authenticate with the MQTT server. |
mqtt_topic_pattern | string Topic pattern to listen on for commands. More detail on the format in README. |
mqtt_update_topic_pattern | string Topic pattern individual intercepted commands will be sent to. More detail on the format in README. |
mqtt_state_topic_pattern | string Topic pattern device state will be sent to. More detail on the format in README. |
mqtt_client_status_topic | string Topic client status will be sent to. |
mqtt_retain | boolean Default: true If true, messages sent to state and client status topics will be published with the retain flag. |
simple_mqtt_client_status | boolean Default: true If true, will use a simple enum flag ( |
radio_interface_type | string Default: "nRF24" Enum: "nRF24" "LT8900" Type of radio interface to use. NRF24 is better supported and more common. Only use LT8900 if you're sure you mean to! |
discovery_port | integer Default: 48899 UDP port used for milight's discovery protocol. Set to 0 to disable. |
listen_repeats | integer Default: 3 Controls how many cycles are spent listening for packets. Set to 0 to disable passive listening. |
state_flush_interval | integer Default: 10000 Controls how many miliseconds must pass between states being flushed to persistent storage. Set to 0 to disable throttling. |
mqtt_state_rate_limit | integer Default: 500 Controls how many miliseconds must pass between MQTT state updates. Set to 0 to disable throttling. |
mqtt_debounce_delay | integer Default: 500 Controls how much time has to pass after the last status update was queued. |
packet_repeat_throttle_threshold | integer Default: 200 Controls how packet repeats are throttled. Packets sent with less time (measured in milliseconds) between them than this value (in milliseconds) will cause packet repeats to be throttled down. More than this value will unthrottle up. |
packet_repeat_throttle_sensitivity | integer [ 0 .. 1000 ] Default: 0 Controls how packet repeats are throttled. Higher values cause packets to be throttled up and down faster. Set to 0 to disable throttling. |
packet_repeat_minimum | integer Default: 3 Controls how far throttling can decrease the number of repeated packets |
enable_automatic_mode_switching | boolean Default: false When making updates to hue or white temperature in a different bulb mode, switch back to the original bulb mode after applying the setting change. |
led_mode_wifi_config | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_wifi_failed | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_operating | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_packet | string (LedMode) Enum: "Off" "Slow toggle" "Fast toggle" "Slow blip" "Fast blip" "Flicker" "On" |
led_mode_packet_count | integer Default: 3 Number of times the LED will flash when packets are changing |
hostname | string[a-zA-Z0-9-]+ Default: "milight-hub" Hostname that will be advertized on a DHCP request |
rf24_power_level | string Default: "MAX" Enum: "MIN" "LOW" "HIGH" "MAX" Power level used when packets are sent. See nRF24 documentation for further detail. |
rf24_listen_channel | string (RF24Channel) Enum: "LOW" "MID" "HIGH" |
wifi_static_ip | string <ipv4> If specified, the static IP address to use |
wifi_static_ip_gateway | string <ipv4> If specified along with static IP, the gateway address to use |
wifi_static_ip_netmask | string <ipv4> If specified along with static IP, the netmask to use |
packet_repeats_per_loop | integer Default: 10 Packets are sent asynchronously. This number controls the number of repeats sent during each iteration. Increase this number to improve packet throughput. Decrease to improve system multi-tasking. |
home_assistant_discovery_prefix | string Default: "homeassistant/" If specified along with MQTT settings, will enable HomeAssistant MQTT discovery using the specified discovery prefix. HomeAssistant's default is |
wifi_mode | string Default: "n" Enum: "b" "g" "n" Forces WiFi into the spcified mode. Try using B or G mode if you are having stability issues. Changing this may cause the device to momentarily lose connection to the network. |
rf24_channels | Array of strings (RF24Channel) Items Enum: "LOW" "MID" "HIGH" Defines which channels we send on. Each remote type has three channels. We can send on any subset of these. |
gateway_configs | Array of integers[ items ] List of UDP servers, stored as 3-long arrays. Elements are 1) remote ID to bind to, 2) UDP port to listen on, 3) protocol version (5 or 6) |
group_state_fields | Array of strings (GroupStateField) Items Enum: "state" "status" "brightness" "level" "hue" "saturation" "color" "mode" "kelvin" "color_temp" "bulb_mode" "computed_color" "effect" "device_id" "group_id" "device_type" "oh_color" "hex_color" "color_mode" |
group_id_aliases | object Deprecated DEPRECATED (use /aliases routes instead) Keys are aliases, values are 3-long arrays with same schema as items in 'device_ids'. |
default_transition_period | integer Default number of milliseconds between transition packets. Set this value lower for more granular transitions, or higher if you are having performance issues during transitions. |
{- "admin_username": "",
- "admin_password": "",
- "ce_pin": 4,
- "csn_pin": 15,
- "reset_pin": 0,
- "led_pin": -2,
- "packet_repeats": 50,
- "http_repeat_factor": 1,
- "auto_restart_period": 0,
- "mqtt_server": "example.com",
- "mqtt_username": "string",
- "mqtt_password": "string",
- "mqtt_topic_pattern": "milight/commands/:device_id/:device_type/:group_id",
- "mqtt_update_topic_pattern": "milight/updates/:device_id/:device_type/:group_id",
- "mqtt_state_topic_pattern": "milight/state/:device_id/:device_type/:group_id",
- "mqtt_client_status_topic": "milight/status",
- "mqtt_retain": true,
- "simple_mqtt_client_status": true,
- "radio_interface_type": "nRF24",
- "discovery_port": 48899,
- "listen_repeats": 3,
- "state_flush_interval": 10000,
- "mqtt_state_rate_limit": 500,
- "mqtt_debounce_delay": 500,
- "packet_repeat_throttle_threshold": 200,
- "packet_repeat_throttle_sensitivity": 0,
- "packet_repeat_minimum": 3,
- "enable_automatic_mode_switching": false,
- "led_mode_wifi_config": "Off",
- "led_mode_wifi_failed": "Off",
- "led_mode_operating": "Off",
- "led_mode_packet": "Off",
- "led_mode_packet_count": 3,
- "hostname": "milight-hub",
- "rf24_power_level": "MIN",
- "rf24_listen_channel": "LOW",
- "wifi_static_ip": "192.168.0.1",
- "wifi_static_ip_gateway": "192.168.0.1",
- "wifi_static_ip_netmask": "192.168.0.1",
- "packet_repeats_per_loop": 10,
- "home_assistant_discovery_prefix": "homeassistant/",
- "wifi_mode": "b",
- "rf24_channels": [
- "LOW"
], - "gateway_configs": [
- [
- [
- 1234,
- 5555,
- 6
]
]
], - "group_state_fields": [
- "state"
], - "group_id_aliases": {
- "alias1": [
- 1234,
- "rgb_cct",
- 1
], - "alias2": [
- 1234,
- "rgb_cct",
- 2
]
}, - "default_transition_period": 0
}
{- "success": true,
- "error": "string"
}
alias required | string |
id | integer |
device_id required | integer |
group_id required | integer |
device_type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" |
{- "alias": "string",
- "id": 0,
- "device_id": 0,
- "group_id": 0,
- "device_type": "rgb_cct"
}
{- "id": 0
}
id required | integer |
alias | string |
device_id | integer |
group_id | integer |
{- "alias": "string",
- "device_id": 0,
- "group_id": 0
}
{- "success": true,
- "error": "string"
}
[- {
- "state": {
- "alias": "string",
- "state": "ON",
- "color": {
- "r": 0,
- "g": 0,
- "b": 0
}, - "level": 100,
- "kelvin": 100,
- "color_mode": "brightness"
}, - "device": {
- "id": 0,
- "device_id": 0,
- "device_type": "rgb_cct",
- "group_id": 0,
- "alias": "string"
}
}
]
Update a batch of gateways with the provided parameters.
Array of objects (BulbId) | |
GroupStateCommands (object) or GroupState (object) |
[- {
- "gateways": [
- {
- "device_id": 1234,
- "group_id": 1,
- "device_type": "rgb_cct"
}
], - "update": {
- "command": "pair",
- "commands": [
- "level_up",
- "temperature_up"
]
}
}
]
{- "success": true,
- "error": "string"
}
If blockOnQueue
is provided, a response will not be returned until any unprocessed packets in the command queue are finished sending.
required | integer or string Example: 0x1234 2-byte device ID. Can be decimal or hexadecimal. |
remote-type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" Example: rgb_cct Type of remote to read a packet from. If unspecified, will read packets from all remote types. |
group-id required | integer [ 0 .. 8 ] Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0. |
blockOnQueue | boolean If true, response will block on update packets being sent before returning |
{- "state": "ON",
- "status": "ON",
- "hue": 359,
- "saturation": 100,
- "kelvin": 100,
- "temperature": 100,
- "color_temp": 153,
- "mode": 0,
- "color": "255,0,255",
- "level": 50,
- "brightness": 170,
- "effect": "night_mode",
- "transition": 2,
- "color_mode": "brightness"
}
Update state of the bulbs with the provided parameters. Existing parameters will be unchanged.
if blockOnQueue
is set to true, the response will not return until packets corresponding to the commands sent are processed, and the updated GroupState
will be returned. If blockOnQueue
is false or not provided, a simple response indicating success will be returned.
if fmt
is set to normalized
, the response will be in normalized format.
required | integer or string Example: 0x1234 2-byte device ID. Can be decimal or hexadecimal. |
remote-type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" Example: rgb_cct Type of remote to read a packet from. If unspecified, will read packets from all remote types. |
group-id required | integer [ 0 .. 8 ] Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0. |
blockOnQueue | boolean If true, response will block on update packets being sent before returning |
fmt | string Value: "normalized" If set to |
state | string (State) Enum: "ON" "OFF" On/Off state |
status | string (State) Enum: "ON" "OFF" On/Off state |
hue | integer [ 0 .. 359 ] Color hue. Will change bulb to color mode. |
saturation | integer [ 0 .. 100 ] Color saturation. Will normally change bulb to color mode. |
kelvin | integer [ 0 .. 100 ] White temperature. 0 is coolest, 100 is warmest. |
temperature | integer [ 0 .. 100 ] Alias for |
color_temp | integer [ 153 .. 370 ] White temperature measured in mireds. Lower values are cooler. |
mode | integer Party mode ID. Actual effect depends on the bulb. |
string or object | |
level | integer [ 0 .. 100 ] Brightness on a 0-100 scale. |
brightness | integer [ 0 .. 255 ] Brightness on a 0-255 scale. |
effect | string Enum: "night_mode" "white_mode" |
transition | number Enables a transition from current state to the provided state. |
color_mode | string (ColorMode) Enum: "brightness" "rgb" "color_temp" "onoff" Describes the current color mode of the bulb. Useful for HomeAssistant. |
GroupStateCommand (string) or object | |
commands | Array of strings (GroupStateCommand) Items Enum: "unpair" "pair" "set_white" "night_mode" "level_up" "level_down" "temperature_up" "temperature_down" "next_mode" "previous_mode" "mode_speed_down" "mode_speed_up" "toggle" |
{- "state": "ON",
- "status": "ON",
- "hue": 359,
- "saturation": 100,
- "kelvin": 100,
- "temperature": 100,
- "color_temp": 153,
- "mode": 0,
- "color": "255,0,255",
- "level": 50,
- "brightness": 170,
- "effect": "night_mode",
- "transition": 2,
- "color_mode": "brightness",
- "command": "pair",
- "commands": [
- "level_up",
- "temperature_up"
]
}
{- "success": true,
- "error": "string"
}
Usets all known values for state fields for the corresponding device. If MQTT is configured, the retained state message corresponding to this device will also be deleted.
required | integer or string Example: 0x1234 2-byte device ID. Can be decimal or hexadecimal. |
remote-type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" Example: rgb_cct Type of remote to read a packet from. If unspecified, will read packets from all remote types. |
group-id required | integer [ 0 .. 8 ] Group ID. Should be 0-8, depending on remote type. Group 0 is a 'wildcard' group. All bulbs paired with the same device ID will respond to commands sent to Group 0. |
{- "success": true,
- "error": "string"
}
device-alias required | string Device alias saved in settings |
{- "state": "ON",
- "status": "ON",
- "hue": 359,
- "saturation": 100,
- "kelvin": 100,
- "temperature": 100,
- "color_temp": 153,
- "mode": 0,
- "color": "255,0,255",
- "level": 50,
- "brightness": 170,
- "effect": "night_mode",
- "transition": 2,
- "color_mode": "brightness"
}
device-alias required | string Device alias saved in settings |
blockOnQueue | boolean If true, response will block on update packets being sent before returning |
fmt | string Value: "normalized" If set to |
state | string (State) Enum: "ON" "OFF" On/Off state |
status | string (State) Enum: "ON" "OFF" On/Off state |
hue | integer [ 0 .. 359 ] Color hue. Will change bulb to color mode. |
saturation | integer [ 0 .. 100 ] Color saturation. Will normally change bulb to color mode. |
kelvin | integer [ 0 .. 100 ] White temperature. 0 is coolest, 100 is warmest. |
temperature | integer [ 0 .. 100 ] Alias for |
color_temp | integer [ 153 .. 370 ] White temperature measured in mireds. Lower values are cooler. |
mode | integer Party mode ID. Actual effect depends on the bulb. |
string or object | |
level | integer [ 0 .. 100 ] Brightness on a 0-100 scale. |
brightness | integer [ 0 .. 255 ] Brightness on a 0-255 scale. |
effect | string Enum: "night_mode" "white_mode" |
transition | number Enables a transition from current state to the provided state. |
color_mode | string (ColorMode) Enum: "brightness" "rgb" "color_temp" "onoff" Describes the current color mode of the bulb. Useful for HomeAssistant. |
GroupStateCommand (string) or object | |
commands | Array of strings (GroupStateCommand) Items Enum: "unpair" "pair" "set_white" "night_mode" "level_up" "level_down" "temperature_up" "temperature_down" "next_mode" "previous_mode" "mode_speed_down" "mode_speed_up" "toggle" |
{- "state": "ON",
- "status": "ON",
- "hue": 359,
- "saturation": 100,
- "kelvin": 100,
- "temperature": 100,
- "color_temp": 153,
- "mode": 0,
- "color": "255,0,255",
- "level": 50,
- "brightness": 170,
- "effect": "night_mode",
- "transition": 2,
- "color_mode": "brightness",
- "command": "pair",
- "commands": [
- "level_up",
- "temperature_up"
]
}
{- "success": true,
- "error": "string"
}
Usets all known values for state fields for the corresponding device. If MQTT is configured, the retained state message corresponding to this device will also be deleted.
device-alias required | string Device alias saved in settings |
{- "success": true,
- "error": "string"
}
Read a packet from the given remote type. Does not return a response until a packet is read. If remote-type
is unspecified, will read from all remote types simultaneously.
remote-type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" Example: rgb_cct Type of remote to read a packet from. If unspecified, will read packets from all remote types. |
{- "packet_info": "string"
}
remote-type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" Example: rgb_cct Type of remote to read a packet from. If unspecified, will read packets from all remote types. |
packet | string([A-Fa-f0-9]{2}[ ])+ Raw packet to send |
num_repeats | integer >= 1 Number of repeated packets to send |
{- "packet": "01 02 03 04 05 06 07 08 09",
- "num_repeats": 50
}
{- "success": true,
- "error": "string"
}
field | string (TransitionField) Enum: "hue" "saturation" "brightness" "level" "kelvin" "color_temp" "color" "status" If transitioning 'status': * If transitioning to 'OFF', will fade to 0 brightness and then turn off. * If transitioning to 'ON', will turn on, set brightness to 0, and fade to brightness 100. |
integer or string (TransitionValue) Either an int value or a color | |
duration | number <float> Duration of transition, measured in seconds |
period | integer Length of time between updates in a transition, measured in milliseconds |
device_id required | integer [ 0 .. 65536 ] |
group_id required | integer [ 0 .. 8 ] |
device_type required | string (RemoteType) Enum: "rgbw" "cct" "rgb_cct" "rgb" "fut089" "fut091" "fut020" |
{- "field": "brightness",
- "start_value": 0,
- "end_value": 0,
- "duration": 0,
- "period": 0,
- "device_id": 1234,
- "group_id": 1,
- "device_type": "rgb_cct"
}
{- "success": true,
- "error": "string"
}
id required | integer ID of transition. This will be an auto-incrementing number reset after a restart. |
{- "field": "brightness",
- "start_value": 0,
- "end_value": 0,
- "duration": 0,
- "period": 0,
- "id": 0,
- "last_sent": 0,
- "bulb": {
- "device_id": 1234,
- "group_id": 1,
- "device_type": "rgb_cct"
}, - "type": "field",
- "current_value": 0
}