device

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 187 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package device is the device layer: one Go type per Matter device type in scope, generated from parity/schema.json by script/devicegen, and the hand-written runtime they share — matter.js's packages/node/src/devices and packages/node/src/endpoints (ADR 0018).

Declaring a device

A device type's constructor (NewDimmableLight, …) mounts every server cluster the type mandates, each with its default server: the module's own where it has one, else the generated spec.Server with the features the type mandates and the defaults it states. The host states the rest in one declaration per cluster, the Declare of the cluster's typed package (onoffdef.Declare, …): the initial state, the feature selection, the write veto, the command handlers, the host port the module's server runs on, or the host's own server (HostServer) — as a matter.js host sets state and overrides a behavior. Declaring an optional cluster mounts it. HostServer mounts the host's own server for a cluster without a typed package. FromSpec builds the same device from data.

A device's typed accessors (DimmableLight.OnOff, …) wrap the server the device mounts for the cluster, whatever its type (Underlying returns it, a seam), and read and set its state; Host returns the kit server's host methods the typed server does not reach; OnChanged sees every change with its origin (contract.Change), OnChangedAsync runs on the device's own goroutine. Once the device is added to a node, Device.SetReachable, Device.Rename and Device.EndpointNumber are its lifecycle.

Device.Spec hands the device to the endpoint assembler as an endpoint.Spec, so endpoint-id persistence and device-type validation are the assembler's (ADR 0016). The clusters the assembler mounts on every endpoint — Descriptor, Identify, BridgedDeviceBasicInformation, Groups and ScenesManagement — are never mounted here; an optional Groups or ScenesManagement is opted into with its declaration (groupsdef.Declare{}, scenesmanagementdef.Declare{}) and mounted by the assembler.

The package is public API from its first commit (README.md §API stability). A device type matter.js renames becomes an alias with a deprecation, not a break.

The lists of typed cluster packages and device types below are generated (doc_gen.go); each type's cluster requirements are listed in docs/reference/device-types.md.

Typed cluster packages

Every cluster with a generated definition has a typed package — its Declare, State, Patch and Server. The package at github.com/SukramJ/go-fabric/cluster/spec/<pkg> is imported as <pkg>def (onoffdef for .../cluster/spec/onoff):

  • github.com/SukramJ/go-fabric/cluster/spec/accountlogin
  • github.com/SukramJ/go-fabric/cluster/spec/actions
  • github.com/SukramJ/go-fabric/cluster/spec/activatedcarbonfiltermonitoring
  • github.com/SukramJ/go-fabric/cluster/spec/administratorcommissioning
  • github.com/SukramJ/go-fabric/cluster/spec/airquality
  • github.com/SukramJ/go-fabric/cluster/spec/ambientcontextsensing
  • github.com/SukramJ/go-fabric/cluster/spec/applicationbasic
  • github.com/SukramJ/go-fabric/cluster/spec/applicationlauncher
  • github.com/SukramJ/go-fabric/cluster/spec/audiooutput
  • github.com/SukramJ/go-fabric/cluster/spec/basicinformation
  • github.com/SukramJ/go-fabric/cluster/spec/binding
  • github.com/SukramJ/go-fabric/cluster/spec/booleanstate
  • github.com/SukramJ/go-fabric/cluster/spec/booleanstateconfiguration
  • github.com/SukramJ/go-fabric/cluster/spec/bridgeddevicebasicinformation
  • github.com/SukramJ/go-fabric/cluster/spec/cameraavsettingsuserlevelmanagement
  • github.com/SukramJ/go-fabric/cluster/spec/cameraavstreammanagement
  • github.com/SukramJ/go-fabric/cluster/spec/carbondioxideconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/carbonmonoxideconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/channel
  • github.com/SukramJ/go-fabric/cluster/spec/chime
  • github.com/SukramJ/go-fabric/cluster/spec/closurecontrol
  • github.com/SukramJ/go-fabric/cluster/spec/closuredimension
  • github.com/SukramJ/go-fabric/cluster/spec/colorcontrol
  • github.com/SukramJ/go-fabric/cluster/spec/commissionercontrol
  • github.com/SukramJ/go-fabric/cluster/spec/commoditymetering
  • github.com/SukramJ/go-fabric/cluster/spec/commodityprice
  • github.com/SukramJ/go-fabric/cluster/spec/commoditytariff
  • github.com/SukramJ/go-fabric/cluster/spec/contentappobserver
  • github.com/SukramJ/go-fabric/cluster/spec/contentcontrol
  • github.com/SukramJ/go-fabric/cluster/spec/contentlauncher
  • github.com/SukramJ/go-fabric/cluster/spec/descriptor
  • github.com/SukramJ/go-fabric/cluster/spec/deviceenergymanagement
  • github.com/SukramJ/go-fabric/cluster/spec/deviceenergymanagementmode
  • github.com/SukramJ/go-fabric/cluster/spec/diagnosticlogs
  • github.com/SukramJ/go-fabric/cluster/spec/dishwasheralarm
  • github.com/SukramJ/go-fabric/cluster/spec/dishwashermode
  • github.com/SukramJ/go-fabric/cluster/spec/doorlock
  • github.com/SukramJ/go-fabric/cluster/spec/ecosysteminformation
  • github.com/SukramJ/go-fabric/cluster/spec/electricalenergymeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/electricalgridconditions
  • github.com/SukramJ/go-fabric/cluster/spec/electricalpowermeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/energyevse
  • github.com/SukramJ/go-fabric/cluster/spec/energyevsemode
  • github.com/SukramJ/go-fabric/cluster/spec/energypreference
  • github.com/SukramJ/go-fabric/cluster/spec/ethernetnetworkdiagnostics
  • github.com/SukramJ/go-fabric/cluster/spec/fancontrol
  • github.com/SukramJ/go-fabric/cluster/spec/fixedlabel
  • github.com/SukramJ/go-fabric/cluster/spec/flowmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/formaldehydeconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/generalcommissioning
  • github.com/SukramJ/go-fabric/cluster/spec/generaldiagnostics
  • github.com/SukramJ/go-fabric/cluster/spec/groupcast
  • github.com/SukramJ/go-fabric/cluster/spec/groups
  • github.com/SukramJ/go-fabric/cluster/spec/hepafiltermonitoring
  • github.com/SukramJ/go-fabric/cluster/spec/icdmanagement
  • github.com/SukramJ/go-fabric/cluster/spec/identify
  • github.com/SukramJ/go-fabric/cluster/spec/illuminancemeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/jointfabricadministrator
  • github.com/SukramJ/go-fabric/cluster/spec/jointfabricdatastore
  • github.com/SukramJ/go-fabric/cluster/spec/keypadinput
  • github.com/SukramJ/go-fabric/cluster/spec/laundrydryercontrols
  • github.com/SukramJ/go-fabric/cluster/spec/laundrywashercontrols
  • github.com/SukramJ/go-fabric/cluster/spec/laundrywashermode
  • github.com/SukramJ/go-fabric/cluster/spec/levelcontrol
  • github.com/SukramJ/go-fabric/cluster/spec/localizationconfiguration
  • github.com/SukramJ/go-fabric/cluster/spec/lowpower
  • github.com/SukramJ/go-fabric/cluster/spec/mediainput
  • github.com/SukramJ/go-fabric/cluster/spec/mediaplayback
  • github.com/SukramJ/go-fabric/cluster/spec/messages
  • github.com/SukramJ/go-fabric/cluster/spec/meteridentification
  • github.com/SukramJ/go-fabric/cluster/spec/microwaveovencontrol
  • github.com/SukramJ/go-fabric/cluster/spec/microwaveovenmode
  • github.com/SukramJ/go-fabric/cluster/spec/modeselect
  • github.com/SukramJ/go-fabric/cluster/spec/networkcommissioning
  • github.com/SukramJ/go-fabric/cluster/spec/nitrogendioxideconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/occupancysensing
  • github.com/SukramJ/go-fabric/cluster/spec/onoff
  • github.com/SukramJ/go-fabric/cluster/spec/operationalstate
  • github.com/SukramJ/go-fabric/cluster/spec/otasoftwareupdateprovider
  • github.com/SukramJ/go-fabric/cluster/spec/otasoftwareupdaterequestor
  • github.com/SukramJ/go-fabric/cluster/spec/ovencavityoperationalstate
  • github.com/SukramJ/go-fabric/cluster/spec/ovenmode
  • github.com/SukramJ/go-fabric/cluster/spec/ozoneconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/pm10concentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/pm1concentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/pm25concentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/powersource
  • github.com/SukramJ/go-fabric/cluster/spec/powersourceconfiguration
  • github.com/SukramJ/go-fabric/cluster/spec/powertopology
  • github.com/SukramJ/go-fabric/cluster/spec/pressuremeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/pumpconfigurationandcontrol
  • github.com/SukramJ/go-fabric/cluster/spec/pushavstreamtransport
  • github.com/SukramJ/go-fabric/cluster/spec/radonconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/refrigeratoralarm
  • github.com/SukramJ/go-fabric/cluster/spec/refrigeratorandtemperaturecontrolledcabinetmode
  • github.com/SukramJ/go-fabric/cluster/spec/relativehumiditymeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/rvccleanmode
  • github.com/SukramJ/go-fabric/cluster/spec/rvcoperationalstate
  • github.com/SukramJ/go-fabric/cluster/spec/rvcrunmode
  • github.com/SukramJ/go-fabric/cluster/spec/scenesmanagement
  • github.com/SukramJ/go-fabric/cluster/spec/servicearea
  • github.com/SukramJ/go-fabric/cluster/spec/smokecoalarm
  • github.com/SukramJ/go-fabric/cluster/spec/softwarediagnostics
  • github.com/SukramJ/go-fabric/cluster/spec/soilmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/switchcluster
  • github.com/SukramJ/go-fabric/cluster/spec/targetnavigator
  • github.com/SukramJ/go-fabric/cluster/spec/temperaturealarm
  • github.com/SukramJ/go-fabric/cluster/spec/temperaturecontrol
  • github.com/SukramJ/go-fabric/cluster/spec/temperaturemeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/thermostat
  • github.com/SukramJ/go-fabric/cluster/spec/thermostatuserinterfaceconfiguration
  • github.com/SukramJ/go-fabric/cluster/spec/threadborderroutermanagement
  • github.com/SukramJ/go-fabric/cluster/spec/threadnetworkdiagnostics
  • github.com/SukramJ/go-fabric/cluster/spec/threadnetworkdirectory
  • github.com/SukramJ/go-fabric/cluster/spec/timeformatlocalization
  • github.com/SukramJ/go-fabric/cluster/spec/timesynchronization
  • github.com/SukramJ/go-fabric/cluster/spec/tlscertificatemanagement
  • github.com/SukramJ/go-fabric/cluster/spec/tlsclientmanagement
  • github.com/SukramJ/go-fabric/cluster/spec/totalvolatileorganiccompoundsconcentrationmeasurement
  • github.com/SukramJ/go-fabric/cluster/spec/unitlocalization
  • github.com/SukramJ/go-fabric/cluster/spec/userlabel
  • github.com/SukramJ/go-fabric/cluster/spec/valveconfigurationandcontrol
  • github.com/SukramJ/go-fabric/cluster/spec/wakeonlan
  • github.com/SukramJ/go-fabric/cluster/spec/waterheatermanagement
  • github.com/SukramJ/go-fabric/cluster/spec/waterheatermode
  • github.com/SukramJ/go-fabric/cluster/spec/watertanklevelmonitoring
  • github.com/SukramJ/go-fabric/cluster/spec/webrtctransportprovider
  • github.com/SukramJ/go-fabric/cluster/spec/webrtctransportrequestor
  • github.com/SukramJ/go-fabric/cluster/spec/wifinetworkdiagnostics
  • github.com/SukramJ/go-fabric/cluster/spec/wifinetworkmanagement
  • github.com/SukramJ/go-fabric/cluster/spec/windowcovering
  • github.com/SukramJ/go-fabric/cluster/spec/zonemanagement

Device types

The cluster requirements of each are in docs/reference/device-types.md.

Index

Constants

View Source
const (
	AggregatorID       schema.DeviceTypeID = 0x000E
	AggregatorRevision uint16              = 2
)

Aggregator device type identity: 0x000E, revision 2.

View Source
const (
	AirPurifierID       schema.DeviceTypeID = 0x002D
	AirPurifierRevision uint16              = 3
)

AirPurifier device type identity: 0x002D, revision 3.

View Source
const (
	AirQualitySensorID       schema.DeviceTypeID = 0x002C
	AirQualitySensorRevision uint16              = 1
)

AirQualitySensor device type identity: 0x002C, revision 1.

View Source
const (
	AudioDoorbellID       schema.DeviceTypeID = 0x0141
	AudioDoorbellRevision uint16              = 2
)

AudioDoorbell device type identity: 0x0141, revision 2.

View Source
const (
	BasicVideoPlayerID       schema.DeviceTypeID = 0x0028
	BasicVideoPlayerRevision uint16              = 2
)

BasicVideoPlayer device type identity: 0x0028, revision 2.

View Source
const (
	BatteryStorageID       schema.DeviceTypeID = 0x0018
	BatteryStorageRevision uint16              = 2
)

BatteryStorage device type identity: 0x0018, revision 2.

View Source
const (
	BridgedNodeID       schema.DeviceTypeID = 0x0013
	BridgedNodeRevision uint16              = 3
)

BridgedNode device type identity: 0x0013, revision 3.

View Source
const (
	CameraControllerID       schema.DeviceTypeID = 0x0147
	CameraControllerRevision uint16              = 1
)

CameraController device type identity: 0x0147, revision 1.

View Source
const (
	CameraID       schema.DeviceTypeID = 0x0142
	CameraRevision uint16              = 1
)

Camera device type identity: 0x0142, revision 1.

View Source
const (
	CastingVideoClientID       schema.DeviceTypeID = 0x0029
	CastingVideoClientRevision uint16              = 2
)

CastingVideoClient device type identity: 0x0029, revision 2.

View Source
const (
	CastingVideoPlayerID       schema.DeviceTypeID = 0x0023
	CastingVideoPlayerRevision uint16              = 2
)

CastingVideoPlayer device type identity: 0x0023, revision 2.

View Source
const (
	ChimeID       schema.DeviceTypeID = 0x0146
	ChimeRevision uint16              = 2
)

Chime device type identity: 0x0146, revision 2.

View Source
const (
	ClosureControllerID       schema.DeviceTypeID = 0x023E
	ClosureControllerRevision uint16              = 2
)

ClosureController device type identity: 0x023E, revision 2.

View Source
const (
	ClosureID       schema.DeviceTypeID = 0x0230
	ClosureRevision uint16              = 1
)

Closure device type identity: 0x0230, revision 1.

View Source
const (
	ClosurePanelID       schema.DeviceTypeID = 0x0231
	ClosurePanelRevision uint16              = 1
)

ClosurePanel device type identity: 0x0231, revision 1.

View Source
const (
	ColorDimmerSwitchID       schema.DeviceTypeID = 0x0105
	ColorDimmerSwitchRevision uint16              = 4
)

ColorDimmerSwitch device type identity: 0x0105, revision 4.

View Source
const (
	ColorTemperatureLightID       schema.DeviceTypeID = 0x010C
	ColorTemperatureLightRevision uint16              = 5
)

ColorTemperatureLight device type identity: 0x010C, revision 5.

View Source
const (
	ContactSensorID       schema.DeviceTypeID = 0x0015
	ContactSensorRevision uint16              = 2
)

ContactSensor device type identity: 0x0015, revision 2.

View Source
const (
	ContentAppID       schema.DeviceTypeID = 0x0024
	ContentAppRevision uint16              = 2
)

ContentApp device type identity: 0x0024, revision 2.

View Source
const (
	ControlBridgeID       schema.DeviceTypeID = 0x0840
	ControlBridgeRevision uint16              = 4
)

ControlBridge device type identity: 0x0840, revision 4.

View Source
const (
	CookSurfaceID       schema.DeviceTypeID = 0x0077
	CookSurfaceRevision uint16              = 2
)

CookSurface device type identity: 0x0077, revision 2.

View Source
const (
	CooktopID       schema.DeviceTypeID = 0x0078
	CooktopRevision uint16              = 1
)

Cooktop device type identity: 0x0078, revision 1.

View Source
const (
	DeviceEnergyManagementID       schema.DeviceTypeID = 0x050D
	DeviceEnergyManagementRevision uint16              = 3
)

DeviceEnergyManagement device type identity: 0x050D, revision 3.

View Source
const (
	DimmableLightID       schema.DeviceTypeID = 0x0101
	DimmableLightRevision uint16              = 4
)

DimmableLight device type identity: 0x0101, revision 4.

View Source
const (
	DimmablePlugInUnitID       schema.DeviceTypeID = 0x010B
	DimmablePlugInUnitRevision uint16              = 6
)

DimmablePlugInUnit device type identity: 0x010B, revision 6.

View Source
const (
	DimmerSwitchID       schema.DeviceTypeID = 0x0104
	DimmerSwitchRevision uint16              = 4
)

DimmerSwitch device type identity: 0x0104, revision 4.

View Source
const (
	DishwasherID       schema.DeviceTypeID = 0x0075
	DishwasherRevision uint16              = 2
)

Dishwasher device type identity: 0x0075, revision 2.

View Source
const (
	DoorLockControllerID       schema.DeviceTypeID = 0x000B
	DoorLockControllerRevision uint16              = 4
)

DoorLockController device type identity: 0x000B, revision 4.

View Source
const (
	DoorLockID       schema.DeviceTypeID = 0x000A
	DoorLockRevision uint16              = 4
)

DoorLock device type identity: 0x000A, revision 4.

View Source
const (
	DoorbellID       schema.DeviceTypeID = 0x0148
	DoorbellRevision uint16              = 2
)

Doorbell device type identity: 0x0148, revision 2.

View Source
const (
	ElectricalEnergyTariffID       schema.DeviceTypeID = 0x0513
	ElectricalEnergyTariffRevision uint16              = 1
)

ElectricalEnergyTariff device type identity: 0x0513, revision 1.

View Source
const (
	ElectricalMeterID       schema.DeviceTypeID = 0x0514
	ElectricalMeterRevision uint16              = 1
)

ElectricalMeter device type identity: 0x0514, revision 1.

View Source
const (
	ElectricalSensorID       schema.DeviceTypeID = 0x0510
	ElectricalSensorRevision uint16              = 1
)

ElectricalSensor device type identity: 0x0510, revision 1.

View Source
const (
	ElectricalUtilityMeterID       schema.DeviceTypeID = 0x0511
	ElectricalUtilityMeterRevision uint16              = 1
)

ElectricalUtilityMeter device type identity: 0x0511, revision 1.

View Source
const (
	EnergyEvseID       schema.DeviceTypeID = 0x050C
	EnergyEvseRevision uint16              = 2
)

EnergyEvse device type identity: 0x050C, revision 2.

View Source
const (
	ExtendedColorLightID       schema.DeviceTypeID = 0x010D
	ExtendedColorLightRevision uint16              = 5
)

ExtendedColorLight device type identity: 0x010D, revision 5.

View Source
const (
	ExtractorHoodID       schema.DeviceTypeID = 0x007A
	ExtractorHoodRevision uint16              = 1
)

ExtractorHood device type identity: 0x007A, revision 1.

View Source
const (
	FanID       schema.DeviceTypeID = 0x002B
	FanRevision uint16              = 5
)

Fan device type identity: 0x002B, revision 5.

View Source
const (
	FloodlightCameraID       schema.DeviceTypeID = 0x0144
	FloodlightCameraRevision uint16              = 1
)

FloodlightCamera device type identity: 0x0144, revision 1.

View Source
const (
	FlowSensorID       schema.DeviceTypeID = 0x0306
	FlowSensorRevision uint16              = 3
)

FlowSensor device type identity: 0x0306, revision 3.

View Source
const (
	GenericSwitchID       schema.DeviceTypeID = 0x000F
	GenericSwitchRevision uint16              = 3
)

GenericSwitch device type identity: 0x000F, revision 3.

View Source
const (
	HeatPumpID       schema.DeviceTypeID = 0x0309
	HeatPumpRevision uint16              = 1
)

HeatPump device type identity: 0x0309, revision 1.

View Source
const (
	HumiditySensorID       schema.DeviceTypeID = 0x0307
	HumiditySensorRevision uint16              = 3
)

HumiditySensor device type identity: 0x0307, revision 3.

View Source
const (
	IntercomID       schema.DeviceTypeID = 0x0140
	IntercomRevision uint16              = 2
)

Intercom device type identity: 0x0140, revision 2.

View Source
const (
	IrrigationSystemID       schema.DeviceTypeID = 0x0040
	IrrigationSystemRevision uint16              = 1
)

IrrigationSystem device type identity: 0x0040, revision 1.

View Source
const (
	JointFabricAdministratorID       schema.DeviceTypeID = 0x0130
	JointFabricAdministratorRevision uint16              = 1
)

JointFabricAdministrator device type identity: 0x0130, revision 1.

View Source
const (
	LaundryDryerID       schema.DeviceTypeID = 0x007C
	LaundryDryerRevision uint16              = 2
)

LaundryDryer device type identity: 0x007C, revision 2.

View Source
const (
	LaundryWasherID       schema.DeviceTypeID = 0x0073
	LaundryWasherRevision uint16              = 2
)

LaundryWasher device type identity: 0x0073, revision 2.

