Code Monkey home page Code Monkey logo

Comments (5)

UpstreamData avatar UpstreamData commented on August 27, 2024

Hey @Awote,

MinerData already includes a MAC address, and with all supported models if it's possible to gather it it should be put into there.

Example:

async def get_miner_mac(ip: str) -> str:
    miner = await pyasic.get_miner(ip)
    data = await miner.get_data()
    return data.mac

Not sure what model of miner you are using, some don't actually provide the MAC address externally via any method I could find, but if you know you miner type and can provide more information I can try.

Also, there are some pretty big re-works in progress on the dev branch that will hopefully be merged soon, I can easily check there if your miner supports getting the MAC address there as the AnyMiner.get_data() function was split off into its constituent parts.

from pyasic.

Awote avatar Awote commented on August 27, 2024

thanks for help. i take mac
I have a question, will pyasic be able to detect the miner if the miner is connected via a switch -> router and pyasic directly to the router? I know the IP address of the miner.

from pyasic.

UpstreamData avatar UpstreamData commented on August 27, 2024

Yep, as long as the miner and the computer you are using pyasic on are connected to the same network, this will work perfectly fine. Just run the above script with

asyncio.run(get_miner_mac(IP_ADDR_OF_MINER))

from pyasic.

UpstreamData avatar UpstreamData commented on August 27, 2024

For reference, if you need any more data from your miner, you can use the above script, but instead of return data.mac you can get any piece of data that is shown here by using the same format of data.attribute.

from pyasic.

UpstreamData avatar UpstreamData commented on August 27, 2024

Closing this for now, seems like it might have been resolved.

@Awote if you have any more questions feel free to re-open this or to create a new discussion in the "Discussions" tab.

from pyasic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.