docs: update documentation.
This commit is contained in:
@@ -6,3 +6,10 @@
|
|||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
|
## HashBoard Data
|
||||||
|
::: pyasic.data.HashBoard
|
||||||
|
handler: python
|
||||||
|
options:
|
||||||
|
show_root_heading: false
|
||||||
|
heading_level: 4
|
||||||
|
|||||||
@@ -411,7 +411,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
the password of the miner using the Whatsminer tool.
|
the password of the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of powering on.
|
A reply informing of the status of powering on.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -426,7 +425,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
changing the password of the miner using the Whatsminer tool.
|
changing the password of the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of resetting the LED.
|
A reply informing of the status of resetting the LED.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -454,7 +452,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
duration: LED on time in the cycle in ms.
|
duration: LED on time in the cycle in ms.
|
||||||
start: LED on time offset in the cycle in ms.
|
start: LED on time offset in the cycle in ms.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting the LED.
|
A reply informing of the status of setting the LED.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -473,7 +470,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
changing the password of the miner using the Whatsminer tool.
|
changing the password of the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting low power mode.
|
A reply informing of the status of setting low power mode.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -491,7 +487,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of the reboot.
|
A reply informing of the status of the reboot.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -510,7 +505,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of the reset.
|
A reply informing of the status of the reset.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -531,7 +525,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
old_pwd: The old admin password.
|
old_pwd: The old admin password.
|
||||||
new_pwd: The new password to set.
|
new_pwd: The new password to set.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting the password.
|
A reply informing of the status of setting the password.
|
||||||
"""
|
"""
|
||||||
self.pwd = old_pwd
|
self.pwd = old_pwd
|
||||||
@@ -563,7 +556,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
percent: The frequency % to set.
|
percent: The frequency % to set.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting the frequency.
|
A reply informing of the status of setting the frequency.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -587,7 +579,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
the miner using the Whatsminer tool.
|
the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of enabling fast boot.
|
A reply informing of the status of enabling fast boot.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -603,7 +594,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
the miner using the Whatsminer tool.
|
the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of disabling fast boot.
|
A reply informing of the status of disabling fast boot.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -619,7 +609,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
password of the miner using the Whatsminer tool.
|
password of the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of enabling web pools.
|
A reply informing of the status of enabling web pools.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -635,7 +624,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
password of the miner using the Whatsminer tool.
|
password of the miner using the Whatsminer tool.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of disabling web pools.
|
A reply informing of the status of disabling web pools.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -653,7 +641,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
hostname: The new hostname to use.
|
hostname: The new hostname to use.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting the hostname.
|
A reply informing of the status of setting the hostname.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -671,7 +658,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
percent: The power percentage to set.
|
percent: The power percentage to set.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting the power percentage.
|
A reply informing of the status of setting the power percentage.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -700,7 +686,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
* `adjust complete`
|
* `adjust complete`
|
||||||
* `adjust continue`
|
* `adjust continue`
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of pre power on.
|
A reply informing of the status of pre power on.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -722,7 +707,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
|
|
||||||
### ADDED IN V2.0.5 Whatsminer API ###
|
### ADDED IN V2.0.5 Whatsminer API ###
|
||||||
@api_min_version("2.0.5")
|
@api_min_version("2.0.5")
|
||||||
async def set_temp_offset(self, temp_offset: int):
|
async def set_temp_offset(self, temp_offset: int) -> dict:
|
||||||
"""Set the offset of miner hash board target temperature.
|
"""Set the offset of miner hash board target temperature.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -734,7 +719,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
temp_offset: Target temperature offset.
|
temp_offset: Target temperature offset.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting temp offset.
|
A reply informing of the status of setting temp offset.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -751,7 +735,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@api_min_version("2.0.5")
|
@api_min_version("2.0.5")
|
||||||
async def adjust_power_limit(self, power_limit: int):
|
async def adjust_power_limit(self, power_limit: int) -> dict:
|
||||||
"""Set the upper limit of the miner's power. Cannot be higher than the ordinary power of the machine.
|
"""Set the upper limit of the miner's power. Cannot be higher than the ordinary power of the machine.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -764,7 +748,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
power_limit: New power limit.
|
power_limit: New power limit.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting power limit.
|
A reply informing of the status of setting power limit.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -774,7 +757,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@api_min_version("2.0.5")
|
@api_min_version("2.0.5")
|
||||||
async def adjust_upfreq_speed(self, upfreq_speed: int):
|
async def adjust_upfreq_speed(self, upfreq_speed: int) -> dict:
|
||||||
"""Set the upfreq speed, 0 is the normal speed, 9 is the fastest speed.
|
"""Set the upfreq speed, 0 is the normal speed, 9 is the fastest speed.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -788,7 +771,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
upfreq_speed: New upfreq speed.
|
upfreq_speed: New upfreq speed.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting upfreq speed.
|
A reply informing of the status of setting upfreq speed.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -803,7 +785,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@api_min_version("2.0.5")
|
@api_min_version("2.0.5")
|
||||||
async def set_poweroff_cool(self, poweroff_cool: bool):
|
async def set_poweroff_cool(self, poweroff_cool: bool) -> dict:
|
||||||
"""Set whether to cool the machine when mining is stopped.
|
"""Set whether to cool the machine when mining is stopped.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -815,7 +797,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
poweroff_cool: Whether to cool the miner during power off mode.
|
poweroff_cool: Whether to cool the miner during power off mode.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting power off cooling mode.
|
A reply informing of the status of setting power off cooling mode.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -825,7 +806,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@api_min_version("2.0.5")
|
@api_min_version("2.0.5")
|
||||||
async def set_fan_zero_speed(self, fan_zero_speed: bool):
|
async def set_fan_zero_speed(self, fan_zero_speed: bool) -> dict:
|
||||||
"""Sets whether the fan speed supports the lowest 0 speed.
|
"""Sets whether the fan speed supports the lowest 0 speed.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -837,7 +818,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Parameters:
|
Parameters:
|
||||||
fan_zero_speed: Whether the fan is allowed to support 0 speed.
|
fan_zero_speed: Whether the fan is allowed to support 0 speed.
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A reply informing of the status of setting fan minimum speed.
|
A reply informing of the status of setting fan minimum speed.
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -854,7 +834,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Summary status of the miner.
|
Summary status of the miner.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -866,7 +845,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Pool status of the miner.
|
Pool status of the miner.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -878,7 +856,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Data on each PGA/ASC with their details.
|
Data on each PGA/ASC with their details.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -890,7 +867,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Data on each PGA/ASC with their details.
|
Data on each PGA/ASC with their details.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -902,7 +878,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Data on all devices with their static details.
|
Data on all devices with their static details.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -914,7 +889,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Data on the PSU and power information.
|
Data on the PSU and power information.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -930,7 +904,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
with the other miner APIs.
|
with the other miner APIs.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Version data for the miner.
|
Version data for the miner.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -942,7 +915,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
Version data for the miner.
|
Version data for the miner.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -954,7 +926,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
BTMiner status and firmware version.
|
BTMiner status and firmware version.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -966,7 +937,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
<summary>Expand</summary>
|
<summary>Expand</summary>
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
General miner info.
|
General miner info.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
@@ -981,7 +951,6 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
Get a list of error codes from the miner. Replaced `summary` as the location of error codes with API version 2.0.4.
|
Get a list of error codes from the miner. Replaced `summary` as the location of error codes with API version 2.0.4.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
A list of error codes on the miner.
|
A list of error codes on the miner.
|
||||||
</details>
|
</details>
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -25,6 +25,17 @@ from .error_codes import BraiinsOSError, InnosiliconError, WhatsminerError, X19E
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class HashBoard:
|
class HashBoard:
|
||||||
|
"""A Dataclass to standardize hashboard data.
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
slot: The slot of the board as an int.
|
||||||
|
hashrate: The hashrate of the board in TH/s as a float.
|
||||||
|
temp: The temperature of the PCB as an int.
|
||||||
|
chip_temp: The temperature of the chips as an int.
|
||||||
|
chips: The chip count of the board as an int.
|
||||||
|
expected_chips: The ideal chip count of the board as an int.
|
||||||
|
missing: Whether the board is returned from the miners data as a bool.
|
||||||
|
"""
|
||||||
slot: int = 0
|
slot: int = 0
|
||||||
hashrate: float = 0.0
|
hashrate: float = 0.0
|
||||||
temp: int = -1
|
temp: int = -1
|
||||||
|
|||||||
Reference in New Issue
Block a user