Class: PoweredUP

PoweredUP()

new PoweredUP()

Source:

Extends

  • EventEmitter

Methods

getHubByPrimaryMACAddress(address) → {BaseHub}

Retrieve a Powered UP Hub by primary MAC address.

Parameters:
Name Type Description
address string
Source:
Returns:
Type
BaseHub

getHubByPrimaryMACAddress(address) → {BaseHub}

Retrieve a Powered UP Hub by primary MAC address.

Parameters:
Name Type Description
address string
Source:
Returns:
Type
BaseHub

getHubByUUID(uuid) → {BaseHub|null}

Retrieve a Powered UP Hub by UUID.

Parameters:
Name Type Description
uuid string
Source:
Returns:
Type
BaseHub | null

getHubByUUID(uuid) → {BaseHub|null}

Retrieve a Powered UP Hub by UUID.

Parameters:
Name Type Description
uuid string
Source:
Returns:
Type
BaseHub | null

getHubs() → {Array.<BaseHub>}

Retrieve a list of Powered UP Hubs.

Source:
Returns:
Type
Array.<BaseHub>

getHubs() → {Array.<BaseHub>}

Retrieve a list of Powered UP Hubs.

Source:
Returns:
Type
Array.<BaseHub>

getHubsByName(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by name.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByName(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by name.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByType(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by type.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByType(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by type.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

scan()

Begin scanning for Powered UP Hub devices.

Source:

scan()

Begin scanning for Powered UP Hub devices.

Source:

stop()

Stop scanning for Powered UP Hub devices.

Source:

Events

discover

Emits when a Powered UP Hub device is found.

Parameters:
Name Type Description
hub WeDo2SmartHub | MoveHub | TechnicMediumHub | RemoteControl | DuploTrainBase
Source:

discover

Emits when a Powered UP Hub device is found.

Parameters:
Name Type Description
hub WeDo2SmartHub | MoveHub | TechnicMediumHub | RemoteControl | DuploTrainBase
Source:

PoweredUP()

new PoweredUP()

Source:

Extends

  • EventEmitter

Methods

getHubByPrimaryMACAddress(address) → {BaseHub}

Retrieve a Powered UP Hub by primary MAC address.

Parameters:
Name Type Description
address string
Source:
Returns:
Type
BaseHub

getHubByPrimaryMACAddress(address) → {BaseHub}

Retrieve a Powered UP Hub by primary MAC address.

Parameters:
Name Type Description
address string
Source:
Returns:
Type
BaseHub

getHubByUUID(uuid) → {BaseHub|null}

Retrieve a Powered UP Hub by UUID.

Parameters:
Name Type Description
uuid string
Source:
Returns:
Type
BaseHub | null

getHubByUUID(uuid) → {BaseHub|null}

Retrieve a Powered UP Hub by UUID.

Parameters:
Name Type Description
uuid string
Source:
Returns:
Type
BaseHub | null

getHubs() → {Array.<BaseHub>}

Retrieve a list of Powered UP Hubs.

Source:
Returns:
Type
Array.<BaseHub>

getHubs() → {Array.<BaseHub>}

Retrieve a list of Powered UP Hubs.

Source:
Returns:
Type
Array.<BaseHub>

getHubsByName(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by name.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByName(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by name.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByType(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by type.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

getHubsByType(name) → {Array.<BaseHub>}

Retrieve a list of Powered UP Hub by type.

Parameters:
Name Type Description
name string
Source:
Returns:
Type
Array.<BaseHub>

scan()

Begin scanning for Powered UP Hub devices.

Source:

scan()

Begin scanning for Powered UP Hub devices.

Source:

stop()

Stop scanning for Powered UP Hub devices.

Source:

Events

discover

Emits when a Powered UP Hub device is found.

Parameters:
Name Type Description
hub WeDo2SmartHub | MoveHub | TechnicMediumHub | RemoteControl | DuploTrainBase
Source:

discover

Emits when a Powered UP Hub device is found.

Parameters:
Name Type Description
hub WeDo2SmartHub | MoveHub | TechnicMediumHub | RemoteControl | DuploTrainBase
Source: