manager

package
v0.0.0-...-372c758 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package manager implements the HomeKit accessory that manages the state of the air conditioner(s).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBridge

func NewBridge(
	version string,
	s *myplace.System,
) *accessory.Bridge

NewBridge returns a new thermostat attached to the given system.

Types

type AccessoryManager

type AccessoryManager interface {
	Accessories() []*accessory.A
	Update(sys *myplace.System)
}

AccessoryManager is an interface for managing synchronization of state between homekit accessories and the MyPlace system.

type AirConManager

type AirConManager struct {
	// contains filtered or unexported fields
}

AirConManager manages the state of thermostat accessories for each zone of an air-conditioning unit.

func NewAirConManager

func NewAirConManager(
	store hap.Store,
	commands chan<- []myplace.Command,
	ac *myplace.AirCon,
) *AirConManager

NewAirConManager returns a manager for the given air-conditioning unit.

func (*AirConManager) Accessories

func (m *AirConManager) Accessories() []*accessory.A

Accessories returns the managed accessories.

func (*AirConManager) Update

func (m *AirConManager) Update(s *myplace.System)

Update updates the accessory to represent the given state.

type FanManager

type FanManager struct {
	// contains filtered or unexported fields
}

FanManager manages the state of a "fan speed" accessory.

This allows the user to set an air-conditioning unit's fan speed via HomeKit.

Note that because HomeKit does not have a fan accessory with an "auto" setting, the accessory is presented as an "override" to the auto setting. If the AC unit is "on", and the fan accessory is "off", the fan speed is set to auto.

I've found this provides the best experience when using Siri to control the fan speed, allowing phrases like "Turn off the fan speed override". I couldn't work out any combination of characteristics that would allow phrases like "Set the fan speed to auto", which would be ideal.

func NewFanManager

func NewFanManager(
	commands chan<- []myplace.Command,
	ac *myplace.AirCon,
) *FanManager

NewFanManager returns a manager for the given air-conditioning unit's fan.

func (*FanManager) Accessories

func (m *FanManager) Accessories() []*accessory.A

Accessories returns the managed accessories.

func (*FanManager) Update

func (m *FanManager) Update(s *myplace.System)

Update updates the accessory to represent the given state.

Jump to

Keyboard shortcuts

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