A simple Go client for the Nest API.
- It's possible to show informations in the console or in a embedded web server.
- It's also possible to export datas to Time Series Database InfluxData.
- Nest API key (get it here: Nest api)
- Download the binary for your OS and the config.yaml in the same folder.
- Don't forget !!!! : You have to change the API Key in the config.yaml.
- Or use flag "-token xxxxxx"
- This application supports en-us and fr
- Cette application supporte l'anglais et le français
Platform | Architecture | URL |
---|---|---|
Apple macOS | 64-bit Intel | ./goNest-darwin-amd64.bin |
Linux | 64-bit Intel | ./goNest-linux-amd64.bin |
Windows | 64-bit Intel | goNest-windows-amd64.exe |
Execute the binary with the config file "config.yaml" in the same folder.
- Ex : goNest-windows-amd64.exe -token xxxxxxx
There are some others flags : --help for doc
Usage of ./nest-client-go:
-debug string
panic,fatal,error,warning,info,debug
-devel string
true,false
-mock string
true,false
-token string
yourtoken
Nest Clientcomes with an embedded web based object browser. Point your web browser by default to http://localhost:1111/
ensure your server has started successfully.
---------------------
Nest 2017-07-20 17:06:21
---------------------
Ambien TemperatureC : 27.5
docker pull patrickalin/docker-nest docker run -d --name=nest -e nestAccessToken=ToBECompleted patrickalin/docker-nest
https://hub.docker.com/r/patrickalin/docker-nest/
- install git
- install go from
http://golang.org/
- If you want install influxData
git clone https://github.com/patrickalin/GonestThermostatAPIRest.git
cd GonestThermostatAPIRest
export GOPATH=$PWD
go get -v .
go build
In the config file, you can activate a mock. If you don't have a API key.
- mock: true
In the config file, you can change the dev mode to use template, lang locally.
- dev: true
When the dev = false you use assembly files. Execute "go generate" to refresh assembly files.
In the config file, you can change the log level (panic,fatal,error,warn,info,debug)
- logLevel: "debug"
https://github.com/tixu for testing and review
http://mervine.net/json2struct "transform JSON to Go struct library"
http://github.com/spf13/viper "read config library"
The code is licensed under the permissive Apache v2.0 licence. This means you can do what you like with the software, as long as you include the required notices. Read this for a summary.