-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially supported miner found: Antminer S19JPRO Hiveon #243
Comments
Haven't touched hiveon stuff since T9, no idea how much theyve changed in the firmware, ill see what I can do. Are you able to send over a couple of the different RPC commands (and any web commands you find relevant)? |
what is above is the result of execution
|
I need the raw calls, ill get a list of commands, 1 sec. |
import asyncio
import httpx
import pyasic
IP = "172.20.174.152"
async def main():
try:
print(await pyasic.miner_factory._socket_ping(IP, "version"))
except Exception as e:
print(f"Error getting RPC version: {e}")
print("-" * 40)
try:
print(await pyasic.miner_factory._socket_ping(IP, "devdetails"))
except Exception as e:
print(f"Error getting RPC devdetails: {e}")
print("-" * 40)
try:
async with httpx.AsyncClient(transport=pyasic.settings.transport()) as session:
print(await pyasic.miner_factory._web_ping(session, f"http://{IP}/"))
except Exception as e:
print(f"Error getting web http root: {e}")
print("-" * 40)
try:
async with httpx.AsyncClient(transport=pyasic.settings.transport()) as session:
print(await pyasic.miner_factory._web_ping(session, f"https://{IP}/"))
except Exception as e:
print(f"Error getting web https root: {e}")
print("-" * 40)
try:
print(await pyasic.miner_factory._socket_ping(IP, "stats"))
except Exception as e:
print(f"Error getting RPC stats: {e}")
print("-" * 40)
try:
print(await pyasic.miner_factory._socket_ping(IP, "summary"))
except Exception as e:
print(f"Error getting RPC summary: {e}")
if __name__ == "__main__":
asyncio.run(main()) |
|
I don't see the mac address anywhere, this is critical for me. Is there any way to get it back? |
That's a good question, I have no idea actually if they will support that. Is SSH enabled on the miner? If so, try |
PS C:\agent> cat /sys/class/net/eth0/address 172.20.174.152
PS C:\agent> did I do something wrong? |
Need to ssh in first, |
Can you try this? I think its returning a stock antminer header and I need to find a way to skip that... import asyncio
import httpx
import pyasic
IP = "172.20.174.152"
async def main():
async with httpx.AsyncClient(transport=pyasic.settings.transport()) as session:
res = await pyasic.miner_factory._web_ping(session, f"https://{IP}/")
print(res.headers)
if __name__ == "__main__":
asyncio.run(main()) |
PS C:\agent> ssh [email protected]
|
Try in command prompt? Not sure familiar with powershell. |
py test.py |
Ack... import asyncio
import httpx
import pyasic
IP = "172.20.174.152"
async def main():
async with httpx.AsyncClient(transport=pyasic.settings.transport()) as session:
res = await pyasic.miner_factory._web_ping(session, f"http://{IP}/")
print(res[1].headers)
if __name__ == "__main__":
asyncio.run(main()) |
ssh: connect to host 172.20.174.152 port 22: Connection refused |
Ok, no SSH then. Anything in any of the web endpoints about it? |
PS C:\vekus\agent> py test.py |
And I messed it up again... import asyncio
import httpx
import pyasic
IP = "172.20.174.152"
async def main():
async with httpx.AsyncClient(transport=pyasic.settings.transport()) as session:
res = await pyasic.miner_factory._web_ping(session, f"http://{IP}/")
print(res[1].headers)
if __name__ == "__main__":
asyncio.run(main()) |
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748e090:f6b60e5ecc67a489297170efe0734509", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 21:28:48 GMT', 'server': 'lighttpd/1.4.69'}) |
Try out v0.64.3. Still have no idea how to get the mac address, but at least it should pick it up properly now... |
Traceback (most recent call last): |
Seems like stuff isnt getting installed properly, if you |
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748e541:7a7cd1d3e33ff30b8b115ecafe94c612", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 21:48:49 GMT', 'server': 'lighttpd/1.4.69'}) The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Whats the result of |
Tell me how to call this? |
|
PS C:\vekus\agent2> py test.py |
in developer tools, it only responds with html pages |
Ok, fixed that in 0.64.4, the pools they are returning were super weird. |
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748ea8c:3804400e68194993828846ec980c3276", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 22:11:24 GMT', 'server': 'lighttpd/1.4.69'}) |
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748eb4a:17b7cee6caa91bf390fe7b6046b54d68", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 22:14:34 GMT', 'server': 'lighttpd/1.4.69'}) |
Still seems like its identifying wrong... |
|
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748ecd1:c148b494a0c557e8c2e687ae126e03cb", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 22:21:05 GMT', 'server': 'lighttpd/1.4.69'}) |
Maybe should check the miner type each time, it seems inconsistent... import asyncio
import httpx
import pyasic
IP = "172.20.174.152"
async def main():
miner = await pyasic.get_miner(IP)
print(miner)
print(await miner.web.get_system_info())
if __name__ == "__main__":
asyncio.run(main()) |
Headers({'www-authenticate': 'Digest realm="antMiner Configuration", charset="UTF-8", algorithm=MD5, nonce="6748ef98:9ddc862a6ac0cf5ca93a7df9fd99d150", qop="auth"', 'content-type': 'text/html', 'content-length': '347', 'date': 'Thu, 28 Nov 2024 22:32:56 GMT', 'server': 'lighttpd/1.4.69'}) |
Please add Hiveon support
pyasic\miners\factory.py:868: UserWarning: Partially supported miner found: Antminer S19JPRO Hiveon, please open an issue with miner data and this model on GitHub (https://github.com/UpstreamData/pyasic/issues).
warnings.warn(
MinerData(ip='172.20.174.152', datetime='2024-11-28T23:28:57.168605+03:00', timestamp=1732825737, device_info=DeviceInfo(make=None, model=None, firmware=<MinerFirmware.STOCK: 'Stock'>, algo=SHA256Algo), make=None, model=None, firmware='Stock', algo='SHA256', mac=None, api_ver='3.1', fw_ver='Fri Apr 19 10:58:21 UTC 2024', hostname=None, hashrate=106.54267999999999 TH/s, expected_hashrate=103.94622 TH/s, expected_hashboards=3, expected_chips=0, expected_fans=2, percent_expected_chips=0, percent_expected_hashrate=102, percent_expected_wattage=None, temperature_avg=57, env_temp=None, wattage=None, wattage_limit=None, voltage=None, fans=[Fan(speed=3840), Fan(speed=3840)], fan_psu=None, hashboards=[HashBoard(slot=0, hashrate=35.69015 TH/s, temp=55, chip_temp=37, chips=126, expected_chips=None, serial_number=None, missing=False, tuned=None, active=None, voltage=None), HashBoard(slot=1, hashrate=36.17393 TH/s, temp=58, chip_temp=38, chips=126, expected_chips=None, serial_number=None, missing=False, tuned=None, active=None, voltage=None), HashBoard(slot=2, hashrate=34.678599999999996 TH/s, temp=59, chip_temp=40, chips=126, expected_chips=None, serial_number=None, missing=False, tuned=None, active=None, voltage=None)], total_chips=378, nominal=False, config=MinerConfig(pools=PoolConfig(groups=[PoolGroup(pools=[Pool(url='stratum+tcp://btc.viabtc.io:3333', user='Andreyns2017.S19jPro100x09', password='x'), Pool(url='stratum+tcp://btc.viabtc.io:25', user='Andreyns2017.S19jPro100x09', password='x'), Pool(url='stratum+tcp://btc.viabtc.io:443', user='Andreyns2017.S19jPro100x09', password='x'), Pool(url='', user='', password='x'), Pool(url='**', user='', password='x')], quota=1, name='KFLAT9')]), fan_mode=FanModeNormal(mode='normal', minimum_fans=1, minimum_speed=0), temperature=TemperatureConfig(target=None, hot=None, danger=None), mining_mode=MiningModeNormal(mode='normal')), fault_light=None, errors=[], is_mining=True, uptime=23368, efficiency=None, pools=[PoolMetrics(url=PoolUrl(scheme=<Scheme.STRATUM_V1: 'stratum+tcp'>, host='btc.viabtc.io', port=3333, pubkey=None), accepted=4296, rejected=2, get_failures=0, remote_failures=0, active=True, alive=True, index=0, user='Andreyns2017.S19jPro100x09', pool_rejected_percent=0.04653327128897162, pool_stale_percent=0.0), PoolMetrics(url=PoolUrl(scheme=<Scheme.STRATUM_V1: 'stratum+tcp'>, host='btc.viabtc.io', port=25, pubkey=None), accepted=0, rejected=0, get_failures=0, remote_failures=0, active=False, alive=True, index=1, user='Andreyns2017.S19jPro100x09', pool_rejected_percent=0, pool_stale_percent=0), PoolMetrics(url=PoolUrl(scheme=<Scheme.STRATUM_V1: 'stratum+tcp'>, host='btc.viabtc.io', port=443, pubkey=None), accepted=0, rejected=0, get_failures=0, remote_failures=0, active=False, alive=True, index=2, user='Andreyns2017.S19jPro100x09', pool_rejected_percent=0, pool_stale_percent=0), PoolMetrics(url=PoolUrl(scheme=<Scheme.STRATUM_V1: 'stratum+tcp'>, host=None, port=None, pubkey=None), accepted=13242, rejected=0, get_failures=0, remote_failures=0, active=True, alive=True, index=3, user='', pool_rejected_percent=0.0, pool_stale_percent=0.0), PoolMetrics(url=PoolUrl(scheme=<Scheme.STRATUM_V1: 'stratum+tcp'>, host=None, port=None, pubkey=None), accepted=15984, rejected=0, get_failures=0, remote_failures=0, active=True, alive=True, index=4, user='*', pool_rejected_percent=0.0, pool_stale_percent=0.0)])
106.54267999999999 TH/s
The text was updated successfully, but these errors were encountered: