Readonly
disconnectedReadonly
motorsProvides a way to send commands to motors attached to ports. e.g. start motor, etc
Readonly
portsProvides a way to access the ports information of the hub. e.g. listen to port attach/detach events, request port value, etc. Hub identifies ports by their numerical index (not by their literal name engraved on the hub). e.g. port A is index 0, port B is index 1, etc. Also note that hubs usually have internal ports that can be accessed by their index as well (e.g. 50). On hub connection, the hub will emit a port attach event for each port that has a device attached to it, including internal ports.
Readonly
propertiesProvides a way to access the properties of the hub. e.g. listen to battery level changes, set hub advertising name, etc.
Readonly
rgbProvides a way to set color for the RGB light.
Readonly
willEmits when the hub is going to be disconnected (after the hub has received a disconnect command or when the hub is going to be switched off by the power button).
Readonly
willEmits whe the hub has received a power off command or when the hub is going to be switched off by the power button. Will replay the switch-off notification to new subscribers (if the hub is already in the process of switching off).
Emits when the hub is disconnected. Can be used to perform actions after the hub is disconnected. Will replay the disconnect notification to new subscribers (if the hub is already disconnected).