renogy

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package renogy implements the renogy charge controller sensor for DC batteries. Tested with renogy wanderer model Wanderer Manual: https://www.renogy.com/content/RNG-CTRL-WND30-LI/WND30-LI-Manual.pdf LCD Wanderer Manual: https://ca.renogy.com/content/manual/RNG-CTRL-WND10-Manual.pdf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	resource.TriviallyValidateConfig
	Path     string `json:"serial_path,omitempty"`
	Baud     int    `json:"serial_baud_rate,omitempty"`
	ModbusID byte   `json:"modbus_id,omitempty"`
}

Config is used for converting config attributes.

type Renogy

type Renogy struct {
	resource.Named
	resource.AlwaysRebuild
	// contains filtered or unexported fields
}

Renogy is a serial charge controller.

func (*Renogy) Close

func (r *Renogy) Close(ctx context.Context) error

Close closes the renogy modbus.

func (*Renogy) Current

func (r *Renogy) Current(ctx context.Context, extra map[string]interface{}) (float64, bool, error)

Current returns the load's current and boolean isAC. If the controller does not have a load input, will return zero.

func (*Renogy) Power

func (r *Renogy) Power(ctx context.Context, extra map[string]interface{}) (float64, error)

Power returns the power of the load. If the controller does not have a load input, will return zero.

func (*Renogy) Readings

func (r *Renogy) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

Readings returns a list of all readings from the sensor.

func (*Renogy) Voltage

func (r *Renogy) Voltage(ctx context.Context, extra map[string]interface{}) (float64, bool, error)

Voltage returns the voltage of the battery and a boolean IsAc.

Jump to

Keyboard shortcuts

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