Skip to content

dibend/Ubibot-S9-ThermoHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubibot-S9-ThermoHash

Ubibot Temp Sensor S9 Heat Regulation
thermostat

⚡ ThermoHash Dashboard — S9/S9i Smart Power Control

UbiBot Industrial Wireless Remote Temperature Humidity Ambient light Sensor 2.4GHZ Wifi 24/7 Alerts Data Logger Free iPhone/Android Apps Monitor Anywhere, Anytime! IFTTT WS1 Temperature Probe Combo https://a.co/d/7hlmSHi


A FastAPI-based control panel and automation toolkit for dynamically adjusting your Antminer S9/S9i's power output based on room temperature from a UbiBot sensor. Turns your miner into a smart heater that keeps your space warm, safe, and energy-efficient — all while earning Bitcoin.


📁 Folder Structure

thermohash/
├── app/
│   ├── main.py               ← FastAPI server backend
│   ├── templates/
│   │   └── index.html        ← UI with live log view
│   ├── img/
│   │   └── logo.svg          ← Logo for Braiins/Bitcoin
│   └── config.ini            ← Log & working dir config
├── scripts/
│   ├── get-room-temp-ubibot.py
│   ├── thermohash.py
│   └── config.ini            ← Miner control + power mapping
├── last_power_target.json    ← Auto-generated cache
└── README.md                 ← This file

⚙️ Setup & Requirements

🐍 Python Modules

pip install fastapi uvicorn jinja2

🧰 System Dependencies

sudo apt install sshpass busybox

🪟 Run the Web App

cd app
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Then visit: http://localhost:8000


🧠 Smart Temperature-to-Power Mapping

[temperature]
temp_to_power_mapping = {
    "5": 850,
    "10": 700,
    "15": 500,
    "20": 350
}

→ Automatically defaults to 350W for any temperature above 20°C.
→ Keeps your miner from overheating or running too cold.

Smart Miner Thinking


🧩 Configuration Files

📄 app/config.ini

[paths]
log_file = /absolute/path/to/logfile.log
working_dir = /absolute/path/to/scripts

📄 scripts/config.ini

[miner]
hostname = 192.168.1.100
root_password = your_root_password

[temperature] temp_to_power_mapping = { "5": 850, "10": 700, "15": 500, "20": 350 }


⏱️ Add to Cron

Automate temperature-based power adjustments every hour:

crontab -e
22 * * * * /usr/bin/python3 /path/to/scripts/get-room-temp-ubibot.py | xargs -r /usr/bin/python3 /path/to/scripts/thermohash.py >> /absolute/path/to/logfile.log 2>&1

✔️ Auto-runs temperature fetch + power tuning
✔️ Logs results for web dashboard viewing


🖥️ Dashboard Features

  • ✨ Live-styled dark UI
  • 📜 View and scroll through log history
  • 🚀 One-click manual script trigger
  • 🎨 Bitcoin + Braiins branding ready

Click Run Script


🛡️ Safety & Security

  • ✅ Never drops below 350W — safe for hashboards & PSU
  • ✅ Avoids SSH if power hasn't changed
  • ⚠️ You may wish to secure the web UI with a proxy, token, or VPN

🧑‍💻 Author Notes

This was built to automate hash tuning on a Braiins OS+ powered Antminer S9 for both home heating and mining optimization.

Pull requests welcome. Suggestions? Open an issue or fork and hash on.

Mining Forever

About

Ubibot Temp Sensor S9 Heat Regulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published