Skip to content
forked from cnovak/emporia

Go Client for Emporia Energy API

License

Notifications You must be signed in to change notification settings

henryouly/emporia

 
 

Repository files navigation

emporia-api-go

emporia-api-go is Go API Client for the Emporia Vue energy monitoring system API. This API is not officially supported by Emporia.

The library can be invoked directly to pull back some basic info but requires your email and password to be added to a keys.json file, which is then replaced with the access tokens.

Mike Marvin's API documentation can help to understand the underlaying API, or use the OpenAPI file in the /docs directory to understand the API.

Installation

go get -u github.com/cnovak/emporia

Usage

You need a username and password to initialize the client:

package main

import (
	"fmt"
	"os"

	emporia "github.com/cnovak/emporia"
)

func main() {
	username := os.Getenv("EMPORIA_USERNAME")
	password := os.Getenv("EMPORIA_PASSWORD")

	client, err := emporia.NewClient(username, password)
	if err != nil {
		panic(err)
	}

	devices, err := client.GetDevices()
	if err != nil {
		panic(err)
	}
	fmt.Printf("============== \nDevices:\n============== \n%+v\n\n", devices)

}


Credits

Thanks to Mike Marvin for his work in the PyEmVue project documenting the Emporia Energy API.

Disclaimer

This project is not affiliated with or endorsed by Emporia Energy.

About

Go Client for Emporia Energy API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%