View Source
const (
	LightSensorID       schema.DeviceTypeID = 0x0106
	LightSensorRevision uint16              = 4
)

LightSensor device type identity: 0x0106, revision 4.

View Source
const (
	MeterReferencePointID       schema.DeviceTypeID = 0x0512
	MeterReferencePointRevision uint16              = 1
)

MeterReferencePoint device type identity: 0x0512, revision 1.

View Source
const (
	MicrowaveOvenID       schema.DeviceTypeID = 0x0079
	MicrowaveOvenRevision uint16              = 2
)

MicrowaveOven device type identity: 0x0079, revision 2.

View Source
const (
	ModeSelectID       schema.DeviceTypeID = 0x0027
	ModeSelectRevision uint16              = 1
)

ModeSelect device type identity: 0x0027, revision 1.

View Source
const (
	MountedDimmableLoadControlID       schema.DeviceTypeID = 0x0110
	MountedDimmableLoadControlRevision uint16              = 3
)

MountedDimmableLoadControl device type identity: 0x0110, revision 3.

View Source
const (
	MountedOnOffControlID       schema.DeviceTypeID = 0x010F
	MountedOnOffControlRevision uint16              = 3
)

MountedOnOffControl device type identity: 0x010F, revision 3.

View Source
const (
	NetworkInfrastructureManagerID       schema.DeviceTypeID = 0x0090
	NetworkInfrastructureManagerRevision uint16              = 2
)

NetworkInfrastructureManager device type identity: 0x0090, revision 2.

View Source
const (
	OccupancySensorID       schema.DeviceTypeID = 0x0107
	OccupancySensorRevision uint16              = 4
)

OccupancySensor device type identity: 0x0107, revision 4.

View Source
const (
	OnOffLightID       schema.DeviceTypeID = 0x0100
	OnOffLightRevision uint16              = 4
)

OnOffLight device type identity: 0x0100, revision 4.

View Source
const (
	OnOffLightSwitchID       schema.DeviceTypeID = 0x0103
	OnOffLightSwitchRevision uint16              = 4
)

OnOffLightSwitch device type identity: 0x0103, revision 4.

View Source
const (
	OnOffPlugInUnitID       schema.DeviceTypeID = 0x010A
	OnOffPlugInUnitRevision uint16              = 5
)

OnOffPlugInUnit device type identity: 0x010A, revision 5.

View Source
const (
	OnOffSensorID       schema.DeviceTypeID = 0x0850
	OnOffSensorRevision uint16              = 4
)

OnOffSensor device type identity: 0x0850, revision 4.

View Source
const (
	OtaProviderID       schema.DeviceTypeID = 0x0014
	OtaProviderRevision uint16              = 1
)

OtaProvider device type identity: 0x0014, revision 1.

View Source
const (
	OtaRequestorID       schema.DeviceTypeID = 0x0012
	OtaRequestorRevision uint16              = 1
)

OtaRequestor device type identity: 0x0012, revision 1.

View Source
const (
	OvenID       schema.DeviceTypeID = 0x007B
	OvenRevision uint16              = 2
)

Oven device type identity: 0x007B, revision 2.

View Source
const (
	PowerSourceID       schema.DeviceTypeID = 0x0011
	PowerSourceRevision uint16              = 1
)

PowerSource device type identity: 0x0011, revision 1.

View Source
const (
	PressureSensorID       schema.DeviceTypeID = 0x0305
	PressureSensorRevision uint16              = 3
)

PressureSensor device type identity: 0x0305, revision 3.

View Source
const (
	PumpControllerID       schema.DeviceTypeID = 0x0304
	PumpControllerRevision uint16              = 5
)

PumpController device type identity: 0x0304, revision 5.

View Source
const (
	PumpID       schema.DeviceTypeID = 0x0303
	PumpRevision uint16              = 4
)

Pump device type identity: 0x0303, revision 4.

View Source
const (
	RainSensorID       schema.DeviceTypeID = 0x0044
	RainSensorRevision uint16              = 2
)

RainSensor device type identity: 0x0044, revision 2.

View Source
const (
	RefrigeratorID       schema.DeviceTypeID = 0x0070
	RefrigeratorRevision uint16              = 3
)

Refrigerator device type identity: 0x0070, revision 3.

View Source
const (
	RoboticVacuumCleanerID       schema.DeviceTypeID = 0x0074
	RoboticVacuumCleanerRevision uint16              = 4
)

RoboticVacuumCleaner device type identity: 0x0074, revision 4.

View Source
const (
	RoomAirConditionerID       schema.DeviceTypeID = 0x0072
	RoomAirConditionerRevision uint16              = 4
)

RoomAirConditioner device type identity: 0x0072, revision 4.

View Source
const (
	RootNodeID       schema.DeviceTypeID = 0x0016
	RootNodeRevision uint16              = 5
)

RootNode device type identity: 0x0016, revision 5.

View Source
const (
	SecondaryNetworkInterfaceID       schema.DeviceTypeID = 0x0019
	SecondaryNetworkInterfaceRevision uint16              = 1
)

SecondaryNetworkInterface device type identity: 0x0019, revision 1.

View Source
const (
	SmokeCoAlarmID       schema.DeviceTypeID = 0x0076
	SmokeCoAlarmRevision uint16              = 2
)

SmokeCoAlarm device type identity: 0x0076, revision 2.

View Source
const (
	SnapshotCameraID       schema.DeviceTypeID = 0x0145
	SnapshotCameraRevision uint16              = 1
)

SnapshotCamera device type identity: 0x0145, revision 1.

View Source
const (
	SoilSensorID       schema.DeviceTypeID = 0x0045
	SoilSensorRevision uint16              = 1
)

SoilSensor device type identity: 0x0045, revision 1.

View Source
const (
	SolarPowerID       schema.DeviceTypeID = 0x0017
	SolarPowerRevision uint16              = 1
)

SolarPower device type identity: 0x0017, revision 1.

View Source
const (
	SpeakerID       schema.DeviceTypeID = 0x0022
	SpeakerRevision uint16              = 1
)

Speaker device type identity: 0x0022, revision 1.

View Source
const (
	TemperatureControlledCabinetID       schema.DeviceTypeID = 0x0071
	TemperatureControlledCabinetRevision uint16              = 6
)

TemperatureControlledCabinet device type identity: 0x0071, revision 6.

View Source
const (
	TemperatureSensorID       schema.DeviceTypeID = 0x0302
	TemperatureSensorRevision uint16              = 3
)

TemperatureSensor device type identity: 0x0302, revision 3.

View Source
const (
	ThermostatControllerID       schema.DeviceTypeID = 0x030A
	ThermostatControllerRevision uint16              = 2
)

ThermostatController device type identity: 0x030A, revision 2.

View Source
const (
	ThermostatID       schema.DeviceTypeID = 0x0301
	ThermostatRevision uint16              = 7
)

Thermostat device type identity: 0x0301, revision 7.

View Source
const (
	ThreadBorderRouterID       schema.DeviceTypeID = 0x0091
	ThreadBorderRouterRevision uint16              = 2
)

ThreadBorderRouter device type identity: 0x0091, revision 2.

View Source
const (
	VideoDoorbellID       schema.DeviceTypeID = 0x0143
	VideoDoorbellRevision uint16              = 1
)

VideoDoorbell device type identity: 0x0143, revision 1.

View Source
const (
	VideoRemoteControlID       schema.DeviceTypeID = 0x002A
	VideoRemoteControlRevision uint16              = 2
)

VideoRemoteControl device type identity: 0x002A, revision 2.

View Source
const (
	WaterFreezeDetectorID       schema.DeviceTypeID = 0x0041
	WaterFreezeDetectorRevision uint16              = 2
)

WaterFreezeDetector device type identity: 0x0041, revision 2.

View Source
const (
	WaterHeaterID       schema.DeviceTypeID = 0x050F
	WaterHeaterRevision uint16              = 1
)

WaterHeater device type identity: 0x050F, revision 1.

View Source
const (
	WaterLeakDetectorID       schema.DeviceTypeID = 0x0043
	WaterLeakDetectorRevision uint16              = 2
)

WaterLeakDetector device type identity: 0x0043, revision 2.

View Source
const (
	WaterValveID       schema.DeviceTypeID = 0x0042
	WaterValveRevision uint16              = 1
)

WaterValve device type identity: 0x0042, revision 1.

View Source
const (
	WindowCoveringControllerID       schema.DeviceTypeID = 0x0203
	WindowCoveringControllerRevision uint16              = 5
)

WindowCoveringController device type identity: 0x0203, revision 5.

View Source
const (
	WindowCoveringID       schema.DeviceTypeID = 0x0202
	WindowCoveringRevision uint16              = 7
)

WindowCovering device type identity: 0x0202, revision 7.

View Source
const ConditionBridgedPowerSourceInfo = "BridgedPowerSourceInfo"

ConditionBridgedPowerSourceInfo is the Base device type's condition a bridged device states when it carries power-source information (matter.js packages/model/src/standard/elements/base.element.ts:40 at b25ed960, `Condition({ name: "BridgedPowerSourceInfo" })`). The kit states it for a device whose declarations mount PowerSource through the BridgedNode rule ([withBridgedPowerSource]).

Variables

View Source
var (
	// ErrConfiguration: a device the device type or the host's options do
	// not allow.
	ErrConfiguration = errors.New("device: configuration refused")
	// ErrNoDefaultServer: a cluster the device mounts that has no default
	// server here; the host supplies one as the cluster's declared
	// HostServer (<cluster>def.Declare).
	ErrNoDefaultServer = errors.New("device: no default server")
	// ErrComposition: a part the device type does not compose.
	ErrComposition = errors.New("device: composition refused")
)

Errors New and AddPart wrap.

View Source
var ErrAddedElsewhere = errors.New("device: the device is added to a node already")

ErrAddedElsewhere is the refusal to add a device a node holds already to another, or to make it a part (Device.AddPart) while a node holds it as a bridged device.

View Source
var ErrNotBridged = errors.New("device: a part has no BridgedDeviceBasicInformation of its own")

ErrNotBridged is the refusal of Device.SetReachable, Device.Rename and Device.Update on a part (Device.AddPart): reachability, the NodeLabel and the host's statements are the bridged device's BridgedDeviceBasicInformation, which only the endpoint its node adds under the Aggregator serves — a part serves none of its own (R2-P6-api-2503).

View Source
var ErrSelectionNotServed = errors.New("device: the self-held server does not serve the selection")

ErrSelectionNotServed is a selection the cluster's self-held server does not serve, wrapping the server's reason. A cluster the host declared — a Declare with a port, or with features the kit's server takes without one — fails the device's construction with it: the host asked for the self-held server. For the device type's default selection the cluster keeps the generated server and the kit logs one Info line (device.default_server.generated).

Functions

func ComposeNodeLabel added in v0.10.3

func ComposeNodeLabel(base, suffix string) string

ComposeNodeLabel is the NodeLabel of a bridged endpoint named base with the parameter suffix — "base (suffix)", or base alone for an empty suffix — capped at the NodeLabel maximum: 32 UTF-8 bytes, the generated definition's constraint, cut at a rune boundary, the suffix dropped first. New, Device.Rename and Device.Update cap a name with it, so a host composes a label with it and never re-derives the cap.

Types

type Aggregator

type Aggregator struct{ *Device }

Aggregator is an endpoint of the Aggregator device type.

func NewAggregator

func NewAggregator(opts Options, decls ...Declaration) (*Aggregator, error)

NewAggregator returns a Aggregator device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type AggregatorID (see New).

func (*Aggregator) Actions

func (d *Aggregator) Actions() *actionsdef.Server

Actions is the device's typed Actions server, nil until a declaration mounts it.

func (*Aggregator) CommissionerControl added in v0.4.0

func (d *Aggregator) CommissionerControl() *commissionercontroldef.Server

CommissionerControl is the device's typed CommissionerControl server, nil until a declaration mounts it.

type AirPurifier

type AirPurifier struct{ *Device }

AirPurifier is an endpoint of the AirPurifier device type.

func NewAirPurifier

func NewAirPurifier(opts Options, decls ...Declaration) (*AirPurifier, error)

NewAirPurifier returns a AirPurifier device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type AirPurifierID (see New).

func (*AirPurifier) ActivatedCarbonFilterMonitoring

func (d *AirPurifier) ActivatedCarbonFilterMonitoring() *activatedcarbonfiltermonitoringdef.Server

ActivatedCarbonFilterMonitoring is the device's typed ActivatedCarbonFilterMonitoring server, nil until a declaration mounts it.

func (*AirPurifier) FanControl

func (d *AirPurifier) FanControl() *fancontroldef.Server

FanControl is the device's typed FanControl server; the type mandates it.

func (*AirPurifier) HepaFilterMonitoring

func (d *AirPurifier) HepaFilterMonitoring() *hepafiltermonitoringdef.Server

HepaFilterMonitoring is the device's typed HepaFilterMonitoring server, nil until a declaration mounts it.

func (*AirPurifier) OnOff

func (d *AirPurifier) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

type AirQualitySensor

type AirQualitySensor struct{ *Device }

AirQualitySensor is an endpoint of the AirQualitySensor device type.

func NewAirQualitySensor

func NewAirQualitySensor(opts Options, decls ...Declaration) (*AirQualitySensor, error)

NewAirQualitySensor returns a AirQualitySensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type AirQualitySensorID (see New).

func (*AirQualitySensor) AirQuality

func (d *AirQualitySensor) AirQuality() *airqualitydef.Server

AirQuality is the device's typed AirQuality server; the type mandates it.

func (*AirQualitySensor) CarbonDioxideConcentrationMeasurement

func (d *AirQualitySensor) CarbonDioxideConcentrationMeasurement() *carbondioxideconcentrationmeasurementdef.Server

CarbonDioxideConcentrationMeasurement is the device's typed CarbonDioxideConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) CarbonMonoxideConcentrationMeasurement

func (d *AirQualitySensor) CarbonMonoxideConcentrationMeasurement() *carbonmonoxideconcentrationmeasurementdef.Server

CarbonMonoxideConcentrationMeasurement is the device's typed CarbonMonoxideConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) FormaldehydeConcentrationMeasurement

func (d *AirQualitySensor) FormaldehydeConcentrationMeasurement() *formaldehydeconcentrationmeasurementdef.Server

FormaldehydeConcentrationMeasurement is the device's typed FormaldehydeConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) NitrogenDioxideConcentrationMeasurement

func (d *AirQualitySensor) NitrogenDioxideConcentrationMeasurement() *nitrogendioxideconcentrationmeasurementdef.Server

NitrogenDioxideConcentrationMeasurement is the device's typed NitrogenDioxideConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) OzoneConcentrationMeasurement

func (d *AirQualitySensor) OzoneConcentrationMeasurement() *ozoneconcentrationmeasurementdef.Server

OzoneConcentrationMeasurement is the device's typed OzoneConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) Pm1ConcentrationMeasurement

func (d *AirQualitySensor) Pm1ConcentrationMeasurement() *pm1concentrationmeasurementdef.Server

Pm1ConcentrationMeasurement is the device's typed Pm1ConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) Pm10ConcentrationMeasurement

func (d *AirQualitySensor) Pm10ConcentrationMeasurement() *pm10concentrationmeasurementdef.Server

Pm10ConcentrationMeasurement is the device's typed Pm10ConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) Pm25ConcentrationMeasurement

func (d *AirQualitySensor) Pm25ConcentrationMeasurement() *pm25concentrationmeasurementdef.Server

Pm25ConcentrationMeasurement is the device's typed Pm25ConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) RadonConcentrationMeasurement

func (d *AirQualitySensor) RadonConcentrationMeasurement() *radonconcentrationmeasurementdef.Server

RadonConcentrationMeasurement is the device's typed RadonConcentrationMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) RelativeHumidityMeasurement

func (d *AirQualitySensor) RelativeHumidityMeasurement() *relativehumiditymeasurementdef.Server

RelativeHumidityMeasurement is the device's typed RelativeHumidityMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) TemperatureMeasurement

func (d *AirQualitySensor) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

func (*AirQualitySensor) TotalVolatileOrganicCompoundsConcentrationMeasurement

func (d *AirQualitySensor) TotalVolatileOrganicCompoundsConcentrationMeasurement() *totalvolatileorganiccompoundsconcentrationmeasurementdef.Server

TotalVolatileOrganicCompoundsConcentrationMeasurement is the device's typed TotalVolatileOrganicCompoundsConcentrationMeasurement server, nil until a declaration mounts it.

type AudioDoorbell added in v0.12.3

type AudioDoorbell struct{ *Device }

AudioDoorbell is an endpoint of the AudioDoorbell device type.

func NewAudioDoorbell added in v0.12.3

func NewAudioDoorbell(opts Options, decls ...Declaration) (*AudioDoorbell, error)

NewAudioDoorbell returns a AudioDoorbell device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type AudioDoorbellID (see New).

func (*AudioDoorbell) Binding added in v0.12.3

func (d *AudioDoorbell) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

func (*AudioDoorbell) CameraAvStreamManagement added in v0.12.3

func (d *AudioDoorbell) CameraAvStreamManagement() *cameraavstreammanagementdef.Server

CameraAvStreamManagement is the device's typed CameraAvStreamManagement server; the type mandates it.

func (*AudioDoorbell) PushAvStreamTransport added in v0.12.3

func (d *AudioDoorbell) PushAvStreamTransport() *pushavstreamtransportdef.Server

PushAvStreamTransport is the device's typed PushAvStreamTransport server, nil until a declaration mounts it.

func (*AudioDoorbell) Switch added in v0.12.3

func (d *AudioDoorbell) Switch() *switchclusterdef.Server

Switch is the device's typed Switch server; the type mandates it.

func (*AudioDoorbell) WebRtcTransportProvider added in v0.12.3

func (d *AudioDoorbell) WebRtcTransportProvider() *webrtctransportproviderdef.Server

WebRtcTransportProvider is the device's typed WebRtcTransportProvider server; the type mandates it.

func (*AudioDoorbell) WebRtcTransportRequestor added in v0.12.3

func (d *AudioDoorbell) WebRtcTransportRequestor() *webrtctransportrequestordef.Server

WebRtcTransportRequestor is the device's typed WebRtcTransportRequestor server, nil until a declaration mounts it.

type BasicVideoPlayer added in v0.4.0

type BasicVideoPlayer struct{ *Device }

BasicVideoPlayer is an endpoint of the BasicVideoPlayer device type.

func NewBasicVideoPlayer added in v0.4.0

func NewBasicVideoPlayer(opts Options, decls ...Declaration) (*BasicVideoPlayer, error)

NewBasicVideoPlayer returns a BasicVideoPlayer device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type BasicVideoPlayerID (see New).

func (*BasicVideoPlayer) AudioOutput added in v0.4.0

func (d *BasicVideoPlayer) AudioOutput() *audiooutputdef.Server

AudioOutput is the device's typed AudioOutput server, nil until a declaration mounts it.

func (*BasicVideoPlayer) Channel added in v0.4.0

func (d *BasicVideoPlayer) Channel() *channeldef.Server

Channel is the device's typed Channel server, nil until a declaration mounts it.

func (*BasicVideoPlayer) ContentControl added in v0.4.0

func (d *BasicVideoPlayer) ContentControl() *contentcontroldef.Server

ContentControl is the device's typed ContentControl server, nil until a declaration mounts it.

func (*BasicVideoPlayer) KeypadInput added in v0.4.0

func (d *BasicVideoPlayer) KeypadInput() *keypadinputdef.Server

KeypadInput is the device's typed KeypadInput server; the type mandates it.

func (*BasicVideoPlayer) LowPower added in v0.4.0

func (d *BasicVideoPlayer) LowPower() *lowpowerdef.Server

LowPower is the device's typed LowPower server, nil until a declaration mounts it.

func (*BasicVideoPlayer) MediaInput added in v0.4.0

func (d *BasicVideoPlayer) MediaInput() *mediainputdef.Server

MediaInput is the device's typed MediaInput server, nil until a declaration mounts it.

func (*BasicVideoPlayer) MediaPlayback added in v0.4.0

func (d *BasicVideoPlayer) MediaPlayback() *mediaplaybackdef.Server

MediaPlayback is the device's typed MediaPlayback server; the type mandates it.

func (*BasicVideoPlayer) Messages added in v0.4.0

func (d *BasicVideoPlayer) Messages() *messagesdef.Server

Messages is the device's typed Messages server, nil until a declaration mounts it.

func (*BasicVideoPlayer) OnOff added in v0.4.0

func (d *BasicVideoPlayer) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

func (*BasicVideoPlayer) TargetNavigator added in v0.4.0

func (d *BasicVideoPlayer) TargetNavigator() *targetnavigatordef.Server

TargetNavigator is the device's typed TargetNavigator server, nil until a declaration mounts it.

func (*BasicVideoPlayer) WakeOnLan added in v0.4.0

func (d *BasicVideoPlayer) WakeOnLan() *wakeonlandef.Server

WakeOnLan is the device's typed WakeOnLan server, nil until a declaration mounts it.

type BatteryStorage

type BatteryStorage struct{ *Device }

BatteryStorage is an endpoint of the BatteryStorage device type.

func NewBatteryStorage

func NewBatteryStorage(opts Options, decls ...Declaration) (*BatteryStorage, error)

NewBatteryStorage returns a BatteryStorage device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type BatteryStorageID (see New).

type BridgedNode

