MCCU API Client
Bases: BaseAPIClient
API client for MCCU API.
This client provides a Python class to communicate with the Operating Point API.
This API reads the nameplate information (ratings) of the 'ABB' made motor. The API is only available from the ABB network.
Source code in reportconnectors/api_client/mccu_api_client.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
is_logged
property
Simple check if client api_key is available.
authenticate(key)
Authenticate to MCCU API using Api-Key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
API key for MCCU |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True, if the client is already logged in or authentication went successfully. |
bool
|
False if no key is provided. |
Source code in reportconnectors/api_client/mccu_api_client.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
get_motor_nameplate(serial_number)
Gets the complete nameplate of the ABB produced motor based on its serial number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serial_number
|
str
|
Serial number of the motor. |
required |
Returns:
| Type | Description |
|---|---|
Dict
|
Dict containing information about motor's nameplate. |
Source code in reportconnectors/api_client/mccu_api_client.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
get_shaft_power_map(serial_number, nominal_voltage=None, nominal_line_frequency=None, nominal_speed=None, nominal_power=None, connection=None)
Gets the shaft power map for motor identified by provided serial number.
Voltage [V], line frequency [Hz], speed [RPM], power [kW] and connection type are required
to get the shaft power map. However, all of them can be read from the get_motor_nameplate endpoint.
Therefore, this method operates in two modes:
- If all optional parameters are provided, it will use them to get the shaft power map.
- If any of the optional parameters are not provided, it will first make the call to get the use the nameplate and then use it to get the shaft power map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serial_number
|
str
|
Serial number of the motor. Required |
required |
nominal_voltage
|
Optional[float]
|
Nominal voltage of the motor. [V] |
None
|
nominal_line_frequency
|
Optional[float]
|
Nominal line frequency of the motor. [Hz] |
None
|
nominal_speed
|
Optional[float]
|
Nominal speed of the motor. [RPM] |
None
|
nominal_power
|
Optional[float]
|
Nominal power of the motor. [W] |
None
|
connection
|
Optional[StatorConnection]
|
Stator connection type of the motor. [delta=0, star=1] |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
Dict with motor ratings, number_of_poles and shaft power map as base64-encoded CSV. |
Source code in reportconnectors/api_client/mccu_api_client.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |