File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -58,29 +58,11 @@ Usage: ./huevent [OPTIONS]
58
58
| | lightlevel | xxxxx | Lightlevel (0 ~ dark, 20000 ~ normal, 40000 ~ very bright) |
59
59
60
60
61
-
62
- ## Build
63
-
64
- ```
65
- git clone https://github.com/mperlet/huevent.git && cd huevent
66
- docker run --rm -v "$PWD":/huevent:Z -w /huevent -e GOOS=linux -e GOARCH=amd64 golang:1.12.1-stretch go build huevent.go
67
- ```
68
-
69
61
## Configuration
70
62
71
63
Run ` huevent -pair ` to pair a local Hue Bridge.
72
64
73
-
74
- ```
75
- # Press Hue Bridge Button before you ran these commands
76
- BRIDGE_IP=$(curl https://www.meethue.com/api/nupnp -s | grep -E -o "([0-9]{1,3}[.]){3}[0-9]{1,3}")
77
- USERNAME=$(curl -s -X POST -d'{"devicetype":"huevent"}' "http://$BRIDGE_IP/api" | grep -P -o '":"(.*)"' | cut -d '"' -f3)
78
-
79
- echo "$BRIDGE_IP $USERNAME"
80
-
81
- ```
82
-
83
- ## Configfile
65
+ ### Configfile
84
66
85
67
` config ` : Hue Bridge IP with Token
86
68
@@ -116,6 +98,23 @@ hooks:
116
98
deviceFilter: []
117
99
```
118
100
101
+ ### Manual Pairing
102
+
103
+ ```
104
+ # Press Hue Bridge Button before you ran these commands
105
+ BRIDGE_IP=$(curl https://www.meethue.com/api/nupnp -s | grep -E -o "([0-9]{1,3}[.]){3}[0-9]{1,3}")
106
+ USERNAME=$(curl -s -X POST -d'{"devicetype":"huevent"}' "http://$BRIDGE_IP/api" | grep -P -o '":"(.*)"' | cut -d '"' -f3)
107
+
108
+ echo "$BRIDGE_IP $USERNAME"
109
+
110
+ ```
111
+
112
+ ## Build
113
+
114
+ ```
115
+ git clone https://github.com/mperlet/huevent.git && cd huevent
116
+ docker run --rm -v "$PWD":/huevent:Z -w /huevent -e GOOS=linux -e GOARCH=amd64 golang:1.12.4-stretch go build huevent.go
117
+ ```
119
118
120
119
## Examples
121
120
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import (
5
5
"encoding/json"
6
6
"flag"
7
7
"fmt"
8
+ "gopkg.in/yaml.v2"
8
9
"io/ioutil"
9
10
"log"
10
11
"net/http"
11
12
"os"
12
13
"os/exec"
13
14
"path"
14
15
"time"
15
- "gopkg.in/yaml.v2"
16
16
)
17
17
18
18
type config struct {
@@ -40,7 +40,7 @@ type HueventConfig struct {
40
40
type Hook struct {
41
41
DeviceID string `yaml:"deviceId"`
42
42
EventType string `yaml:"eventType"`
43
- TriggerOn string `yaml:"triggerOn,omitempty"`
43
+ TriggerOn string `yaml:"triggerOn,omitempty"`
44
44
Cmd string `yaml:"cmd"`
45
45
}
46
46
You can’t perform that action at this time.
0 commit comments