I have a Antminer Bitcoin miner that I am controlling from Home Assistant where I start, stop and adjust the power by automations depending on electricity hour price, solar power production and heating need. I am using the GitHub - Schnitzel/hass-miner: Controll your Bitcoin miner from Home Assistant integration which has been working great so far.
I was wondering if anyone else in the HA community is doing the same and what experiences you have from this?
One thing that I have not been successful to find information on google is how changing power and turning off/on is effecting mining rewards. As every change will cause delays to get mining up to speed again, I try to limit my changes to a few a day, not more. But I do not have exact numbers on this. It would be fun to know if it makes sense to adjust speed more frequently to adapt better to solar production and heating need
@BJ-Axel , I have set my miner to have minimum consumption of 1800W which I use for economy, more efficient mode. Max power I set to 3000W when I have excess solar power or grid electricity is very cheap or even negative price which occur quite often where I live lately. The automation turns off the miner when the grip electricity price is higher and the automation is setup to use most possible from my solar panel production.
Last year my solar panels exported power to the grid when the price was negative several times, it was then I figured out that a bitcoin miner us useful to consume at least part of the solar production during those periods.
My miner have 3 hash boards. I see there are discussions regarding to make it possible to turn off individual hash boards from HA. Then one can get seamless power consumption to very low values which could be useful to adapt to solar production and needed heating.
I’m running an off-grid system. 15 kW solar, Victron and Fronius inverters and I’m struggling to keep up with the generation which means that I’m spilling a lot of solar.
I’ve just started to research crypto mining as a way to utilise the max capacity of the system instead of spilling it… In this case power is free but supply varies.
What kind of rig are you running and would you mind sharing your learnings around profitability and ROI?
I am running Braiins OS on my S19 and my brother has a S19 Pro+ hydro. If running Braiins OS, then can regulate power limit and with the HA integration, can regulate from there as well. I am regulating based on electricity price and solar panel production. I have defined three miner running conditions:
Off: When expensive electricity prices
On_low: When more affordable prices but not cheap, thus running on lower power when the miner is more efficient.
On_high: When cheap electricity prices and solar excess power, then full power possible.
I added a Nicehash integration so I can monitor how much the miner is earning. Then I filter the value as it is fluctuating and made a template sensor to see the earnings in EUR/h as I then can compare to how much EUR/h the miner is consuming.
I did not do much ROI calculations. But I know that I need the heat from the miner for many months and I have many hours through the summer with “free” electricity. So roughly estimated, ROI 1-2years if I make a guess. I do not like to pay to export excess solar power(which is happening quite frequently lately), therefore converting it to BTC appeals to me
Not sure if this will be useful to anyone but I connected my Braiins OS S19j pro to home assistant using the hass-miner integration; created an input number helper to set the minimum power to 966w, and the maximum to 3000w; created an automation to set the hass-miner power slider with the input number helper; installed the “versatile thermostat” integration and setup a “valve” vtherm and gave it the input number helper to control. Now the vtherm can vary the power of the miner until it gets a steady-state set temperature in the house. Its been working well for a month now.
Hey, thank you so much for sharing this. I regularly have excess solar at home. And I’m Keen to use home assistant to enable disable mining or vary the power input based on excess solar which I already have set up and accessed in home assistant. Is this something that is possible that seems like it would be?
Thank you for the feedback. I was wondering how your thermostat is controlling the antminer, does it change the power setting frequently? I am asking as the antminer takes quite much time, up to several minutes to get going again with the new speed.
Yes, it’s absolutely possible to operate the miner using excess solar power. I’m doing it at home, and my brother is running a similar setup in his workshop. We’ve set up Home Assistant to monitor miner profitability in EUR/kWh by creating template sensors based on data from the Nicehash integration and the miner’s power consumption.
To optimize when the miner runs, we’ve built another template sensor that evaluates the next 24 hours based on electricity prices from the Nordpool integration and the solar power forecast. This sensor calculates the total cost per kWh, factoring in both imported electricity and available solar power. We also consider Nordpool export prices, if selling excess solar power is more profitable than mining, the system will prioritize exporting rather than running the miner.
Whenever the miner is profitable based on the cost per kWh for each hour, it automatically turns on.
In winter, we use the miner for heating also. We’ve created a sensor that estimates the required runtime per day to maintain the desired indoor temperature. It then selects the cheapest hours each day for operation. In my brother’s workshop, the system automatically chooses between running the miner or the heat pump based on which is more cost-effective. If electricity prices are high, the heat pump is favored, as it has a higher COP. If electricity prices are lower, and mining is profitable, the miner is prioritized for both heating and mining. This is done by having template sensors that are calculating EUR/kWh for both miner and heat pump and automations to run the more cheap one for heating.
We rely on a solar forecast sensor rather than real-time solar production. The forecast is stable enough for planning and prevents unnecessary fluctuations that could cause the miner to turn on and off frequently due to passing clouds.
Congratulations ugglas!!
I’d like to know some more details about your Home Assistant modules. We will start the implementation shortly and I would like to know the difficulties you have encountered or perhaps suggestions if you want to share they would be very interesting for us.
Our system is made up of proxmox as a virtualization base inside we have HA plus other machines and an S19 miner for now
I’m so sorry for not responding earlier. I really appreciate it this reply. I ended up getting 11 Avalon nano 3s. Doing solo mining. But I think I would rather use more terror hashes during the day when I’ve got excess solar and lower it at night when I don’t have any solo battery power left. As it’s using about 40 KW per day, the 11 nano 3s.
Hello,
I just would need to know if it’s possible to manage power of an Antminer (S21) with the GitHub - Schnitzel/hass-miner integration without installing anything on the miner (to avoid loosing the warranty)?