-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add support for newer versions of miners #195
Comments
Hey. Thnx. Will definitely take a look at your code |
Hi there, I took a long break from this project cause I didn't have, and still don't have, access to any of my miners so I couldn't test some of the features I wanted to add. |
There have been many many updates to the project since I posted this, it is now published to PyPI under I have a list of supported miners here - https://pyasic.readthedocs.io/en/latest/miners/supported_types/, and these miners use 4 different API backends, CGMiner, BMMiner, BOSMiner, and BTMiner (what Whatsminer/MicroBT calls their api). I have links to the base documentation for all the types of APIs supported in the documentation here - https://pyasic.readthedocs.io/en/latest/API/api/ if you're interested in them, except BTMiner, which is on whatsminers official website as Whatsminer.com under the support tab. I would recommend against trying to implement their privileged API without looking at some code, as it's not super straightforward and all the implementations I've seen for it use deprecated cryptography methods. If you want to set the up you may want to have a look at pyasic/API/BTMiner.py. I am happy to provide API outputs if you want them, but if you want just the implementations to get things, check out the functions for data gathering in the files in pyasic/miners/_backends/*.py. That being said the sad part is the API is not the end all be all, as most miners nowadays use some form of web commands. Let me know if you have any questions or any specific API outputs you want and I can try to send them. |
I realize I probably should have linked to the files I'm talking about, so here's the backend implementations folder - https://github.com/UpstreamData/pyasic/tree/master/pyasic/miners/_backends And here's the BTMiner implementation - https://github.com/UpstreamData/pyasic/blob/master/pyasic/API/btminer.py |
Thnx for the quick reply, I appreciate it. |
I haven't been able to test at quite that scale, but I would be concerned about the select.select loop on windows since it tends to crash if you put too many asynchronous operations into it, so it's very possible that I don't have enough semaphores in the code. Let me know if you find any crashes and I can try to fix them, I'm happily open to contributions and comments as well if you have them. |
I was thinking also to refactor the code and transform it to async but I am not sure it would work as expected. |
That would be awesome. I know some people that may have access to that many miners who are testing pyasic, and may be able to test them at scale soon, but I will fix issues as I find them. Feel free to reach out if you have any questions on the async side of things. |
Hey, just looking at the project and you only have support for older, possibly outdated types of miners. I am working on a similar project in python, and figured you would possibly want to implement some of the same miner versions that I have supported, such as X19/X17 models, Canaan 841 and 1066, and Whatsminer M30 and M20 series. Most of these have fairly standard API's across the board. In addition to this, I would be happy to provide outputs from every known command for a bunch of miner models if you would like to implement them into your project.
Link to my miner handler is here: https://github.com/UpstreamData/minerInterface
API implementations are under .API, and implementations for per-miner models are under .miners and sorted by miner type (antminer, whatsminer, avalonminer).
Hopefully this helps you :)
The text was updated successfully, but these errors were encountered: