Versions in this module Expand all Collapse all v0 v0.1.1 May 19, 2026 v0.1.0 May 19, 2026 Changes in this version + const Version + var ErrClosed = errors.New("rheemcloud: client closed") + var ErrInvalidCredentials = errors.New("rheemcloud: invalid credentials") + var ErrModeUnsupported = errors.New("rheemcloud: mode not supported by this unit") + var ErrNoDevice = errors.New("rheemcloud: device not found") + var ErrSetpointOutOfRange = errors.New("rheemcloud: setpoint out of range") + type Client struct + func Connect(ctx context.Context, email, password string, cfg *Config) (*Client, error) + func (c *Client) AccountID() string + func (c *Client) Close() error + func (c *Client) Device(serial string) *Device + func (c *Client) Devices() map[string]*Device + func (c *Client) DynamicAction(ctx context.Context, payload any) ([]byte, error) + func (c *Client) EnergyUsage(ctx context.Context, dev *Device, start, end time.Time) (*EnergyUsage, error) + func (c *Client) Refresh(ctx context.Context) error + func (c *Client) SetAway(ctx context.Context, dev *Device, on bool) error + func (c *Client) SetMode(ctx context.Context, dev *Device, m Mode) error + func (c *Client) SetSetpoint(ctx context.Context, dev *Device, degF int) error + func (c *Client) Subscribe() <-chan Event + func (c *Client) WaterUsage(ctx context.Context, dev *Device, start, end time.Time) (*WaterUsage, error) + type Config struct + HTTPClient *http.Client + HTTPTimeout time.Duration + Logger *slog.Logger + UserAgent string + type Device struct + LastUpdated time.Time + func (d *Device) AlertCount() int + func (d *Device) Away() bool + func (d *Device) Connected() bool + func (d *Device) DeviceID() string + func (d *Device) Enabled() bool + func (d *Device) FriendlyName() string + func (d *Device) GenericType() string + func (d *Device) HotWaterAvailability() int + func (d *Device) Mode() Mode + func (d *Device) Raw() map[string]json.RawMessage + func (d *Device) Running() bool + func (d *Device) RunningState() string + func (d *Device) SerialNumber() string + func (d *Device) Setpoint() int + func (d *Device) SetpointLimits() (min, max int) + func (d *Device) SupportedModes() []Mode + func (d *Device) SupportsAway() bool + func (d *Device) SupportsModes() bool + func (d *Device) SupportsOnOff() bool + func (d *Device) Type() DeviceType + func (d *Device) WiFiSignal() int + type DeviceType int + const DeviceThermostat + const DeviceUnknown + const DeviceWaterHeater + func (d DeviceType) String() string + type EnergyUsage struct + EnergyType string + Message string + Past []UsagePoint + Today []UsagePoint + Total float64 + type Event struct + At time.Time + Device *Device + Kind EventKind + type EventKind int + const EventConnected + const EventDisconnected + const EventStateChange + func (k EventKind) String() string + type Mode int + const ModeElectric + const ModeEnergySaving + const ModeGas + const ModeHeatPump + const ModeHighDemand + const ModeOff + const ModePerformance + const ModeUnknown + const ModeVacation + func (m Mode) String() string + type UsagePoint struct + Bucket int + Value float64 + type WaterUsage struct + Message string + Past []UsagePoint + Today []UsagePoint + Total float64