type BridgedNode struct{ *Device }

BridgedNode is an endpoint of the BridgedNode device type.

func NewBridgedNode

func NewBridgedNode(opts Options, decls ...Declaration) (*BridgedNode, error)

NewBridgedNode returns a BridgedNode device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type BridgedNodeID (see New).

func (*BridgedNode) AdministratorCommissioning

func (d *BridgedNode) AdministratorCommissioning() *administratorcommissioningdef.Server

AdministratorCommissioning is the device's typed AdministratorCommissioning server, nil until a declaration mounts it.

func (*BridgedNode) EcosystemInformation

func (d *BridgedNode) EcosystemInformation() *ecosysteminformationdef.Server

EcosystemInformation is the device's typed EcosystemInformation server, nil until a declaration mounts it.

func (*BridgedNode) PowerSource

func (d *BridgedNode) PowerSource() *powersourcedef.Server

PowerSource is the device's typed PowerSource server, nil until a declaration mounts it.

func (*BridgedNode) PowerSourceConfiguration

func (d *BridgedNode) PowerSourceConfiguration() *powersourceconfigurationdef.Server

PowerSourceConfiguration is the device's typed PowerSourceConfiguration server, nil until a declaration mounts it.

type Camera added in v0.12.3

type Camera struct{ *Device }

Camera is an endpoint of the Camera device type.

func NewCamera added in v0.12.3

func NewCamera(opts Options, decls ...Declaration) (*Camera, error)

NewCamera returns a Camera device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CameraID (see New).

func (*Camera) CameraAvSettingsUserLevelManagement added in v0.12.3

func (d *Camera) CameraAvSettingsUserLevelManagement() *cameraavsettingsuserlevelmanagementdef.Server

CameraAvSettingsUserLevelManagement is the device's typed CameraAvSettingsUserLevelManagement server, nil until a declaration mounts it.

func (*Camera) CameraAvStreamManagement added in v0.12.3

func (d *Camera) CameraAvStreamManagement() *cameraavstreammanagementdef.Server

CameraAvStreamManagement is the device's typed CameraAvStreamManagement server; the type mandates it.

func (*Camera) OccupancySensing added in v0.12.3

func (d *Camera) OccupancySensing() *occupancysensingdef.Server

OccupancySensing is the device's typed OccupancySensing server, nil until a declaration mounts it.

func (*Camera) PushAvStreamTransport added in v0.12.3

func (d *Camera) PushAvStreamTransport() *pushavstreamtransportdef.Server

PushAvStreamTransport is the device's typed PushAvStreamTransport server, nil until a declaration mounts it.

func (*Camera) WebRtcTransportProvider added in v0.12.3

func (d *Camera) WebRtcTransportProvider() *webrtctransportproviderdef.Server

WebRtcTransportProvider is the device's typed WebRtcTransportProvider server; the type mandates it.

func (*Camera) WebRtcTransportRequestor added in v0.12.3

func (d *Camera) WebRtcTransportRequestor() *webrtctransportrequestordef.Server

WebRtcTransportRequestor is the device's typed WebRtcTransportRequestor server, nil until a declaration mounts it.

func (*Camera) ZoneManagement added in v0.12.3

func (d *Camera) ZoneManagement() *zonemanagementdef.Server

ZoneManagement is the device's typed ZoneManagement server, nil until a declaration mounts it.

type CameraController added in v0.12.3

type CameraController struct{ *Device }

CameraController is an endpoint of the CameraController device type.

func NewCameraController added in v0.12.3

func NewCameraController(opts Options, decls ...Declaration) (*CameraController, error)

NewCameraController returns a CameraController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CameraControllerID (see New).

func (*CameraController) WebRtcTransportRequestor added in v0.12.3

func (d *CameraController) WebRtcTransportRequestor() *webrtctransportrequestordef.Server

WebRtcTransportRequestor is the device's typed WebRtcTransportRequestor server; the type mandates it.

type CastingVideoClient

type CastingVideoClient struct{ *Device }

CastingVideoClient is an endpoint of the CastingVideoClient device type.

func NewCastingVideoClient

func NewCastingVideoClient(opts Options, decls ...Declaration) (*CastingVideoClient, error)

NewCastingVideoClient returns a CastingVideoClient device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CastingVideoClientID (see New).

func (*CastingVideoClient) Binding

func (d *CastingVideoClient) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

func (*CastingVideoClient) ContentAppObserver

func (d *CastingVideoClient) ContentAppObserver() *contentappobserverdef.Server

ContentAppObserver is the device's typed ContentAppObserver server, nil until a declaration mounts it.

type CastingVideoPlayer added in v0.4.0

type CastingVideoPlayer struct{ *Device }

CastingVideoPlayer is an endpoint of the CastingVideoPlayer device type.

func NewCastingVideoPlayer added in v0.4.0

func NewCastingVideoPlayer(opts Options, decls ...Declaration) (*CastingVideoPlayer, error)

NewCastingVideoPlayer returns a CastingVideoPlayer device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CastingVideoPlayerID (see New).

func (*CastingVideoPlayer) AccountLogin added in v0.4.0

func (d *CastingVideoPlayer) AccountLogin() *accountlogindef.Server

AccountLogin is the device's typed AccountLogin server, nil until a declaration mounts it.

func (*CastingVideoPlayer) ApplicationLauncher added in v0.4.0

func (d *CastingVideoPlayer) ApplicationLauncher() *applicationlauncherdef.Server

ApplicationLauncher is the device's typed ApplicationLauncher server, nil until a declaration mounts it.

func (*CastingVideoPlayer) AudioOutput added in v0.4.0

func (d *CastingVideoPlayer) AudioOutput() *audiooutputdef.Server

AudioOutput is the device's typed AudioOutput server, nil until a declaration mounts it.

func (*CastingVideoPlayer) Channel added in v0.4.0

func (d *CastingVideoPlayer) Channel() *channeldef.Server

Channel is the device's typed Channel server, nil until a declaration mounts it.

func (*CastingVideoPlayer) ContentControl added in v0.4.0

func (d *CastingVideoPlayer) ContentControl() *contentcontroldef.Server

ContentControl is the device's typed ContentControl server, nil until a declaration mounts it.

func (*CastingVideoPlayer) ContentLauncher added in v0.4.0

func (d *CastingVideoPlayer) ContentLauncher() *contentlauncherdef.Server

ContentLauncher is the device's typed ContentLauncher server; the type mandates it.

func (*CastingVideoPlayer) KeypadInput added in v0.4.0

func (d *CastingVideoPlayer) KeypadInput() *keypadinputdef.Server

KeypadInput is the device's typed KeypadInput server; the type mandates it.

func (*CastingVideoPlayer) LowPower added in v0.4.0

func (d *CastingVideoPlayer) LowPower() *lowpowerdef.Server

LowPower is the device's typed LowPower server, nil until a declaration mounts it.

func (*CastingVideoPlayer) MediaInput added in v0.4.0

func (d *CastingVideoPlayer) MediaInput() *mediainputdef.Server

MediaInput is the device's typed MediaInput server, nil until a declaration mounts it.

func (*CastingVideoPlayer) MediaPlayback added in v0.4.0

func (d *CastingVideoPlayer) MediaPlayback() *mediaplaybackdef.Server

MediaPlayback is the device's typed MediaPlayback server; the type mandates it.

func (*CastingVideoPlayer) Messages added in v0.4.0

func (d *CastingVideoPlayer) Messages() *messagesdef.Server

Messages is the device's typed Messages server, nil until a declaration mounts it.

func (*CastingVideoPlayer) OnOff added in v0.4.0

func (d *CastingVideoPlayer) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

func (*CastingVideoPlayer) TargetNavigator added in v0.4.0

func (d *CastingVideoPlayer) TargetNavigator() *targetnavigatordef.Server

TargetNavigator is the device's typed TargetNavigator server, nil until a declaration mounts it.

func (*CastingVideoPlayer) WakeOnLan added in v0.4.0

func (d *CastingVideoPlayer) WakeOnLan() *wakeonlandef.Server

WakeOnLan is the device's typed WakeOnLan server, nil until a declaration mounts it.

type Chime added in v0.12.3

type Chime struct{ *Device }

Chime is an endpoint of the Chime device type.

func NewChime added in v0.12.3

func NewChime(opts Options, decls ...Declaration) (*Chime, error)

NewChime returns a Chime device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ChimeID (see New).

func (*Chime) Chime added in v0.12.3

func (d *Chime) Chime() *chimedef.Server

Chime is the device's typed Chime server; the type mandates it.

type Closure

type Closure struct{ *Device }

Closure is an endpoint of the Closure device type.

func NewClosure

func NewClosure(opts Options, decls ...Declaration) (*Closure, error)

NewClosure returns a Closure device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ClosureID (see New).

func (*Closure) ClosureControl

func (d *Closure) ClosureControl() *closurecontroldef.Server

ClosureControl is the device's typed ClosureControl server; the type mandates it.

type ClosureController added in v0.4.0

type ClosureController struct{ *Device }

ClosureController is an endpoint of the ClosureController device type.

func NewClosureController added in v0.4.0

func NewClosureController(opts Options, decls ...Declaration) (*ClosureController, error)

NewClosureController returns a ClosureController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ClosureControllerID (see New).

func (*ClosureController) Binding added in v0.4.0

func (d *ClosureController) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type ClosurePanel

type ClosurePanel struct{ *Device }

ClosurePanel is an endpoint of the ClosurePanel device type.

func NewClosurePanel

func NewClosurePanel(opts Options, decls ...Declaration) (*ClosurePanel, error)

NewClosurePanel returns a ClosurePanel device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ClosurePanelID (see New).

func (*ClosurePanel) ClosureDimension

func (d *ClosurePanel) ClosureDimension() *closuredimensiondef.Server

ClosureDimension is the device's typed ClosureDimension server; the type mandates it.

type ClusterRequirement

type ClusterRequirement struct {
	// ID is the cluster id.
	ID uint32
	// Name is the cluster's name.
	Name string
	// Conformance is the requirement's conformance as matter.js prints it;
	// empty when it states none.
	Conformance string
	// Mandatory is true for a cluster in matter.js's `server.mandatory`
	// (or `client.mandatory`) block: the requirement's conformance is
	// mandatory, or the Base device type mandates the server
	// (RequirementGenerator.ts:188).
	Mandatory bool
	// BaseMandated marks a server the device type does not state but the
	// Base device type mandates for it (RequirementGenerator.ts:71-106,
	// 143-155).
	BaseMandated bool
	// Features is the FeatureMap of the features the device type mandates
	// (ClusterRequirements.ts:102-117) — matter.js's `.with(...)`.
	Features uint32
	// FeatureNames are those features' codes, in requirement order.
	FeatureNames []string
	// Elements are the attribute, command and event requirements that
	// change something (ClusterRequirements.ts:137-208).
	Elements []ElementRequirement
	// Definition is the cluster's generated definition; nil for a client
	// cluster and for a cluster without one committed under cluster/spec.
	Definition *spec.Cluster
}

ClusterRequirement is one server or client cluster a device type requires or permits, as matter.js's RequirementGenerator and ClusterRequirements derive it (support/codegen/src/endpoints/ RequirementGenerator.ts:141-205, ClusterRequirements.ts:65-208).

func (*ClusterRequirement) Element

Element returns the requirement's element requirement of kind and id.

type ColorDimmerSwitch added in v0.4.0

type ColorDimmerSwitch struct{ *Device }

ColorDimmerSwitch is an endpoint of the ColorDimmerSwitch device type.

func NewColorDimmerSwitch added in v0.4.0

func NewColorDimmerSwitch(opts Options, decls ...Declaration) (*ColorDimmerSwitch, error)

NewColorDimmerSwitch returns a ColorDimmerSwitch device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ColorDimmerSwitchID (see New).

func (*ColorDimmerSwitch) Binding added in v0.4.0

func (d *ColorDimmerSwitch) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type ColorTemperatureLight

type ColorTemperatureLight struct{ *Device }

ColorTemperatureLight is an endpoint of the ColorTemperatureLight device type.

func NewColorTemperatureLight

func NewColorTemperatureLight(opts Options, decls ...Declaration) (*ColorTemperatureLight, error)

NewColorTemperatureLight returns a ColorTemperatureLight device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ColorTemperatureLightID (see New).

func (*ColorTemperatureLight) ColorControl

func (d *ColorTemperatureLight) ColorControl() *colorcontroldef.Server

ColorControl is the device's typed ColorControl server; the type mandates it.

func (*ColorTemperatureLight) LevelControl

func (d *ColorTemperatureLight) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*ColorTemperatureLight) OnOff

OnOff is the device's typed OnOff server; the type mandates it.

type ContactSensor

type ContactSensor struct{ *Device }

ContactSensor is an endpoint of the ContactSensor device type.

func NewContactSensor

func NewContactSensor(opts Options, decls ...Declaration) (*ContactSensor, error)

NewContactSensor returns a ContactSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ContactSensorID (see New).

func (*ContactSensor) BooleanState

func (d *ContactSensor) BooleanState() *booleanstatedef.Server

BooleanState is the device's typed BooleanState server; the type mandates it.

func (*ContactSensor) BooleanStateConfiguration

func (d *ContactSensor) BooleanStateConfiguration() *booleanstateconfigurationdef.Server

BooleanStateConfiguration is the device's typed BooleanStateConfiguration server, nil until a declaration mounts it.

type ContentApp added in v0.4.0

type ContentApp struct{ *Device }

ContentApp is an endpoint of the ContentApp device type.

func NewContentApp added in v0.4.0

func NewContentApp(opts Options, decls ...Declaration) (*ContentApp, error)

NewContentApp returns a ContentApp device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ContentAppID (see New).

func (*ContentApp) AccountLogin added in v0.4.0

func (d *ContentApp) AccountLogin() *accountlogindef.Server

AccountLogin is the device's typed AccountLogin server, nil until a declaration mounts it.

func (*ContentApp) ApplicationBasic added in v0.4.0

func (d *ContentApp) ApplicationBasic() *applicationbasicdef.Server

ApplicationBasic is the device's typed ApplicationBasic server; the type mandates it.

func (*ContentApp) ApplicationLauncher added in v0.4.0

func (d *ContentApp) ApplicationLauncher() *applicationlauncherdef.Server

ApplicationLauncher is the device's typed ApplicationLauncher server; the type mandates it.

func (*ContentApp) Channel added in v0.4.0

func (d *ContentApp) Channel() *channeldef.Server

Channel is the device's typed Channel server, nil until a declaration mounts it.

func (*ContentApp) ContentLauncher added in v0.4.0

func (d *ContentApp) ContentLauncher() *contentlauncherdef.Server

ContentLauncher is the device's typed ContentLauncher server, nil until a declaration mounts it.

func (*ContentApp) KeypadInput added in v0.4.0

func (d *ContentApp) KeypadInput() *keypadinputdef.Server

KeypadInput is the device's typed KeypadInput server; the type mandates it.

func (*ContentApp) MediaPlayback added in v0.4.0

func (d *ContentApp) MediaPlayback() *mediaplaybackdef.Server

MediaPlayback is the device's typed MediaPlayback server, nil until a declaration mounts it.

func (*ContentApp) TargetNavigator added in v0.4.0

func (d *ContentApp) TargetNavigator() *targetnavigatordef.Server

TargetNavigator is the device's typed TargetNavigator server, nil until a declaration mounts it.

type ControlBridge added in v0.4.0

type ControlBridge struct{ *Device }

ControlBridge is an endpoint of the ControlBridge device type.

func NewControlBridge added in v0.4.0

func NewControlBridge(opts Options, decls ...Declaration) (*ControlBridge, error)

NewControlBridge returns a ControlBridge device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ControlBridgeID (see New).

func (*ControlBridge) Binding added in v0.4.0

func (d *ControlBridge) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type CookSurface

type CookSurface struct{ *Device }

CookSurface is an endpoint of the CookSurface device type.

func NewCookSurface

func NewCookSurface(opts Options, decls ...Declaration) (*CookSurface, error)

NewCookSurface returns a CookSurface device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CookSurfaceID (see New).

func (*CookSurface) OnOff

func (d *CookSurface) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

func (*CookSurface) TemperatureControl

func (d *CookSurface) TemperatureControl() *temperaturecontroldef.Server

TemperatureControl is the device's typed TemperatureControl server, nil until a declaration mounts it.

func (*CookSurface) TemperatureMeasurement

func (d *CookSurface) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type Cooktop

type Cooktop struct{ *Device }

Cooktop is an endpoint of the Cooktop device type.

func NewCooktop

func NewCooktop(opts Options, decls ...Declaration) (*Cooktop, error)

NewCooktop returns a Cooktop device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type CooktopID (see New).

func (*Cooktop) OnOff

func (d *Cooktop) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type Declaration added in v0.10.0

type Declaration interface {
	// ClusterID is the cluster declared; 0 for a statement about the
	// device as a whole.
	ClusterID() uint32
	// ClusterDeclaration is the declaration in the form the kit applies
	// it.
	ClusterDeclaration() spec.ClusterDeclaration
}

Declaration is one statement about a device beside its Options, which New, FromSpec and every generated constructor (NewDimmableLight, …) take: a cluster's declaration — <cluster>def.Declare of the generated cluster packages (cluster/spec/<cluster>, imported as <cluster>def), the one form of a cluster's initial state, feature selection, write veto, command handlers and host ports — or one of the kit's own options (HostServer, WithChangeNotifier, WithClientClusters). It is the Go form of what matter.js states on an endpoint type and its behaviors (`Endpoint.with(…)`, the behaviors' initial state, a behavior subclass overriding a command; packages/node/src/devices/on-off-light.ts:103-135, packages/node/src/endpoint/Endpoint.ts:596-637).

func HostServer added in v0.10.1

func HostServer(srv contract.ClusterServer) Declaration

HostServer declares srv as the host's own server for its cluster (srv.MatterClusterID()), the one form for a host whose servers are a list: for a cluster with a generated package it is that package's <cluster>def.Declare{HostServer: srv}, resolved through the table script/devicegen writes (hostserver_gen.go); for any other cluster — a manufacturer-specific one — it mounts the server after the type's clusters, in the order of the calls (matter.js MutableEndpoint.with, packages/node/src/endpoint/type/MutableEndpoint.ts:95-110). A host that states more about the cluster than its server — a host port, an Initial patch, a feature selection, a command handler or a write veto — writes the typed <cluster>def.Declare instead, whose fields say so; a cluster is declared once either way. A nil srv is refused when the device is built.

func Measurement added in v0.10.1

func Measurement(src contract.MeasurementSource) Declaration

Measurement serves clusters of the device from a classified host source — a host whose sensors are data (a measurement class per data point) rather than per-type code: src's class (contract.MeasurementClass) names the clusters, cluster/measurement's materialiser for it builds their servers (measurement.FromMeasurementClass), and src is read on every dispatch. The kit hands src to the endpoint assembler (endpoint.Spec.Measurement), which runs the materialiser once the device is added and its endpoint number is known (endpoint/materialize.go ClusterServers) — the moment the momentary switch (which addresses its events to the endpoint) and the battery (whose EndpointList names it) need — and the bridge subscribes to src when it is a contract.ChangeNotifier and wires a switch's presses to it, as for an endpoint the host assembles itself. A battery-class source (contract.MeasurementBattery) rides as the device's PowerSource (endpoint.Spec.PowerSource) beside a measurement of another class.

The device stays the kit's: its type's other clusters, the construction-time checks and the mandatory client clusters are as without the declaration. The clusters the source materialises are the assembler's for this device, as Descriptor is: New mounts no default server for them and refuses every other declaration of them, and Device.Server and the typed accessors answer nil for them. New refuses a nil src, a class that materialises no cluster from src, and a second source of a measurement class or a second battery (an endpoint carries one of each; a second sensor is a part or a device of its own).

A host with per-type code declares the sensor's cluster instead (<cluster>def.Declare{Initial: …}) and sets each reading through the typed server; this is the form for a host whose sensors are classified data. It is the Go form of a matter.js host setting a measurement behavior's state from its own reading, which the behavior's Datasource then reports (packages/node/src/behavior/state/managed/Datasource.ts:268-270, the Options.onChange callback invoked when properties change).

func WithChangeNotifier

func WithChangeNotifier(n contract.ChangeNotifier) Declaration

WithChangeNotifier makes the device's endpoint source a contract.ChangeNotifier that fires whenever n fires: the host-model relay, the host's own model telling the bridge that state its servers read through a host port (the valve's or ModeSelect's declared source, …) has moved, so the endpoint's reportable attributes are reported. It is the Go form of a matter.js host setting behavior state from its own device events, whose Datasource then reports the change (packages/node/src/behavior/state/managed/Datasource.ts). A server that notifies its own changes (contract.ChangeNotifier or contract.AttributeChangeNotifier) is heard by the bridge without it; the relay is for a host model whose servers do not forward its notifications. A later call replaces an earlier one; nil leaves the source without one.

func WithClientClusters added in v0.4.0

func WithClientClusters(clusterIDs ...uint32) Declaration

WithClientClusters declares client clusters on the endpoint beyond the ones its device type mandates — matter.js's `MutableEndpoint.withClientClusters` (packages/node/src/endpoint/type/ MutableEndpoint.ts:123-129), which extends the type's clientClusters. They join the Descriptor's ClientList and are what the binding manager selects for a Binding entry (BindingManager.ts:563-577, #selectClientClusters reads the type's clientClusters). A declared bindable application client makes Base mandate Binding, which the assembler then mounts where the type does not (endpoint.Spec.ClientClusters).

