zeversolar

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

go-zeversolar

Go client to pull data from a ZeverSolar EverShine inverter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// address of inverter web interface
	Address string
	// client to use for requests
	Client Doer
}

func (*Client) GetInverterData

func (c *Client) GetInverterData(ctx context.Context) (*InverterData, error)

type Doer added in v0.0.4

type Doer interface {
	Do(req *http.Request) (*http.Response, error)
}

type InverterData

type InverterData struct {
	RegistryID       string
	RegistryKey      string
	HardwareVersion  string
	SoftwareVersion  string
	Timestamp        time.Time
	ZevercloudStatus string
	SerialNumber     string
	PowerAC          int64
	EnergyToday      float64
	Status           string
}

InverterData is the response from the inverter

data looks something like

index value                 // description
0     1                     // ?
1     1                     // ?
2     EAB123456789          // registry id
3     EFMH6DQ123456789      // registry key
4     M11                   // hardware version
5     16B00-111R+22B33-444R // software version
6     14:05 01/03/2024      // timestamp
7     OK                    // zevercloud status
8     1                     // ?
9     SX00050123456789      // serial number
10    4853                  // power ac
11    21.80                 // energy today
12    OK                    // status
13    Error                 // ?

func (*InverterData) UnmarshalBinary

func (d *InverterData) UnmarshalBinary(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL