Documentation
¶
Index ¶
- type AspectDef
- type ChannelDef
- type Client
- func (sc *Client) Channels(iseID string) ([]ChannelDef, error)
- func (sc *Client) Devices() ([]DeviceDef, error)
- func (sc *Client) ExecProgram(p *ProgramDef) error
- func (sc *Client) Execute(script string) ([]string, error)
- func (sc *Client) ExecuteTempl(templ *template.Template, data interface{}) ([]string, error)
- func (sc *Client) Functions() ([]AspectDef, error)
- func (sc *Client) Programs() ([]*ProgramDef, error)
- func (sc *Client) ReadExecTime(p *ProgramDef) (time.Time, error)
- func (sc *Client) ReadSysVars(sysVars SysVarDefs) ([]Value, error)
- func (sc *Client) ReadValues(objs []ValObjDef) ([]Value, error)
- func (sc *Client) Rooms() ([]AspectDef, error)
- func (sc *Client) SystemVariables() (SysVarDefs, error)
- func (sc *Client) WriteSysVar(sysVar *SysVarDef, value interface{}) error
- func (sc *Client) WriteValue(obj ValObjDef, value interface{}) error
- type DeviceDef
- type ProgramDef
- type ReGaDOM
- func (rd *ReGaDOM) Channel(addr string) *ChannelDef
- func (rd *ReGaDOM) Device(addr string) *DeviceDef
- func (rd *ReGaDOM) Function(iseID string) *AspectDef
- func (rd *ReGaDOM) Functions() map[string]AspectDef
- func (rd *ReGaDOM) Refresh()
- func (rd *ReGaDOM) Room(iseID string) *AspectDef
- func (rd *ReGaDOM) Rooms() map[string]AspectDef
- func (rd *ReGaDOM) Start()
- func (rd *ReGaDOM) Stop()
- type SysVarDef
- type SysVarDefs
- type ValObjDef
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AspectDef ¶
type AspectDef struct { ISEID string DisplayName string Comment string // Channels will not be returned by Rooms() or Functions()! // ReGaDOM.explore() sets this member with a reverse lookup. Channels []string // channel address }
AspectDef describes a room or function of a channel.
type ChannelDef ¶
type ChannelDef struct { ISEID string DisplayName string Address string Rooms []string // ISEID's Functions []string // ISEID's }
ChannelDef describes a channel.
type Client ¶
type Client struct { // IP address or network name of the CCU Addr string // Limits the size of a valid response RespLimit int64 }
Client executes HM scripts remotely on the CCU.
func (*Client) Channels ¶
func (sc *Client) Channels(iseID string) ([]ChannelDef, error)
Channels retrieves the channels of a device from the CCU.
func (*Client) ExecProgram ¶
func (sc *Client) ExecProgram(p *ProgramDef) error
ExecProgram executes a ReGaHssProgram.
func (*Client) ExecuteTempl ¶
ExecuteTempl executes a HM script template with the specified data remotely on the CCU.
func (*Client) Programs ¶
func (sc *Client) Programs() ([]*ProgramDef, error)
Programs retrieves all programs from the CCU.
func (*Client) ReadExecTime ¶
func (sc *Client) ReadExecTime(p *ProgramDef) (time.Time, error)
ReadExecTime reads the last execution time of a ReGaHssProgram.
func (*Client) ReadSysVars ¶
func (sc *Client) ReadSysVars(sysVars SysVarDefs) ([]Value, error)
ReadSysVars reads the values of system variables.
func (*Client) ReadValues ¶
ReadValues reads values of multiple ReGaDOM objects.
func (*Client) SystemVariables ¶
func (sc *Client) SystemVariables() (SysVarDefs, error)
SystemVariables retrieves the list of system variables in the ReGaHss. SysVarDefs is returned sorted.
func (*Client) WriteSysVar ¶
WriteSysVar sets the value of a system variable.
func (*Client) WriteValue ¶
WriteValue sets the value of a ReGaDOM object.
type ProgramDef ¶
type ProgramDef struct { ISEID string DisplayName string Description string Active bool Visible bool }
ProgramDef describes a program in the ReGaHss.
type ReGaDOM ¶
type ReGaDOM struct { ScriptClient *Client // contains filtered or unexported fields }
ReGaDOM retrieves and caches information (e.g. rooms, functions) from the ReGa DOM of the CCU.
func (*ReGaDOM) Channel ¶
func (rd *ReGaDOM) Channel(addr string) *ChannelDef
Channel returns info about a channel.
func (*ReGaDOM) Refresh ¶ added in v0.5.0
func (rd *ReGaDOM) Refresh()
Refresh triggers a reexploration of the ReGa DOM.
type SysVarDef ¶
type SysVarDef struct { ISEID string Name string Description string Unit string Operations int Type string // type: FLOAT Minimum *float64 Maximum *float64 // type: ALARM or BOOL ValueName0 *string ValueName1 *string // type: ENUM ValueList *[]string }
SysVarDef contains meta data about a ReGaHss system variable.
type SysVarDefs ¶
type SysVarDefs []*SysVarDef
SysVarDefs is a slice of SysVarDef.
func (SysVarDefs) Find ¶
func (s SysVarDefs) Find(name string) *SysVarDef
Find finds a system variable by name. If not found, nil is returned. SysVarDefs must be sorted.