fix send_config for ePIC
This commit is contained in:
@@ -265,15 +265,7 @@ class PoolGroup(MinerConfigValue):
|
|||||||
return [p.as_auradine(user_suffix=user_suffix) for p in self.pools]
|
return [p.as_auradine(user_suffix=user_suffix) for p in self.pools]
|
||||||
|
|
||||||
def as_epic(self, user_suffix: str = None) -> dict:
|
def as_epic(self, user_suffix: str = None) -> dict:
|
||||||
if len(self.pools) > 0:
|
return [p.as_epic(user_suffix=user_suffix) for p in self.pools]
|
||||||
conf = {
|
|
||||||
"name": self.name,
|
|
||||||
"pool": [pool.as_epic(user_suffix=user_suffix) for pool in self.pools],
|
|
||||||
}
|
|
||||||
if self.quota is not None:
|
|
||||||
conf["quota"] = self.quota
|
|
||||||
return conf
|
|
||||||
return {"name": self.name, "pool": []}
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, dict_conf: dict | None) -> "PoolGroup":
|
def from_dict(cls, dict_conf: dict | None) -> "PoolGroup":
|
||||||
@@ -421,9 +413,7 @@ class PoolConfig(MinerConfigValue):
|
|||||||
return {
|
return {
|
||||||
"pools": {
|
"pools": {
|
||||||
"coin": "Btc",
|
"coin": "Btc",
|
||||||
"stratum_configs": [
|
"stratum_configs": self.groups[0].as_epic(user_suffix=user_suffix),
|
||||||
g.as_epic(user_suffix=user_suffix) for g in self.groups
|
|
||||||
],
|
|
||||||
"unique_id": False,
|
"unique_id": False,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,10 @@ class ePIC(BaseMiner):
|
|||||||
if not conf["fans"].get("Manual", {}) == {}:
|
if not conf["fans"].get("Manual", {}) == {}:
|
||||||
await self.web.set_fan({"Manual": conf["fans"]["Manual"]})
|
await self.web.set_fan({"Manual": conf["fans"]["Manual"]})
|
||||||
elif not conf["fans"].get("Auto", {}) == {}:
|
elif not conf["fans"].get("Auto", {}) == {}:
|
||||||
await self.web.set_fan({"Auto": conf["fans"]["Auto"]})
|
target_temp = {"Target Temperature": conf["fans"]["Target Temperature"]}
|
||||||
|
await self.web.set_fan(
|
||||||
|
{"Auto": {**conf["fans"]["Auto"], **target_temp}}
|
||||||
|
)
|
||||||
|
|
||||||
# Mining Mode -- Need to handle that you may not be able to change while miner is tuning
|
# Mining Mode -- Need to handle that you may not be able to change while miner is tuning
|
||||||
if conf["ptune"].get("enabled", True):
|
if conf["ptune"].get("enabled", True):
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ePICWebAPI(BaseWebAPI):
|
|||||||
f"http://{self.ip}:{self.port}/{command}",
|
f"http://{self.ip}:{self.port}/{command}",
|
||||||
timeout=5,
|
timeout=5,
|
||||||
json={
|
json={
|
||||||
**parameters,
|
"param": parameters["parameters"],
|
||||||
"password": self.pwd,
|
"password": self.pwd,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user