Discord Channel | Discord Mobile Notifications |
---|---|
Listed as a Helium Community Tool https://explorer.helium.com/tools
Bobcat 300 Miner owners can add their local address and receive miner reports via the Bobcat Diagnoser including status, temperature and OTA firmware versions.
- Uses Helium Blockchain API
- Python + Crontab
- Short, Concise Messages that mostly fit within a mobile notification
- Campy, Fun, and Full of Emojis
- Activities are displayed with Contextual Information for insights into performance, optimization and maintenance.
- Updated values are presented in bold
- Wellness Check: HDS will send a Status Message after 12 hours of no activities from the Helium API.
- Receive Miner Reports with more detailed stats directly from your miner locally via new Dashboard
- Miner Reports are sent every 72 hours, or by adding report as an argument
- Wellness Checks will also include a Miner Report
Welcome Message:
🤙 THANKFUL COTTON CROCODILE [ 📡 TCC ]
Status Bar:
📡 TCC 🔥ONLINE 🥑*NSYNC 🍕1.00 🥓23.534
- 📡 Hotspot Initials
- 🔥 Online Status
- 🥑 API Sync Status or Block Gap. Are you *NSYNC?
- 🍕 Transmit/Reward Scale
- 🥓 Wallet Balance (of Hotspot Owner)
Proof of Coverage
- 🎲 Created Challenge...
16:57 23/AUG
- 🏁 ...Challenged Beaconer, 7 Witnesses
04:22 23/AUG
- 🌋 Sent Beacon, 21 Witnesses, 18 Valid
13:29 23/AUG
- 🛸 Valid Witness, 1 of 4, All Valid
12:04 23/AUG
Invalid Witness
- 💩 Invalid Witness, Too Close
12:12 23/AUG
- 💩 Invalid Witness, RSSI BLB
10:55 25/AUG
Data Packet Transfer
- 🚛 Transferred 4 Packets (8 DC)
04:39 24/AUG
Other Activities
- 🚀 ASSERT_LOCATION_V2
14:39 04/JUL
HNT Amounts
- 🥓1.743
- 🥓
0.0007548
Mining Rewards in 🥓HNT
- 🍪 Reward 🥓0.013, Witness
04:31 23/AUG
- 🍪 Reward 🥓0.008, Challenger
04:31 23/AUG
- 🍪 Reward 🥓
0.0000032
, Data04:48 24/AUG
- 🍪 Reward 🥓0.590, Beacon
01:42 24/AUG
Wellness Check plus Status Message
🚧 No API Activities in the Last 12hrs
📡 TCC 🔥ONLINE 🥑*NSYNC 🍕1.00 🥓23.534
⏰ Scheduled Miner Report, every 72hrs
🔩 MINERity Report 12:27 11/SEP
Sync: Synced Height: 📦 1,006,679 Gap: (2)
Status: Running Temp: Normal Epoch: 26,000
Firmware: Helium 2021.09.03.0 | Bobcat 1.0.2.23S
Inbound (44158): ✅ Open
- Also sent with Wellness Check
- Status: Online and Running
- Temperature: Normal or XX°C
- Sync Status, Block Height and Gap Directly from Miner
- OTA Firmware Versions: Helium and Bobcat
- Inbound Traffic Port Status (44158)
- Python v3.7+
- How to Use Crontab, or other scheduler
- Windows - Scheduled Tasks and Cron Jobs
- Install Discord Webhook for Python via pip3
- Have a Discord Account
- Make a Discord Channel and Webhook
Option A: Download from Github
- Download Latest https://github.com/co8/hds/archive/refs/heads/latest.zip
- rename/copy new-config.json to config.json
- rename/copy new-activity_history.json to activity_history.json
- edit config.json
Option B: Clone from Github
git clone https://github.com/co8/hds
cd ~/hds
cp new-config.json config.json
cp new-activity_history.json activity_history.json
nano config.json
Install Discord Webhook for Python via pip3
cd /path/to/hds/
(optional, activate your virtualenv)
pip install -r requirements.txt
or
pip3 install discord-webhook
Option C: Docker Container - Dockerfile
(instructions to come)
Add your Hotspot and Discord Bot Webhook
required
{
"hotspot": "HOTSPOT_ADDRESS_HERE",
"discord_webhook": "DISCORD_WEBHOOK_HERE"
}
example
{
"hotspot": "112MWdscG3DjHTxdCrtuLk...",
"discord_webhook": "https://discord.com/api/webhooks/87869..."
}
optional, config values that can be customized
{
"bobcat_local_endpoint": "http://192.168.1.120/"
}
optional, change default values
{
"wellness_check_hours": 12,
"report_interval_hours": 72
}
FYI: Bobcat Miner Reports slow down the miner. Do not abuse
- Edit Cron:
crontab -e
- Copy to bottom of crontab file
- Required:
- run script every minute. log to file
*/1 * * * * cd ~/hds; python3 hds.py >> cron.log 2>&1
Optional, Clear cron.log weekly on Sunday
20 4 * * 0 cd ~/hds; rm cron.log; echo "cron.log cleared (weekly)" >> cron.log 2>&1
-
After paste use CONTROL-X to close and then press Y to confirm changes and save
- Crontab will Reload Automatically
cd ~/hds
python3 hds.py
python3 hds.py reset
- resets by removing non-essential config values and clearing activity history
python3 hds.py report
- sends a bobcat miner report, if bobcat_local_endpoint is set in config.json
A) Docker - Run multiple containers
B) Duplicate the HDS folder for each hotspot and duplicate the crontabs for each instance
directories
hds/
hds-b/
hds-c/
crontab file
/1 * * * * cd ~/hds; ...
20 4 * * 0 cd ~/hds; ...
/1 * * * * cd ~/hds-b; ...
20 4 * * 0 cd ~/hds-b; ...
/1 * * * * cd ~/hds-c; ...
20 4 * * 0 cd ~/hds-c; ...
cron.log is generated at hds/cron.log
.
(period) No new activities
:
(colon) Repeat activities, no new
10:17 08/22/21 a:5 r:3 m:2 discord:OK sec:2.88
10:17 08/28/21
24hr time and datea:
activities countr:
repeat activities countm:
message line count sentdiscord:
Discord Response Reasonsec:
Execution speed, in seconds
Fork this project and submit pull requests
If you find this project useful please consider supporting it
HNT: 14hriz8pmxm51FGmk1nuijHz6ng9z9McfJZgsg4yxzF2H7No3mH
I'm seeking grants and bounties for new projects and to improve and expand this project. e@co8.com
For convenience, I run this script on a Raspberry Pi Zero W
Raspberry Pi Zero W Kit (Amazon US)
Check out my other Helium Projects...
Easily Access Helium Blockchain API Data with just your Hotspot Address
https://github.com/co8/happy
for Rak, Oukeione and Outdoor Fiberglass Dipole Antennas Outdoor or Attic
https://www.thingiverse.com/thing:4942377