Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
1c56844be2 | |||
b65306e3d5 | |||
fb63f3cf52 |
41
.drone.yml
Normal file
41
.drone.yml
Normal 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]
|
56
README.md
56
README.md
@ -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
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homebridge-hue-chase",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homebridge-hue-chase",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"description": "A Phillips Hue add on for creating chase sequences.",
|
||||
"main": "bin/index.js",
|
||||
"scripts": {
|
||||
|
@ -62,7 +62,6 @@ export class Chase implements IAccessory {
|
||||
'lightbulbService'
|
||||
)
|
||||
|
||||
this.getLights();
|
||||
this._lightbulbService.getCharacteristic(Characteristic.On)
|
||||
//@ts-ignore
|
||||
.on("set", this.onPowerSet)
|
||||
@ -95,7 +94,7 @@ export class Chase implements IAccessory {
|
||||
*/
|
||||
private onPowerSet = async (activeState: boolean, callback: (error?: Error | null | undefined) => void) => {
|
||||
if (this._isActive != activeState) {
|
||||
activeState ? this.chase() : this.stopAndSetOff();
|
||||
activeState ? this.chase() : this.stop();
|
||||
}
|
||||
return callback();
|
||||
}
|
||||
|
Reference in New Issue
Block a user