A comprehensive Home Assistant custom component for solar-powered Bitcoin mining operations using Antminer devices with LuxOS firmware.
- Manual Power Input: Set available solar power (0-50000W)
- Solar Curve Simulation: Automatic power adjustment following sun patterns throughout the day
- Solar Efficiency Monitoring: Real-time visual feedback on solar power utilization
- Peak Solar Mode: Optimize mining during maximum sun availability
- Pause/Resume: Instantly disable/enable all hashboards
- Solar Max Mode: Set 4200W for maximum solar power utilization
- Eco Mode: Set 1500W for energy-efficient mining
- Emergency Stop: Immediate shutdown of all mining operations
- Max Power (+2): Overclock profile for peak performance
- Balanced (0): Default profile for optimal efficiency
- Ultra Eco (-2): Underclock profile for minimal power consumption
- Manual Range: -16 to +4 frequency adjustment
- Individual Board Toggle: Control boards 0, 1, and 2 independently
- Real-time Status: Monitor temperature, frequency, voltage per board
- Smart Automation: Automatic board management based on solar power
- Auto-refresh: Updates every 30-60 seconds (configurable)
- Performance Metrics: Hashrate (5s, 1m, 15m), power consumption, efficiency
- Temperature Monitoring: Per-board and overall temperature tracking
- Fan Control: Monitor and override fan speeds
- Night Mode (30%): Quiet operation at 30% power
- Night Mode (15%): Ultra-quiet operation at 15% power
- Standby Mode: Complete shutdown for silent nights
- 10-minute Intervals: Automatic solar power adjustments
- Auto Standby: Automatic shutdown when solar power drops below threshold
- Auto Restart: Automatic restart when solar power exceeds set point
- Temperature Protection: Auto-underclock at 75Β°C (configurable per miner)
- Antminer S19j Pro
- Antminer S19j Pro+
- Antminer S21+
- LuxOS Firmware (required)
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the "+" button
- Search for "SolMiner"
- Click "Install"
- Restart Home Assistant
- Copy the
custom_components/solminerfolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Configuration > Integrations
- Click "Add Integration" and search for "SolMiner"
- Go to Configuration > Integrations
- Click Add Integration
- Search for SolMiner
- Enter your miner details:
- Host: IP address of your miner (e.g., 192.168.1.210)
- Username: Usually "root" (default)
- Password: Usually "root" (default)
- Click Submit
- Hashrate metrics (5s, 1m, 15m averages)
- Power consumption and efficiency
- Temperature sensors (average, maximum, per-board)
- Fan speeds
- Solar power utilization
- Chip frequency and voltage
- Miner status and uptime
- Mining enabled/disabled
- Individual hashboard control (Board 0, 1, 2)
- Solar curve mode toggle
- Auto power management
- Temperature protection
- Solar power input (manual)
- Maximum solar power (for curve simulation)
- Power limit settings
- Performance scaling (50-130%)
- Temperature threshold
- Fan speed override
- Chip frequency adjustment
- Power profiles (Max Power, Balanced, Ultra Eco, Manual)
- Quick power modes (Solar Max, Eco Mode, Night modes, Standby)
- Frequency profiles (-16 to +4)
- Operating modes (Normal, Solar Optimized, Night Quiet, etc.)
- Active mining pool selection
Immediately stops all mining operations and sets minimum power.
Reboots the selected miner device.
Configures the miner for optimal solar power utilization.
max_power: Maximum power to use when solar is available (W)
Configures the miner for quiet night operation.
power_percentage: Percentage of normal power (0-50%)
Applies a specific power profile.
profile: Profile to apply (-16 to +4)
Controls individual hashboards.
board_id: Board to control (0, 1, or 2)enabled: Enable or disable the board
The integration includes a 24-hour solar curve simulation that automatically adjusts mining power based on typical solar generation patterns:
- Night (00:00-05:00, 18:00-23:00): 0-5% power
- Morning (06:00-11:00): 5-85% power (gradual increase)
- Peak (12:00-13:00): 95-100% power
- Afternoon (14:00-17:00): 85-30% power (gradual decrease)
automation:
- alias: "Solar Mining Control"
trigger:
- platform: numeric_state
entity_id: number.solminer_solar_power_input
above: 2000
action:
- service: solminer.set_solar_mode
data:
max_power: 4200automation:
- alias: "Miner Temperature Protection"
trigger:
- platform: numeric_state
entity_id: sensor.solminer_temp_max
above: 80
action:
- service: solminer.apply_power_profile
data:
profile: "-4"automation:
- alias: "Night Mode Enable"
trigger:
- platform: time
at: "22:00:00"
action:
- service: solminer.set_night_mode
data:
power_percentage: 15- Verify the miner IP address is correct
- Ensure the miner is accessible on your network
- Check that LuxOS firmware is installed and running
- Try default credentials (root/root) if authentication fails
- Ensure the miner is not overloaded with requests
- Check Home Assistant logs for detailed error messages
- Verify the miner firmware supports the required API commands
- Adjust the update interval in integration options
- Reduce the number of enabled sensors if needed
- Check network latency to the miner
cd SolMiner
pytest __tests__/ -vcustom_components/solminer/
βββ __init__.py # Integration setup and services
βββ config_flow.py # Configuration flow
βββ const.py # Constants and defaults
βββ coordinator.py # Data coordinator
βββ luxos_api.py # LuxOS API client
βββ manifest.json # Integration manifest
βββ sensor.py # Sensor platform
βββ switch.py # Switch platform
βββ number.py # Number platform
βββ select.py # Select platform
βββ services.yaml # Service definitions
βββ translations/ # Localization files
Contributions are welcome! Please read the contributing guidelines and submit pull requests to the main repository.
This project is licensed under the MIT License - see the LICENSE file for details.
- π Report Issues
- π¬ Discussions
- π Documentation