Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-alpha.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Mofasser committed Jan 13, 2018
2 parents 0394f3e + acbef90 commit bc6816f
Show file tree
Hide file tree
Showing 21 changed files with 1,928 additions and 1,543 deletions.
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,39 @@ This project is currently in **ALPHA** and not recommended for production use. A
## Installation
Get the package
```
go get -u github.com/amimof/huego
go get github.com/amimof/huego
```

Include it in your code
Include it in your code. You may use `huego.New()` if you've already created a user and know the ip-address/hostname to your bridge.
```Go
package main

import (
"github.com/amimof/huego"
"fmt"
"github.com/amimof/huego"
"fmt"
)

func main() {
bridge, err := huego.New("username", "password")
l, err := hue.GetLights()
if err != nil {
fmt.Error(err)
bridge, err := huego.New("192.168.1.59", "username")
l, err := hue.GetLights()
if err != nil {
fmt.Fatal(err)
}
fmt.Printf("Found %d lights", len(l))
}
```

To discover new bridges and add an user, use `huego.Discover()` and `huego.Login()`
```Go
func main() {
bridge, _ := huego.Discover()
user, _ := b.CreateUser("my awesome hue app") // Link button needs to be pressed
bridge = b.Login(user)
light, _ := bridge.GetLight(3)
light.TurnOff()
}
```

## Project Status

This project is currently in **ALPHA** and still under heavy development. Current iteration is subject to big changes until the initial release. Below is the current status of *modules* that are expected to be implemented.
Expand All @@ -45,7 +56,7 @@ This project is currently in **ALPHA** and still under heavy development. Curren
| Configuration | `Complete` | `Complete`
| Capabilities | `Not Started` | `Not Started`

Other than above core modules, each module needs additional *helper* methods for conveniance and flavour. The goal is to keep it simple, and not to bload the library with functionality that developers might want to write on their own.
Other than above core modules, each module needs additional *helper* methods for conveniance and flavour. The goal is to keep it simple, and not to bloat the library with functionality that developers might want to write on their own.

## Goal

Expand Down
Loading

0 comments on commit bc6816f

Please sign in to comment.