Help us shape the future of Go! Take the 2026 Go Developer Survey

loxonews

package module
v0.0.0-...-8d72e1a Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: MIT Imports: 27 Imported by: 0

README

Loxone Websocket Golang

TODO

  • Loxone DNS
  • Download Socket
  • Version Check

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	UUID  string
	Value float64
}

Event represent a Loxone event with an UUID and a Value

type Loxone

type Loxone struct {

	// Events received from the websockets
	Events chan *Event
	// contains filtered or unexported fields
}

Loxone The loxone object exposed

func Connect

func Connect(host string, user string, password string) (*Loxone, error)

Connect to the loxone websocket

func (*Loxone) GetConfig

func (l *Loxone) GetConfig() (*LoxoneConfig, error)

GetConfig get the loxone server config

func (*Loxone) RegisterEvents

func (l *Loxone) RegisterEvents() error

RegisterEvents ask the loxone server to send events

func (*Loxone) SendCommand

func (l *Loxone) SendCommand(cmd string, class interface{}) (*LoxoneBody, error)

SendCommand Send a command to the loxone server

type LoxoneBody

type LoxoneBody struct {
	// Control name of the control invoked
	Control string
	// Code status
	Code int32
}

LoxoneBody response form command sent by ws

type LoxoneCategory

type LoxoneCategory struct {
	Name string
	UUID string
	Type string
}

LoxoneCategory represent a category

type LoxoneConfig

type LoxoneConfig struct {
	// LastModified
	LastModified string
	// MsInfo
	MsInfo map[string]interface{}
	// GlobalStates states about the sun, the day, etc
	GlobalStates map[string]string
	// OperatingModes of the loxone server
	OperatingModes map[string]interface{}
	// Rooms of the loxone server
	Rooms map[string]*LoxoneRoom
	// Cats Categories of the loxone server
	Cats map[string]*LoxoneCategory
	// Controls all the control of the loxone server
	Controls map[string]*LoxoneControl
}

LoxoneConfig represent the LoxAPP3.json config file

type LoxoneControl

type LoxoneControl struct {
	Name       string
	Type       string
	UUIDAction string
	Room       string
	Cat        string
	States     map[string]interface{} // Can be an array or a string
}

LoxoneControl represent a control

type LoxoneRoom

type LoxoneRoom struct {
	Name string
	UUID string
	Type int32
}

LoxoneRoom represent a room

type LoxoneSimpleValue

type LoxoneSimpleValue struct {
	// The value answered
	Value string
}

LoxoneSimpleValue represent a simple Loxone Response Value

Jump to

Keyboard shortcuts

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