0.3.0 β€’ Published 7 months ago

homebridge-lifx-plugin v0.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

homebridge-lifx-plugin

verified-by-homebridge

npm npm npm

GitHub code size in bytes GitHub last commit

LIFX plugin for Homebridge.

This is the first lifx plugin that officially supports adaptive lighting β˜€οΈ | πŸŒ‘

A plugin that automatically adds Lifx bulbs on the network to the Homebridge instead of tediously registering the lights individually via homekit.

This plugin will be updated regularly in the future, because I see it as a small heart task and use it personally.

The reason to create this plugin was the use of several published already existing lifx-plugins for homebridge and the anger struggeling with lifx and homekit. Unfortunately, all the plugins I tested slowed down homebridge so I couldn't access my devices from outside my network. This plugin should fix that problem and add some extra functionality

Also, lights that were not connected to the power were marked as "not responding". This plugin automatically sets the status of these lights to offline as soon as the light can no longer be reached.

I appreciate anyone who would like to use my plugin and welcome comments of any kind.

Of course, sometimes no error is left out, so forgive me if you might have problems and stay tuned. Updates will follow as soon as possible!

πŸ’‘ Features

  • Adaptive Lighting
  • Different dim settings for brightness, color and On/Off
  • Addind lights automatically
  • Addind lights individually
  • Exclusions for individual bulbs
  • Default route for different NICs

πŸš€ Quick Start

1. Installation

npm i homebridge-lifx-plugin

or use the awesome Homebridge Config Ui X plugin

All options can be found under Settings

3. Enjoy πŸ˜ŽπŸ’‘

All Lifx bulbs accessible on the network will be added to your homekit automatically. So go outside, configure your lights, create scenes and automations. Enjoy your life🧘

βš™οΈ Settings

General

TitleNameTypeValueDefaultDescription
Platform Namenamestringany"Lifx Plugin"Display name of the platform, to be seen in the log
Enable Auto DiscoverautoDiscoverbooleantrue/falsetrueDiscovers bulbs by broadcasting
Durationdurationinteger0...∞0Time to fade on/off in milliseconds
Brightness DurationbrightnessDurationinteger0...∞300Time to fade in milliseconds for changing brightness
Color DurationcolorDurationinteger0...∞300Time to fade in milliseconds for changing color

Bulbs

Adding bulbs separately is useful for networks where broadcasting is not possible or if you do not want the plugin to discover all bulbs automatically. If autoDiscover is enabled the separately added bulbs are not added a second time.

TitleNameTypeValueDefaultDescription
NamenamestringanyName for recognizing the bulb
AddressaddressstringipIP address of the bulb to be added separately

Excludes

You can now create exceptions for your bulbs that should not be registered with broadcasting

TitleNameTypeValueDefaultDescription
NamenamestringanyName for recognizing the bulb
AddressaddressstringipIP address of the bulb to be excluded
IDidstringidSerial number of the bulb to be excluded

Advenced Settings

TitleNameTypeValueDefaultDescription
Default Routedefaultstringip0.0.0.0Default route address to bind the udp connection to
Broadcast Addressbroadcaststringip255.255.255.255Broadcast address of your network to detect bulbs automatically
Offline TolerancelightOfflineToleranceinteger1...∞3A light is offline if not seen for the given amount of discoveries
Handler TimeoutmessageHandlerTimeoutinteger100...∞45000In ms, if not answer in time an error is provided to get methods
Resend Packet DelayresendPacketDelayinteger50...∞150Delay between packages if light did not receive a packet
Resend Packet Max TimesresendMaxTimesinteger0...∞3Resend packages x times if light did not receive a packet
Updateupdatesbooleantrue/falsetrueDisable if you don't want the plugin to check for updates

Example Configuration

πŸ’‘ Autodiscover

{
   "name": "Lifx",
   "duration": 0,
   "brightnessDuration": 300,
   "colorDuration": 300,
   "broadcast": "255.255.255.255",
   "lightOfflineTolerance": 3,
   "messageHandlerTimeout": 45000,
   "resendPacketDelay": 150,
   "resendMaxTimes": 3,
   "debug": false,
   "autoDiscover": true,
   "platform": "LifxPlugin"
}

πŸ”§ Manually Added Bulbs

{
   "name": "Lifx",
   "duration": 500,
   "brightnessDuration": 500,
   "colorDuration": 500,
   "broadcast": "255.255.255.255",
   "lightOfflineTolerance": 3,
   "messageHandlerTimeout": 45000,
   "resendPacketDelay": 150,
   "resendMaxTimes": 3,
   "debug": false,
   "autoDiscover": false,
   "bulbs": [
         {
            "address": "192.168.178.20"
         }
   ],
   "platform": "LifxPlugin"
}

πŸ“ ToDo

  • Dim settings for brightness, color and On/Off
  • Add lights individually
  • Listen for new states of the light
  • Mark bulb as offline if it could not be reached
  • Enable adding bulbs manually when autoDiscover is active
  • Added exclusions for bulbs to not be registered (thanks to L0T8)
  • Added default route for different NICs (thanks to andyvirus)
  • Implement adaptive Lighting (thanks to joelrichards)
  • Separate dim settings for brightness, color and On/Off
  • Configure lights individually
  • Accessories will show as "no response" until plugin has successfully initialised

βœ… Officialy supported on

  • LIFX A19 Night Vision
  • LIFX A19
  • LIFX Z
  • LIFX Mini White
  • LIFX BR30 Night Vision
  • LIFX Original
  • LIFX Colour 1000
  • LIFX GU10
  • LIFX Mini Day & Dusk

All other bulbs could be supported, but without guarantee. If you find something that does not fit yet open an issue, I will take care of it

πŸ” Tested on

  • LIFX A19 Night Vision
  • LIFX A19
  • LIFX Z
  • LIFX Mini White (by 7RDR7)
  • LIFX BR30 Night Vision (by 7RDR7)
  • LIFX Original (by andyvirus)
  • LIFX Colour 1000 (by andyvirus)
  • LIFX GU10 (by L0T8)
  • LIFX Mini Day & Dusk (by L0T8)
0.3.0

7 months ago

0.2.4

1 year ago

0.2.3

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.10-beta.1

2 years ago

0.1.10-beta.2

2 years ago

0.1.10-beta.3

2 years ago

0.1.10-beta.4

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.16

2 years ago

0.1.8

2 years ago

0.1.17

2 years ago

0.1.7

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.2.2

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago