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
for Rak, Oukeione and Outdoor Fiberglass Dipole Antennas Outdoor or Attic
https://www.thingiverse.com/thing:4942377