homebridge-lifx-plugin 0.1.4 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,11 +1,45 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/calvarium/homebridge-lifx-plugin"><img alt="homebridge-lifx-plugin" src="homebridge-lifx-icon.png" width="200px"></a>
|
|
3
|
+
</p>
|
|
4
|
+
<span align="center">
|
|
5
|
+
|
|
1
6
|
# homebridge-lifx-plugin
|
|
2
7
|
|
|
3
|
-
[](https://www.npmjs.com/package/homebridge-lifx-plugin)
|
|
9
|
+
[](https://www.npmjs.com/package/homebridge-lifx-plugin)
|
|
10
|
+
[](https://www.npmjs.com/package/homebridge-lifx-plugin)
|
|
11
|
+
[](https://github.com/calvarium/homebridge-lifx-plugin)
|
|
4
12
|
|
|
5
13
|
LIFX plugin for [Homebridge](https://github.com/homebridge/homebridge).
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
A plugin that adds lifx-lights in the network automatically to the homebridge, also single lights can be added manually.
|
|
16
|
+
|
|
17
|
+
This plugin will be updated regularly in the future, because I see it as a small heart task and use it personally.
|
|
18
|
+
|
|
19
|
+
The reason to create this plugin was the use of several published already existing lifx-plugins for homebridge. Unfortunately, all the plugins I tested slowed down homebridge so I couldn't access my devices from outside my network.
|
|
20
|
+
This plugin should fix that problem and add some extra functionality
|
|
21
|
+
|
|
22
|
+
Also, lights that were not connected to the power were marked as "not responding".
|
|
23
|
+
This plugin automatically sets the status of these lights to offline as soon as the light can no longer be reached.
|
|
24
|
+
|
|
25
|
+
I appreciate anyone who would like to use my plugin and welcome comments of any kind.
|
|
26
|
+
|
|
27
|
+
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!
|
|
28
|
+
|
|
8
29
|
|
|
9
30
|
## Installation
|
|
10
31
|
|
|
32
|
+
```console
|
|
11
33
|
npm i homebridge-lifx-plugin
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
or use the awesome [Homebridge Config Ui X plugin](https://www.npmjs.com/package/homebridge-config-ui-x)
|
|
37
|
+
|
|
38
|
+
## ToDo
|
|
39
|
+
|
|
40
|
+
- [x] Dim settings for brightness, color and On/Off
|
|
41
|
+
- [x] Add lights individually
|
|
42
|
+
- [x] Listen for new states of the light
|
|
43
|
+
- [x] Mark bulb as offline if it could not be reached
|
|
44
|
+
- [ ] Separate dim settings for brightness, color and On/Off
|
|
45
|
+
- [ ] Configure lights individually
|
|
@@ -11,7 +11,8 @@ export declare class LifxPlatformAccessory {
|
|
|
11
11
|
private readonly light;
|
|
12
12
|
private service;
|
|
13
13
|
private informationService;
|
|
14
|
-
private
|
|
14
|
+
private online;
|
|
15
|
+
private watcher;
|
|
15
16
|
/**
|
|
16
17
|
* These are just used to create a working example
|
|
17
18
|
* You should implement your own code to track the state of your accessory
|
|
@@ -42,7 +43,8 @@ export declare class LifxPlatformAccessory {
|
|
|
42
43
|
setSaturation(value: CharacteristicValue): Promise<void>;
|
|
43
44
|
setKelvin(value: CharacteristicValue): Promise<void>;
|
|
44
45
|
handleError(err: any): void;
|
|
45
|
-
watchState(
|
|
46
|
+
watchState(): Promise<void>;
|
|
47
|
+
resetWatcher(): Promise<void>;
|
|
46
48
|
updateStates(callback: any): Promise<void>;
|
|
47
49
|
setStates(state: any): Promise<void>;
|
|
48
50
|
updateLightbuldCharacteristics(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformAccessory.d.ts","sourceRoot":"","sources":["../src/platformAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIpD;;;;GAIG;AAEH,qBAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"platformAccessory.d.ts","sourceRoot":"","sources":["../src/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AAE,KAAK,EAAG,mBAAmB;IAIjF,0BAA0B,CAAC,cAAc,KAAA,EAAE,KAAK,EAAG,mBAAmB;IAItE,6BAA6B,CAAC,cAAc,KAAA,EAAE,KAAK,EAAG,mBAAmB;IAI/E,QAAQ;IAIR,SAAS;IAIT,gBAAgB;IAIhB,gBAAgB;IAIhB,YAAY;IAIZ,QAAQ,CAAC,KAAK,KAAA;IAKD,SAAS;IAKT,UAAU;IAKhB,OAAO;CAIf"}
|
|
@@ -15,8 +15,7 @@ class LifxPlatformAccessory {
|
|
|
15
15
|
this.platform = platform;
|
|
16
16
|
this.Accessory = Accessory;
|
|
17
17
|
this.light = light;
|
|
18
|
-
|
|
19
|
-
this.pollRequests = 0;
|
|
18
|
+
this.online = false;
|
|
20
19
|
/**
|
|
21
20
|
* These are just used to create a working example
|
|
22
21
|
* You should implement your own code to track the state of your accessory
|
|
@@ -42,6 +41,7 @@ class LifxPlatformAccessory {
|
|
|
42
41
|
};
|
|
43
42
|
this.UUID = Accessory.UUID;
|
|
44
43
|
this.Settings = settings;
|
|
44
|
+
this.online = true;
|
|
45
45
|
// get the LightBulb service if it exists, otherwise create a new LightBulb service
|
|
46
46
|
// you can create multiple services for each accessory
|
|
47
47
|
this.service = this.Accessory.getService(this.platform.Service.Lightbulb) || this.Accessory.addService(this.platform.Service.Lightbulb);
|
|
@@ -71,7 +71,7 @@ class LifxPlatformAccessory {
|
|
|
71
71
|
this.service.getCharacteristic(this.platform.Characteristic.Saturation)
|
|
72
72
|
.onSet(this.setSaturation.bind(this)); // SET - bind to the 'setBrightness` method below
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
this.resetWatcher();
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}
|
|
@@ -94,64 +94,105 @@ class LifxPlatformAccessory {
|
|
|
94
94
|
return isOn;
|
|
95
95
|
}
|
|
96
96
|
async setOn(value) {
|
|
97
|
-
this.
|
|
98
|
-
if (this.
|
|
99
|
-
this.
|
|
97
|
+
this.resetWatcher();
|
|
98
|
+
if (!this.online) {
|
|
99
|
+
this.updateLightbuldCharacteristics();
|
|
100
|
+
//place Timeout right here
|
|
100
101
|
}
|
|
101
102
|
else {
|
|
102
|
-
this.
|
|
103
|
+
this.States.power = value;
|
|
104
|
+
if (this.States.power > 0) {
|
|
105
|
+
this.light.on(this.Settings.Duration);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.light.off(this.Settings.Duration);
|
|
109
|
+
}
|
|
110
|
+
this.platform.log.debug('Set Characteristic On ->', value);
|
|
103
111
|
}
|
|
104
|
-
this.platform.log.debug('Set Characteristic On ->', value);
|
|
105
112
|
}
|
|
106
113
|
async setBrightness(value) {
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
this.resetWatcher();
|
|
115
|
+
if (!this.online) {
|
|
116
|
+
this.updateLightbuldCharacteristics();
|
|
117
|
+
//place Timeout right here
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.States.color.brightness = value;
|
|
121
|
+
bulb_1.default.update(this.light, this.States, this.Settings.BrightnessDuration);
|
|
122
|
+
// this.updateLightbuldCharacteristics();
|
|
123
|
+
this.platform.log.debug('Set Characteristic Brightness -> ', value);
|
|
124
|
+
}
|
|
110
125
|
}
|
|
111
126
|
async setHue(value) {
|
|
112
|
-
this.
|
|
113
|
-
|
|
114
|
-
|
|
127
|
+
this.resetWatcher();
|
|
128
|
+
if (!this.online) {
|
|
129
|
+
this.updateLightbuldCharacteristics();
|
|
130
|
+
//place Timeout right here
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.States.color.hue = value;
|
|
134
|
+
bulb_1.default.update(this.light, this.States, this.Settings.ColorDuration);
|
|
135
|
+
// this.updateLightbuldCharacteristics();
|
|
136
|
+
this.platform.log.debug('Set Characteristic Hue -> ', value);
|
|
137
|
+
}
|
|
115
138
|
}
|
|
116
139
|
async setSaturation(value) {
|
|
117
|
-
this.
|
|
118
|
-
|
|
119
|
-
|
|
140
|
+
this.resetWatcher();
|
|
141
|
+
if (!this.online) {
|
|
142
|
+
this.updateLightbuldCharacteristics();
|
|
143
|
+
//place Timeout right here
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.States.color.saturation = value;
|
|
147
|
+
bulb_1.default.update(this.light, this.States, this.Settings.ColorDuration);
|
|
148
|
+
// this.updateLightbuldCharacteristics();
|
|
149
|
+
this.platform.log.debug('Set Characteristic Saturation -> ', value);
|
|
150
|
+
}
|
|
120
151
|
}
|
|
121
152
|
async setKelvin(value) {
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
153
|
+
this.resetWatcher();
|
|
154
|
+
if (!this.online) {
|
|
155
|
+
this.updateLightbuldCharacteristics();
|
|
156
|
+
//place Timeout right here
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.States.color.hue = 0;
|
|
160
|
+
this.States.color.saturation = 0;
|
|
161
|
+
this.States.color.kelvin = bulb_1.default.getKelvin(value);
|
|
162
|
+
// this.updateLightbuldCharacteristics();
|
|
163
|
+
bulb_1.default.update(this.light, this.States, this.Settings.ColorDuration);
|
|
164
|
+
this.platform.log.debug('Set Characteristic Kelvin -> ', value);
|
|
165
|
+
}
|
|
128
166
|
}
|
|
129
167
|
handleError(err) {
|
|
130
|
-
this.platform.log.error
|
|
168
|
+
this.platform.log.debug('Bulb throughs error', err);
|
|
169
|
+
this.SetOffline();
|
|
131
170
|
// if you need to return an error to show the device as "Not Responding" in the Home app:
|
|
132
171
|
// throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE);
|
|
133
172
|
}
|
|
134
|
-
async watchState(
|
|
135
|
-
setInterval(() => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
this.pollRequests = 0;
|
|
147
|
-
}
|
|
148
|
-
}, (err) => this.handleError(err));
|
|
149
|
-
}, 3000);
|
|
173
|
+
async watchState() {
|
|
174
|
+
this.watcher = setInterval(() => {
|
|
175
|
+
this.updateStates(() => {
|
|
176
|
+
this.platform.log.debug('updated', this.States);
|
|
177
|
+
});
|
|
178
|
+
}, 5000);
|
|
179
|
+
}
|
|
180
|
+
async resetWatcher() {
|
|
181
|
+
if (this.watcher) {
|
|
182
|
+
clearInterval(this.watcher);
|
|
183
|
+
}
|
|
184
|
+
this.watchState();
|
|
150
185
|
}
|
|
151
186
|
async updateStates(callback) {
|
|
152
187
|
bulb_1.default.getStates(this.light, (state) => {
|
|
153
|
-
|
|
154
|
-
|
|
188
|
+
if (state !== null) {
|
|
189
|
+
this.SetOnline();
|
|
190
|
+
this.setStates(state);
|
|
191
|
+
callback();
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.SetOffline();
|
|
195
|
+
}
|
|
155
196
|
}, (err) => this.handleError(err));
|
|
156
197
|
}
|
|
157
198
|
async setStates(state) {
|
|
@@ -215,9 +256,11 @@ class LifxPlatformAccessory {
|
|
|
215
256
|
this.updateOn();
|
|
216
257
|
}
|
|
217
258
|
async SetOnline() {
|
|
259
|
+
this.online = true;
|
|
218
260
|
this.setPower(1);
|
|
219
261
|
}
|
|
220
262
|
async SetOffline() {
|
|
263
|
+
this.online = false;
|
|
221
264
|
this.setPower(0);
|
|
222
265
|
}
|
|
223
266
|
GetName() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformAccessory.js","sourceRoot":"","sources":["../src/platformAccessory.ts"],"names":[],"mappings":";;;;;;AAIA,kDAA0B;AAE1B;;;;GAIG;AAEH,MAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"platformAccessory.js","sourceRoot":"","sources":["../src/platformAccessory.ts"],"names":[],"mappings":";;;;;;AAIA,kDAA0B;AAE1B;;;;GAIG;AAEH,MA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S;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;CAEF;AArTD,sDAqTC"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Lifx Plugin",
|
|
4
4
|
"name": "homebridge-lifx-plugin",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.8",
|
|
6
6
|
"description": "This plugin is a bridge between lifx smart bulbs and your apple homekit",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
@@ -24,7 +24,14 @@
|
|
|
24
24
|
"prepublishOnly": "npm run lint && npm run build"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
|
-
"homebridge-plugin"
|
|
27
|
+
"homebridge-plugin",
|
|
28
|
+
"homebridge",
|
|
29
|
+
"plugin",
|
|
30
|
+
"lifx",
|
|
31
|
+
"bulb",
|
|
32
|
+
"smartbulb",
|
|
33
|
+
"smartlight",
|
|
34
|
+
"homekit"
|
|
28
35
|
],
|
|
29
36
|
"dependencies": {
|
|
30
37
|
"lifx-lan-client": "^1.1.0"
|