-
Notifications
You must be signed in to change notification settings - Fork 8
Open
1 / 31 of 3 issues completedLabels
enhancementNew feature or requestNew feature or request
Milestone
Description
Implement adapter that uses MinerControlPort
to control the miner (using Home Assistant or the ASIC firmware's APIs).
Following the port (interface), the adapter should implements these methods that will be used by the application logic.
class MinerControlPort(ABC):
"""Port for the Miner Control."""
@abstractmethod
def start_miner(self) -> bool:
"""Attempts to start the miner. Returns True on success request."""
raise NotImplementedError
@abstractmethod
def stop_miner(self) -> bool:
"""Attempts to stop the specified miner. Returns True on success request."""
raise NotImplementedError
@abstractmethod
def get_miner_status(self) -> MinerStatus:
"""Gets the current operational status of the miner."""
raise NotImplementedError
@abstractmethod
def get_miner_power(self) -> Optional[Watts]:
"""Gets the current power consumption, if available."""
raise NotImplementedError
@abstractmethod
def get_miner_hashrate(self) -> Optional[HashRate]:
"""Gets the current hash rate, if available."""
raise NotImplementedError
I imagine some extra data will needed, such as a URL and a TOKEN for Home Assistant API connection, or an IP address and port for firmware APIs. These parameters, and any other necessary one, can be provided through by adapter's constructor (its __init__()
function)
Sub-issues
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
In Progress 🏗️