Optional
parent: EnvironmentEmits on service add.
Currently only emits for services owned directly by this environment.
Emits on service delete.
Currently only emits for services owned directly by this environment.
Name of the environment.
Shortcut for accessing RuntimeService.
Shortcut for accessing VariableService.vars.
Static
defaultThe default environment.
Currently only emits for services owned directly by this environment.
Set the default environment.
Remove and close an environmental service.
Remove an environmental service.
the class of the service to remove
Rest
...args: any[]Optional
instance: anyoptional instance expected, if existing instance does not match it is not deleted
Obtain an object with events that trigger when a specific service is added or deleted.
This is a more convenient way to observe a specific service than added and deleted.
Access an environmental service, waiting for any async initialization to complete.
Protected
load
Access to general platform-dependent features.
The following variables are defined by this class:
log.level
- Log level to use Logger.LEVELlog.format
- Log format to use Logger.FORMATlog.stack.limit
- Stack trace limit, see https://nodejs.org/api/errors.html#errorstacktracelimitmdns.networkInterface
- Network interface to use for MDNS broadcasts and scanning, default are all available interfacesmdns.ipv4
- Also announce/scan on IPv4 interfacesnetwork.interface
- Map of interface names to types, expected to be defined as object with name as key and of{type: string|number}
objects with types: 1=Wifi, 2=Ethernet, 3=Cellular, 4=Thread (strings or numbers can be used). Can also be provided via env or cli likeMATTER_NETWORK_INTERFACE_ETH0_TYPE=Ethernet
TODO - could remove global singletons by moving here