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.0.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for bobcat_miner-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5b021440a44f514cd4abd89cc14019e1d7caac2b7d2303a9342295f5c356d01 |
|
MD5 | 02858eb279f61f208f735e16c454ebce |
|
BLAKE2b-256 | 8257e5a4f349c09383e1023f1f79d00305afa018511a68d38f4705439e5d670c |