amimof/huego
소개
An extensive Philips Hue client library for Go with an emphasis on simplicity
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalHuego
An extensive Philips Hue client library for Go with an emphasis on simplicity. It is designed to be clean, unbloated and extensible. With Huego you can interact with any Philips Hue bridge and its resources including Lights, Groups, Scenes, Sensors, Rules, Schedules, Resourcelinks, Capabilities and Configuration .

Installation
Get the package and import it in your code.
go get github.com/amimof/huego
You may use New() if you have already created an user and know the IP address to your bridge.
package main
import (
"github.com/amimof/huego"
"fmt"
)
func main() {
bridge := huego.New("192.168.1.59", "username")
l, err := bridge.GetLights()
if err != nil {
panic(err)
}
fmt.Printf("Found %d lights", len(l))
}
Or discover a bridge on your network with Discover() and create a new user with CreateUser(). To successfully create a user, the link button on your bridge must have been pressed before calling CreateUser() in order to authorise the request.
func main() {
bridge, _ := huego.Discover()
user, _ := bridge.CreateUser("my awesome hue app") // Link button needs to be pressed
bridge = bridge.Login(user)
light, _ := bridge.GetLight(3)
light.Off()
}
Documentation
See godoc.org/github.com/amimof/huego for the full package documentation.
Contributing
All help in any form is highly appreciated and your are welcome participate in developing Huego together. To contribute submit a Pull Request. If you want to provide feedback, open up a Github Issue or contact me personally.
관련 프로젝트 살펴보기
불러오는 중…