Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An extensive Philips Hue client library for Go with an emphasis on simplicity

License

NotificationsYou must be signed in to change notification settings

amimof/huego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoGo Report CardcodecovAwesome

Huego

An extensive Philips Hue client library forGo with an emphasis on simplicity. It is designed to be clean, unbloated and extensible. WithHuego you can interact with any Philips Hue bridge and its resources includingLights,Groups,Scenes,Sensors,Rules,Schedules,Resourcelinks,Capabilities andConfiguration .

Installation

Get the package and import it in your code.

go get github.com/amimof/huego

You may useNew() if you have already created an user and know the IP address to your bridge.

package mainimport ("github.com/amimof/huego""fmt")funcmain() {bridge:=huego.New("192.168.1.59","username")l,err:=bridge.GetLights()iferr!=nil {panic(err)  }fmt.Printf("Found %d lights",len(l))}

Or discover a bridge on your network withDiscover() and create a new user withCreateUser(). To successfully create a user, the link button on your bridge must have been pressed before callingCreateUser() in order to authorise the request.

funcmain() {bridge,_:=huego.Discover()user,_:=bridge.CreateUser("my awesome hue app")// Link button needs to be pressedbridge=bridge.Login(user)light,_:=bridge.GetLight(3)light.Off()}

Documentation

Seegodoc.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 developingHuego together. To contribute submit aPull Request. If you want to provide feedback, open up a GithubIssue or contact me personally.

About

An extensive Philips Hue client library for Go with an emphasis on simplicity

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp