Skip to main content

A command line tool used to automate the Bobcat miner. This project also offers a robust python SDK's for interacting with the Bobcat miner.

Reason this release was yanked:

pre-release

Project description

PyPI Dockerhub Release Tests Lint Code style: black

bobcat miner python

A command line tool used to automate the Bobcat miner. This project also offers a robust python SDK's for interacting with the Bobcat miner.

Install

# install command line tools
$ pipx install bobcat-miner

# install SDK
$ pip3 install bobcat-miner

Please see this guide for more information about installing stand alone command line tools with pipx.

Bobcat Autopilot Usage

The bobcat autopilot command will automatically diagnose and repair the Bobcat!

Follow these instructions to find your Bobcats's ip address.

Bobcat Autopilot Term

The bobcat command line tool accepts both command line options and environment variables. Please see the bobcat --help for more information.

Bobcat Dry Run

Diagnostics checks will run and all actions will be skipped during a Bobcat dry run.

$ bobcat -i 192.168.0.10 -l DEBUG --dry-run autopilot
🚧 Bobcat Autopilot Dry Run Enabled. Actions such as reboot, reset, resync, and fastsync will be skipped. Wait times will only last 1 second.

Discord Monitoring

Send bobcat logs to a Discord channel using a webhook url

$ export BOBCAT_LOG_LEVEL=DEBUG
$ export BOBCAT_IP_ADDRESS=192.168.0.10
$ export BOBCAT_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/xxx/xxx
$ bobcat autopilot
🚀 The Bobcat Autopilot is starting

and watch your logs stream your Discord channel!

Bobcat Autopilot Discord

Log File

Send logs to a file

$ bobcat --ip-address 192.168.0.10 --log-file bobcat-autopilot.log autopilot
🚀 The Bobcat Autopilot is starting

Bobcat Docker Container

Run the bobcat command line tool as a docker container.

$ docker run --rm -it aidanmelen/bobcat -i 192.168.0.10 status
{
    "status": "Synced",
    "gap": "-2",
    "miner_height": "1185959",
    "blockchain_height": "1185957",
    "epoch": "31260"
}

Bobcat Autopilot SDK Usage

import bobcat_miner

bobcat = bobcat_miner.Bobcat("192.168.1.100")
autopilot = bobcat_miner.Autopilot(bobcat)

# Automatically diagnose and repair the Bobcat
autopilot.run()

# diagnostics
autopilot.is_relayed()
autopilot.is_temp_dangerous()
autopilot.is_network_speed_slow()
autopilot.is_syncing()
autopilot.has_errors()

# actions
autopilot.ping()        # Ping the Bobcat until it connects or attempts are maxed out
autopilot.reboot()      # Reboot the Bobcat and wait for connection
autopilot.reset()       # Reset the Bobcat and wait for connection or exceeds max attempts
autopilot.resync()      # Fastsync the Bobcat and wait for connection
autopilot.fastsync()    # Fastsync the Bobcat until the gap is less than 400 or exceeds max attempts
autopilot.is_syncing()  # Poll the Bobcat's gap to see if it is syncing over time

Bobcat SDK Usage

import bobcat_miner

bobcat = bobcat_miner.Bobcat("192.168.1.100")

# refresh
bobcat.refresh_status()
bobcat.refresh_miner()
bobcat.refresh_speed()
bobcat.refresh_temp()
bobcat.refresh_dig()
bobcat.refresh()

# properties
bobcat.status
bobcat.gap
bobcat.miner_height
bobcat.blockchain_height
bobcat.epoch
bobcat.tip
bobcat.ota_version
bobcat.region
bobcat.frequency_plan
bobcat.animal
bobcat.name
bobcat.pubkey
bobcat.state
bobcat.miner_status
bobcat.names
bobcat.image
bobcat.created
bobcat.p2p_status
bobcat.ports_desc
bobcat.ports
bobcat.private_ip
bobcat.public_ip
bobcat.peerbook
bobcat.peerbook_miner
bobcat.peerbook_listen_address
bobcat.peerbook_peers
bobcat.timestamp
bobcat.error
bobcat.temp0
bobcat.temp1
bobcat.temp0_c
bobcat.temp1_c
bobcat.temp0_f
bobcat.temp1_f
bobcat.download_speed
bobcat.upload_speed
bobcat.latency
bobcat.dig_name
bobcat.dig_message
bobcat.dig_dns
bobcat.dig_records

# actions
bobcat.ping()
bobcat.reboot()
bobcat.reset()
bobcat.resync()
bobcat.fastsync()

# diagnostics
bobcat.is_bobcat()

Troubleshooting

Please see No Witness's Troubleshooting Guide for more information.

Donations

Donations are welcome and appreciated! :gift:

HNT: 14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR

HNT: 14HmckNU4WHDDtGH29FMqVENzZAYh5a9XRiLfY2AN6ghfHMvAuR

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bobcat-miner-0.11.1a0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bobcat_miner-0.11.1a0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file bobcat-miner-0.11.1a0.tar.gz.

File metadata

  • Download URL: bobcat-miner-0.11.1a0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/20.5.0

File hashes

Hashes for bobcat-miner-0.11.1a0.tar.gz
Algorithm Hash digest
SHA256 298725f7335b70b5b52406defd314e8fce07abe366591a3f23737f31c1dc1a57
MD5 fb2ec10781416875255d9b8f24d4a5fa
BLAKE2b-256 1c7eebe8c62b1f6f15bb9faaa8d607cbe7930c1d41b008323fae2594d4221230

See more details on using hashes here.

File details

Details for the file bobcat_miner-0.11.1a0-py3-none-any.whl.

File metadata

  • Download URL: bobcat_miner-0.11.1a0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Darwin/20.5.0

File hashes

Hashes for bobcat_miner-0.11.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbdba39f14a465e0b5b554c799a6589eca68659d36dfd689af5bfb9125771ce1
MD5 39f6364ec76b55de9779924d3f3c7e2e
BLAKE2b-256 4370d6d8816499862c4c73cc11b3ca6cea9b2cfda1f78c3aff37e3d68a3842e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page