pyasic
AuradineWebAPI
Bases: BaseWebAPI
Source code in pyasic/web/auradine.py
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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
|
__init__(ip)
Initializes the API client for interacting with Auradine mining devices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ip
|
str
|
IP address of the Auradine miner. |
required |
Source code in pyasic/web/auradine.py
auth()
async
Authenticate and retrieve a web token from the Auradine miner.
Returns:
Type | Description |
---|---|
str | None
|
str | None: A token if authentication is successful, None otherwise. |
Source code in pyasic/web/auradine.py
factory_reset()
async
Perform a factory reset on the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the reset operation. |
firmware_upgrade(url=None, version='latest')
async
Upgrade the firmware of the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The URL to download the firmware from. |
None
|
version
|
str
|
The version of the firmware to upgrade to, defaults to 'latest'. |
'latest'
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the firmware upgrade. |
Source code in pyasic/web/auradine.py
get_fan()
async
Retrieve the current fan status from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the current fan status. |
get_frequency()
async
Retrieve the current frequency settings of the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the frequency settings. |
get_led()
async
Retrieve the current LED status from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the current status of the LED settings. |
get_mode()
async
Retrieve the current operational mode of the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the current mode settings. |
get_network()
async
Retrieve the network configuration settings of the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the network configuration details. |
get_psu()
async
Retrieve the status of the power supply unit (PSU) from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the PSU status. |
get_register()
async
Retrieve registration information from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the registration details. |
get_token()
async
Retrieve the current authentication token for the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the authentication token. |
Source code in pyasic/web/auradine.py
get_ztp()
async
Retrieve the zero-touch provisioning status from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the ZTP status. |
ipreport()
async
Generate an IP report for the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the IP report details. |
multicommand(*commands, ignore_errors=False, allow_warning=True)
async
Execute multiple commands simultaneously on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*commands
|
str
|
Commands to execute. |
()
|
ignore_errors
|
bool
|
Whether to ignore errors during command execution. |
False
|
allow_warning
|
bool
|
Whether to proceed despite warnings. |
True
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing responses for all commands executed. |
Source code in pyasic/web/auradine.py
password(password)
async
Change the password used for accessing the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
password
|
str
|
The new password to set. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the password change operation. |
Source code in pyasic/web/auradine.py
reboot()
async
Reboot the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the reboot operation. |
restart_api_server()
async
Restart the API server on the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the API server restart operation. |
Source code in pyasic/web/auradine.py
restart_gcminer()
async
Restart the GCMiner application on the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the GCMiner restart operation. |
Source code in pyasic/web/auradine.py
send_command(command, ignore_errors=False, allow_warning=True, privileged=False, **parameters)
async
Send a command to the Auradine miner, handling authentication and retries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command
|
str | bytes
|
The specific command to execute. |
required |
ignore_errors
|
bool
|
Whether to ignore HTTP errors. |
False
|
allow_warning
|
bool
|
Whether to proceed with warnings. |
True
|
privileged
|
bool
|
Whether the command requires privileged access. |
False
|
**parameters
|
Any
|
Additional parameters for the command. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The JSON response from the device. |
Source code in pyasic/web/auradine.py
set_fan(fan, speed_pct)
async
Set the speed of a specific fan on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fan
|
int
|
The index of the fan to control. |
required |
speed_pct
|
int
|
The speed percentage to set for the fan. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the operation. |
Source code in pyasic/web/auradine.py
set_frequency(board, frequency)
async
Set the frequency for a specific board on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board
|
int
|
The index of the board to configure. |
required |
frequency
|
float
|
The frequency in MHz to set for the board. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of setting the frequency. |
Source code in pyasic/web/auradine.py
set_led(code)
async
Set the LED code on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code
|
int
|
The code that determines the LED behavior. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the operation. |
Source code in pyasic/web/auradine.py
set_led_custom(code, led_1, led_2, msg)
async
Set custom LED configurations including messages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code
|
int
|
The LED code to set. |
required |
led_1
|
int
|
The first LED indicator number. |
required |
led_2
|
int
|
The second LED indicator number. |
required |
msg
|
str
|
The message to display or represent with LEDs. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the custom LED configuration. |
Source code in pyasic/web/auradine.py
set_mode(**kwargs)
async
Set the operational mode of the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Mode settings specified as keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the mode setting operation. |
Source code in pyasic/web/auradine.py
set_network(**kwargs)
async
Set the network configuration of the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Network settings specified as keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the network configuration. |
Source code in pyasic/web/auradine.py
set_psu(voltage)
async
Set the voltage for the power supply unit of the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voltage
|
float
|
The voltage level to set for the PSU. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of setting the PSU voltage. |
Source code in pyasic/web/auradine.py
set_register(company)
async
Set the registration information for the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
company
|
str
|
The company name to register the miner under. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the registration operation. |
Source code in pyasic/web/auradine.py
set_ztp(enable)
async
Enable or disable zero-touch provisioning (ZTP) on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enable
|
bool
|
True to enable ZTP, False to disable. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the ZTP setting operation. |
Source code in pyasic/web/auradine.py
temperature()
async
Retrieve the current temperature readings from the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing temperature data. |
timedate(ntp, timezone)
async
Set the time and date settings for the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ntp
|
str
|
The NTP server to use for time synchronization. |
required |
timezone
|
str
|
The timezone setting. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of setting the time and date. |
Source code in pyasic/web/auradine.py
update_pools(pools)
async
Update the mining pools configuration on the Auradine miner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pools
|
list[dict]
|
A list of dictionaries, each representing a pool configuration. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary indicating the result of the update operation. |
Source code in pyasic/web/auradine.py
voltage()
async
Retrieve the voltage settings of the Auradine miner.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the voltage details. |