type Device

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

Device is one endpoint of a generated device type with its cluster servers: matter.js's Endpoint of a MutableEndpoint type (packages/node/src/endpoint/Endpoint.ts). It is the endpoint's contract.EndpointSource; Device.Spec hands it to the endpoint assembler.

func FromSpec added in v0.10.0

func FromSpec(s Spec) (*Device, error)

FromSpec returns the device s describes: New with the generated device type of s.Type, and each of s.Parts built the same way and added as a part. It builds what the generated constructor of the type builds: FromSpec(Spec{Type: DimmableLightID, Options: o, Declarations: d}) and NewDimmableLight(o, d...) build the same device, and for a composite (FloodlightCamera, VideoDoorbell) the components the constructor takes as arguments come from s.Parts — a missing one is refused with the constructor's ErrComposition. A part that is refused refuses the device.

func New

func New(t *Type, opts Options, decls ...Declaration) (*Device, error)

New returns a device of type t: every server cluster the type mandates, and every optional one the host opted in, with its default server or the one the host supplied. It refuses what it can judge without a topology — a feature selection the cluster or the device type does not allow, a cluster the type does not allow, a mandatory cluster without a server — and names the schema requirement. The rest of device-type conformance is the assembler's (endpoint.ValidateDeviceTypes, ADR 0016).

The declarations name what the host states beyond the type: a cluster's <cluster>def.Declare, or the kit's own options. Every hook a declaration carries (OnWrite, Handle…) is installed on its cluster's server, the kit's or the host's.

Under Options.Surface New first rejects a level the policies do not know (surface.Policies.Validate). When the specification level does not know the type or a cluster the type mandates, New returns the device together with a *surface.WithheldError (errors.Is surface.ErrWithheld): the device serves nothing, its Surface() reports the decisions and the withheld elements, and node.Aggregator.Add of it records it as withheld and returns the same error. A level is an operator's setting; the host decides what to show.

New reads the servers it built: the attributes a value is required of (decision 17) and the ones that start at their select default are read through each server's MatterRead. A kit server backed by a declared host port (a valve's or a fan's state source, …) answers that read from the port, so a port the host declares is called from New and must answer then, without blocking (R2-P6-api-2517).

Mirrors matter.js's construction of an Endpoint from its generated MutableEndpoint type (packages/node/src/devices/dimmable-light.ts:103-116, packages/node/src/endpoint/Endpoint.ts:596-637 at db021da0).

func (*Device) AddPart

func (d *Device) AddPart(p *Device) error

AddPart makes p a part of the device — matter.js's `endpoint.parts.add` (packages/node/src/endpoint/properties/Parts.ts:37-73). matter.js validates an insertion for endpoint-number identity only (Parts.ts:195-213) and leaves composition to device-type validation; the device layer refuses here what it can judge without a topology: a part whose device type the device type does not name as a component (its deviceType requirements, schema.DeviceTypeDefinitionOf, through its base types), except under a BridgedNode, whose "Separate Endpoints" pattern hosts any application device type on descendants (packages/node/src/endpoints/bridged-node.ts:39-73 at b25ed960).

A part of another device moves while it is bound to no running node: it leaves its former owner's parts — and that owner's node, which has not started — and is bound with d to d's node, or waits unbound until d is added. The bookkeeping mirrors matter.js's owner setter, which removes the endpoint from its former owner's container before it adds it to the new one (packages/node/src/endpoint/Endpoint.ts:706-725 at db021da0); matter.js completes that move only while the endpoint is not initialised. A part bound to a running node is refused with ErrComposition and stays with its former owner, nothing moved: matter.js refuses the move of a live endpoint too — the add starts its construction (Parts.ts:64-70), which an active one refuses (packages/general/src/util/Construction.ts:284-287) — and Go keeps the state clean where matter.js's owner setter leaves the endpoint without an owner (packages/node/src/endpoint/Endpoint.ts:719-723; R2-P6-fsm-2501, decision 225). The node counts as running from before its first snapshot (deviceseam.Composing), so no move lands between that snapshot and the node's start. Every refusal comes before the move, so a refused AddPart leaves p with its former owner, as matter.js's parts.add checks before it adds (Parts.ts:45-59); nothing after the move can fail, so p is never half-owned. A device a node holds as a bridged device is the Aggregator's, which AddPart does not change: it is refused with ErrAddedElsewhere (node.Aggregator.Remove it first). A part already d's is left as it is. A callback on p's queue must not move p: the move waits for p's queue to run what it holds.

func (*Device) EndpointNumber added in v0.10.0

func (d *Device) EndpointNumber() (uint16, bool)

EndpointNumber returns the endpoint number the node serves the device under — matter.js's `endpoint.number` — and false before the device is added and the node assembled it (node.Aggregator.Add on a started node, or node.Node.Start after the Add). A part has a number of its own.

func (*Device) FixedLabel added in v0.10.6

func (d *Device) FixedLabel() *fixedlabeldef.Server

FixedLabel is the device's typed FixedLabel server — a cluster the Base device type allows on every endpoint, mounted when a declaration names it (fixedlabeldef.Declare); nil when the device does not mount it. Its …Async callbacks run on the device's goroutine.

func (*Device) HoldsAttribute

func (d *Device) HoldsAttribute(clusterID, attrID uint32) bool

HoldsAttribute reports whether the value of clusterID's attrID is the state of a server the device built itself: the device mounts a server for the cluster, the host did not supply it (a declared HostServer), and no host port the declaration carries takes the attribute's writes — the Thermostat's Sink (SystemMode, the four setpoints, TemperatureSetpointHold), FanControl's StateSource (FanMode), the Pump's StateSource (OperationMode; ControlMode, LifetimeRunningHours and LifetimeEnergyConsumed when it takes them) and the Valve's StateSource (DefaultOpenDuration; DefaultOpenLevel when it takes it). A cluster served from a Measurement source is the host's. The node stores a controller's write of such an attribute when it is nonvolatile, and restores it before it serves the device.

func (*Device) Identify added in v0.12.1

func (d *Device) Identify() *identifydef.Server

Identify is the device's Identify handlers, typed: HandleIdentify and HandleTriggerEffect install (or with nil remove) the host's handler of the controller's Identify and TriggerEffect commands on the Identify server the endpoint assembler mounts for the device. It is not that server: IdentifyTime and its countdown stay the assembler's, and a write veto (OnWrite) is not honoured.

func (*Device) MatterClusterServers

func (d *Device) MatterClusterServers() []contract.ClusterServer

MatterClusterServers implements contract.EndpointSource: the device's servers, without the ones the assembler mounts.

func (*Device) MatterDeviceType

func (d *Device) MatterDeviceType() uint16

MatterDeviceType implements contract.EndpointSource.

func (*Device) MatterIdentify added in v0.12.1

func (d *Device) MatterIdentify(ctx context.Context, identifyTime uint16) error

MatterIdentify implements contract.IdentifyHandler: the host's HandleIdentify, when installed.

func (*Device) MatterTriggerEffect added in v0.12.1

func (d *Device) MatterTriggerEffect(ctx context.Context, effectIdentifier, effectVariant uint8) error

MatterTriggerEffect implements contract.IdentifyHandler: the host's HandleTriggerEffect, when installed.

func (*Device) OnChanged

func (d *Device) OnChanged(clusterID uint32, fn func(change contract.Change)) (unsubscribe func())

OnChanged calls fn with every change of the device's clusterID server — matter.js's `events.<cluster>.<attribute>$Changed` (endpoint/Endpoint.ts:457) with the origin of the change (contract.Change; Datasource.ts:1486-1492 at db021da0 hands the observer the session that made it) — delivered through the server's contract.AttributeChangeNotifier, or through its contract.ChangeNotifier with every attribute it reports. fn runs inline, on the goroutine that made the change and before the write, command or Set that made it returns; Device.OnChangedAsync queues it. It is the untyped form of the typed accessor's OnChanged — one hook, two signatures. It returns the unsubscribe function. A cluster the device does not mount never calls fn (Binding reports each change of its list, the per-fabric entries through core.Binding.OnChange); a server that reads its state from a host port (contract.ChangeNotifier only — valve, fan, pump, SmokeCoAlarm, ModeSelect) calls fn when that port notifies, with contract.OriginUnknown.

func (*Device) OnChangedAsync added in v0.10.0

func (d *Device) OnChangedAsync(clusterID uint32, fn func(change contract.Change)) (unsubscribe func())

OnChangedAsync is Device.OnChanged with fn queued on the device's goroutine: the change is taken when the server reports it, and fn runs later, one call after the other, while the device is added to a running node. A change reported while it is not added is not delivered.

func (*Device) Parts

func (d *Device) Parts() []*Device

Parts returns the device's parts in the order they were added. The slice is fresh.

func (*Device) PowerSource added in v0.10.9

func (d *Device) PowerSource() *powersourcedef.Server

PowerSource is the device's typed PowerSource server — a cluster the BridgedNode device type allows on every bridged device under the condition BridgedPowerSourceInfo, mounted when a declaration names it (powersourcedef.Declare) and then stating that condition; nil when the device does not mount it. Its EndpointList names the device's own endpoint unless the declaration's Initial names others. Its …Async callbacks run on the device's goroutine.

func (*Device) Reachable added in v0.10.0

func (d *Device) Reachable() bool

Reachable reports whether the device is reachable: what Device.SetReachable set last, true before the first call.

func (*Device) Rename added in v0.10.0

func (d *Device) Rename(ctx context.Context, name string) error

Rename names the device name: its BridgedDeviceBasicInformation NodeLabel, reported to a subscribed controller and persisted by the node as a controller's write of it is, so it survives a restart — a written label, which a later Device.Update of the host's name does not replace. The Name of the device's Options becomes name, capped at the NodeLabel maximum (ComposeNodeLabel). Before the device is added only the name changes.

The node stores the label before it serves it, as it stores a controller's write: when its store refuses, Rename returns the refusal, the label is not served and the device keeps its name — a label the host believes saved is never lost on the next restart (R2-P5-apidev-16). On a part (Device.AddPart) Rename returns ErrNotBridged and changes nothing (R2-P6-api-2503).

func (*Device) Server

func (d *Device) Server(clusterID uint32) contract.ClusterServer

Server returns the device's server for clusterID, or nil when it mounts none — a cluster served from a Measurement source included, whose servers the assembler builds.

func (*Device) Servers

func (d *Device) Servers() []contract.ClusterServer

Servers returns the device's servers in the device type's requirement order. The slice is fresh.

func (*Device) SetReachable added in v0.10.0

func (d *Device) SetReachable(ctx context.Context, reachable bool) error

SetReachable says whether the bridged device is reachable: its BridgedDeviceBasicInformation Reachable attribute, and on a change the ReachableChanged event a subscribed controller receives — as a matter.js host sets the state and the server emits the event (BridgedDeviceBasicInformationServer.ts:37 reactTo, :100-102 #emitReachableChange). A device starts reachable, as matter.js's State does (BridgedDeviceBasicInformationServer.ts:129-132). It is the one reachability input: a host whose source goes away calls it, as a matter.js host sets the one reachable state (ADR 0025 principle 2). Before the device is added only the value changes. Concurrent calls tell the host in the order they change the state, so the last value the host hears is the device's; no lock is held while the host is told, so a host whose notification sets the reachability again (a node observer of the ReachableChanged event) returns. A call that finds another telling the host leaves its notification to that one, in order and under that call's ctx, and returns before the host heard it (review II, R2-P1-dr-rest-06).

On a part (Device.AddPart) it returns ErrNotBridged and changes nothing: a part serves no Reachable of its own (R2-P6-api-2503).

func (*Device) Spec

func (d *Device) Spec() endpoint.Spec

Spec converts the device into the endpoint assembler's input: the Options mapped onto endpoint.Spec, the device itself as its contract.EndpointSource, and its parts, recursively, as endpoint.Spec.Parts.

func (*Device) Surface

func (d *Device) Surface() surface.Report

Surface reports the device's surface: the digest of the policies it was composed under (Options.Surface), the effective surface read from its built servers — one endpoint, the root empty — and every decision of the policy chain, at least one per candidate element (package surface). The report is computed once, at New; the endpoint's number is filled in once the node assembled the device. The clusters the endpoint assembler mounts and those a Measurement source projects are not part of it. The report is a fresh copy.

func (*Device) Type

func (d *Device) Type() *Type

Type returns the device's type, a copy: modifying it changes neither the device nor the registry (Type).

func (*Device) Update added in v0.10.3

func (d *Device) Update(ctx context.Context, fn func(*HostStatement)) error

Update applies a change of the host's statements: fn gets the current ones and changes what changed. The new Name (capped at the NodeLabel maximum, ComposeNodeLabel) is served at once to a subscribed controller unless a written label wins, and persisted nowhere, so the next restart starts from the host's statement again. The addresses reach the endpoint at the node's next reassembly. The device stays bound: Device.EndpointNumber and Device.SetReachable keep working. Before the device is added only the statements change.

fn runs without a lock of the device, so it may ask the device anything (R2-P6-conc-2504); only the statements fn changed are written back, so a Device.Rename or another Update that lands while fn runs keeps what it set unless fn changed the same statement. On a part (Device.AddPart) Update returns ErrNotBridged, calls no fn and changes nothing (R2-P6-api-2503).

matter.js has no such split: every change of a persistent attribute is stored, whoever made it (packages/node/src/behavior/state/managed/Datasource.ts:1442-1453 at db021da0; NodeLabel is nonvolatile, basic-information.element.ts:36-37), and the stored value replaces the endpoint's configured state when the node restarts (Datasource.ts:580-583). The host's statement is the configured state here — changed without becoming the stored one.

func (*Device) UserLabel added in v0.10.6

func (d *Device) UserLabel() *userlabeldef.Server

UserLabel is the device's typed UserLabel server — a cluster the Base device type allows on every endpoint, mounted when a declaration names it (userlabeldef.Declare); nil when the device does not mount it. A controller's write reaches its OnChanged; a node keeps the list in its store under the device's stable key.

type DeviceEnergyManagement

type DeviceEnergyManagement struct{ *Device }

DeviceEnergyManagement is an endpoint of the DeviceEnergyManagement device type.

func NewDeviceEnergyManagement

func NewDeviceEnergyManagement(opts Options, decls ...Declaration) (*DeviceEnergyManagement, error)

NewDeviceEnergyManagement returns a DeviceEnergyManagement device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DeviceEnergyManagementID (see New).

func (*DeviceEnergyManagement) DeviceEnergyManagement

func (d *DeviceEnergyManagement) DeviceEnergyManagement() *deviceenergymanagementdef.Server

DeviceEnergyManagement is the device's typed DeviceEnergyManagement server; the type mandates it.

func (*DeviceEnergyManagement) DeviceEnergyManagementMode

func (d *DeviceEnergyManagement) DeviceEnergyManagementMode() *deviceenergymanagementmodedef.Server

DeviceEnergyManagementMode is the device's typed DeviceEnergyManagementMode server, nil until a declaration mounts it.

type DimmableLight

type DimmableLight struct{ *Device }

DimmableLight is an endpoint of the DimmableLight device type.

func NewDimmableLight

func NewDimmableLight(opts Options, decls ...Declaration) (*DimmableLight, error)

NewDimmableLight returns a DimmableLight device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DimmableLightID (see New).

func (*DimmableLight) LevelControl

func (d *DimmableLight) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*DimmableLight) OnOff

func (d *DimmableLight) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type DimmablePlugInUnit

type DimmablePlugInUnit struct{ *Device }

DimmablePlugInUnit is an endpoint of the DimmablePlugInUnit device type.

func NewDimmablePlugInUnit

func NewDimmablePlugInUnit(opts Options, decls ...Declaration) (*DimmablePlugInUnit, error)

NewDimmablePlugInUnit returns a DimmablePlugInUnit device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DimmablePlugInUnitID (see New).

func (*DimmablePlugInUnit) LevelControl

func (d *DimmablePlugInUnit) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*DimmablePlugInUnit) OnOff

func (d *DimmablePlugInUnit) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type DimmerSwitch added in v0.4.0

type DimmerSwitch struct{ *Device }

DimmerSwitch is an endpoint of the DimmerSwitch device type.

func NewDimmerSwitch added in v0.4.0

func NewDimmerSwitch(opts Options, decls ...Declaration) (*DimmerSwitch, error)

NewDimmerSwitch returns a DimmerSwitch device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DimmerSwitchID (see New).

func (*DimmerSwitch) Binding added in v0.4.0

func (d *DimmerSwitch) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type Dishwasher

type Dishwasher struct{ *Device }

Dishwasher is an endpoint of the Dishwasher device type.

func NewDishwasher

func NewDishwasher(opts Options, decls ...Declaration) (*Dishwasher, error)

NewDishwasher returns a Dishwasher device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DishwasherID (see New).

func (*Dishwasher) DishwasherAlarm

func (d *Dishwasher) DishwasherAlarm() *dishwasheralarmdef.Server

DishwasherAlarm is the device's typed DishwasherAlarm server, nil until a declaration mounts it.

func (*Dishwasher) DishwasherMode

func (d *Dishwasher) DishwasherMode() *dishwashermodedef.Server

DishwasherMode is the device's typed DishwasherMode server, nil until a declaration mounts it.

func (*Dishwasher) OnOff

func (d *Dishwasher) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

func (*Dishwasher) OperationalState

func (d *Dishwasher) OperationalState() *operationalstatedef.Server

OperationalState is the device's typed OperationalState server; the type mandates it.

func (*Dishwasher) TemperatureControl

func (d *Dishwasher) TemperatureControl() *temperaturecontroldef.Server

TemperatureControl is the device's typed TemperatureControl server, nil until a declaration mounts it.

type DoorLock

type DoorLock struct{ *Device }

DoorLock is an endpoint of the DoorLock device type.

func NewDoorLock

func NewDoorLock(opts Options, decls ...Declaration) (*DoorLock, error)

NewDoorLock returns a DoorLock device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DoorLockID (see New).

func (*DoorLock) DoorLock

func (d *DoorLock) DoorLock() *doorlockdef.Server

DoorLock is the device's typed DoorLock server; the type mandates it.

type DoorLockController added in v0.4.0

type DoorLockController struct{ *Device }

DoorLockController is an endpoint of the DoorLockController device type.

func NewDoorLockController added in v0.4.0

func NewDoorLockController(opts Options, decls ...Declaration) (*DoorLockController, error)

NewDoorLockController returns a DoorLockController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DoorLockControllerID (see New).

func (*DoorLockController) Binding added in v0.4.0

func (d *DoorLockController) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type Doorbell

type Doorbell struct{ *Device }

Doorbell is an endpoint of the Doorbell device type.

func NewDoorbell

func NewDoorbell(opts Options, decls ...Declaration) (*Doorbell, error)

NewDoorbell returns a Doorbell device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type DoorbellID (see New).

func (*Doorbell) Binding

func (d *Doorbell) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

func (*Doorbell) Switch

func (d *Doorbell) Switch() *switchclusterdef.Server

Switch is the device's typed Switch server; the type mandates it.

type ElectricalEnergyTariff

type ElectricalEnergyTariff struct{ *Device }

ElectricalEnergyTariff is an endpoint of the ElectricalEnergyTariff device type.

func NewElectricalEnergyTariff

func NewElectricalEnergyTariff(opts Options, decls ...Declaration) (*ElectricalEnergyTariff, error)

NewElectricalEnergyTariff returns a ElectricalEnergyTariff device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ElectricalEnergyTariffID (see New).

func (*ElectricalEnergyTariff) CommodityPrice

func (d *ElectricalEnergyTariff) CommodityPrice() *commoditypricedef.Server

CommodityPrice is the device's typed CommodityPrice server, nil until a declaration mounts it.

func (*ElectricalEnergyTariff) CommodityTariff

func (d *ElectricalEnergyTariff) CommodityTariff() *commoditytariffdef.Server

CommodityTariff is the device's typed CommodityTariff server, nil until a declaration mounts it.

func (*ElectricalEnergyTariff) ElectricalGridConditions

func (d *ElectricalEnergyTariff) ElectricalGridConditions() *electricalgridconditionsdef.Server

ElectricalGridConditions is the device's typed ElectricalGridConditions server, nil until a declaration mounts it.

type ElectricalMeter

type ElectricalMeter struct{ *Device }

ElectricalMeter is an endpoint of the ElectricalMeter device type.

func NewElectricalMeter

func NewElectricalMeter(opts Options, decls ...Declaration) (*ElectricalMeter, error)

NewElectricalMeter returns a ElectricalMeter device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ElectricalMeterID (see New).

func (*ElectricalMeter) CommodityMetering

func (d *ElectricalMeter) CommodityMetering() *commoditymeteringdef.Server

CommodityMetering is the device's typed CommodityMetering server, nil until a declaration mounts it.

func (*ElectricalMeter) ElectricalEnergyMeasurement

func (d *ElectricalMeter) ElectricalEnergyMeasurement() *electricalenergymeasurementdef.Server

ElectricalEnergyMeasurement is the device's typed ElectricalEnergyMeasurement server; the type mandates it.

func (*ElectricalMeter) ElectricalPowerMeasurement

func (d *ElectricalMeter) ElectricalPowerMeasurement() *electricalpowermeasurementdef.Server

ElectricalPowerMeasurement is the device's typed ElectricalPowerMeasurement server; the type mandates it.

