3 Commits
1.0.0 ... 1.1.0

Author SHA1 Message Date
1c56844be2 Adding drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-02 22:12:50 -04:00
b65306e3d5 Update 'README.md' 2020-12-20 15:02:49 -05:00
fb63f3cf52 Fixed issue where not all lights are used for chase 2020-04-17 23:32:15 -04:00
5 changed files with 519 additions and 423 deletions

41
.drone.yml Normal file
View File

@ -0,0 +1,41 @@
kind: pipeline
type: docker
name: default
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone https://gitea.watsonlabs.net/watsonb8/homebridge-hue-chase.git .
- git checkout $DRONE_COMMIT
- name: build
image: node
commands:
- npm install
- npm run build
- name: publish
image: plugins/npm
settings:
username: admin
password:
from_secret: npm_password
email: brandon@watsonlabs.net
registry: "http://linuxhost.me:4873/"
when:
event:
- tag
notify:
image: drillster/drone-email
host: smtp.watsonlabs.net
username: srvGitea
password:
from_secret: smtp_password
from: drone@watsonlabs.net
when:
status: [failure]

View File

@ -0,0 +1,56 @@
# homebridge-hue-chase
Homebridge-hue-chase is a good way to add a little spice to your home lighting set up. This simple plugin will cycle the colors of any given hue lights.
## Installation
1. Clone the repository by running `git clone ssh://git@thebword.ddns.net:3122/watsonb8/homebridge-hue-chase.git`
2. Run `npm install` to install required modules
3. Run `npm run build` to build the module
4. Run `npm link` or install globally to link this instance to your global homebridge instance
> NOTE: Upon starting this plugin for the first time, you will be asked to press the sync button on your hue bridge
## Configuration
```
{
"platform": "HueChase",
"ipAddress": "example.com",
"userName": "",
"clientKey": "",
"sequences": [
{
"name": "Play Sequence",
"transitionTime": 60000,
"matchAllLights": false,
"colors": ["#00e456", "#21adea", "#f14cfc", "#8c4cfc", "#e40098"],
"lights": ["Play left", "Play right"]
},
]
}
```
#### Platform
- `ipAddress`: The ipaddres or host name of the hue hub
- `userName`: The userName to use when authenticating with the hue hub
> NOTE: This will be visible in the console upon first run of the platform
- `clientKey`: This clientKey to use when authenticating with the hue hub
> NOTE: This will be visible in the console upon first run of the platform
- `sequences`: A list of sequence objects
#### sequences
- `name`: The name of the sequence. This will be the label of the enable switch
- `transitionTime`: The amount of time in milliseconds it will take to transition from one color to the next
- `colors`: A list hex colors
- `lights`: The list of lights to use in the sequence

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "homebridge-hue-chase", "name": "homebridge-hue-chase",
"version": "1.0.0", "version": "1.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "homebridge-hue-chase", "name": "homebridge-hue-chase",
"version": "1.0.0", "version": "1.1.0",
"description": "A Phillips Hue add on for creating chase sequences.", "description": "A Phillips Hue add on for creating chase sequences.",
"main": "bin/index.js", "main": "bin/index.js",
"scripts": { "scripts": {

View File

@ -62,7 +62,6 @@ export class Chase implements IAccessory {
'lightbulbService' 'lightbulbService'
) )
this.getLights();
this._lightbulbService.getCharacteristic(Characteristic.On) this._lightbulbService.getCharacteristic(Characteristic.On)
//@ts-ignore //@ts-ignore
.on("set", this.onPowerSet) .on("set", this.onPowerSet)
@ -95,7 +94,7 @@ export class Chase implements IAccessory {
*/ */
private onPowerSet = async (activeState: boolean, callback: (error?: Error | null | undefined) => void) => { private onPowerSet = async (activeState: boolean, callback: (error?: Error | null | undefined) => void) => {
if (this._isActive != activeState) { if (this._isActive != activeState) {
activeState ? this.chase() : this.stopAndSetOff(); activeState ? this.chase() : this.stop();
} }
return callback(); return callback();
} }