almond2mqtt

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: MIT Imports: 10 Imported by: 0

README

almond2mqtt

mqtt-smarthome

Exposes the Almond+ router websocket API over MQTT

The project is a work in progress. Contributions welcome.

The MQTT topics stucture is choosen to follow https://github.com/mqtt-smarthome/mqtt-smarthome

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AlmondAddr     string
	AlmondUser     string
	AlmondPassword string
	MQTTURL        string
	MQTTPrefix     string
}

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

type Lookup

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

func (*Lookup) Device

func (l *Lookup) Device(key string) (marzipan.Device, bool)

DeviceValue returns the device, index, kind and whether or not the device was found.

func (*Lookup) DeviceValue

func (l *Lookup) DeviceValue(name, dtype, location string) (string, string, string, bool)

DeviceValue returns the device, index, kind and whether or not the device was found.

func (*Lookup) Update

func (l *Lookup) Update(dl *marzipan.DeviceList)

type Server

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

func New

func New(c Config) (*Server, error)

func (*Server) Command

func (s *Server) Command(toplevel string, cmd []byte)

func (*Server) Get

func (s *Server) Get(toplevel, item string) (smarthome.Value, bool)

func (*Server) Run

func (s *Server) Run() error

func (*Server) Set

func (s *Server) Set(toplevel, item string, value interface{})

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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