0.1.2 • Published 5 years ago

homebridge-automation-lifx-colour-palettes v0.1.2

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

Automation - Lifx colour palettes

Intro

This accessory will apply a colour palette on your Lifx Z light trip.

The list of palettes must be stored on a file. The plugin will pick a random palette from the file every time you turn on the switch. If you want to apply always the same palette, create a json file with only one palette.

Palettes file

Example:

[
  {
    "name": "Giant Goldfish",
    "url": "https://www.colourlovers.com/palette/92095/Giant_Goldfish",
    "author": {
      "name": "manekineko",
      "url": "https://www.colourlovers.com/lover/manekineko"
    },
    "palette": [
      "#69d2e7",
      "#a7dbd8",
      "#e0e4cc",
      "#f38630",
      "#fa6900"
    ]
  },
  {
    "name": "Random 1",
    "url": "https://www.colourlovers.com/palette/629637/()",
    "author": {
      "name": "sugar!",
      "url": "https://www.colourlovers.com/lover/sugar%21"
    },
    "palette": [
      "#fe4365",
      "#fc9d9a",
      "#f9cdad",
      "#c8c8a9",
      "#83af9b"
    ]
  }
]

The JSON file must contain an array of objects. Each object will be a palette.

Format of each palette object: | Attribute | Required | Description | Example | |-----------|----------|-------------|---------| | name | Yes | The name of the palette | Random 1 | | url | No | A link to the original palette (if any) | https://website.com/palette | | author.name | No (default: unknown) | The name of the author of the palette | John Doe | | author.url | No | An attribution link, if any | https://webside.com/author | | palette | Yes | An array of HEX colour codes, starting with "#". You can have as many colours as you like, the palette will be spread across the zones of your Lifx Z strip. The max number of colours is the number of zones of your light strip (24 in the config example). | ["#ff0000", "#bb0000"] |

You can find an example file in this repo under palettes.json. This file contains the top palettes from COLOURlovers.

Config

Example config.json:

{
  "accessories": [
    {
      "accessory": "AutomationLifxColourPalettes",
      "name": "Lifx Z Colour Palette",
      "light": {
        "ip": "192.168.1.26",
        "mac": "d0:00:00:00:00:00",
        "zones": 24
      },
      "standardMode": {
        "brightness": 65
      },
      "fadeInMode": {
        "brightness": 100,
        "transitionDuration": 180
      },
      "palettesFile": "./palettes.json"
    }
  ]
}

This accessory will create a switch. Turning on the switch will apply a random palette to your Lifx Z light trip. The switch will turn off automatically after 1 second.

The switch has the following properties:

NameDescriptionExample
AuthorThe name of the author of the current applied paletteJohn Doe
PaletteThe name of the current applied paletteRandom 1
Fade inTo be used instead of the main Power switch. It will pick a random palette and fade-in the lights.Switch

Note: some properties are not compatible with iOS Home app, use Elgato Eve app instead.

Configuration options

AttributeRequiredUsageExample
nameYesA unique name for the accessory. It will be used as the accessory name in HomeKit.Living Room Light
light.ipYesThe IP address of the light (this plugin does not currently support autodetect)192.168.1.26
light.macYesThe MAC address of the light (this plugin does not currently support autodetect)d0:00:00:00:00:00
light.zonesYesThe number of zones of your lightstrip (this plugin does not currently support autodetect)24
standardMode.brightnessNo (default: 100)The brightness to be set when turning on the main switch65 (% brightness)
fadeInMode.brightnessNo (default: 100)The brightness to be set when turning on the fade-in switch100 (% brightness)
fadeInMode.transitionDurationNo (default: 1)The number of seconds to fade-in the light when turning on the fade-in switch180 (seconds)
palettesFileYesThe path of the palette file (relative to the Homebridge current working directory)./palettes.json

Credits

Big thanks to @futomi for the support in improving the Node Lifx lan module.

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago