Skip to content

Go client library for Netatmo Weather Station

License

Notifications You must be signed in to change notification settings

mikan/netatmo-weather-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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