Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
640dc6d8c2 | ||
|
|
a572fedb4d | ||
|
|
6c46a7cd71 |
@@ -82,6 +82,9 @@ class MiningModeNormal(MinerConfigValue):
|
||||
def as_luxos(self) -> dict:
|
||||
return {"autotunerset": {"enabled": False}}
|
||||
|
||||
def as_bosminer(self) -> dict:
|
||||
return {"autotuning": {"enabled": True}}
|
||||
|
||||
|
||||
class MiningModeSleep(MinerConfigValue):
|
||||
mode: str = field(init=False, default="sleep")
|
||||
@@ -692,6 +695,7 @@ class MiningModeConfig(MinerConfigOption):
|
||||
return cls.hashrate_tuning(
|
||||
scaling=ScalingConfig.from_bosminer(toml_conf, mode="hashrate"),
|
||||
)
|
||||
return cls.default()
|
||||
|
||||
@classmethod
|
||||
def from_vnish(cls, web_settings: dict, web_presets: list[dict]):
|
||||
|
||||
@@ -190,7 +190,7 @@ class Pool(MinerConfigValue):
|
||||
return cls(
|
||||
url=toml_pool_conf["url"],
|
||||
user=toml_pool_conf["user"],
|
||||
password=toml_pool_conf["password"],
|
||||
password=toml_pool_conf.get("password", ""),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -252,6 +252,9 @@ class AntminerModern(BMMiner):
|
||||
return errors
|
||||
|
||||
async def _get_hashboards(self) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=idx, expected_chips=self.expected_chips)
|
||||
for idx in range(self.expected_hashboards)
|
||||
@@ -565,6 +568,9 @@ class AntminerOld(CGMiner):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, rpc_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_stats is None:
|
||||
try:
|
||||
rpc_stats = await self.rpc.stats()
|
||||
@@ -593,6 +599,8 @@ class AntminerOld(CGMiner):
|
||||
return fans_data
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
hashboards = []
|
||||
|
||||
if rpc_stats is None:
|
||||
|
||||
@@ -303,6 +303,9 @@ class Auradine(StockFirmware):
|
||||
async def _get_hashboards(
|
||||
self, rpc_devs: dict = None, web_ipreport: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -382,6 +385,9 @@ class Auradine(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, web_fan: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_fan is None:
|
||||
try:
|
||||
web_fan = await self.web.get_fan()
|
||||
|
||||
@@ -212,6 +212,9 @@ class AvalonMiner(CGMiner):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -326,6 +329,9 @@ class AvalonMiner(CGMiner):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, rpc_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_stats is None:
|
||||
try:
|
||||
rpc_stats = await self.rpc.stats()
|
||||
|
||||
@@ -129,6 +129,9 @@ class BFGMiner(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = []
|
||||
|
||||
if rpc_stats is None:
|
||||
@@ -185,6 +188,9 @@ class BFGMiner(StockFirmware):
|
||||
return hashboards
|
||||
|
||||
async def _get_fans(self, rpc_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_stats is None:
|
||||
try:
|
||||
rpc_stats = await self.rpc.stats()
|
||||
|
||||
@@ -133,6 +133,9 @@ class BMMiner(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = []
|
||||
|
||||
if rpc_stats is None:
|
||||
@@ -202,6 +205,9 @@ class BMMiner(StockFirmware):
|
||||
return hashboards
|
||||
|
||||
async def _get_fans(self, rpc_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_stats is None:
|
||||
try:
|
||||
rpc_stats = await self.rpc.stats()
|
||||
|
||||
@@ -376,6 +376,9 @@ class BOSMiner(BraiinsOSFirmware):
|
||||
rpc_devdetails: dict = None,
|
||||
rpc_devs: dict = None,
|
||||
) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -473,6 +476,9 @@ class BOSMiner(BraiinsOSFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, rpc_fans: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_fans is None:
|
||||
try:
|
||||
rpc_fans = await self.rpc.fans()
|
||||
@@ -926,6 +932,9 @@ class BOSer(BraiinsOSFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, grpc_hashboards: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -997,6 +1006,9 @@ class BOSer(BraiinsOSFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, grpc_cooling_state: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if grpc_cooling_state is None:
|
||||
try:
|
||||
grpc_cooling_state = await self.web.get_cooling_state()
|
||||
|
||||
@@ -412,6 +412,9 @@ class BTMiner(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_devs: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -490,6 +493,9 @@ class BTMiner(StockFirmware):
|
||||
async def _get_fans(
|
||||
self, rpc_summary: dict = None, rpc_get_psu: dict = None
|
||||
) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_summary is None:
|
||||
try:
|
||||
rpc_summary = await self.rpc.summary()
|
||||
|
||||
@@ -209,6 +209,9 @@ class ElphapexMiner(StockFirmware):
|
||||
return errors
|
||||
|
||||
async def _get_hashboards(self, web_stats: dict | None = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=idx, expected_chips=self.expected_chips)
|
||||
for idx in range(self.expected_hashboards)
|
||||
@@ -317,6 +320,9 @@ class ElphapexMiner(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, web_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_stats is None:
|
||||
try:
|
||||
web_stats = await self.web.stats()
|
||||
|
||||
@@ -283,6 +283,9 @@ class ePIC(ePICFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, web_summary: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_summary is None:
|
||||
try:
|
||||
web_summary = await self.web.summary()
|
||||
@@ -302,6 +305,9 @@ class ePIC(ePICFirmware):
|
||||
async def _get_hashboards(
|
||||
self, web_summary: dict = None, web_capabilities: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
if web_summary is None:
|
||||
try:
|
||||
web_summary = await self.web.summary()
|
||||
|
||||
@@ -141,6 +141,9 @@ class ESPMiner(BaseMiner):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, web_system_info: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
if web_system_info is None:
|
||||
try:
|
||||
web_system_info = await self.web.system_info()
|
||||
@@ -169,6 +172,9 @@ class ESPMiner(BaseMiner):
|
||||
return []
|
||||
|
||||
async def _get_fans(self, web_system_info: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_system_info is None:
|
||||
try:
|
||||
web_system_info = await self.web.system_info()
|
||||
|
||||
@@ -145,6 +145,9 @@ class GoldshellMiner(BFGMiner):
|
||||
async def _get_hashboards(
|
||||
self, rpc_devs: dict = None, rpc_devdetails: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
if rpc_devs is None:
|
||||
try:
|
||||
rpc_devs = await self.rpc.devs()
|
||||
|
||||
@@ -180,6 +180,9 @@ class BlackMiner(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = []
|
||||
|
||||
if rpc_stats is None:
|
||||
@@ -245,6 +248,9 @@ class BlackMiner(StockFirmware):
|
||||
return hashboards
|
||||
|
||||
async def _get_fans(self, rpc_stats: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_stats is None:
|
||||
try:
|
||||
rpc_stats = await self.rpc.stats()
|
||||
|
||||
@@ -79,6 +79,9 @@ class IceRiver(StockFirmware):
|
||||
return MinerConfig.from_iceriver(web_userpanel)
|
||||
|
||||
async def _get_fans(self, web_userpanel: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_userpanel is None:
|
||||
try:
|
||||
web_userpanel = await self.web.userpanel()
|
||||
@@ -170,6 +173,9 @@ class IceRiver(StockFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, web_userpanel: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
if web_userpanel is None:
|
||||
try:
|
||||
web_userpanel = await self.web.userpanel()
|
||||
|
||||
@@ -211,6 +211,9 @@ class Innosilicon(CGMiner):
|
||||
async def _get_hashboards(
|
||||
self, rpc_stats: dict = None, web_get_all: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
if web_get_all:
|
||||
web_get_all = web_get_all["all"]
|
||||
|
||||
@@ -304,6 +307,9 @@ class Innosilicon(CGMiner):
|
||||
return wattage
|
||||
|
||||
async def _get_fans(self, web_get_all: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_get_all:
|
||||
web_get_all = web_get_all["all"]
|
||||
|
||||
|
||||
@@ -240,6 +240,9 @@ class LUXMiner(LuxOSFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=idx, expected_chips=self.expected_chips)
|
||||
for idx in range(self.expected_hashboards)
|
||||
@@ -309,6 +312,9 @@ class LUXMiner(LuxOSFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, rpc_fans: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if rpc_fans is None:
|
||||
try:
|
||||
rpc_fans = await self.rpc.fans()
|
||||
|
||||
@@ -164,6 +164,9 @@ class MaraMiner(MaraFirmware):
|
||||
pass
|
||||
|
||||
async def _get_hashboards(self, web_hashboards: dict = None) -> List[HashBoard]:
|
||||
if self.expected_hashboards is None:
|
||||
return []
|
||||
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -250,6 +253,9 @@ class MaraMiner(MaraFirmware):
|
||||
pass
|
||||
|
||||
async def _get_fans(self, web_fans: dict = None) -> List[Fan]:
|
||||
if self.expected_fans is None:
|
||||
return []
|
||||
|
||||
if web_fans is None:
|
||||
try:
|
||||
web_fans = await self.web.fans()
|
||||
|
||||
@@ -97,7 +97,7 @@ class UnknownMiner(BaseMiner):
|
||||
return None
|
||||
|
||||
async def _get_fans(self) -> List[Fan]:
|
||||
return [Fan(), Fan(), Fan(), Fan()]
|
||||
return []
|
||||
|
||||
async def _get_fan_psu(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "pyasic"
|
||||
version = "0.72.0"
|
||||
version = "0.72.1"
|
||||
|
||||
description = "A simplified and standardized interface for Bitcoin ASICs."
|
||||
authors = [{name = "UpstreamData", email = "brett@upstreamdata.ca"}]
|
||||
|
||||
Reference in New Issue
Block a user