Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 906 Bytes

README.md

File metadata and controls

60 lines (42 loc) · 906 Bytes

netatmo-weather-go

Unofficial client library for Netatmo Weather Station written in Go.

Usage

Setup

go get github.com/mikan/netatmo-weather-go

Create a client

client, err := netatmo.NewClient(context.Background(), clientID, clientSecret, username, password)
if err != nil {
    panic(err)
}

Get stations data

devices, user, err := client.GetStationsData()
if err != nil {
    panic(err)
}
fmt.Println(user)
fmt.Println(devices)

Get measure

value, err := client.GetMeasureByNewest(device, module)
if err != nil {
    panic(err)
}
fmt.Println(value)

Example code

See cmd/example directory.

Usage:

go run cmd/example/*.go -c <CLIENT_ID> -s <CLIENT_SECRET> -u <USER> -p <PASSWORD>

License

netatmo-weather-go licensed under the BSD 3-clause.

Author