Ubibot Temp Sensor S9 Heat Regulation
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.
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
pip install fastapi uvicorn jinja2
sudo apt install sshpass busybox
cd app uvicorn main:app --reload --host 0.0.0.0 --port 8000
Then visit: http://localhost:8000
[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.
[paths] log_file = /absolute/path/to/logfile.log working_dir = /absolute/path/to/scripts
[miner] hostname = 192.168.1.100 root_password = your_root_password[temperature] temp_to_power_mapping = { "5": 850, "10": 700, "15": 500, "20": 350 }
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
- ✨ Live-styled dark UI
- 📜 View and scroll through log history
- 🚀 One-click manual script trigger
- 🎨 Bitcoin + Braiins branding ready
- ✅ 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
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.