type ElectricalSensor

type ElectricalSensor struct{ *Device }

ElectricalSensor is an endpoint of the ElectricalSensor device type.

func NewElectricalSensor

func NewElectricalSensor(opts Options, decls ...Declaration) (*ElectricalSensor, error)

NewElectricalSensor returns a ElectricalSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ElectricalSensorID (see New).

func (*ElectricalSensor) ElectricalEnergyMeasurement

func (d *ElectricalSensor) ElectricalEnergyMeasurement() *electricalenergymeasurementdef.Server

ElectricalEnergyMeasurement is the device's typed ElectricalEnergyMeasurement server, nil until a declaration mounts it.

func (*ElectricalSensor) ElectricalPowerMeasurement

func (d *ElectricalSensor) ElectricalPowerMeasurement() *electricalpowermeasurementdef.Server

ElectricalPowerMeasurement is the device's typed ElectricalPowerMeasurement server, nil until a declaration mounts it.

func (*ElectricalSensor) PowerTopology

func (d *ElectricalSensor) PowerTopology() *powertopologydef.Server

PowerTopology is the device's typed PowerTopology server; the type mandates it.

type ElectricalUtilityMeter

type ElectricalUtilityMeter struct{ *Device }

ElectricalUtilityMeter is an endpoint of the ElectricalUtilityMeter device type.

func NewElectricalUtilityMeter

func NewElectricalUtilityMeter(opts Options, decls ...Declaration) (*ElectricalUtilityMeter, error)

NewElectricalUtilityMeter returns a ElectricalUtilityMeter device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ElectricalUtilityMeterID (see New).

func (*ElectricalUtilityMeter) MeterIdentification

func (d *ElectricalUtilityMeter) MeterIdentification() *meteridentificationdef.Server

MeterIdentification is the device's typed MeterIdentification server; the type mandates it.

type ElementRequirement

type ElementRequirement struct {
	// Element is schema.RequirementAttribute, RequirementCommand or
	// RequirementEvent.
	Element schema.RequirementElement
	// Name is the element's name.
	Name string
	// ID is the attribute, command or event id.
	ID       uint32
	Presence Presence
	// Default is the element's default, where the requirement states one
	// or a constraint `value` implies it (`default ??= value`).
	HasDefault bool
	Default    float64
	// Min and Max are the constraint's bounds (a constraint `value` sets
	// both).
	HasMin bool
	Min    float64
	HasMax bool
	Max    float64
}

ElementRequirement is an attribute, command or event requirement: the alteration matter.js's ClusterRequirements.ingestElement makes of it (ClusterRequirements.ts:137-208). Only numeric bounds and defaults are carried, as matter.js carries them.

type EnergyEvse

type EnergyEvse struct{ *Device }

EnergyEvse is an endpoint of the EnergyEvse device type.

func NewEnergyEvse

func NewEnergyEvse(opts Options, decls ...Declaration) (*EnergyEvse, error)

NewEnergyEvse returns a EnergyEvse device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type EnergyEvseID (see New).

func (*EnergyEvse) EnergyEvse

func (d *EnergyEvse) EnergyEvse() *energyevsedef.Server

EnergyEvse is the device's typed EnergyEvse server; the type mandates it.

func (*EnergyEvse) EnergyEvseMode

func (d *EnergyEvse) EnergyEvseMode() *energyevsemodedef.Server

EnergyEvseMode is the device's typed EnergyEvseMode server; the type mandates it.

func (*EnergyEvse) TemperatureMeasurement

func (d *EnergyEvse) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type ExtendedColorLight

type ExtendedColorLight struct{ *Device }

ExtendedColorLight is an endpoint of the ExtendedColorLight device type.

func NewExtendedColorLight

func NewExtendedColorLight(opts Options, decls ...Declaration) (*ExtendedColorLight, error)

NewExtendedColorLight returns a ExtendedColorLight device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ExtendedColorLightID (see New).

func (*ExtendedColorLight) ColorControl

func (d *ExtendedColorLight) ColorControl() *colorcontroldef.Server

ColorControl is the device's typed ColorControl server; the type mandates it.

func (*ExtendedColorLight) LevelControl

func (d *ExtendedColorLight) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*ExtendedColorLight) OnOff

func (d *ExtendedColorLight) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type ExtractorHood

type ExtractorHood struct{ *Device }

ExtractorHood is an endpoint of the ExtractorHood device type.

func NewExtractorHood

func NewExtractorHood(opts Options, decls ...Declaration) (*ExtractorHood, error)

NewExtractorHood returns a ExtractorHood device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ExtractorHoodID (see New).

func (*ExtractorHood) ActivatedCarbonFilterMonitoring

func (d *ExtractorHood) ActivatedCarbonFilterMonitoring() *activatedcarbonfiltermonitoringdef.Server

ActivatedCarbonFilterMonitoring is the device's typed ActivatedCarbonFilterMonitoring server, nil until a declaration mounts it.

func (*ExtractorHood) FanControl

func (d *ExtractorHood) FanControl() *fancontroldef.Server

FanControl is the device's typed FanControl server; the type mandates it.

func (*ExtractorHood) HepaFilterMonitoring

func (d *ExtractorHood) HepaFilterMonitoring() *hepafiltermonitoringdef.Server

HepaFilterMonitoring is the device's typed HepaFilterMonitoring server, nil until a declaration mounts it.

type Fan

type Fan struct{ *Device }

Fan is an endpoint of the Fan device type.

func NewFan

func NewFan(opts Options, decls ...Declaration) (*Fan, error)

NewFan returns a Fan device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type FanID (see New).

func (*Fan) FanControl

func (d *Fan) FanControl() *fancontroldef.Server

FanControl is the device's typed FanControl server; the type mandates it.

func (*Fan) OnOff

func (d *Fan) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

type FloodlightCamera

type FloodlightCamera struct {
	*Device
	// contains filtered or unexported fields
}

FloodlightCamera is an endpoint of the FloodlightCamera device type, a composite: its mandatory components (OnOffLight, Camera) are its parts, endpoints below it.

func NewFloodlightCamera

func NewFloodlightCamera(opts Options, onOffLight *OnOffLight, camera *Camera, decls ...Declaration) (*FloodlightCamera, error)

NewFloodlightCamera returns a FloodlightCamera device with its mandatory components as its parts, in this order: matter.js places a component on an endpoint below the composite (DeviceTypeConformance.ts candidatesOf). Each component must be given; further parts join with Device.AddPart.

func (*FloodlightCamera) Camera

func (d *FloodlightCamera) Camera() *Camera

Camera is the device's Camera component.

func (*FloodlightCamera) OnOffLight

func (d *FloodlightCamera) OnOffLight() *OnOffLight

OnOffLight is the device's OnOffLight component.

type FlowSensor

type FlowSensor struct{ *Device }

FlowSensor is an endpoint of the FlowSensor device type.

func NewFlowSensor

func NewFlowSensor(opts Options, decls ...Declaration) (*FlowSensor, error)

NewFlowSensor returns a FlowSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type FlowSensorID (see New).

func (*FlowSensor) FlowMeasurement

func (d *FlowSensor) FlowMeasurement() *flowmeasurementdef.Server

FlowMeasurement is the device's typed FlowMeasurement server; the type mandates it.

type GenericSwitch

type GenericSwitch struct{ *Device }

GenericSwitch is an endpoint of the GenericSwitch device type.

func NewGenericSwitch

func NewGenericSwitch(opts Options, decls ...Declaration) (*GenericSwitch, error)

NewGenericSwitch returns a GenericSwitch device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type GenericSwitchID (see New).

func (*GenericSwitch) Switch

func (d *GenericSwitch) Switch() *switchclusterdef.Server

Switch is the device's typed Switch server; the type mandates it.

type HeatPump

type HeatPump struct{ *Device }

HeatPump is an endpoint of the HeatPump device type.

func NewHeatPump

func NewHeatPump(opts Options, decls ...Declaration) (*HeatPump, error)

NewHeatPump returns a HeatPump device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type HeatPumpID (see New).

type HostStatement added in v0.10.3

type HostStatement struct {
	Name                          string
	DeviceAddress, ChannelAddress string
}

HostStatement are the facts of a device's Options the host states and may change while the device is bound — what the host's own model says about the device, as against what a controller writes to it:

  • Name: the name the device's NodeLabel serves as long as no label is written. A controller's write of NodeLabel, and Device.Rename, persist a label that wins over it, across restarts.
  • DeviceAddress, ChannelAddress: the host's addresses of the physical device and of this function of it.

Reachability is not a statement: Device.SetReachable is its one input.

StableKey, Vendor and Conditions are the device's identity and type and do not change while it is bound; a host that changes them replaces the device (node.Aggregator.Replace).

type HumiditySensor

type HumiditySensor struct{ *Device }

HumiditySensor is an endpoint of the HumiditySensor device type.

func NewHumiditySensor

func NewHumiditySensor(opts Options, decls ...Declaration) (*HumiditySensor, error)

NewHumiditySensor returns a HumiditySensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type HumiditySensorID (see New).

func (*HumiditySensor) RelativeHumidityMeasurement

func (d *HumiditySensor) RelativeHumidityMeasurement() *relativehumiditymeasurementdef.Server

RelativeHumidityMeasurement is the device's typed RelativeHumidityMeasurement server; the type mandates it.

type InitialRequirement

type InitialRequirement struct {
	// Cluster and ClusterName name the cluster.
	Cluster     uint32
	ClusterName string
	// Attribute and AttributeName name the attribute.
	Attribute     uint32
	AttributeName string
	// Declare is the declaration that states it, as Go source:
	// "<cluster>def.Declare{Initial: <cluster>def.Patch{<Attribute>: …}}".
	Declare string
}

InitialRequirement is an attribute a device's kit server lists and has no value for, one matter.js requires a value of when the server initialises: the host states it in the cluster's declaration, or New refuses the device (Type.RequiredInitial).

func (InitialRequirement) String

func (r InitialRequirement) String() string

String names the attribute and the declaration that states it.

type Intercom added in v0.12.3

type Intercom struct{ *Device }

Intercom is an endpoint of the Intercom device type.

func NewIntercom added in v0.12.3

func NewIntercom(opts Options, decls ...Declaration) (*Intercom, error)

NewIntercom returns a Intercom device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type IntercomID (see New).

func (*Intercom) CameraAvSettingsUserLevelManagement added in v0.12.3

func (d *Intercom) CameraAvSettingsUserLevelManagement() *cameraavsettingsuserlevelmanagementdef.Server

CameraAvSettingsUserLevelManagement is the device's typed CameraAvSettingsUserLevelManagement server, nil until a declaration mounts it.

func (*Intercom) CameraAvStreamManagement added in v0.12.3

func (d *Intercom) CameraAvStreamManagement() *cameraavstreammanagementdef.Server

CameraAvStreamManagement is the device's typed CameraAvStreamManagement server; the type mandates it.

func (*Intercom) WebRtcTransportProvider added in v0.12.3

func (d *Intercom) WebRtcTransportProvider() *webrtctransportproviderdef.Server

WebRtcTransportProvider is the device's typed WebRtcTransportProvider server; the type mandates it.

func (*Intercom) WebRtcTransportRequestor added in v0.12.3

func (d *Intercom) WebRtcTransportRequestor() *webrtctransportrequestordef.Server

WebRtcTransportRequestor is the device's typed WebRtcTransportRequestor server; the type mandates it.

type IrrigationSystem

type IrrigationSystem struct{ *Device }

IrrigationSystem is an endpoint of the IrrigationSystem device type.

func NewIrrigationSystem

func NewIrrigationSystem(opts Options, decls ...Declaration) (*IrrigationSystem, error)

NewIrrigationSystem returns a IrrigationSystem device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type IrrigationSystemID (see New).

func (*IrrigationSystem) FlowMeasurement

func (d *IrrigationSystem) FlowMeasurement() *flowmeasurementdef.Server

FlowMeasurement is the device's typed FlowMeasurement server, nil until a declaration mounts it.

func (*IrrigationSystem) OperationalState

func (d *IrrigationSystem) OperationalState() *operationalstatedef.Server

OperationalState is the device's typed OperationalState server, nil until a declaration mounts it.

type JointFabricAdministrator added in v0.12.3

type JointFabricAdministrator struct{ *Device }

JointFabricAdministrator is an endpoint of the JointFabricAdministrator device type.

func NewJointFabricAdministrator added in v0.12.3

func NewJointFabricAdministrator(opts Options, decls ...Declaration) (*JointFabricAdministrator, error)

NewJointFabricAdministrator returns a JointFabricAdministrator device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type JointFabricAdministratorID (see New).

func (*JointFabricAdministrator) JointFabricAdministrator added in v0.12.3

func (d *JointFabricAdministrator) JointFabricAdministrator() *jointfabricadministratordef.Server

JointFabricAdministrator is the device's typed JointFabricAdministrator server; the type mandates it.

func (*JointFabricAdministrator) JointFabricDatastore added in v0.12.3

func (d *JointFabricAdministrator) JointFabricDatastore() *jointfabricdatastoredef.Server

JointFabricDatastore is the device's typed JointFabricDatastore server; the type mandates it.

type LaundryDryer

type LaundryDryer struct{ *Device }

LaundryDryer is an endpoint of the LaundryDryer device type.

func NewLaundryDryer

func NewLaundryDryer(opts Options, decls ...Declaration) (*LaundryDryer, error)

NewLaundryDryer returns a LaundryDryer device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type LaundryDryerID (see New).

func (*LaundryDryer) LaundryDryerControls

func (d *LaundryDryer) LaundryDryerControls() *laundrydryercontrolsdef.Server

LaundryDryerControls is the device's typed LaundryDryerControls server, nil until a declaration mounts it.

func (*LaundryDryer) LaundryWasherMode

func (d *LaundryDryer) LaundryWasherMode() *laundrywashermodedef.Server

LaundryWasherMode is the device's typed LaundryWasherMode server, nil until a declaration mounts it.

func (*LaundryDryer) OnOff

func (d *LaundryDryer) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

func (*LaundryDryer) OperationalState

func (d *LaundryDryer) OperationalState() *operationalstatedef.Server

OperationalState is the device's typed OperationalState server; the type mandates it.

func (*LaundryDryer) TemperatureControl

func (d *LaundryDryer) TemperatureControl() *temperaturecontroldef.Server

TemperatureControl is the device's typed TemperatureControl server, nil until a declaration mounts it.

type LaundryWasher

type LaundryWasher struct{ *Device }

LaundryWasher is an endpoint of the LaundryWasher device type.

func NewLaundryWasher

func NewLaundryWasher(opts Options, decls ...Declaration) (*LaundryWasher, error)

NewLaundryWasher returns a LaundryWasher device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type LaundryWasherID (see New).

func (*LaundryWasher) LaundryWasherControls

func (d *LaundryWasher) LaundryWasherControls() *laundrywashercontrolsdef.Server

LaundryWasherControls is the device's typed LaundryWasherControls server, nil until a declaration mounts it.

func (*LaundryWasher) LaundryWasherMode

func (d *LaundryWasher) LaundryWasherMode() *laundrywashermodedef.Server

LaundryWasherMode is the device's typed LaundryWasherMode server, nil until a declaration mounts it.

func (*LaundryWasher) OnOff

func (d *LaundryWasher) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server, nil until a declaration mounts it.

func (*LaundryWasher) OperationalState

func (d *LaundryWasher) OperationalState() *operationalstatedef.Server

OperationalState is the device's typed OperationalState server; the type mandates it.

func (*LaundryWasher) TemperatureControl

func (d *LaundryWasher) TemperatureControl() *temperaturecontroldef.Server

TemperatureControl is the device's typed TemperatureControl server, nil until a declaration mounts it.

type LightSensor

type LightSensor struct{ *Device }

LightSensor is an endpoint of the LightSensor device type.

func NewLightSensor

func NewLightSensor(opts Options, decls ...Declaration) (*LightSensor, error)

NewLightSensor returns a LightSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type LightSensorID (see New).

func (*LightSensor) IlluminanceMeasurement

func (d *LightSensor) IlluminanceMeasurement() *illuminancemeasurementdef.Server

IlluminanceMeasurement is the device's typed IlluminanceMeasurement server; the type mandates it.

type MeterReferencePoint

type MeterReferencePoint struct{ *Device }

MeterReferencePoint is an endpoint of the MeterReferencePoint device type.

func NewMeterReferencePoint

func NewMeterReferencePoint(opts Options, decls ...Declaration) (*MeterReferencePoint, error)

NewMeterReferencePoint returns a MeterReferencePoint device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type MeterReferencePointID (see New).

type MicrowaveOven

type MicrowaveOven struct{ *Device }

MicrowaveOven is an endpoint of the MicrowaveOven device type.

func NewMicrowaveOven

func NewMicrowaveOven(opts Options, decls ...Declaration) (*MicrowaveOven, error)

NewMicrowaveOven returns a MicrowaveOven device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type MicrowaveOvenID (see New).

func (*MicrowaveOven) FanControl

func (d *MicrowaveOven) FanControl() *fancontroldef.Server

FanControl is the device's typed FanControl server, nil until a declaration mounts it.

func (*MicrowaveOven) MicrowaveOvenControl

func (d *MicrowaveOven) MicrowaveOvenControl() *microwaveovencontroldef.Server

MicrowaveOvenControl is the device's typed MicrowaveOvenControl server; the type mandates it.

func (*MicrowaveOven) MicrowaveOvenMode

func (d *MicrowaveOven) MicrowaveOvenMode() *microwaveovenmodedef.Server

MicrowaveOvenMode is the device's typed MicrowaveOvenMode server; the type mandates it.

func (*MicrowaveOven) OperationalState

func (d *MicrowaveOven) OperationalState() *operationalstatedef.Server

OperationalState is the device's typed OperationalState server; the type mandates it.

type ModeSelect

type ModeSelect struct{ *Device }

ModeSelect is an endpoint of the ModeSelect device type.

func NewModeSelect

func NewModeSelect(opts Options, decls ...Declaration) (*ModeSelect, error)

NewModeSelect returns a ModeSelect device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ModeSelectID (see New).

func (*ModeSelect) ModeSelect

func (d *ModeSelect) ModeSelect() *modeselectdef.Server

ModeSelect is the device's typed ModeSelect server; the type mandates it.

type MountedDimmableLoadControl

type MountedDimmableLoadControl struct{ *Device }

MountedDimmableLoadControl is an endpoint of the MountedDimmableLoadControl device type.

func NewMountedDimmableLoadControl

func NewMountedDimmableLoadControl(opts Options, decls ...Declaration) (*MountedDimmableLoadControl, error)

NewMountedDimmableLoadControl returns a MountedDimmableLoadControl device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type MountedDimmableLoadControlID (see New).

func (*MountedDimmableLoadControl) LevelControl

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*MountedDimmableLoadControl) OnOff

OnOff is the device's typed OnOff server; the type mandates it.

type MountedOnOffControl

type MountedOnOffControl struct{ *Device }

MountedOnOffControl is an endpoint of the MountedOnOffControl device type.

func NewMountedOnOffControl

func NewMountedOnOffControl(opts Options, decls ...Declaration) (*MountedOnOffControl, error)

NewMountedOnOffControl returns a MountedOnOffControl device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type MountedOnOffControlID (see New).

func (*MountedOnOffControl) LevelControl

func (d *MountedOnOffControl) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server, nil until a declaration mounts it.

func (*MountedOnOffControl) OnOff

func (d *MountedOnOffControl) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type NetworkInfrastructureManager added in v0.12.3

type NetworkInfrastructureManager struct{ *Device }

NetworkInfrastructureManager is an endpoint of the NetworkInfrastructureManager device type.

func NewNetworkInfrastructureManager added in v0.12.3

func NewNetworkInfrastructureManager(opts Options, decls ...Declaration) (*NetworkInfrastructureManager, error)

NewNetworkInfrastructureManager returns a NetworkInfrastructureManager device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type NetworkInfrastructureManagerID (see New).

func (*NetworkInfrastructureManager) ThreadBorderRouterManagement added in v0.12.3

func (d *NetworkInfrastructureManager) ThreadBorderRouterManagement() *threadborderroutermanagementdef.Server

ThreadBorderRouterManagement is the device's typed ThreadBorderRouterManagement server; the type mandates it.

func (*NetworkInfrastructureManager) ThreadNetworkDiagnostics added in v0.12.3

func (d *NetworkInfrastructureManager) ThreadNetworkDiagnostics() *threadnetworkdiagnosticsdef.Server

ThreadNetworkDiagnostics is the device's typed ThreadNetworkDiagnostics server; the type mandates it.

func (*NetworkInfrastructureManager) ThreadNetworkDirectory added in v0.12.3

func (d *NetworkInfrastructureManager) ThreadNetworkDirectory() *threadnetworkdirectorydef.Server

ThreadNetworkDirectory is the device's typed ThreadNetworkDirectory server; the type mandates it.

func (*NetworkInfrastructureManager) WiFiNetworkManagement added in v0.12.3

func (d *NetworkInfrastructureManager) WiFiNetworkManagement() *wifinetworkmanagementdef.Server

WiFiNetworkManagement is the device's typed WiFiNetworkManagement server; the type mandates it.

type OccupancySensor

type OccupancySensor struct{ *Device }

OccupancySensor is an endpoint of the OccupancySensor device type.

func NewOccupancySensor

