Skip to content

probakowski/go-viessmann

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-viessmann

go-viessmann is a Go client library for accessing the Viessmann Cloud API

Build Go Report Card

Installation

go-viessmann is compatible with modern Go releases in module mode, with Go installed:

go get github.com/probakowski/go-viessmann

will resolve and add the package to the current development module, along with its dependencies.

Alternatively the same can be achieved if you use import in a package:

import "github.com/probakowski/go-viessmann"

and run go get without parameters.

Finally, to use the top-of-trunk version of this repo, use the following command:

go get github.com/probakowski/go-viessmann@master

Usage

import "github.com/probakowski/go-viessmann"

Construct a new viessmann client, then you can use different method from API, for example:

client := viessmann.Client{
    ClientId: "<your_client_id"
    RefreshToken "<OAuth refresh token"
    HttpClient: client, //optional, HTTP client to use, http.DefaultClient will be used if nil
}

...

Authentication

You have to register as developer on Viessmann Developer Portal and create API key

viessmann.Client uses OAuth refresh token to obtain access token that is required for API access. This token can be obtained manually as described in Viessmann documentation or you can use server located in example/server/go:

  1. Start server: go run example/server.go
  2. Go to http://localhost:3000
  3. Provide Client ID and click Log in, you'll be redirected to Viessmann login page when you have to log in with credentials you used during registration
  4. If everything is OK you will see overview of all your installations, gateways, devices and their features
  5. Refresh token will be stored in config file in current directory

About

Go wrapper for Viessmann Cloud API

Resources

License

Stars

Watchers

Forks

Packages

No packages published