hapserver

package module
v0.0.0-...-2fbd439 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

hapserver

A basic HAP server implementation that supports dynamic accessories. Updating accessories will restart the server.

go get github.com/jeffh/hapserver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicServer

type DynamicServer struct {
	Pin              string
	SetupId          string
	Bridge           *accessory.Bridge
	DebounceDuration time.Duration
	OnSetup          func(s *hap.Server)
	// contains filtered or unexported fields
}

func NewDynamicServer

func NewDynamicServer(s hap.Store, bridge *accessory.Bridge) *DynamicServer

func (*DynamicServer) Run

func (s *DynamicServer) Run(ctx context.Context) error

func (*DynamicServer) SetAccessories

func (s *DynamicServer) SetAccessories(as []*accessory.A)

SetAccessories restarts the server with new accessories

func (*DynamicServer) SetupUri

func (s *DynamicServer) SetupUri() string

Jump to

Keyboard shortcuts

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