A python SDK for interacting with the bobcat miner.
Project description
bobcat-miner
A python SDK for interacting with the bobcat miner.
Install
pip install bobcat-miner
Autopilot Usage
Run autopilot against a healthy bobcat
$ BOBCAT_IP_ADDRESS="x.x.x.x" bobcat-autopilot
2022-01-03 20:26:30,433 INFO starting bobcat autopilot...
2022-01-03 20:26:33,494 INFO refreshing status data...
2022-01-03 20:26:34,999 INFO refreshing miner data...
2022-01-03 20:26:45,749 INFO bobcat is healthy
Run autopilot against an unhealthy bobcat
$ BOBCAT_IP_ADDRESS="x.x.x.x" bobcat-autopilot
2022-01-03 20:26:30,433 INFO starting bobcat autopilot...
2022-01-03 20:26:33,494 INFO refreshing status data...
2022-01-03 20:26:34,999 INFO refreshing miner data...
2022-01-03 20:26:45,749 INFO bobcat is unhealthy
2022-01-03 20:26:47,472 INFO bobcat rebooting...
2022-01-03 20:31:33,594 INFO refreshing status data...
2022-01-03 20:31:53,989 INFO refreshing miner data...
2022-01-03 20:39:23,989 INFO bobcat is still unhealthy after reboot
2022-01-03 20:40:34,712 INFO bobcat resetting...
2022-01-03 21:10:32,182 INFO waiting for 30 minutes...
2022-01-03 21:12:54,941 INFO refreshing status data...
2022-01-03 21:13:47,912 INFO bobcat fastsync...
2022-01-03 21:14:23,673 INFO waiting for 30 minutes...
2022-01-03 21:45:12,492 INFO bobcat is healthy
Bobcat Usage
import bobcat_miner
bobcat = bobcat_miner.Bobcat(ip_address="x.x.x.x")
# data refresh
bobcat.refresh_status()
print(bobcat.status)
# {"status": "Synced", "gap": "0", "miner_height": "1148539", "blockchain_height": "1148539", "epoch": "30157"}
bobcat.refresh_miner()
print(bobcat.miner)
# {"ota_version": "1.0.2.66", "region": "region_us915", "frequency_plan": "us915", "animal": "my-mocked-miner", ... }
bobcat.refresh_speed()
print(bobcat.speed)
# {"DownloadSpeed": "94 Mbit/s", "UploadSpeed": "57 Mbit/s", "Latency": "7.669083ms"}
bobcat.refresh_dig()
print(bobcat.dig)
# {"name": "seed.helium.io.", "DNS": "Local DNS", "records": [{"A": "54.232.171.76", ... ]}
# actions
bobcat.reboot()
bobcat.resync()
bobcat.fastsync()
bobcat.reset()
# diagnostics
bobcat.is_healthy()
bobcat.is_running()
bobcat.is_synced()
bobcat.is_temp_safe()
bobcat.has_errors()
bobcat.is_relayed()
bobcat.should_reboot())
bobcat.should_resync()
bobcat.should_fastsync()
bobcat.should_reset()
# autopilot
bobcat.autopilot()
:warning: bobcat.refresh_speed()
takes about 30 seconds to complete and you should not call it repeatedly. Doing so will slow down your internet speed, which in turn will slow down your miner.
Troubleshooting
Please see No Witness's Troubleshooting Guide for more information troubleshooting your bobcat miner.
Donations
Donations are welcome and appreciated!
Project details
Release history Release notifications | RSS feed
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.3.2.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for bobcat_miner-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87fb907107ee925bee728291e1091bee88230f2269f7389f3595bdcedcc50a2e |
|
MD5 | 21646d1b52fb062d8269d82d950536b8 |
|
BLAKE2b-256 | 3cf200e534afd540e7290e9f32c560e920c2aa63666d0dcb16942a7f3b666c5b |