forked from savaki/go.hue
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfiguration.go
More file actions
38 lines (36 loc) · 1.71 KB
/
Copy pathconfiguration.go
File metadata and controls
38 lines (36 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package hue
// Configuration contains all basic information about the hue bridge itself.
type Configuration struct {
Name string `json:"name"`
ZigbeeChannel int `json:"zigbeechannel"`
SoftwareUpdate map[string]interface{} `json:"swupdate"`
Whitelist map[string]interface{} `json:"whitelist"`
APIVersion string `json:"apiversion"`
SoftwareVersion string `json:"swversion"`
Proxyaddress string `json:"proxyaddress"`
Proxyport int `json:"proxyport"`
Linkbutton bool `json:"linkbutton"`
IPAddress string `json:"ipadress"`
Mac string `json:"mac"`
Netmask string `json:"netmask"`
Gateway string `json:"gateway"`
DHCP bool `json:"dhcp"`
Portalservices bool `json:"bool"`
UTC string `json:"UTC"`
Localtime string `json:"localtime"`
Timezone string `json:"timezone"`
ModelId string `json:"modelid"`
BridgeId string `json:"bridgeid"`
FactoryNew bool `json:"factorynew"`
ReplacesBridgeId string `json:"replacesbridgeid"`
DatastoreVersion string `json:"datastoreversion"`
}
// Configuration return all basic information about the hue bridge itself.
func (bridge *Bridge) Configuration() (*Configuration, error) {
var result Configuration
err := bridge.get("/config", &result)
if err != nil {
return nil, err
}
return &result, nil
}