From b3a8ebdba165f00bce8a438d88cc5b513d91a57c Mon Sep 17 00:00:00 2001 From: Paul W Russell Date: Thu, 7 May 2020 11:52:44 +1000 Subject: [PATCH] initial LIFX connector (#246) --- .../LIFX/apiDefinition.swagger.json | 2422 +++++++++++++++++ certified-connectors/LIFX/apiProperties.json | 34 + certified-connectors/LIFX/readme.md | 41 + 3 files changed, 2497 insertions(+) create mode 100644 certified-connectors/LIFX/apiDefinition.swagger.json create mode 100644 certified-connectors/LIFX/apiProperties.json create mode 100644 certified-connectors/LIFX/readme.md diff --git a/certified-connectors/LIFX/apiDefinition.swagger.json b/certified-connectors/LIFX/apiDefinition.swagger.json new file mode 100644 index 000000000..b478093ff --- /dev/null +++ b/certified-connectors/LIFX/apiDefinition.swagger.json @@ -0,0 +1,2422 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "LIFX", + "description": "LIFX make Wi-Fi-enabled LED smart lighting. Deep colors, bright whites, and unique features, effects and integrations make for Smarter Light. Use this connector to control your LIFX." + }, + "host": "api.lifx.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [ + "application/json" + ], + "paths": { + "/v1/lights/{Lights}/effects/move": { + "post": { + "summary": "Move current pattern across Beam or Z Strip", + "description": "Move current pattern across Beam or Z Strip", + "operationId": "MoveEffect", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "direction": { + "type": "string", + "description": "Move direction, can be forward or backward.", + "title": "Direction", + "default": "forward", + "enum": [ + "forward", + "backward" + ], + "x-ms-enum-values": [ + { + "value": "forward", + "displayName": "Forward" + }, + { + "value": "backward", + "displayName": "Backward" + } + ] + }, + "period": { + "type": "number", + "format": "double", + "description": "The time in seconds for one cycle of the effect.", + "title": "Period", + "default": 1 + }, + "cycles": { + "type": "number", + "format": "float", + "description": "The number of times to move the pattern across the device", + "title": "Cycles" + }, + "power_on": { + "type": "boolean", + "description": "Switch any selected device that is off to on before performing the effect", + "title": "Power On", + "enum": [ + true, + false + ] + } + }, + "default": { + "direction": "forward", + "period": 2, + "cycles": 5, + "power_on": true + } + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/{Lights}": { + "get": { + "summary": "List lights", + "description": "List lights", + "operationId": "ListLights", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + } + ], + "responses": { + "default": { + "description": "default", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "uuid": { + "type": "string", + "description": "uuid" + }, + "label": { + "type": "string", + "description": "label" + }, + "connected": { + "type": "boolean", + "description": "connected" + }, + "power": { + "type": "string", + "description": "power" + }, + "color": { + "type": "object", + "properties": { + "hue": { + "type": "number", + "format": "double", + "description": "hue", + "title": "" + }, + "saturation": { + "type": "integer", + "format": "int32", + "description": "saturation" + }, + "kelvin": { + "type": "integer", + "format": "int32", + "description": "kelvin" + } + }, + "description": "color" + }, + "brightness": { + "type": "number", + "format": "float", + "description": "brightness", + "title": "" + }, + "effect": { + "type": "string", + "description": "effect" + }, + "group": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "name": { + "type": "string", + "description": "name" + } + }, + "description": "group" + }, + "location": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "name": { + "type": "string", + "description": "name" + } + }, + "description": "location" + }, + "product": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name" + }, + "identifier": { + "type": "string", + "description": "identifier" + }, + "company": { + "type": "string", + "description": "company" + }, + "capabilities": { + "type": "object", + "properties": { + "has_color": { + "type": "boolean", + "description": "has_color" + }, + "has_variable_color_temp": { + "type": "boolean", + "description": "has_variable_color_temp" + }, + "has_ir": { + "type": "boolean", + "description": "has_ir" + }, + "has_chain": { + "type": "boolean", + "description": "has_chain" + }, + "has_matrix": { + "type": "boolean", + "description": "has_matrix" + }, + "has_multizone": { + "type": "boolean", + "description": "has_multizone" + }, + "min_kelvin": { + "type": "integer", + "format": "int32", + "description": "min_kelvin" + }, + "max_kelvin": { + "type": "integer", + "format": "int32", + "description": "max_kelvin" + } + }, + "description": "capabilities" + } + }, + "description": "product" + }, + "last_seen": { + "type": "string", + "description": "last_seen" + }, + "seconds_since_seen": { + "type": "integer", + "format": "int32", + "description": "seconds_since_seen" + }, + "zones": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "count" + }, + "zones": { + "type": "array", + "items": { + "type": "object", + "properties": { + "brightness": { + "type": "number", + "format": "float", + "description": "brightness" + }, + "hue": { + "type": "number", + "format": "double", + "description": "hue" + }, + "kelvin": { + "type": "integer", + "format": "int32", + "description": "kelvin" + }, + "saturation": { + "type": "integer", + "format": "int32", + "description": "saturation" + }, + "zone": { + "type": "integer", + "format": "int32", + "description": "zone" + } + } + }, + "description": "zones" + } + }, + "description": "zones" + }, + "chain": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "count" + }, + "children": { + "type": "array", + "items": { + "type": "object", + "properties": { + "height": { + "type": "integer", + "format": "int32", + "description": "height" + }, + "index": { + "type": "integer", + "format": "int32", + "description": "index" + }, + "user_x": { + "type": "integer", + "format": "int32", + "description": "user_x" + }, + "user_y": { + "type": "integer", + "format": "int32", + "description": "user_y" + }, + "width": { + "type": "integer", + "format": "int32", + "description": "width" + } + } + }, + "description": "children" + } + }, + "description": "chain" + } + } + } + } + } + }, + "x-ms-visibility": "internal" + } + }, + "/v1/lights/{Lights}/effects/pulse": { + "post": { + "summary": "Pulse effect by quickly flashing between the given colors", + "description": "Pulse effect by quickly flashing between the given colors", + "operationId": "PulseEffect", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "color": { + "type": "string", + "description": "The color to use for the pulse effect", + "title": "Color", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "from_color": { + "type": "string", + "description": "The color to start the effect from", + "title": "From Color", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "", + "displayName": "Leave unchanged" + }, + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "period": { + "type": "number", + "format": "double", + "description": "The time in seconds for one cycles of the effect.", + "title": "Period", + "default": 1 + }, + "cycles": { + "type": "number", + "format": "double", + "description": "The number of times to repeat the effect.", + "title": "Cycles", + "default": 1 + }, + "persist": { + "type": "boolean", + "description": "False sets the light back to its previous value when effect ends, if true leave the last effect color", + "title": "Persist", + "enum": [ + true, + false + ] + }, + "power_on": { + "type": "boolean", + "description": "If true, turn the bulb on if it is not already on.", + "title": "Power On", + "enum": [ + true, + false + ], + "default": true + } + }, + "default": { + "color": null, + "from_color": null, + "period": 2, + "cycles": 5, + "persist": false, + "power_on": true + }, + "required": [ + "color" + ] + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/scenes": { + "get": { + "summary": "Lists scenes", + "description": "Lists scenes", + "operationId": "ListScenes", + "parameters": [], + "responses": { + "default": { + "description": "default", + "schema": {} + } + }, + "x-ms-visibility": "internal" + } + }, + "/v1/scenes/{Scene}/activate": { + "put": { + "summary": "Activate a scene", + "description": "Activate a scene", + "operationId": "ActivateScene", + "parameters": [ + { + "name": "Scene", + "in": "path", + "type": "string", + "required": true, + "description": "The scene to activate", + "x-ms-summary": "Scene", + "x-ms-dynamic-values": { + "operationId": "ListSceneSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "format": "int32", + "description": "Time in seconds to transition from current light state to the scene state", + "title": "Duration", + "default": 0 + } + }, + "default": { + "duration": 5 + } + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/{Lights}/state": { + "put": { + "summary": "Set state of the lights", + "description": "Set state of the lights", + "operationId": "SetState", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "power": { + "type": "string", + "description": "Turn lights on or off", + "title": "Power", + "enum": [ + "on", + "off" + ], + "x-ms-visibility": "important" + }, + "color": { + "type": "string", + "description": "The color to set the light to", + "title": "Color", + "x-ms-visibility": "important", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "", + "displayName": "Leave unchanged" + }, + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "brightness": { + "type": "number", + "format": "double", + "description": "The brightness level from 0.0 to 1.0. Overrides any brightness set in color (if any).", + "title": "Brightness", + "x-ms-visibility": "important", + "default": 1 + }, + "duration": { + "type": "number", + "format": "double", + "description": "How long in seconds you want the power action to take", + "title": "Duration", + "x-ms-visibility": "important", + "default": 0 + }, + "infrared": { + "type": "number", + "format": "double", + "description": "The maximum brightness of the infrared channel from 0.0 to 1.0", + "title": "Infrared", + "x-ms-visibility": "important" + } + }, + "default": { + "power": "on", + "color": null, + "brightness": 1, + "duration": 5, + "infrared": 1 + }, + "x-ms-visibility": "important" + }, + "required": true, + "x-ms-visibility": "important" + } + ], + "responses": { + "default": { + "description": "default", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id" + }, + "status": { + "type": "string", + "description": "status" + }, + "label": { + "type": "string", + "description": "label" + } + } + }, + "description": "results" + } + } + } + } + }, + "x-ms-visibility": "advanced" + } + }, + "/v1/lights/{Lights}/effects/off": { + "post": { + "summary": "Turn off any running effects on the device", + "description": "Turn off any running effects on the device", + "operationId": "EffectsOff", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Light or group of lights to apply action to", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "power_off": { + "type": "boolean", + "description": "Turn the devices all off", + "title": "Power Off", + "enum": [ + true, + false + ] + } + }, + "default": { + "power_off": true + } + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/states": { + "put": { + "summary": "Set different states on multiple sets of lights", + "description": "Set different states on multiple sets of lights", + "operationId": "SetStates", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "states": { + "type": "array", + "title": "State", + "items": { + "type": "object", + "properties": { + "selector": { + "type": "string", + "description": "Light or group of lights to apply action to", + "title": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + "power": { + "type": "string", + "description": "Turn lights on or off", + "title": "Power", + "enum": [ + "on", + "off" + ], + "x-ms-visibility": "important" + }, + "color": { + "type": "string", + "description": "The color to set the light to", + "title": "Color", + "x-ms-visibility": "important", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "", + "displayName": "Leave unchanged" + }, + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "brightness": { + "type": "number", + "format": "double", + "description": "The brightness level from 0.0 to 1.0. Overrides any brightness set in color (if any).", + "title": "Brightness", + "x-ms-visibility": "important", + "default": 1 + }, + "duration": { + "type": "number", + "format": "double", + "description": "How long in seconds you want the power action to take", + "title": "Duration", + "x-ms-visibility": "important", + "default": 0 + }, + "infrared": { + "type": "number", + "format": "double", + "description": "The maximum brightness of the infrared channel from 0.0 to 1.0", + "title": "Infrared", + "x-ms-visibility": "important" + } + }, + "required": [ + "selector" + ] + }, + "description": "states" + }, + "defaults": { + "type": "object", + "description": "Default values applied when no specific values set", + "title": "Default", + "properties": { + "power": { + "type": "string", + "description": "Turn lights on or off", + "title": "Power", + "enum": [ + "on", + "off" + ], + "x-ms-visibility": "important" + }, + "color": { + "type": "string", + "description": "The color to set the light to", + "title": "Color", + "x-ms-visibility": "important", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "", + "displayName": "Leave unchanged" + }, + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "brightness": { + "type": "number", + "format": "double", + "description": "The brightness level from 0.0 to 1.0. Overrides any brightness set in color (if any).", + "title": "Brightness", + "x-ms-visibility": "important", + "default": 1 + }, + "duration": { + "type": "number", + "format": "double", + "description": "How long in seconds you want the power action to take", + "title": "Duration", + "x-ms-visibility": "important", + "default": 0 + }, + "infrared": { + "type": "number", + "format": "double", + "description": "The maximum brightness of the infrared channel from 0.0 to 1.0", + "title": "Infrared", + "x-ms-visibility": "important" + } + } + } + }, + "default": { + "defaults": { + "duration": 5 + } + }, + "required": [ + "states" + ] + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/{Lights}/toggle": { + "post": { + "summary": "Turn off lights if any of them are on, or turn them on if they are all off", + "description": "Turn off lights if any of them are on, or turn them on if they are all off", + "operationId": "TogglePower", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "duration": { + "type": "number", + "format": "double", + "description": "The time is seconds to spend performing the power toggle.", + "title": "Duration", + "default": 1 + } + }, + "default": { + "duration": 5 + } + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/{Lights}/effects/breathe": { + "post": { + "summary": "Breathe effect by slowly fading between the given colors", + "description": "Breathe effect by slowly fading between the given colors", + "operationId": "BreatheEffect", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "color": { + "type": "string", + "description": "The color to use for the breathe effect", + "title": "Color", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "from_color": { + "type": "string", + "description": "The color to start the effect from", + "title": "From Color", + "enum": [ + "", + "kelvin:1500", + "kelvin:2000", + "kelvin:2500", + "kelvin:2750", + "kelvin:3000", + "kelvin:3200", + "kelvin:3500", + "kelvin:4000", + "kelvin:4500", + "kelvin:5000", + "kelvin:5500", + "kelvin:6000", + "kelvin:6500", + "kelvin:7000", + "kelvin:7500", + "kelvin:8000", + "kelvin:8500", + "kelvin:9000", + "red", + "orange", + "yellow", + "green", + "cyan", + "blue", + "purple", + "pink", + "red saturation:0.5", + "orange saturation:0.5", + "yellow saturation:0.5", + "green saturation:0.5", + "cyan saturation:0.5", + "blue saturation:0.5", + "purple saturation:0.5", + "pink saturation:0.5", + "random" + ], + "x-ms-enum-values": [ + { + "value": "", + "displayName": "Existing color" + }, + { + "value": "kelvin:1500", + "displayName": "Candlelight" + }, + { + "value": "kelvin:2000", + "displayName": "Sunset" + }, + { + "value": "kelvin:2500", + "displayName": "Ultra Warm" + }, + { + "value": "kelvin:2750", + "displayName": "Incandescent" + }, + { + "value": "kelvin:3000", + "displayName": "Warm" + }, + { + "value": "kelvin:3200", + "displayName": "Neutral Warm" + }, + { + "value": "kelvin:3500", + "displayName": "Neutral" + }, + { + "value": "kelvin:4000", + "displayName": "Cool" + }, + { + "value": "kelvin:4500", + "displayName": "Cool Daylight" + }, + { + "value": "kelvin:5000", + "displayName": "Soft Daylight" + }, + { + "value": "kelvin:5500", + "displayName": "Daylight" + }, + { + "value": "kelvin:6000", + "displayName": "Noon Daylight" + }, + { + "value": "kelvin:6500", + "displayName": "Bright Daylight" + }, + { + "value": "kelvin:7000", + "displayName": "Cloudy Daylight" + }, + { + "value": "kelvin:7500", + "displayName": "Blue Daylight" + }, + { + "value": "kelvin:8000", + "displayName": "Blue Overcast" + }, + { + "value": "kelvin:8500", + "displayName": "Blue Water" + }, + { + "value": "kelvin:9000", + "displayName": "Blue Ice" + }, + { + "value": "red", + "displayName": "Red" + }, + { + "value": "orange", + "displayName": "Orange" + }, + { + "value": "yellow", + "displayName": "Yellow" + }, + { + "value": "green", + "displayName": "Green" + }, + { + "value": "cyan", + "displayName": "Cyan" + }, + { + "value": "blue", + "displayName": "Blue" + }, + { + "value": "purple", + "displayName": "Purple" + }, + { + "value": "pink", + "displayName": "Pink" + }, + { + "value": "red saturation:0.5", + "displayName": "Pastel Red" + }, + { + "value": "orange saturation:0.5", + "displayName": "Pastel Orange" + }, + { + "value": "yellow saturation:0.5", + "displayName": "Pastel Yellow" + }, + { + "value": "green saturation:0.5", + "displayName": "Pastel Green" + }, + { + "value": "cyan saturation:0.5", + "displayName": "Pastel Cyan" + }, + { + "value": "blue saturation:0.5", + "displayName": "Pastel Blue" + }, + { + "value": "purple saturation:0.5", + "displayName": "Pastel Purple" + }, + { + "value": "pink saturation:0.5", + "displayName": "Pastel Pink" + }, + { + "value": "random", + "displayName": "Random" + } + ] + }, + "period": { + "type": "number", + "format": "double", + "description": "The time in seconds for one cycle of the effect.", + "title": "Period", + "default": 1 + }, + "cycles": { + "type": "number", + "format": "double", + "description": "The number of times to repeat the effect.", + "title": "Cycles", + "default": 1 + }, + "persist": { + "type": "boolean", + "description": "True leaves lights with last effect color.", + "title": "Persist", + "enum": [ + true, + false + ] + }, + "power_on": { + "type": "boolean", + "description": "If true, turn the bulb on if it is not already on.", + "title": "Power On", + "enum": [ + true, + false + ], + "default": true + }, + "peak": { + "type": "number", + "format": "double", + "description": "Defines where in a period the target color is at its maximum. Minimum 0.0, maximum 1.0.", + "title": "Peak", + "default": 0.5 + } + }, + "default": { + "color": null, + "from_color": null, + "period": 2, + "cycles": 5, + "persist": false, + "power_on": true, + "peak": 1 + }, + "required": [ + "color" + ] + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/lights/{Lights}/effects/morph": { + "post": { + "summary": "Morph effect on Tiles", + "description": "Morph effect on Tiles", + "operationId": "MorphEffect", + "parameters": [ + { + "name": "Lights", + "in": "path", + "type": "string", + "required": true, + "description": "Light or group of lights to apply action to", + "x-ms-summary": "Lights", + "x-ms-dynamic-values": { + "operationId": "ListDeviceSelectors", + "value-path": "selector", + "value-title": "label" + } + }, + { + "name": "body", + "in": "body", + "schema": { + "type": "object", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "How quickly the morph runs in seconds", + "title": "Period" + }, + "duration": { + "type": "integer", + "format": "int32", + "description": "How long the animation lasts for in second", + "title": "Duration" + }, + "palette": { + "type": "array", + "items": { + "type": "string", + "title": "Color", + "description": "Colors in the animation" + }, + "description": "Colors" + }, + "power_on": { + "type": "boolean", + "description": "Switch light that is off to on before performing the effect", + "title": "Power On", + "enum": [ + true, + false + ] + } + }, + "default": { + "period": 5, + "duration": 10, + "palette": [ + "red", + "green", + "blue" + ], + "power_on": true + } + }, + "required": true + } + ], + "responses": { + "default": { + "description": "default", + "schema": {} + } + } + } + }, + "/v1/selectors/devices": { + "get": { + "summary": "List of light selectors", + "description": "List of light selectors", + "operationId": "ListDeviceSelectors", + "responses": { + "default": { + "description": "default", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "selector": { + "type": "string", + "description": "selector" + }, + "label": { + "type": "string", + "description": "label" + } + } + } + } + } + }, + "x-ms-visibility": "internal" + } + }, + "/v1/selectors/scenes": { + "get": { + "summary": "List of scene selectors", + "description": "List of scene selectors", + "operationId": "ListSceneSelectors", + "responses": { + "default": { + "description": "default", + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "selector": { + "type": "string", + "description": "selector" + }, + "label": { + "type": "string", + "description": "label" + } + } + } + } + } + }, + "x-ms-visibility": "internal" + } + } + }, + "definitions": {}, + "parameters": {}, + "responses": {}, + "securityDefinitions": { + "oauth2_auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://cloud.lifx.com/oauth/authorize", + "tokenUrl": "https://cloud.lifx.com/oauth/token", + "scopes": { + "remote_control:all": "remote_control:all" + } + } + }, + "security": [ + { + "oauth2_auth": [ + "remote_control:all" + ] + } + ], + "tags": [] +} \ No newline at end of file diff --git a/certified-connectors/LIFX/apiProperties.json b/certified-connectors/LIFX/apiProperties.json new file mode 100644 index 000000000..ddc0a3498 --- /dev/null +++ b/certified-connectors/LIFX/apiProperties.json @@ -0,0 +1,34 @@ +{ + "properties": { + "connectionParameters": { + "token": { + "type": "oauthSetting", + "oAuthSettings": { + "identityProvider": "oauth2", + "clientId": "<>", + "scopes": [ + "remote_control:all" + ], + "redirectMode": "Global", + "redirectUrl": "https://global.consent.azure-apim.net/redirect", + "properties": { + "IsFirstParty": "False" + }, + "customParameters": { + "authorizationUrl": { + "value": "https://cloud.lifx.com/oauth/authorize" + }, + "tokenUrl": { + "value": "https://cloud.lifx.com/oauth/token" + }, + "refreshUrl": { + "value": "https://cloud.lifx.com/oauth/token" + } + } + } + } + }, + "iconBrandColor": "#03051E", + "capabilities": [] + } +} \ No newline at end of file diff --git a/certified-connectors/LIFX/readme.md b/certified-connectors/LIFX/readme.md new file mode 100644 index 000000000..b0c105b45 --- /dev/null +++ b/certified-connectors/LIFX/readme.md @@ -0,0 +1,41 @@ + +## LIFX Connector +LIFX make Wi-Fi-enabled LED smart lighting. Deep colors, bright whites, and unique features, effects and integrations make for Smarter Light. Use this connector to use your LIFX to provide add immersive visual feedback into your workflows. + +## Pre-requisites +You will need the following to proceed: +- A Microsoft Power Apps or Microsoft Power Automate plan enabling the use of Premium connectors +- [LIFX](https://www.lifx.co) Account + +## API documentation +Introduction: https://api.developer.lifx.com/ +Selectors: https://api.developer.lifx.com/docs/selectors +Colors: https://api.developer.lifx.com/docs/colors + +Set State: https://api.developer.lifx.com/docs/set-state +Set States: https://api.developer.lifx.com/docs/set-states +Toggle Power: https://api.developer.lifx.com/docs/toggle-power +Breathe Effect: https://api.developer.lifx.com/docs/breathe-effect +Move Effect: https://api.developer.lifx.com/docs/move-effect +Morph Effect: https://api.developer.lifx.com/docs/morph-effect +Pulse Effect: https://api.developer.lifx.com/docs/pulse-effect +Effects Off: https://api.developer.lifx.com/docs/effects-off +Activate Scene: https://api.developer.lifx.com/docs/activate-scene + +## Supported Operations +Set State: Set state of the lights. +Set States: Set different states on multiple sets of lights. +Toggle Power: Turn off lights if any of them are on, or turn them on if they are all off. +Breathe Effect: Performs a breathe effect by slowly fading between the given colors. +Move Effect: Performs a move effect on a linear device with zones, by moving the current pattern across the device. Use the parameters to tweak the effect. +Morph Effect: Performs a morph effect on the tiles in your selector. Note that the brightness of the morph is determined by the brightness of the tile, rather than the brightness of the colours in the palette. To change the brightness, use the SetState endpoint. +Pulse Effect: Quickly flashes lights between given colors. +Effects Off: Turn off any running effects on the lights. +Activate Scene: ACtivates a LIFX scene, that has been defined within the LIFX app. + + +## How to get credentials +To test the connectors you need a LIFX account. You will then be prompted to sign in to your account when creating a connection. + +## Deployment instructions +Please use [these instructions](https://docs.microsoft.com/en-us/connectors/custom-connectors/paconn-cli) to deploy this connector as custom connector in Microsoft Power Automate and Power Apps