func NewOccupancySensor(opts Options, decls ...Declaration) (*OccupancySensor, error)

NewOccupancySensor returns a OccupancySensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OccupancySensorID (see New).

func (*OccupancySensor) BooleanStateConfiguration

func (d *OccupancySensor) BooleanStateConfiguration() *booleanstateconfigurationdef.Server

BooleanStateConfiguration is the device's typed BooleanStateConfiguration server, nil until a declaration mounts it.

func (*OccupancySensor) OccupancySensing

func (d *OccupancySensor) OccupancySensing() *occupancysensingdef.Server

OccupancySensing is the device's typed OccupancySensing server; the type mandates it.

type OnOffLight

type OnOffLight struct{ *Device }

OnOffLight is an endpoint of the OnOffLight device type.

func NewOnOffLight

func NewOnOffLight(opts Options, decls ...Declaration) (*OnOffLight, error)

NewOnOffLight returns a OnOffLight device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OnOffLightID (see New).

func (*OnOffLight) LevelControl

func (d *OnOffLight) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server, nil until a declaration mounts it.

func (*OnOffLight) OnOff

func (d *OnOffLight) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type OnOffLightSwitch added in v0.4.0

type OnOffLightSwitch struct{ *Device }

OnOffLightSwitch is an endpoint of the OnOffLightSwitch device type.

func NewOnOffLightSwitch added in v0.4.0

func NewOnOffLightSwitch(opts Options, decls ...Declaration) (*OnOffLightSwitch, error)

NewOnOffLightSwitch returns a OnOffLightSwitch device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OnOffLightSwitchID (see New).

func (*OnOffLightSwitch) Binding added in v0.4.0

func (d *OnOffLightSwitch) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type OnOffPlugInUnit

type OnOffPlugInUnit struct{ *Device }

OnOffPlugInUnit is an endpoint of the OnOffPlugInUnit device type.

func NewOnOffPlugInUnit

func NewOnOffPlugInUnit(opts Options, decls ...Declaration) (*OnOffPlugInUnit, error)

NewOnOffPlugInUnit returns a OnOffPlugInUnit device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OnOffPlugInUnitID (see New).

func (*OnOffPlugInUnit) LevelControl

func (d *OnOffPlugInUnit) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server, nil until a declaration mounts it.

func (*OnOffPlugInUnit) OnOff

func (d *OnOffPlugInUnit) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type OnOffSensor added in v0.4.0

type OnOffSensor struct{ *Device }

OnOffSensor is an endpoint of the OnOffSensor device type.

func NewOnOffSensor added in v0.4.0

func NewOnOffSensor(opts Options, decls ...Declaration) (*OnOffSensor, error)

NewOnOffSensor returns a OnOffSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OnOffSensorID (see New).

func (*OnOffSensor) Binding added in v0.4.0

func (d *OnOffSensor) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type Options

type Options struct {
	// StableKey identifies the device across reassemblies and restarts
	// ([endpoint.Spec.StableKey]); required, and unique per device and
	// per part.
	StableKey SourceKey
	// Name is the BridgedDeviceBasicInformation NodeLabel
	// ([endpoint.Spec.FriendlyName]); [Device.Rename] changes it.
	Name string
	// Vendor is the bridged device's manufacturer
	// ([endpoint.Spec.VendorName]).
	Vendor string
	// DeviceAddress and ChannelAddress are the host's own addresses of the
	// physical device and of this function of it, carried through
	// verbatim.
	DeviceAddress  string
	ChannelAddress string
	// Logger receives the device kit's diagnostics — a default selection
	// that keeps the generated server, the Thread servers' logs; nil is
	// slog.Default() at the time of the call (ADR 0026 principle 9).
	Logger *slog.Logger
	// Conditions are the device-type conditions the host states for the
	// endpoint ([endpoint.Spec.DeviceConditions]).
	Conditions []string
	// DeviceTypes are further device types the endpoint lists in its
	// Descriptor DeviceTypeList after its own and before Bridged Node,
	// each once, with the revision the schema gives it
	// ([endpoint.Spec.DeviceTypes]) — matter.js's bridge test instance
	// lists Power Source on its composed device
	// (support/chip-testing/src/BridgeTestInstance.ts:323-335). A listed
	// device type's mandatory clusters are required of the endpoint as its
	// own type's are; an id the schema does not know is refused.
	DeviceTypes []schema.DeviceTypeID
	// Tags are the semantic tags the endpoint's Descriptor serves in
	// TagList ([endpoint.Spec.Tags]); they tell sibling parts of one
	// device type apart (BridgeTestInstance.ts:306-317, CommonNumberTag).
	// Nil leaves the TagList feature off, the default.
	Tags []SemanticTag
	// Surface are the surface policies the device is composed under; the
	// zero value is no policy — the same form as node.Config.Surface,
	// which a node compares it with: it refuses a device composed under
	// policies other than its own (ADR 0025 principle 2).
	Surface surface.Policies
}

Options is what the host states about one device beyond its type: the fields of endpoint.Spec the device layer passes through, as a matter.js host passes `id` and `bridgedDeviceBasicInformation` to `new Endpoint` (examples/device-bridge-onoff/src/BridgedDevicesNode.ts:77-122).

type OtaProvider added in v0.4.0

type OtaProvider struct{ *Device }

OtaProvider is an endpoint of the OtaProvider device type.

func NewOtaProvider added in v0.4.0

func NewOtaProvider(opts Options, decls ...Declaration) (*OtaProvider, error)

NewOtaProvider returns a OtaProvider device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OtaProviderID (see New).

func (*OtaProvider) OtaSoftwareUpdateProvider added in v0.4.0

func (d *OtaProvider) OtaSoftwareUpdateProvider() *otasoftwareupdateproviderdef.Server

OtaSoftwareUpdateProvider is the device's typed OtaSoftwareUpdateProvider server; the type mandates it.

type OtaRequestor

type OtaRequestor struct{ *Device }

OtaRequestor is an endpoint of the OtaRequestor device type.

func NewOtaRequestor

func NewOtaRequestor(opts Options, decls ...Declaration) (*OtaRequestor, error)

NewOtaRequestor returns a OtaRequestor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OtaRequestorID (see New).

func (*OtaRequestor) OtaSoftwareUpdateRequestor

func (d *OtaRequestor) OtaSoftwareUpdateRequestor() *otasoftwareupdaterequestordef.Server

OtaSoftwareUpdateRequestor is the device's typed OtaSoftwareUpdateRequestor server; the type mandates it.

type Oven

type Oven struct{ *Device }

Oven is an endpoint of the Oven device type.

func NewOven

func NewOven(opts Options, decls ...Declaration) (*Oven, error)

NewOven returns a Oven device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type OvenID (see New).

type PowerSource

type PowerSource struct{ *Device }

PowerSource is an endpoint of the PowerSource device type.

func NewPowerSource

func NewPowerSource(opts Options, decls ...Declaration) (*PowerSource, error)

NewPowerSource returns a PowerSource device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type PowerSourceID (see New).

func (*PowerSource) PowerSource

func (d *PowerSource) PowerSource() *powersourcedef.Server

PowerSource is the device's typed PowerSource server; the type mandates it.

type Presence

type Presence uint8

Presence is what a device type's requirement does to an element's optionality: matter.js's alteration `optional` (ClusterRequirements.ts:151-163).

const (
	// PresenceUnchanged: the requirement leaves the element as its cluster
	// states it.
	PresenceUnchanged Presence = iota
	// PresenceMandatory: `optional: false` — RequirementDisposition.Mandate.
	PresenceMandatory
	// PresenceOptional: `optional: true` — RequirementDisposition.Relax.
	PresenceOptional
)

Presences.

type PressureSensor

type PressureSensor struct{ *Device }

PressureSensor is an endpoint of the PressureSensor device type.

func NewPressureSensor

func NewPressureSensor(opts Options, decls ...Declaration) (*PressureSensor, error)

NewPressureSensor returns a PressureSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type PressureSensorID (see New).

func (*PressureSensor) PressureMeasurement

func (d *PressureSensor) PressureMeasurement() *pressuremeasurementdef.Server

PressureMeasurement is the device's typed PressureMeasurement server; the type mandates it.

type Pump

type Pump struct{ *Device }

Pump is an endpoint of the Pump device type.

func NewPump

func NewPump(opts Options, decls ...Declaration) (*Pump, error)

NewPump returns a Pump device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type PumpID (see New).

func (*Pump) FlowMeasurement

func (d *Pump) FlowMeasurement() *flowmeasurementdef.Server

FlowMeasurement is the device's typed FlowMeasurement server, nil until a declaration mounts it.

func (*Pump) LevelControl

func (d *Pump) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server, nil until a declaration mounts it.

func (*Pump) OnOff

func (d *Pump) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

func (*Pump) PressureMeasurement

func (d *Pump) PressureMeasurement() *pressuremeasurementdef.Server

PressureMeasurement is the device's typed PressureMeasurement server, nil until a declaration mounts it.

func (*Pump) PumpConfigurationAndControl

func (d *Pump) PumpConfigurationAndControl() *pumpconfigurationandcontroldef.Server

PumpConfigurationAndControl is the device's typed PumpConfigurationAndControl server; the type mandates it.

func (*Pump) TemperatureMeasurement

func (d *Pump) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type PumpController added in v0.4.0

type PumpController struct{ *Device }

PumpController is an endpoint of the PumpController device type.

func NewPumpController added in v0.4.0

func NewPumpController(opts Options, decls ...Declaration) (*PumpController, error)

NewPumpController returns a PumpController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type PumpControllerID (see New).

func (*PumpController) Binding added in v0.4.0

func (d *PumpController) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type RainSensor

type RainSensor struct{ *Device }

RainSensor is an endpoint of the RainSensor device type.

func NewRainSensor

func NewRainSensor(opts Options, decls ...Declaration) (*RainSensor, error)

NewRainSensor returns a RainSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type RainSensorID (see New).

func (*RainSensor) BooleanState

func (d *RainSensor) BooleanState() *booleanstatedef.Server

BooleanState is the device's typed BooleanState server; the type mandates it.

func (*RainSensor) BooleanStateConfiguration

func (d *RainSensor) BooleanStateConfiguration() *booleanstateconfigurationdef.Server

BooleanStateConfiguration is the device's typed BooleanStateConfiguration server, nil until a declaration mounts it.

type Refrigerator

type Refrigerator struct{ *Device }

Refrigerator is an endpoint of the Refrigerator device type.

func NewRefrigerator

func NewRefrigerator(opts Options, decls ...Declaration) (*Refrigerator, error)

NewRefrigerator returns a Refrigerator device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type RefrigeratorID (see New).

func (*Refrigerator) ActivatedCarbonFilterMonitoring

func (d *Refrigerator) ActivatedCarbonFilterMonitoring() *activatedcarbonfiltermonitoringdef.Server

ActivatedCarbonFilterMonitoring is the device's typed ActivatedCarbonFilterMonitoring server, nil until a declaration mounts it.

func (*Refrigerator) RefrigeratorAlarm

func (d *Refrigerator) RefrigeratorAlarm() *refrigeratoralarmdef.Server

RefrigeratorAlarm is the device's typed RefrigeratorAlarm server, nil until a declaration mounts it.

func (*Refrigerator) RefrigeratorAndTemperatureControlledCabinetMode

func (d *Refrigerator) RefrigeratorAndTemperatureControlledCabinetMode() *refrigeratorandtemperaturecontrolledcabinetmodedef.Server

RefrigeratorAndTemperatureControlledCabinetMode is the device's typed RefrigeratorAndTemperatureControlledCabinetMode server, nil until a declaration mounts it.

type RoboticVacuumCleaner

type RoboticVacuumCleaner struct{ *Device }

RoboticVacuumCleaner is an endpoint of the RoboticVacuumCleaner device type.

func NewRoboticVacuumCleaner

func NewRoboticVacuumCleaner(opts Options, decls ...Declaration) (*RoboticVacuumCleaner, error)

NewRoboticVacuumCleaner returns a RoboticVacuumCleaner device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type RoboticVacuumCleanerID (see New).

func (*RoboticVacuumCleaner) RvcCleanMode

func (d *RoboticVacuumCleaner) RvcCleanMode() *rvccleanmodedef.Server

RvcCleanMode is the device's typed RvcCleanMode server, nil until a declaration mounts it.

func (*RoboticVacuumCleaner) RvcOperationalState

func (d *RoboticVacuumCleaner) RvcOperationalState() *rvcoperationalstatedef.Server

RvcOperationalState is the device's typed RvcOperationalState server; the type mandates it.

func (*RoboticVacuumCleaner) RvcRunMode

func (d *RoboticVacuumCleaner) RvcRunMode() *rvcrunmodedef.Server

RvcRunMode is the device's typed RvcRunMode server; the type mandates it.

func (*RoboticVacuumCleaner) ServiceArea

func (d *RoboticVacuumCleaner) ServiceArea() *serviceareadef.Server

ServiceArea is the device's typed ServiceArea server, nil until a declaration mounts it.

type RoomAirConditioner

type RoomAirConditioner struct{ *Device }

RoomAirConditioner is an endpoint of the RoomAirConditioner device type.

func NewRoomAirConditioner

func NewRoomAirConditioner(opts Options, decls ...Declaration) (*RoomAirConditioner, error)

NewRoomAirConditioner returns a RoomAirConditioner device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type RoomAirConditionerID (see New).

func (*RoomAirConditioner) ActivatedCarbonFilterMonitoring

func (d *RoomAirConditioner) ActivatedCarbonFilterMonitoring() *activatedcarbonfiltermonitoringdef.Server

ActivatedCarbonFilterMonitoring is the device's typed ActivatedCarbonFilterMonitoring server, nil until a declaration mounts it.

func (*RoomAirConditioner) FanControl

func (d *RoomAirConditioner) FanControl() *fancontroldef.Server

FanControl is the device's typed FanControl server, nil until a declaration mounts it.

func (*RoomAirConditioner) HepaFilterMonitoring

func (d *RoomAirConditioner) HepaFilterMonitoring() *hepafiltermonitoringdef.Server

HepaFilterMonitoring is the device's typed HepaFilterMonitoring server, nil until a declaration mounts it.

func (*RoomAirConditioner) OnOff

func (d *RoomAirConditioner) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

func (*RoomAirConditioner) RelativeHumidityMeasurement

func (d *RoomAirConditioner) RelativeHumidityMeasurement() *relativehumiditymeasurementdef.Server

RelativeHumidityMeasurement is the device's typed RelativeHumidityMeasurement server, nil until a declaration mounts it.

func (*RoomAirConditioner) TemperatureMeasurement

func (d *RoomAirConditioner) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

func (*RoomAirConditioner) Thermostat

func (d *RoomAirConditioner) Thermostat() *thermostatdef.Server

Thermostat is the device's typed Thermostat server; the type mandates it.

func (*RoomAirConditioner) ThermostatUserInterfaceConfiguration

func (d *RoomAirConditioner) ThermostatUserInterfaceConfiguration() *thermostatuserinterfaceconfigurationdef.Server

ThermostatUserInterfaceConfiguration is the device's typed ThermostatUserInterfaceConfiguration server, nil until a declaration mounts it.

type RootNode

type RootNode struct{ *Device }

RootNode is an endpoint of the RootNode device type.

func NewRootNode deprecated

func NewRootNode(opts Options, decls ...Declaration) (*RootNode, error)

NewRootNode returns a RootNode device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type RootNodeID (see New).

Deprecated: the root endpoint is the node's (node.Node.Root), not a device: NewRootNode always refuses, its root clusters have no committed definitions. RootNodeType stays for Lookup. Removable in v0.25.0.

func (*RootNode) AdministratorCommissioning

func (d *RootNode) AdministratorCommissioning() *administratorcommissioningdef.Server

AdministratorCommissioning is the device's typed AdministratorCommissioning server; the type mandates it.

func (*RootNode) BasicInformation

func (d *RootNode) BasicInformation() *basicinformationdef.Server

BasicInformation is the device's typed BasicInformation server; the type mandates it.

func (*RootNode) DiagnosticLogs

func (d *RootNode) DiagnosticLogs() *diagnosticlogsdef.Server

DiagnosticLogs is the device's typed DiagnosticLogs server, nil until a declaration mounts it.

func (*RootNode) EthernetNetworkDiagnostics

func (d *RootNode) EthernetNetworkDiagnostics() *ethernetnetworkdiagnosticsdef.Server

EthernetNetworkDiagnostics is the device's typed EthernetNetworkDiagnostics server, nil until a declaration mounts it.

func (*RootNode) GeneralCommissioning

func (d *RootNode) GeneralCommissioning() *generalcommissioningdef.Server

GeneralCommissioning is the device's typed GeneralCommissioning server; the type mandates it.

func (*RootNode) GeneralDiagnostics

func (d *RootNode) GeneralDiagnostics() *generaldiagnosticsdef.Server

GeneralDiagnostics is the device's typed GeneralDiagnostics server; the type mandates it.

func (*RootNode) Groupcast added in v0.6.0

func (d *RootNode) Groupcast() *groupcastdef.Server

Groupcast is the device's typed Groupcast server, nil until a declaration mounts it.

func (*RootNode) IcdManagement

func (d *RootNode) IcdManagement() *icdmanagementdef.Server

IcdManagement is the device's typed IcdManagement server, nil until a declaration mounts it.

func (*RootNode) LocalizationConfiguration

func (d *RootNode) LocalizationConfiguration() *localizationconfigurationdef.Server

LocalizationConfiguration is the device's typed LocalizationConfiguration server, nil until a declaration mounts it.

func (*RootNode) NetworkCommissioning

func (d *RootNode) NetworkCommissioning() *networkcommissioningdef.Server

NetworkCommissioning is the device's typed NetworkCommissioning server, nil until a declaration mounts it.

func (*RootNode) PowerSourceConfiguration

func (d *RootNode) PowerSourceConfiguration() *powersourceconfigurationdef.Server

PowerSourceConfiguration is the device's typed PowerSourceConfiguration server, nil until a declaration mounts it.

func (*RootNode) SoftwareDiagnostics

func (d *RootNode) SoftwareDiagnostics() *softwarediagnosticsdef.Server

SoftwareDiagnostics is the device's typed SoftwareDiagnostics server, nil until a declaration mounts it.

func (*RootNode) ThreadNetworkDiagnostics added in v0.12.3

func (d *RootNode) ThreadNetworkDiagnostics() *threadnetworkdiagnosticsdef.Server

ThreadNetworkDiagnostics is the device's typed ThreadNetworkDiagnostics server, nil until a declaration mounts it.

func (*RootNode) TimeFormatLocalization

func (d *RootNode) TimeFormatLocalization() *timeformatlocalizationdef.Server

TimeFormatLocalization is the device's typed TimeFormatLocalization server, nil until a declaration mounts it.

func (*RootNode) TimeSynchronization

func (d *RootNode) TimeSynchronization() *timesynchronizationdef.Server

TimeSynchronization is the device's typed TimeSynchronization server, nil until a declaration mounts it.

func (*RootNode) TlsCertificateManagement added in v0.12.3

func (d *RootNode) TlsCertificateManagement() *tlscertificatemanagementdef.Server

TlsCertificateManagement is the device's typed TlsCertificateManagement server, nil until a declaration mounts it.

func (*RootNode) TlsClientManagement added in v0.12.3

func (d *RootNode) TlsClientManagement() *tlsclientmanagementdef.Server

TlsClientManagement is the device's typed TlsClientManagement server, nil until a declaration mounts it.

func (*RootNode) UnitLocalization

func (d *RootNode) UnitLocalization() *unitlocalizationdef.Server

UnitLocalization is the device's typed UnitLocalization server, nil until a declaration mounts it.

func (*RootNode) WiFiNetworkDiagnostics added in v0.4.0

func (d *RootNode) WiFiNetworkDiagnostics() *wifinetworkdiagnosticsdef.Server

WiFiNetworkDiagnostics is the device's typed WiFiNetworkDiagnostics server, nil until a declaration mounts it.

type SecondaryNetworkInterface added in v0.4.0

type SecondaryNetworkInterface struct{ *Device }

SecondaryNetworkInterface is an endpoint of the SecondaryNetworkInterface device type.

func NewSecondaryNetworkInterface added in v0.4.0

func NewSecondaryNetworkInterface(opts Options, decls ...Declaration) (*SecondaryNetworkInterface, error)

NewSecondaryNetworkInterface returns a SecondaryNetworkInterface device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SecondaryNetworkInterfaceID (see New).

func (*SecondaryNetworkInterface) EthernetNetworkDiagnostics added in v0.4.0

func (d *SecondaryNetworkInterface) EthernetNetworkDiagnostics() *ethernetnetworkdiagnosticsdef.Server

EthernetNetworkDiagnostics is the device's typed EthernetNetworkDiagnostics server, nil until a declaration mounts it.

func (*SecondaryNetworkInterface) NetworkCommissioning added in v0.4.0

func (d *SecondaryNetworkInterface) NetworkCommissioning() *networkcommissioningdef.Server

NetworkCommissioning is the device's typed NetworkCommissioning server; the type mandates it.

func (*SecondaryNetworkInterface) ThreadNetworkDiagnostics added in v0.12.3

func (d *SecondaryNetworkInterface) ThreadNetworkDiagnostics() *threadnetworkdiagnosticsdef.Server

ThreadNetworkDiagnostics is the device's typed ThreadNetworkDiagnostics server, nil until a declaration mounts it.

