How do I schedule my #Bitmain #Antminer S19 to stop and start mining?
Perhaps you are like me and get different power rates at different times of the day.
The below Python script will allow you to change the power mode of a Bitmain Antminer S19 between sleep (which is stopped), normal (which is maximum performance) and low-power (which is maximum efficiency).
You can combine this with the task scheduling system on your computer to change modes whenever you want.
#!/usr/bin/env python3
# https://bitcointalk.org/index.php?top...
import sys,requests
from requests.auth import HTTPDigestAuth
import json
import argparse
from ipaddress import ip_address
text="""
antminer-mode.py allows you to set the power mode on the Bitmain Antminer
S19 series of BTC ASICs.
"""
parser = argparse.ArgumentParser(description = text)
parser.add_argument("-u","--username",required=True,help="Username for the Antminer")
parser.add_argument("-p","--password",required=True,help="Password for the Antminer")
parser.add_argument("-ip","--ip-address",required=True,type=ip_address,help="IP Address of Antminer")
parser.add_argument("-m","--mode",required=True,choices=['sleep','normal','low-power'],help="Which operating mode to put Antminer into")
args=parser.parse_args()
# Specific a default mode of "sleep"
minerMode="1"
if args.mode == "normal":
minerMode="0"
elif args.mode == "low-power":
minerMode="3"
confData = {}
confData['miner-mode'] = minerMode
confPayload = json.dumps(confData)
setConfAddr = '/cgi-bin/set_miner_conf.cgi'
print(f"Setting {args.ip_address} to {args.mode} mode.")
try:
r = requests.post('http://' + str(args.ip_address) + setConfAddr, auth=HTTPDigestAuth(args.username, args.password), data=confPayload)
except requests.exceptions.RequestException as e:
sys.exit("post ant miner configuration failed."+e)
Смотрите видео Schedule Bitmain Antminer онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Philip D'Ath 07 Январь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,955 раз и оно понравилось 56 людям.