typedef HubType property { number } UNKNOWN property { number } WEDO2_SMART_HUB property { number } MOVE_HUB property { number } POWERED_UP_HUB property { number } POWERED_UP_REMOTE property { number } DUPLO_TRAIN_HUB property { number } CONTROL_PLUS_HUB property { number } MARIO export enum HubType { UNKNOWN = 0 , WEDO2_SMART_HUB = 1 , MOVE_HUB = 2 , HUB = 3 , REMOTE_CONTROL = 4 , DUPLO_TRAIN_BASE = 5 , TECHNIC_MEDIUM_HUB = 6 , MARIO = 7 , TECHNIC_SMALL_HUB = 8 } export const HubTypeNames = HubType ; typedef DeviceType property { number } UNKNOWN property { number } SIMPLE_MEDIUM_LINEAR_MOTOR property { number } TRAIN_MOTOR property { number } LED_LIGHTS property { number } VOLTAGE property { number } CURRENT property { number } PIEZO_TONE property { number } RGB_LIGHT property { number } WEDO2_TILT property { number } WEDO2_DISTANCE property { number } COLOR_DISTANCE_SENSOR property { number } MEDIUM_LINEAR_MOTOR property { number } MOVE_HUB_MEDIUM_LINEAR_MOTOR property { number } BOOST_TILT property { number } DUPLO_TRAIN_BASE_MOTOR property { number } DUPLO_TRAIN_BASE_SPEAKER property { number } DUPLO_TRAIN_BASE_COLOR property { number } DUPLO_TRAIN_BASE_SPEEDOMETER property { number } CONTROL_PLUS_LARGE_MOTOR property { number } CONTROL_PLUS_XLARGE_MOTOR property { number } POWERED_UP_REMOTE_BUTTON property { number } RSSI property { number } CONTROL_PLUS_ACCELEROMETER property { number } CONTROL_PLUS_TILT export enum DeviceType { UNKNOWN = 0 , SIMPLE_MEDIUM_LINEAR_MOTOR = 1 , TRAIN_MOTOR = 2 , LIGHT = 8 , VOLTAGE_SENSOR = 20 , CURRENT_SENSOR = 21 , PIEZO_BUZZER = 22 , HUB_LED = 23 , TILT_SENSOR = 34 , MOTION_SENSOR = 35 , COLOR_DISTANCE_SENSOR = 37 , MEDIUM_LINEAR_MOTOR = 38 , MOVE_HUB_MEDIUM_LINEAR_MOTOR = 39 , MOVE_HUB_TILT_SENSOR = 40 , DUPLO_TRAIN_BASE_MOTOR = 41 , DUPLO_TRAIN_BASE_SPEAKER = 42 , DUPLO_TRAIN_BASE_COLOR_SENSOR = 43 , DUPLO_TRAIN_BASE_SPEEDOMETER = 44 , TECHNIC_LARGE_LINEAR_MOTOR = 46 , TECHNIC_XLARGE_LINEAR_MOTOR = 47 , TECHNIC_MEDIUM_ANGULAR_MOTOR = 48 , TECHNIC_LARGE_ANGULAR_MOTOR = 49 , TECHNIC_MEDIUM_HUB_GEST_SENSOR = 54 , REMOTE_CONTROL_BUTTON = 55 , REMOTE_CONTROL_RSSI = 56 , TECHNIC_MEDIUM_HUB_ACCELEROMETER = 57 , TECHNIC_MEDIUM_HUB_GYRO_SENSOR = 58 , TECHNIC_MEDIUM_HUB_TILT_SENSOR = 59 , TECHNIC_MEDIUM_HUB_TEMPERATURE_SENSOR = 60 , TECHNIC_COLOR_SENSOR = 61 , TECHNIC_DISTANCE_SENSOR = 62 , TECHNIC_FORCE_SENSOR = 63 , TECHNIC_3X3_COLOR_LIGHT_MATRIX = 64 , TECHNIC_SMALL_ANGULAR_MOTOR = 65 , MARIO_ACCELEROMETER = 71 , MARIO_BARCODE_SENSOR = 73 , MARIO_PANTS_SENSOR = 74 , TECHNIC_MEDIUM_ANGULAR_MOTOR_GREY = 75 , TECHNIC_LARGE_ANGULAR_MOTOR_GREY = 76 } export const DeviceTypeNames = DeviceType ; typedef Color property { number } BLACK property { number } PINK property { number } PURPLE property { number } BLUE property { number } LIGHT_BLUE property { number } CYAN property { number } GREEN property { number } YELLOW property { number } ORANGE property { number } RED property { number } WHITE property { number } NONE export enum Color { BLACK = 0 , PINK = 1 , PURPLE = 2 , BLUE = 3 , LIGHT_BLUE = 4 , CYAN = 5 , GREEN = 6 , YELLOW = 7 , ORANGE = 8 , RED = 9 , WHITE = 10 , NONE = 255 } export const ColorNames = Color ; typedef ButtonState property { number } PRESSED property { number } RELEASED property { number } UP property { number } DOWN property { number } STOP export enum ButtonState { PRESSED = 2 , RELEASED = 0 , UP = 1 , DOWN = 255 , STOP = 127 } typedef BrakingStyle property { number } HOLD property { number } BRAKE export enum BrakingStyle { FLOAT = 0 , HOLD = 126 , BRAKE = 127 } typedef DuploTrainBaseSound property { number } BRAKE property { number } STATION_DEPARTURE property { number } WATER_REFILL property { number } HORN property { number } STEAM export enum DuploTrainBaseSound { BRAKE = 3 , STATION_DEPARTURE = 5 , WATER_REFILL = 7 , HORN = 9 , STEAM = 10 } export enum BLEManufacturerData { DUPLO_TRAIN_BASE_ID = 32 , MOVE_HUB_ID = 64 , HUB_ID = 65 , REMOTE_CONTROL_ID = 66 , MARIO_ID = 67 , TECHNIC_MEDIUM_HUB_ID = 128 , TECHNIC_SMALL_HUB_ID = 131 } export enum BLEService { WEDO2_SMART_HUB = "00001523-1212-efde-1523-785feabcd123" , WEDO2_SMART_HUB_2 = "00004f0e-1212-efde-1523-785feabcd123" , WEDO2_SMART_HUB_3 = "2a19" , WEDO2_SMART_HUB_4 = "180f" , WEDO2_SMART_HUB_5 = "180a" , LPF2_HUB = "00001623-1212-efde-1623-785feabcd123" } export enum BLECharacteristic { WEDO2_BATTERY = "2a19" , WEDO2_FIRMWARE_REVISION = "2a26" , WEDO2_BUTTON = "00001526-1212-efde-1523-785feabcd123" , WEDO2_PORT_TYPE = "00001527-1212-efde-1523-785feabcd123" , WEDO2_LOW_VOLTAGE_ALERT = "00001528-1212-efde-1523-785feabcd123" , WEDO2_HIGH_CURRENT_ALERT = "00001529-1212-efde-1523-785feabcd123" , WEDO2_LOW_SIGNAL_ALERT = "0000152a-1212-efde-1523-785feabcd123" , WEDO2_DISCONNECT = "0000152b-1212-efde-1523-785feabcd123" , WEDO2_SENSOR_VALUE = "00001560-1212-efde-1523-785feabcd123" , WEDO2_VALUE_FORMAT = "00001561-1212-efde-1523-785feabcd123" , WEDO2_PORT_TYPE_WRITE = "00001563-1212-efde-1523-785feabcd123" , WEDO2_MOTOR_VALUE_WRITE = "00001565-1212-efde-1523-785feabcd123" , WEDO2_NAME_ID = "00001524-1212-efde-1523-785feabcd123" , LPF2_ALL = "00001624-1212-efde-1623-785feabcd123" } typedef MessageType property { number } HUB_PROPERTIES property { number } HUB_ACTIONS property { number } HUB_ALERTS property { number } HUB_ATTACHED_IO property { number } GENERIC_ERROR_MESSAGES property { number } HW_NETWORK_COMMANDS property { number } FW_UPDATE_GO_INTO_BOOT_MODE property { number } FW_UPDATE_LOCK_MEMORY property { number } FW_UPDATE_LOCK_STATUS_REQUEST property { number } FW_LOCK_STATUS property { number } PORT_INFORMATION_REQUEST property { number } PORT_MODE_INFORMATION_REQUEST property { number } PORT_INPUT_FORMAT_SETUP_SINGLE property { number } PORT_INPUT_FORMAT_SETUP_COMBINEDMODE property { number } PORT_INFORMATION property { number } PORT_MODE_INFORMATION property { number } PORT_VALUE_SINGLE property { number } PORT_VALUE_COMBINEDMODE property { number } PORT_INPUT_FORMAT_SINGLE property { number } PORT_INPUT_FORMAT_COMBINEDMODE property { number } VIRTUAL_PORT_SETUP property { number } PORT_OUTPUT_COMMAND property { number } PORT_OUTPUT_COMMAND_FEEDBACK description export enum MessageType { HUB_PROPERTIES = 0x01 , HUB_ACTIONS = 0x02 , HUB_ALERTS = 0x03 , HUB_ATTACHED_IO = 0x04 , GENERIC_ERROR_MESSAGES = 0x05 , HW_NETWORK_COMMANDS = 0x08 , FW_UPDATE_GO_INTO_BOOT_MODE = 0x10 , FW_UPDATE_LOCK_MEMORY = 0x11 , FW_UPDATE_LOCK_STATUS_REQUEST = 0x12 , FW_LOCK_STATUS = 0x13 , PORT_INFORMATION_REQUEST = 0x21 , PORT_MODE_INFORMATION_REQUEST = 0x22 , PORT_INPUT_FORMAT_SETUP_SINGLE = 0x41 , PORT_INPUT_FORMAT_SETUP_COMBINEDMODE = 0x42 , PORT_INFORMATION = 0x43 , PORT_MODE_INFORMATION = 0x44 , PORT_VALUE_SINGLE = 0x45 , PORT_VALUE_COMBINEDMODE = 0x46 , PORT_INPUT_FORMAT_SINGLE = 0x47 , PORT_INPUT_FORMAT_COMBINEDMODE = 0x48 , VIRTUAL_PORT_SETUP = 0x61 , PORT_OUTPUT_COMMAND = 0x81 , PORT_OUTPUT_COMMAND_FEEDBACK = 0x82 } typedef HubPropertyReference param { number } ADVERTISING_NAME param { number } BUTTON param { number } FW_VERSION param { number } HW_VERSION param { number } RSSI param { number } BATTERY_VOLTAGE param { number } BATTERY_TYPE param { number } MANUFACTURER_NAME param { number } RADIO_FIRMWARE_VERSION param { number } LEGO_WIRELESS_PROTOCOL_VERSION param { number } SYSTEM_TYPE_ID param { number } HW_NETWORK_ID param { number } PRIMARY_MAC_ADDRESS param { number } SECONDARY_MAC_ADDRESS param { number } HARDWARE_NETWORK_FAMILY description export enum HubPropertyReference { ADVERTISING_NAME = 0x01 , BUTTON = 0x02 , FW_VERSION = 0x03 , HW_VERSION = 0x04 , RSSI = 0x05 , BATTERY_VOLTAGE = 0x06 , BATTERY_TYPE = 0x07 , MANUFACTURER_NAME = 0x08 , RADIO_FIRMWARE_VERSION = 0x09 , LEGO_WIRELESS_PROTOCOL_VERSION = 0x0A , SYSTEM_TYPE_ID = 0x0B , HW_NETWORK_ID = 0x0C , PRIMARY_MAC_ADDRESS = 0x0D , SECONDARY_MAC_ADDRESS = 0x0E , HARDWARE_NETWORK_FAMILY = 0x0F } typedef HubPropertyOperation param { number } SET_DOWNSTREAM param { number } ENABLE_UPDATES_DOWNSTREAM param { number } DISABLE_UPDATES_DOWNSTREAM param { number } RESET_DOWNSTREAM param { number } REQUEST_UPDATE_DOWNSTREAM param { number } UPDATE_UPSTREAM description export enum HubPropertyOperation { SET_DOWNSTREAM = 0x01 , ENABLE_UPDATES_DOWNSTREAM = 0x02 , DISABLE_UPDATES_DOWNSTREAM = 0x03 , RESET_DOWNSTREAM = 0x04 , REQUEST_UPDATE_DOWNSTREAM = 0x05 , UPDATE_UPSTREAM = 0x06 } typedef HubPropertyPayload param { number } ADVERTISING_NAME param { number } BUTTON_STATE param { number } FW_VERSION param { number } HW_VERSION param { number } RSSI param { number } BATTERY_VOLTAGE param { number } BATTERY_TYPE param { number } MANUFACTURER_NAME param { number } RADIO_FIRMWARE_VERSION param { number } LWP_PROTOCOL_VERSION param { number } SYSTEM_TYPE_ID param { number } HW_NETWORK_ID param { number } PRIMARY_MAC_ADDRESS param { number } SECONDARY_MAC_ADDRESS param { number } HW_NETWORK_FAMILY description export enum HubPropertyPayload { ADVERTISING_NAME = 0x01 , BUTTON_STATE = 0x02 , FW_VERSION = 0x03 , HW_VERSION = 0x04 , RSSI = 0x05 , BATTERY_VOLTAGE = 0x06 , BATTERY_TYPE = 0x07 , MANUFACTURER_NAME = 0x08 , RADIO_FIRMWARE_VERSION = 0x09 , LWP_PROTOCOL_VERSION = 0x0A , SYSTEM_TYPE_ID = 0x0B , HW_NETWORK_ID = 0x0C , PRIMARY_MAC_ADDRESS = 0x0D , SECONDARY_MAC_ADDRESS = 0x0E , HW_NETWORK_FAMILY = 0x0F } typedef ActionType param { number } SWITCH_OFF_HUB param { number } DISCONNECT param { number } VCC_PORT_CONTROL_ON param { number } VCC_PORT_CONTROL_OFF param { number } ACTIVATE_BUSY_INDICATION param { number } RESET_BUSY_INDICATION param { number } SHUTDOWN param { number } HUB_WILL_SWITCH_OFF param { number } HUB_WILL_DISCONNECT param { number } HUB_WILL_GO_INTO_BOOT_MODE description export enum ActionType { SWITCH_OFF_HUB = 0x01 , DISCONNECT = 0x02 , VCC_PORT_CONTROL_ON = 0x03 , VCC_PORT_CONTROL_OFF = 0x04 , ACTIVATE_BUSY_INDICATION = 0x05 , RESET_BUSY_INDICATION = 0x06 , SHUTDOWN = 0x2F , HUB_WILL_SWITCH_OFF = 0x30 , HUB_WILL_DISCONNECT = 0x31 , HUB_WILL_GO_INTO_BOOT_MODE = 0x32 } typedef AlertType param { number } LOW_VOLTAGE param { number } HIGH_CURRENT param { number } LOW_SIGNAL_STRENGTH param { number } OVER_POWER_CONDITION description export enum AlertType { LOW_VOLTAGE = 0x01 , HIGH_CURRENT = 0x02 , LOW_SIGNAL_STRENGTH = 0x03 , OVER_POWER_CONDITION = 0x04 } typedef AlertOperation param { number } ENABLE_UPDATE param { number } DISABLE_UPDATE param { number } REQUEST_UPDATE param { number } UPDATE description export enum AlertOperation { LOW_VOLTAGE = 0x01 , HIGH_CURRENT = 0x02 , LOW_SIGNAL_STRENGTH = 0x03 , OVER_POWER_CONDITION = 0x04 } typedef AlertPayload param { number } STATUS_OK param { number } ALERT description export enum AlertPayload { STATUS_OK = 0x00 , ALERT = 0xFF } typedef Event param { number } DETACHED_IO param { number } ATTACHED_IO param { number } ATTACHED_VIRTUAL_IO description export enum Event { DETACHED_IO = 0x00 , ATTACHED_IO = 0x01 , ATTACHED_VIRTUAL_IO = 0x02 } typedef IOTypeID param { number } MOTOR param { number } SYSTEM_TRAIN_MOTOR param { number } BUTTON param { number } LED_LIGHT param { number } VOLTAGE param { number } CURRENT param { number } PIEZO_TONE_SOUND param { number } RGB_LIGHT param { number } EXTERNAL_TILT_SENSOR param { number } MOTION_SENSOR param { number } VISION_SENSOR param { number } EXTERNAL_MOTOR param { number } INTERNAL_MOTOR param { number } INTERNAL_TILT description export enum IOTypeID { MOTOR = 0x0001 , SYSTEM_TRAIN_MOTOR = 0x0002 , BUTTON = 0x0005 , LED_LIGHT = 0x0008 , VOLTAGE = 0x0014 , CURRENT = 0x0015 , PIEZO_TONE_SOUND = 0x0016 , RGB_LIGHT = 0x0017 , EXTERNAL_TILT_SENSOR = 0x0022 , MOTION_SENSOR = 0x0023 , VISION_SENSOR = 0x0025 , EXTERNAL_MOTOR = 0x0026 , INTERNAL_MOTOR = 0x0027 , INTERNAL_TILT = 0x0028 } typedef ErrorCode param { number } ACK param { number } MACK param { number } BUFFER_OVERFLOW param { number } TIMEOUT param { number } COMMAND_NOT_RECOGNIZED param { number } INVALID_USE param { number } OVERCURRENT param { number } INTERNAL_ERROR description export enum ErrorCode { ACK = 0x01 , MACK = 0x02 , BUFFER_OVERFLOW = 0x03 , TIMEOUT = 0x04 , COMMAND_NOT_RECOGNIZED = 0x05 , INVALID_USE = 0x06 , OVERCURRENT = 0x07 , INTERNAL_ERROR = 0x08 } typedef HWNetWorkCommandType param { number } CONNECTION_REQUEST param { number } FAMILY_REQUEST param { number } FAMILY_SET param { number } JOIN_DENIED param { number } GET_FAMILY param { number } FAMILY param { number } GET_SUBFAMILY param { number } SUBFAMILY param { number } SUBFAMILY_SET param { number } GET_EXTENDED_FAMILY param { number } EXTENDED_FAMILY param { number } EXTENDED_FAMILY_SET param { number } RESET_LONG_PRESS_TIMING description export enum HWNetWorkCommandType { CONNECTION_REQUEST = 0x02 , FAMILY_REQUEST = 0x03 , FAMILY_SET = 0x04 , JOIN_DENIED = 0x05 , GET_FAMILY = 0x06 , FAMILY = 0x07 , GET_SUBFAMILY = 0x08 , SUBFAMILY = 0x09 , SUBFAMILY_SET = 0x0A , GET_EXTENDED_FAMILY = 0x0B , EXTENDED_FAMILY = 0x0C , EXTENDED_FAMILY_SET = 0x0D , RESET_LONG_PRESS_TIMING = 0x0E } typedef HWNetworkFamily param { number } GREEN param { number } YELLOW param { number } RED param { number } BLUE param { number } PURPLE param { number } LIGHT_BLUE param { number } TEAL param { number } PINK param { number } WHITE description export enum HWNetworkFamily { GREEN = 0x01 , YELLOW = 0x02 , RED = 0x03 , BLUE = 0x04 , PURPLE = 0x05 , LIGHT_BLUE = 0x06 , TEAL = 0x07 , PINK = 0x08 , WHITE = 0x00 } typedef HWNetworkSubFamily param { number } ONE_FLASH param { number } TWO_FLASHES param { number } THREE_FLASHES param { number } FOUR_FLASHES param { number } FIVE_FLASHES param { number } SIX_FLASHES param { number } SEVEN_FLASHES description export enum HWNetworkSubFamily { ONE_FLASH = 0x01 , TWO_FLASHES = 0x02 , THREE_FLASHES = 0x03 , FOUR_FLASHES = 0x04 , FIVE_FLASHES = 0x05 , SIX_FLASHES = 0x06 , SEVEN_FLASHES = 0x07 } typedef ModeInformationType param { number } NAME param { number } RAW param { number } PCT param { number } SI param { number } SYMBOL param { number } MAPPING param { number } USED_INTERNALLY param { number } MOTOR_BIAS param { number } CAPABILITY_BITS param { number } VALUE_FORMAT description export enum ModeInformationType { NAME = 0x00 , RAW = 0x01 , PCT = 0x02 , SI = 0x03 , SYMBOL = 0x04 , MAPPING = 0x05 , USED_INTERNALLY = 0x06 , MOTOR_BIAS = 0x07 , CAPABILITY_BITS = 0x08 , VALUE_FORMAT = 0x80 } typedef PortInputFormatSetupSubCommand param { number } SET_MODEANDDATASET_COMBINATIONS param { number } LOCK_LPF2_DEVICE_FOR_SETUP param { number } UNLOCKANDSTARTWITHMULTIUPDATEENABLED param { number } UNLOCKANDSTARTWITHMULTIUPDATEDISABLED param { number } NOT_USED param { number } RESET_SENSOR description export enum PortInputFormatSetupSubCommand { SET_MODEANDDATASET_COMBINATIONS = 0x01 , LOCK_LPF2_DEVICE_FOR_SETUP = 0x02 , UNLOCKANDSTARTWITHMULTIUPDATEENABLED = 0x03 , UNLOCKANDSTARTWITHMULTIUPDATEDISABLED = 0x04 , NOT_USED = 0x05 , RESET_SENSOR = 0x06 } typedef MarioPantsType param { number } NONE param { number } PROPELLER param { number } CAT param { number } FIRE param { number } NORMAL param { number } BUILDER export enum MarioPantsType { NONE = 0x00 , PROPELLER = 0x06 , CAT = 0x11 , FIRE = 0x12 , NORMAL = 0x21 , BUILDER = 0x22 } typedef MarioColor param { number } WHITE param { number } RED param { number } BLUE param { number } YELLOW param { number } BLACK param { number } GREEN param { number } BROWN param { number } CYAN export enum MarioColor { WHITE = 0x1300 , RED = 0x1500 , BLUE = 0x1700 , YELLOW = 0x1800 , BLACK = 0x1a00 , GREEN = 0x2500 , BROWN = 0x6a00 , CYAN = 0x4201 }