func (*SecondaryNetworkInterface) WiFiNetworkDiagnostics added in v0.4.0

func (d *SecondaryNetworkInterface) WiFiNetworkDiagnostics() *wifinetworkdiagnosticsdef.Server

WiFiNetworkDiagnostics is the device's typed WiFiNetworkDiagnostics server, nil until a declaration mounts it.

type SemanticTag

type SemanticTag = mattercore.SemanticTag

SemanticTag is one entry of a Descriptor's TagList, as Options.Tags declares it (mattercore.SemanticTag).

type SmokeCoAlarm

type SmokeCoAlarm struct{ *Device }

SmokeCoAlarm is an endpoint of the SmokeCoAlarm device type.

func NewSmokeCoAlarm

func NewSmokeCoAlarm(opts Options, decls ...Declaration) (*SmokeCoAlarm, error)

NewSmokeCoAlarm returns a SmokeCoAlarm device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SmokeCoAlarmID (see New).

func (*SmokeCoAlarm) CarbonMonoxideConcentrationMeasurement

func (d *SmokeCoAlarm) CarbonMonoxideConcentrationMeasurement() *carbonmonoxideconcentrationmeasurementdef.Server

CarbonMonoxideConcentrationMeasurement is the device's typed CarbonMonoxideConcentrationMeasurement server, nil until a declaration mounts it.

func (*SmokeCoAlarm) RelativeHumidityMeasurement

func (d *SmokeCoAlarm) RelativeHumidityMeasurement() *relativehumiditymeasurementdef.Server

RelativeHumidityMeasurement is the device's typed RelativeHumidityMeasurement server, nil until a declaration mounts it.

func (*SmokeCoAlarm) SmokeCoAlarm

func (d *SmokeCoAlarm) SmokeCoAlarm() *smokecoalarmdef.Server

SmokeCoAlarm is the device's typed SmokeCoAlarm server; the type mandates it.

func (*SmokeCoAlarm) TemperatureMeasurement

func (d *SmokeCoAlarm) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type SnapshotCamera added in v0.12.3

type SnapshotCamera struct{ *Device }

SnapshotCamera is an endpoint of the SnapshotCamera device type.

func NewSnapshotCamera added in v0.12.3

func NewSnapshotCamera(opts Options, decls ...Declaration) (*SnapshotCamera, error)

NewSnapshotCamera returns a SnapshotCamera device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SnapshotCameraID (see New).

func (*SnapshotCamera) CameraAvSettingsUserLevelManagement added in v0.12.3

func (d *SnapshotCamera) CameraAvSettingsUserLevelManagement() *cameraavsettingsuserlevelmanagementdef.Server

CameraAvSettingsUserLevelManagement is the device's typed CameraAvSettingsUserLevelManagement server, nil until a declaration mounts it.

func (*SnapshotCamera) CameraAvStreamManagement added in v0.12.3

func (d *SnapshotCamera) CameraAvStreamManagement() *cameraavstreammanagementdef.Server

CameraAvStreamManagement is the device's typed CameraAvStreamManagement server; the type mandates it.

func (*SnapshotCamera) OccupancySensing added in v0.12.3

func (d *SnapshotCamera) OccupancySensing() *occupancysensingdef.Server

OccupancySensing is the device's typed OccupancySensing server, nil until a declaration mounts it.

func (*SnapshotCamera) ZoneManagement added in v0.12.3

func (d *SnapshotCamera) ZoneManagement() *zonemanagementdef.Server

ZoneManagement is the device's typed ZoneManagement server, nil until a declaration mounts it.

type SoilSensor

type SoilSensor struct{ *Device }

SoilSensor is an endpoint of the SoilSensor device type.

func NewSoilSensor

func NewSoilSensor(opts Options, decls ...Declaration) (*SoilSensor, error)

NewSoilSensor returns a SoilSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SoilSensorID (see New).

func (*SoilSensor) SoilMeasurement

func (d *SoilSensor) SoilMeasurement() *soilmeasurementdef.Server

SoilMeasurement is the device's typed SoilMeasurement server; the type mandates it.

func (*SoilSensor) TemperatureMeasurement

func (d *SoilSensor) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type SolarPower

type SolarPower struct{ *Device }

SolarPower is an endpoint of the SolarPower device type.

func NewSolarPower

func NewSolarPower(opts Options, decls ...Declaration) (*SolarPower, error)

NewSolarPower returns a SolarPower device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SolarPowerID (see New).

type SourceKey added in v0.9.1

type SourceKey = endpoint.SourceKey

SourceKey is the type of Options.StableKey (endpoint.SourceKey).

type Speaker

type Speaker struct{ *Device }

Speaker is an endpoint of the Speaker device type.

func NewSpeaker

func NewSpeaker(opts Options, decls ...Declaration) (*Speaker, error)

NewSpeaker returns a Speaker device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type SpeakerID (see New).

func (*Speaker) LevelControl

func (d *Speaker) LevelControl() *levelcontroldef.Server

LevelControl is the device's typed LevelControl server; the type mandates it.

func (*Speaker) OnOff

func (d *Speaker) OnOff() *onoffdef.Server

OnOff is the device's typed OnOff server; the type mandates it.

type Spec added in v0.10.0

type Spec struct {
	// Type is the device type id (DimmableLightID, …): a generated type
	// ([Lookup]).
	Type schema.DeviceTypeID
	// Options are the host's statements about the device.
	Options Options
	// Declarations are the device's cluster declarations and the kit's
	// options, in order.
	Declarations []Declaration
	// Parts are the device's parts, endpoints below it ([Device.AddPart]),
	// in order: a composed device (a power strip's outlets, a composite's
	// components). A composite type's mandatory components are among them,
	// found by their device type.
	Parts []Spec
}

Spec is a device as data: its device type by id, its Options, its [Declaration]s and its parts — what a host whose devices come from a configuration file builds per device, and what every generated constructor (NewDimmableLight, …) builds for its type. Nothing in it is reflective: the declarations are the generated <cluster>def.Declare values and the kit's options, as in code.

type StringKey added in v0.10.0

type StringKey = endpoint.StringKey

StringKey is the SourceKey of a host whose device identity is one string (endpoint.StringKey).

type TemperatureControlledCabinet

type TemperatureControlledCabinet struct{ *Device }

TemperatureControlledCabinet is an endpoint of the TemperatureControlledCabinet device type.

func NewTemperatureControlledCabinet

func NewTemperatureControlledCabinet(opts Options, decls ...Declaration) (*TemperatureControlledCabinet, error)

NewTemperatureControlledCabinet returns a TemperatureControlledCabinet device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type TemperatureControlledCabinetID (see New).

func (*TemperatureControlledCabinet) OvenCavityOperationalState

func (d *TemperatureControlledCabinet) OvenCavityOperationalState() *ovencavityoperationalstatedef.Server

OvenCavityOperationalState is the device's typed OvenCavityOperationalState server, nil until a declaration mounts it.

func (*TemperatureControlledCabinet) OvenMode

OvenMode is the device's typed OvenMode server, nil until a declaration mounts it.

func (*TemperatureControlledCabinet) RefrigeratorAndTemperatureControlledCabinetMode

func (d *TemperatureControlledCabinet) RefrigeratorAndTemperatureControlledCabinetMode() *refrigeratorandtemperaturecontrolledcabinetmodedef.Server

RefrigeratorAndTemperatureControlledCabinetMode is the device's typed RefrigeratorAndTemperatureControlledCabinetMode server, nil until a declaration mounts it.

func (*TemperatureControlledCabinet) TemperatureAlarm

TemperatureAlarm is the device's typed TemperatureAlarm server, nil until a declaration mounts it.

func (*TemperatureControlledCabinet) TemperatureControl

TemperatureControl is the device's typed TemperatureControl server; the type mandates it.

func (*TemperatureControlledCabinet) TemperatureMeasurement

func (d *TemperatureControlledCabinet) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server, nil until a declaration mounts it.

type TemperatureSensor

type TemperatureSensor struct{ *Device }

TemperatureSensor is an endpoint of the TemperatureSensor device type.

func NewTemperatureSensor

func NewTemperatureSensor(opts Options, decls ...Declaration) (*TemperatureSensor, error)

NewTemperatureSensor returns a TemperatureSensor device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type TemperatureSensorID (see New).

func (*TemperatureSensor) TemperatureMeasurement

func (d *TemperatureSensor) TemperatureMeasurement() *temperaturemeasurementdef.Server

TemperatureMeasurement is the device's typed TemperatureMeasurement server; the type mandates it.

func (*TemperatureSensor) ThermostatUserInterfaceConfiguration

func (d *TemperatureSensor) ThermostatUserInterfaceConfiguration() *thermostatuserinterfaceconfigurationdef.Server

ThermostatUserInterfaceConfiguration is the device's typed ThermostatUserInterfaceConfiguration server, nil until a declaration mounts it.

type Thermostat

type Thermostat struct{ *Device }

Thermostat is an endpoint of the Thermostat device type.

func NewThermostat

func NewThermostat(opts Options, decls ...Declaration) (*Thermostat, error)

NewThermostat returns a Thermostat device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ThermostatID (see New).

func (*Thermostat) EnergyPreference

func (d *Thermostat) EnergyPreference() *energypreferencedef.Server

EnergyPreference is the device's typed EnergyPreference server, nil until a declaration mounts it.

func (*Thermostat) Thermostat

func (d *Thermostat) Thermostat() *thermostatdef.Server

Thermostat is the device's typed Thermostat server; the type mandates it.

func (*Thermostat) ThermostatUserInterfaceConfiguration

func (d *Thermostat) ThermostatUserInterfaceConfiguration() *thermostatuserinterfaceconfigurationdef.Server

ThermostatUserInterfaceConfiguration is the device's typed ThermostatUserInterfaceConfiguration server, nil until a declaration mounts it.

type ThermostatController added in v0.4.0

type ThermostatController struct{ *Device }

ThermostatController is an endpoint of the ThermostatController device type.

func NewThermostatController added in v0.4.0

func NewThermostatController(opts Options, decls ...Declaration) (*ThermostatController, error)

NewThermostatController returns a ThermostatController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ThermostatControllerID (see New).

func (*ThermostatController) Binding added in v0.4.0

func (d *ThermostatController) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type ThreadBorderRouter added in v0.12.3

type ThreadBorderRouter struct{ *Device }

ThreadBorderRouter is an endpoint of the ThreadBorderRouter device type.

func NewThreadBorderRouter added in v0.12.3

func NewThreadBorderRouter(opts Options, decls ...Declaration) (*ThreadBorderRouter, error)

NewThreadBorderRouter returns a ThreadBorderRouter device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type ThreadBorderRouterID (see New).

func (*ThreadBorderRouter) ThreadBorderRouterManagement added in v0.12.3

func (d *ThreadBorderRouter) ThreadBorderRouterManagement() *threadborderroutermanagementdef.Server

ThreadBorderRouterManagement is the device's typed ThreadBorderRouterManagement server; the type mandates it.

func (*ThreadBorderRouter) ThreadNetworkDiagnostics added in v0.12.3

func (d *ThreadBorderRouter) ThreadNetworkDiagnostics() *threadnetworkdiagnosticsdef.Server

ThreadNetworkDiagnostics is the device's typed ThreadNetworkDiagnostics server; the type mandates it.

func (*ThreadBorderRouter) ThreadNetworkDirectory added in v0.12.3

func (d *ThreadBorderRouter) ThreadNetworkDirectory() *threadnetworkdirectorydef.Server

ThreadNetworkDirectory is the device's typed ThreadNetworkDirectory server, nil until a declaration mounts it.

type Type

type Type struct {
	// ID is the device type id (DimmableLight 0x0101).
	ID schema.DeviceTypeID
	// Name is the device type's name as matter.js states it.
	Name string
	// Revision is the device type revision the Descriptor's DeviceTypeList
	// announces.
	Revision uint16
	// Classification is matter.js's DeviceClassification ("simple",
	// "utility", "node").
	Classification string
	// Composition is how the device type composes its PartsList.
	Composition schema.Composition
	// Base names the device type this one derives from; empty when none.
	Base string
	// Conditions are the conditions the device type declares itself.
	Conditions []string
	// Servers are the server cluster requirements, mandatory ones first,
	// each group in the order matter.js's generator emits it
	// (RequirementGenerator.ts:163-205, 207-226).
	Servers []ClusterRequirement
	// Clients are the client cluster requirements, in the same order.
	Clients []ClusterRequirement
	// contains filtered or unexported fields
}

Type is one device type as the device layer mounts it: the identity matter.js's MutableEndpoint carries (name, deviceType, deviceRevision, deviceClass) and the cluster requirements its generated device file states in its Requirements namespace — matter.js packages/node/src/devices/dimmable-light.ts:32-116 is one such file.

A Type is generated by script/devicegen from parity/schema.json, one per device type in scope (device/<name>_gen.go), and a host may make its own (a manufacturer-specific device type). The registry's values are not reachable: every accessor — <Name>Type(), Lookup, Types, Device.Type — returns a copy, and New copies the Type it is given, so modifying a Type changes nothing but that value. Pointer identity is not given: compare types by ID. A copy shares the read-only cluster definitions (ClusterRequirement.Definition).

func AggregatorType

func AggregatorType() *Type

AggregatorType returns the Aggregator device type, matter.js's packages/node/src/endpoints/aggregator.ts; its cluster requirements are listed in docs/reference/device-types.md#aggregator. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func AirPurifierType

func AirPurifierType() *Type

AirPurifierType returns the AirPurifier device type, matter.js's packages/node/src/devices/air-purifier.ts; its cluster requirements are listed in docs/reference/device-types.md#airpurifier. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func AirQualitySensorType

func AirQualitySensorType() *Type

AirQualitySensorType returns the AirQualitySensor device type, matter.js's packages/node/src/devices/air-quality-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#airqualitysensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func AudioDoorbellType added in v0.12.3

func AudioDoorbellType() *Type

AudioDoorbellType returns the AudioDoorbell device type, matter.js's packages/node/src/devices/audio-doorbell.ts; its cluster requirements are listed in docs/reference/device-types.md#audiodoorbell. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func BasicVideoPlayerType added in v0.4.0

func BasicVideoPlayerType() *Type

BasicVideoPlayerType returns the BasicVideoPlayer device type, matter.js's packages/node/src/devices/basic-video-player.ts; its cluster requirements are listed in docs/reference/device-types.md#basicvideoplayer. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func BatteryStorageType

func BatteryStorageType() *Type

BatteryStorageType returns the BatteryStorage device type, matter.js's packages/node/src/devices/battery-storage.ts; its cluster requirements are listed in docs/reference/device-types.md#batterystorage. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func BridgedNodeType

func BridgedNodeType() *Type

BridgedNodeType returns the BridgedNode device type, matter.js's packages/node/src/endpoints/bridged-node.ts; its cluster requirements are listed in docs/reference/device-types.md#bridgednode. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CameraControllerType added in v0.12.3

func CameraControllerType() *Type

CameraControllerType returns the CameraController device type, matter.js's packages/node/src/devices/camera-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#cameracontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CameraType added in v0.12.3

func CameraType() *Type

CameraType returns the Camera device type, matter.js's packages/node/src/devices/camera.ts; its cluster requirements are listed in docs/reference/device-types.md#camera. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CastingVideoClientType

func CastingVideoClientType() *Type

CastingVideoClientType returns the CastingVideoClient device type, matter.js's packages/node/src/devices/casting-video-client.ts; its cluster requirements are listed in docs/reference/device-types.md#castingvideoclient. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CastingVideoPlayerType added in v0.4.0

func CastingVideoPlayerType() *Type

CastingVideoPlayerType returns the CastingVideoPlayer device type, matter.js's packages/node/src/devices/casting-video-player.ts; its cluster requirements are listed in docs/reference/device-types.md#castingvideoplayer. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ChimeType added in v0.12.3

func ChimeType() *Type

ChimeType returns the Chime device type, matter.js's packages/node/src/devices/chime.ts; its cluster requirements are listed in docs/reference/device-types.md#chime. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ClosureControllerType added in v0.4.0

func ClosureControllerType() *Type

ClosureControllerType returns the ClosureController device type, matter.js's packages/node/src/devices/closure-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#closurecontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ClosurePanelType

func ClosurePanelType() *Type

ClosurePanelType returns the ClosurePanel device type, matter.js's packages/node/src/devices/closure-panel.ts; its cluster requirements are listed in docs/reference/device-types.md#closurepanel. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ClosureType

func ClosureType() *Type

ClosureType returns the Closure device type, matter.js's packages/node/src/devices/closure.ts; its cluster requirements are listed in docs/reference/device-types.md#closure. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ColorDimmerSwitchType added in v0.4.0

func ColorDimmerSwitchType() *Type

ColorDimmerSwitchType returns the ColorDimmerSwitch device type, matter.js's packages/node/src/devices/color-dimmer-switch.ts; its cluster requirements are listed in docs/reference/device-types.md#colordimmerswitch. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ColorTemperatureLightType

func ColorTemperatureLightType() *Type

ColorTemperatureLightType returns the ColorTemperatureLight device type, matter.js's packages/node/src/devices/color-temperature-light.ts; its cluster requirements are listed in docs/reference/device-types.md#colortemperaturelight. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ContactSensorType

func ContactSensorType() *Type

ContactSensorType returns the ContactSensor device type, matter.js's packages/node/src/devices/contact-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#contactsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ContentAppType added in v0.4.0

func ContentAppType() *Type

ContentAppType returns the ContentApp device type, matter.js's packages/node/src/devices/content-app.ts; its cluster requirements are listed in docs/reference/device-types.md#contentapp. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ControlBridgeType added in v0.4.0

func ControlBridgeType() *Type

ControlBridgeType returns the ControlBridge device type, matter.js's packages/node/src/devices/control-bridge.ts; its cluster requirements are listed in docs/reference/device-types.md#controlbridge. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CookSurfaceType

func CookSurfaceType() *Type

CookSurfaceType returns the CookSurface device type, matter.js's packages/node/src/devices/cook-surface.ts; its cluster requirements are listed in docs/reference/device-types.md#cooksurface. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func CooktopType

func CooktopType() *Type

CooktopType returns the Cooktop device type, matter.js's packages/node/src/devices/cooktop.ts; its cluster requirements are listed in docs/reference/device-types.md#cooktop. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DeviceEnergyManagementType

func DeviceEnergyManagementType() *Type

DeviceEnergyManagementType returns the DeviceEnergyManagement device type, matter.js's packages/node/src/endpoints/device-energy-management.ts; its cluster requirements are listed in docs/reference/device-types.md#deviceenergymanagement. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DimmableLightType

func DimmableLightType() *Type

DimmableLightType returns the DimmableLight device type, matter.js's packages/node/src/devices/dimmable-light.ts; its cluster requirements are listed in docs/reference/device-types.md#dimmablelight. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DimmablePlugInUnitType

func DimmablePlugInUnitType() *Type

DimmablePlugInUnitType returns the DimmablePlugInUnit device type, matter.js's packages/node/src/devices/dimmable-plug-in-unit.ts; its cluster requirements are listed in docs/reference/device-types.md#dimmablepluginunit. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DimmerSwitchType added in v0.4.0

func DimmerSwitchType() *Type

DimmerSwitchType returns the DimmerSwitch device type, matter.js's packages/node/src/devices/dimmer-switch.ts; its cluster requirements are listed in docs/reference/device-types.md#dimmerswitch. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DishwasherType

func DishwasherType() *Type

DishwasherType returns the Dishwasher device type, matter.js's packages/node/src/devices/dishwasher.ts; its cluster requirements are listed in docs/reference/device-types.md#dishwasher. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DoorLockControllerType added in v0.4.0

func DoorLockControllerType() *Type

DoorLockControllerType returns the DoorLockController device type, matter.js's packages/node/src/devices/door-lock-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#doorlockcontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DoorLockType

func DoorLockType() *Type

DoorLockType returns the DoorLock device type, matter.js's packages/node/src/devices/door-lock.ts; its cluster requirements are listed in docs/reference/device-types.md#doorlock. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func DoorbellType

func DoorbellType() *Type

DoorbellType returns the Doorbell device type, matter.js's packages/node/src/devices/doorbell.ts; its cluster requirements are listed in docs/reference/device-types.md#doorbell. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ElectricalEnergyTariffType

func ElectricalEnergyTariffType() *Type

ElectricalEnergyTariffType returns the ElectricalEnergyTariff device type, matter.js's packages/node/src/devices/electrical-energy-tariff.ts; its cluster requirements are listed in docs/reference/device-types.md#electricalenergytariff. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ElectricalMeterType

func ElectricalMeterType() *Type

ElectricalMeterType returns the ElectricalMeter device type, matter.js's packages/node/src/devices/electrical-meter.ts; its cluster requirements are listed in docs/reference/device-types.md#electricalmeter. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ElectricalSensorType

func ElectricalSensorType() *Type

ElectricalSensorType returns the ElectricalSensor device type, matter.js's packages/node/src/endpoints/electrical-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#electricalsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ElectricalUtilityMeterType

func ElectricalUtilityMeterType() *Type

ElectricalUtilityMeterType returns the ElectricalUtilityMeter device type, matter.js's packages/node/src/devices/electrical-utility-meter.ts; its cluster requirements are listed in docs/reference/device-types.md#electricalutilitymeter. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func EnergyEvseType

func EnergyEvseType() *Type

EnergyEvseType returns the EnergyEvse device type, matter.js's packages/node/src/devices/energy-evse.ts; its cluster requirements are listed in docs/reference/device-types.md#energyevse. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ExtendedColorLightType

func ExtendedColorLightType() *Type

ExtendedColorLightType returns the ExtendedColorLight device type, matter.js's packages/node/src/devices/extended-color-light.ts; its cluster requirements are listed in docs/reference/device-types.md#extendedcolorlight. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ExtractorHoodType

func ExtractorHoodType() *Type

ExtractorHoodType returns the ExtractorHood device type, matter.js's packages/node/src/devices/extractor-hood.ts; its cluster requirements are listed in docs/reference/device-types.md#extractorhood. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func FanType

func FanType() *Type

FanType returns the Fan device type, matter.js's packages/node/src/devices/fan.ts; its cluster requirements are listed in docs/reference/device-types.md#fan. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func FloodlightCameraType

func FloodlightCameraType() *Type

FloodlightCameraType returns the FloodlightCamera device type, matter.js's packages/node/src/devices/floodlight-camera.ts; its cluster requirements are listed in docs/reference/device-types.md#floodlightcamera. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func FlowSensorType

func FlowSensorType() *Type

FlowSensorType returns the FlowSensor device type, matter.js's packages/node/src/devices/flow-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#flowsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func GenericSwitchType

func GenericSwitchType() *Type

GenericSwitchType returns the GenericSwitch device type, matter.js's packages/node/src/devices/generic-switch.ts; its cluster requirements are listed in docs/reference/device-types.md#genericswitch. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func HeatPumpType

func HeatPumpType() *Type

HeatPumpType returns the HeatPump device type, matter.js's packages/node/src/devices/heat-pump.ts; its cluster requirements are listed in docs/reference/device-types.md#heatpump. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func HumiditySensorType

func HumiditySensorType() *Type

HumiditySensorType returns the HumiditySensor device type, matter.js's packages/node/src/devices/humidity-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#humiditysensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func IntercomType added in v0.12.3

func IntercomType() *Type

IntercomType returns the Intercom device type, matter.js's packages/node/src/devices/intercom.ts; its cluster requirements are listed in docs/reference/device-types.md#intercom. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func IrrigationSystemType

func IrrigationSystemType() *Type

IrrigationSystemType returns the IrrigationSystem device type, matter.js's packages/node/src/devices/irrigation-system.ts; its cluster requirements are listed in docs/reference/device-types.md#irrigationsystem. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func JointFabricAdministratorType added in v0.12.3

func JointFabricAdministratorType() *Type

JointFabricAdministratorType returns the JointFabricAdministrator device type, matter.js's packages/node/src/endpoints/joint-fabric-administrator.ts; its cluster requirements are listed in docs/reference/device-types.md#jointfabricadministrator. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func LaundryDryerType

func LaundryDryerType() *Type

LaundryDryerType returns the LaundryDryer device type, matter.js's packages/node/src/devices/laundry-dryer.ts; its cluster requirements are listed in docs/reference/device-types.md#laundrydryer. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func LaundryWasherType

func LaundryWasherType() *Type

LaundryWasherType returns the LaundryWasher device type, matter.js's packages/node/src/devices/laundry-washer.ts; its cluster requirements are listed in docs/reference/device-types.md#laundrywasher. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func LightSensorType

func LightSensorType() *Type

LightSensorType returns the LightSensor device type, matter.js's packages/node/src/devices/light-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#lightsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func Lookup added in v0.4.0

func Lookup(id uint32) (*Type, bool)

Lookup returns the generated device type of a device type id as the Descriptor's DeviceTypeList carries it (a 32-bit devtype-id), or (nil, false) for an id device/ does not generate: an id above 0xFFFF, a manufacturer-specific or unknown one, and a snapshot device type script/devicegen excludes (its excluded list, empty since wave 27-C2). It reads the generated registry (types_gen.go), so a regeneration that commits a type makes Lookup find it.

A client view resolves a remote endpoint's device type through it, as matter.js's ClientStructure resolves it through the model (packages/node/src/node/client/ClientStructure.ts:1007 at db021da0, this.#node.matter.deviceTypes(dt.deviceType)).

func MeterReferencePointType

func MeterReferencePointType() *Type

MeterReferencePointType returns the MeterReferencePoint device type, matter.js's packages/node/src/devices/meter-reference-point.ts; its cluster requirements are listed in docs/reference/device-types.md#meterreferencepoint. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func MicrowaveOvenType

func MicrowaveOvenType() *Type

MicrowaveOvenType returns the MicrowaveOven device type, matter.js's packages/node/src/devices/microwave-oven.ts; its cluster requirements are listed in docs/reference/device-types.md#microwaveoven. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ModeSelectType

func ModeSelectType() *Type

ModeSelectType returns the ModeSelect device type, matter.js's packages/node/src/devices/mode-select.ts; its cluster requirements are listed in docs/reference/device-types.md#modeselect. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func MountedDimmableLoadControlType

func MountedDimmableLoadControlType() *Type

MountedDimmableLoadControlType returns the MountedDimmableLoadControl device type, matter.js's packages/node/src/devices/mounted-dimmable-load-control.ts; its cluster requirements are listed in docs/reference/device-types.md#mounteddimmableloadcontrol. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func MountedOnOffControlType

func MountedOnOffControlType() *Type

MountedOnOffControlType returns the MountedOnOffControl device type, matter.js's packages/node/src/devices/mounted-on-off-control.ts; its cluster requirements are listed in docs/reference/device-types.md#mountedonoffcontrol. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func NetworkInfrastructureManagerType added in v0.12.3

func NetworkInfrastructureManagerType() *Type

NetworkInfrastructureManagerType returns the NetworkInfrastructureManager device type, matter.js's packages/node/src/devices/network-infrastructure-manager.ts; its cluster requirements are listed in docs/reference/device-types.md#networkinfrastructuremanager. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OccupancySensorType

func OccupancySensorType() *Type

OccupancySensorType returns the OccupancySensor device type, matter.js's packages/node/src/devices/occupancy-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#occupancysensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OnOffLightSwitchType added in v0.4.0

func OnOffLightSwitchType() *Type

OnOffLightSwitchType returns the OnOffLightSwitch device type, matter.js's packages/node/src/devices/on-off-light-switch.ts; its cluster requirements are listed in docs/reference/device-types.md#onofflightswitch. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OnOffLightType

func OnOffLightType() *Type

OnOffLightType returns the OnOffLight device type, matter.js's packages/node/src/devices/on-off-light.ts; its cluster requirements are listed in docs/reference/device-types.md#onofflight. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OnOffPlugInUnitType

func OnOffPlugInUnitType() *Type

OnOffPlugInUnitType returns the OnOffPlugInUnit device type, matter.js's packages/node/src/devices/on-off-plug-in-unit.ts; its cluster requirements are listed in docs/reference/device-types.md#onoffpluginunit. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OnOffSensorType added in v0.4.0

func OnOffSensorType() *Type

OnOffSensorType returns the OnOffSensor device type, matter.js's packages/node/src/devices/on-off-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#onoffsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OtaProviderType added in v0.4.0

func OtaProviderType() *Type

OtaProviderType returns the OtaProvider device type, matter.js's packages/node/src/endpoints/ota-provider.ts; its cluster requirements are listed in docs/reference/device-types.md#otaprovider. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OtaRequestorType

func OtaRequestorType() *Type

OtaRequestorType returns the OtaRequestor device type, matter.js's packages/node/src/endpoints/ota-requestor.ts; its cluster requirements are listed in docs/reference/device-types.md#otarequestor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func OvenType

func OvenType() *Type

OvenType returns the Oven device type, matter.js's packages/node/src/devices/oven.ts; its cluster requirements are listed in docs/reference/device-types.md#oven. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func PowerSourceType

func PowerSourceType() *Type

PowerSourceType returns the PowerSource device type, matter.js's packages/node/src/endpoints/power-source.ts; its cluster requirements are listed in docs/reference/device-types.md#powersource. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func PressureSensorType

func PressureSensorType() *Type

PressureSensorType returns the PressureSensor device type, matter.js's packages/node/src/devices/pressure-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#pressuresensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func PumpControllerType added in v0.4.0

func PumpControllerType() *Type

PumpControllerType returns the PumpController device type, matter.js's packages/node/src/devices/pump-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#pumpcontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func PumpType

func PumpType() *Type

PumpType returns the Pump device type, matter.js's packages/node/src/devices/pump.ts; its cluster requirements are listed in docs/reference/device-types.md#pump. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func RainSensorType

func RainSensorType() *Type

RainSensorType returns the RainSensor device type, matter.js's packages/node/src/devices/rain-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#rainsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func RefrigeratorType

func RefrigeratorType() *Type

RefrigeratorType returns the Refrigerator device type, matter.js's packages/node/src/devices/refrigerator.ts; its cluster requirements are listed in docs/reference/device-types.md#refrigerator. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func RoboticVacuumCleanerType

func RoboticVacuumCleanerType() *Type

RoboticVacuumCleanerType returns the RoboticVacuumCleaner device type, matter.js's packages/node/src/devices/robotic-vacuum-cleaner.ts; its cluster requirements are listed in docs/reference/device-types.md#roboticvacuumcleaner. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func RoomAirConditionerType

func RoomAirConditionerType() *Type

RoomAirConditionerType returns the RoomAirConditioner device type, matter.js's packages/node/src/devices/room-air-conditioner.ts; its cluster requirements are listed in docs/reference/device-types.md#roomairconditioner. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func RootNodeType

func RootNodeType() *Type

RootNodeType returns the RootNode device type, matter.js's packages/node/src/endpoints/root.ts; its cluster requirements are listed in docs/reference/device-types.md#rootnode. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SecondaryNetworkInterfaceType added in v0.4.0

func SecondaryNetworkInterfaceType() *Type

SecondaryNetworkInterfaceType returns the SecondaryNetworkInterface device type, matter.js's packages/node/src/endpoints/secondary-network-interface.ts; its cluster requirements are listed in docs/reference/device-types.md#secondarynetworkinterface. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SmokeCoAlarmType

func SmokeCoAlarmType() *Type

SmokeCoAlarmType returns the SmokeCoAlarm device type, matter.js's packages/node/src/devices/smoke-co-alarm.ts; its cluster requirements are listed in docs/reference/device-types.md#smokecoalarm. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SnapshotCameraType added in v0.12.3

func SnapshotCameraType() *Type

SnapshotCameraType returns the SnapshotCamera device type, matter.js's packages/node/src/devices/snapshot-camera.ts; its cluster requirements are listed in docs/reference/device-types.md#snapshotcamera. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SoilSensorType

func SoilSensorType() *Type

SoilSensorType returns the SoilSensor device type, matter.js's packages/node/src/devices/soil-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#soilsensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SolarPowerType

func SolarPowerType() *Type

SolarPowerType returns the SolarPower device type, matter.js's packages/node/src/devices/solar-power.ts; its cluster requirements are listed in docs/reference/device-types.md#solarpower. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func SpeakerType

func SpeakerType() *Type

SpeakerType returns the Speaker device type, matter.js's packages/node/src/devices/speaker.ts; its cluster requirements are listed in docs/reference/device-types.md#speaker. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func TemperatureControlledCabinetType

func TemperatureControlledCabinetType() *Type

TemperatureControlledCabinetType returns the TemperatureControlledCabinet device type, matter.js's packages/node/src/devices/temperature-controlled-cabinet.ts; its cluster requirements are listed in docs/reference/device-types.md#temperaturecontrolledcabinet. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func TemperatureSensorType

func TemperatureSensorType() *Type

TemperatureSensorType returns the TemperatureSensor device type, matter.js's packages/node/src/devices/temperature-sensor.ts; its cluster requirements are listed in docs/reference/device-types.md#temperaturesensor. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ThermostatControllerType added in v0.4.0

func ThermostatControllerType() *Type

ThermostatControllerType returns the ThermostatController device type, matter.js's packages/node/src/devices/thermostat-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#thermostatcontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ThermostatType

func ThermostatType() *Type

ThermostatType returns the Thermostat device type, matter.js's packages/node/src/devices/thermostat.ts; its cluster requirements are listed in docs/reference/device-types.md#thermostat. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func ThreadBorderRouterType added in v0.12.3

func ThreadBorderRouterType() *Type

ThreadBorderRouterType returns the ThreadBorderRouter device type, matter.js's packages/node/src/devices/thread-border-router.ts; its cluster requirements are listed in docs/reference/device-types.md#threadborderrouter. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func Types

func Types() []*Type

Types returns every generated device type, by id, each a copy.

func VideoDoorbellType

func VideoDoorbellType() *Type

VideoDoorbellType returns the VideoDoorbell device type, matter.js's packages/node/src/devices/video-doorbell.ts; its cluster requirements are listed in docs/reference/device-types.md#videodoorbell. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func VideoRemoteControlType added in v0.4.0

func VideoRemoteControlType() *Type

VideoRemoteControlType returns the VideoRemoteControl device type, matter.js's packages/node/src/devices/video-remote-control.ts; its cluster requirements are listed in docs/reference/device-types.md#videoremotecontrol. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WaterFreezeDetectorType

func WaterFreezeDetectorType() *Type

WaterFreezeDetectorType returns the WaterFreezeDetector device type, matter.js's packages/node/src/devices/water-freeze-detector.ts; its cluster requirements are listed in docs/reference/device-types.md#waterfreezedetector. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WaterHeaterType

func WaterHeaterType() *Type

WaterHeaterType returns the WaterHeater device type, matter.js's packages/node/src/devices/water-heater.ts; its cluster requirements are listed in docs/reference/device-types.md#waterheater. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WaterLeakDetectorType

func WaterLeakDetectorType() *Type

WaterLeakDetectorType returns the WaterLeakDetector device type, matter.js's packages/node/src/devices/water-leak-detector.ts; its cluster requirements are listed in docs/reference/device-types.md#waterleakdetector. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WaterValveType

func WaterValveType() *Type

WaterValveType returns the WaterValve device type, matter.js's packages/node/src/devices/water-valve.ts; its cluster requirements are listed in docs/reference/device-types.md#watervalve. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WindowCoveringControllerType added in v0.4.0

func WindowCoveringControllerType() *Type

WindowCoveringControllerType returns the WindowCoveringController device type, matter.js's packages/node/src/devices/window-covering-controller.ts; its cluster requirements are listed in docs/reference/device-types.md#windowcoveringcontroller. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func WindowCoveringType

func WindowCoveringType() *Type

WindowCoveringType returns the WindowCovering device type, matter.js's packages/node/src/devices/window-covering.ts; its cluster requirements are listed in docs/reference/device-types.md#windowcovering. It is a copy of the registry's value, as Lookup's: modifying it changes nothing else.

func (*Type) RequiredInitial

func (t *Type) RequiredInitial() ([]InitialRequirement, error)

RequiredInitial lists the attributes New refuses a device of the type for unless the host's declarations state them (InitialRequirement): a data-driven host checks its configuration against it before it builds a device. It measures the type's default servers, built without declarations. A type whose defaults New refuses for another reason first — a feature selection, a port, a server the host supplies — is not measured: the error is that refusal, and New with the host's declarations names what is still missing. No rows and no error: the type's defaults answer every attribute they list (a nil type requires nothing).

func (*Type) Server

func (t *Type) Server(clusterID uint32) (ClusterRequirement, bool)

Server returns the type's server requirement for clusterID.

type VideoDoorbell

type VideoDoorbell struct {
	*Device
	// contains filtered or unexported fields
}

VideoDoorbell is an endpoint of the VideoDoorbell device type, a composite: its mandatory components (Camera, Doorbell) are its parts, endpoints below it.

func NewVideoDoorbell

func NewVideoDoorbell(opts Options, camera *Camera, doorbell *Doorbell, decls ...Declaration) (*VideoDoorbell, error)

NewVideoDoorbell returns a VideoDoorbell device with its mandatory components as its parts, in this order: matter.js places a component on an endpoint below the composite (DeviceTypeConformance.ts candidatesOf). Each component must be given; further parts join with Device.AddPart.

func (*VideoDoorbell) Camera

func (d *VideoDoorbell) Camera() *Camera

Camera is the device's Camera component.

func (*VideoDoorbell) Doorbell

func (d *VideoDoorbell) Doorbell() *Doorbell

Doorbell is the device's Doorbell component.

type VideoRemoteControl added in v0.4.0

type VideoRemoteControl struct{ *Device }

VideoRemoteControl is an endpoint of the VideoRemoteControl device type.

func NewVideoRemoteControl added in v0.4.0

func NewVideoRemoteControl(opts Options, decls ...Declaration) (*VideoRemoteControl, error)

NewVideoRemoteControl returns a VideoRemoteControl device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type VideoRemoteControlID (see New).

func (*VideoRemoteControl) Binding added in v0.4.0

func (d *VideoRemoteControl) Binding() *bindingdef.Server

Binding is the device's typed Binding server; the type mandates it.

type WaterFreezeDetector

type WaterFreezeDetector struct{ *Device }

WaterFreezeDetector is an endpoint of the WaterFreezeDetector device type.

func NewWaterFreezeDetector

func NewWaterFreezeDetector(opts Options, decls ...Declaration) (*WaterFreezeDetector, error)

NewWaterFreezeDetector returns a WaterFreezeDetector device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WaterFreezeDetectorID (see New).

func (*WaterFreezeDetector) BooleanState

func (d *WaterFreezeDetector) BooleanState() *booleanstatedef.Server

BooleanState is the device's typed BooleanState server; the type mandates it.

func (*WaterFreezeDetector) BooleanStateConfiguration

func (d *WaterFreezeDetector) BooleanStateConfiguration() *booleanstateconfigurationdef.Server

BooleanStateConfiguration is the device's typed BooleanStateConfiguration server, nil until a declaration mounts it.

type WaterHeater

type WaterHeater struct{ *Device }

WaterHeater is an endpoint of the WaterHeater device type.

func NewWaterHeater

func NewWaterHeater(opts Options, decls ...Declaration) (*WaterHeater, error)

NewWaterHeater returns a WaterHeater device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WaterHeaterID (see New).

func (*WaterHeater) Thermostat

func (d *WaterHeater) Thermostat() *thermostatdef.Server

Thermostat is the device's typed Thermostat server; the type mandates it.

func (*WaterHeater) WaterHeaterManagement

func (d *WaterHeater) WaterHeaterManagement() *waterheatermanagementdef.Server

WaterHeaterManagement is the device's typed WaterHeaterManagement server; the type mandates it.

func (*WaterHeater) WaterHeaterMode

func (d *WaterHeater) WaterHeaterMode() *waterheatermodedef.Server

WaterHeaterMode is the device's typed WaterHeaterMode server; the type mandates it.

type WaterLeakDetector

type WaterLeakDetector struct{ *Device }

WaterLeakDetector is an endpoint of the WaterLeakDetector device type.

func NewWaterLeakDetector

func NewWaterLeakDetector(opts Options, decls ...Declaration) (*WaterLeakDetector, error)

NewWaterLeakDetector returns a WaterLeakDetector device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WaterLeakDetectorID (see New).

func (*WaterLeakDetector) BooleanState

func (d *WaterLeakDetector) BooleanState() *booleanstatedef.Server

BooleanState is the device's typed BooleanState server; the type mandates it.

func (*WaterLeakDetector) BooleanStateConfiguration

func (d *WaterLeakDetector) BooleanStateConfiguration() *booleanstateconfigurationdef.Server

BooleanStateConfiguration is the device's typed BooleanStateConfiguration server, nil until a declaration mounts it.

type WaterValve

type WaterValve struct{ *Device }

WaterValve is an endpoint of the WaterValve device type.

func NewWaterValve

func NewWaterValve(opts Options, decls ...Declaration) (*WaterValve, error)

NewWaterValve returns a WaterValve device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WaterValveID (see New).

func (*WaterValve) FlowMeasurement

func (d *WaterValve) FlowMeasurement() *flowmeasurementdef.Server

FlowMeasurement is the device's typed FlowMeasurement server, nil until a declaration mounts it.

func (*WaterValve) ValveConfigurationAndControl

func (d *WaterValve) ValveConfigurationAndControl() *valveconfigurationandcontroldef.Server

ValveConfigurationAndControl is the device's typed ValveConfigurationAndControl server; the type mandates it.

type WindowCovering

type WindowCovering struct{ *Device }

WindowCovering is an endpoint of the WindowCovering device type.

func NewWindowCovering

func NewWindowCovering(opts Options, decls ...Declaration) (*WindowCovering, error)

NewWindowCovering returns a WindowCovering device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WindowCoveringID (see New).

func (*WindowCovering) WindowCovering

func (d *WindowCovering) WindowCovering() *windowcoveringdef.Server

WindowCovering is the device's typed WindowCovering server; the type mandates it.

type WindowCoveringController added in v0.4.0

type WindowCoveringController struct{ *Device }

WindowCoveringController is an endpoint of the WindowCoveringController device type.

func NewWindowCoveringController added in v0.4.0

func NewWindowCoveringController(opts Options, decls ...Declaration) (*WindowCoveringController, error)

NewWindowCoveringController returns a WindowCoveringController device: its mandatory server clusters and the optional ones declared, each with its default server or the host's — FromSpec with Type WindowCoveringControllerID (see New).

func (*WindowCoveringController) Binding added in v0.4.0

Binding is the device's typed Binding server; the type mandates it.

Source Files

Jump to

Keyboard shortcuts

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