Documentation ¶
Index ¶
- type Pingvin
- func (p *Pingvin) Collect(ch chan<- prometheus.Metric)
- func (p *Pingvin) Describe(ch chan<- *prometheus.Desc)
- func (p *Pingvin) Monitor(interval int)
- func (p *Pingvin) Quit()
- func (p *Pingvin) ReadCoil(n uint16) ([]byte, error)
- func (p *Pingvin) ReadRegister(addr uint16) (int, error)
- func (p *Pingvin) Temperature(action string) error
- func (p *Pingvin) Update()
- func (p *Pingvin) WriteCoil(n uint16, val bool) bool
- func (p *Pingvin) WriteCoils(startaddr uint16, quantity uint16, vals []bool) error
- func (p *Pingvin) WriteRegister(addr uint16, value uint16) (uint16, error)
- type PingvinLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pingvin ¶
type Pingvin struct { Coils []pingvinCoil Registers []pingvinRegister Status pingvinStatus Debug PingvinLogger // contains filtered or unexported fields }
unit modbus data
func (*Pingvin) Collect ¶
func (p *Pingvin) Collect(ch chan<- prometheus.Metric)
Implements prometheus.Collect()
func (*Pingvin) Describe ¶
func (p *Pingvin) Describe(ch chan<- *prometheus.Desc)
Implements prometheus.Describe()
func (*Pingvin) ReadRegister ¶
Read a single holding register, stores value in p.Registers Returns integer value of register
func (*Pingvin) Temperature ¶
Change temperature setpoint (register 135) action can be up, down or a value. If value, the value can be the raw register value (200-300), a decimal degree value (20.0 - 23.0), or full degrees (20-30) Temperature must be between 20 and 30 deg Celsius, otherwise returns an error
func (*Pingvin) Update ¶
func (p *Pingvin) Update()
Wrapper function for updating coils, registers and populating p.Status for Home Assistant
func (*Pingvin) WriteCoils ¶
Force multiple coils
type PingvinLogger ¶
type PingvinLogger struct {
// contains filtered or unexported fields
}
func (*PingvinLogger) Println ¶
func (logger *PingvinLogger) Println(msg ...any)
Click to show internal directories.
Click to hide internal directories.