💾 Archived View for code.pfad.fr › gohmekit › hapip › characteristic › service › accessory captured on 2023-12-28 at 15:38:00. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

🚧 View Differences

-=-=-=-=-=-=-

accessory package - code.pfad.fr/gohmekit

import "code.pfad.fr/gohmekit/hapip/characteristic/service/accessory"

Types

type Basic

type Basic struct {
	// required
	Identify func(bool) error
	// required
	Manufacturer, Model, Name, SerialNumber, FirmwareRevision string

	// optional
	HardwareRevision string
	AccessoryFlags   *characteristic.Updatable[uint32]

	// HAPProtocolVersion will be added as "HAP Protocol Information" service to the services if not empty
	HAPProtocolVersion string

	// Additional services provided by this accessory
	AdditionalServices []hapip.Service
}

Basic implements a basic accessory.

func (Basic) Service

func (i Basic) Service() characteristic.Service

func (Basic) Services

func (i Basic) Services() []hapip.Service

func (Basic) WithResourceHandler

func (i Basic) WithResourceHandler(handler func(rw http.ResponseWriter, typ string, width, height int) error) WithResource

type WithResource

type WithResource struct {
	Basic

	ResourceHandler func(rw http.ResponseWriter, typ string, width, height int) error
}

WithResource implements an accessory with a /resource handler.

func (WithResource) Resource

func (i WithResource) Resource(rw http.ResponseWriter, typ string, width, height int) error

Files

accessory.go

Breadcrumb

code.pfad.fr/gohmekit/hapip/characteristic/service

code.pfad.fr/gohmekit/hapip/characteristic

code.pfad.fr/gohmekit/hapip

code.pfad.fr/gohmekit