Use

Mine on spare energy

In winter, the electricity a card uses while mining heats your home. In summer you need no heat, so mine when energy is spare:

  • the sun gives more than your home uses;
  • your electricity is cheaper at certain hours.

The rest of the time the card rests. Nothing is wasted.

The network does not mind. When fewer cards mine, the difficulty adjusts by itself, and blocks keep coming about once a minute.

Mining is not a way to make money. These pages promise no profit, only that a watt you use is not thrown away.

There are three ways, from simplest to smartest:

Way You need Good for
Set hours nothing extra cheap night tariff, sunny midday
Solar surplus Home Assistant and a power meter that it can read solar panels
Low price Home Assistant and an hourly electricity price a contract with an hourly price

Before you start

  • Save your settings once. Run the start script once by hand so that it saves your address and pool (see Mining). After that it starts without questions, also when nobody is at the computer.
  • Mine in long runs. Each start prepares the 2.5 GB mining data (the DAG) again. On a recent card this takes about 10 seconds, on an old card longer. Starting and stopping every few minutes wastes that time. Runs of at least half an hour work well.
  • No ports are opened. Every way here only starts and stops the miner on your own computer.

Set hours

The simplest way uses the scheduler built into your system. No extra software is needed.

The examples use 11:00–16:00. Change the times to your own cheap or sunny hours.

Windows

The examples assume the miner is in C:\Nember\miner. Change the path if yours is elsewhere.

  1. Make a stop script. Create a file stop-mining.bat in the miner folder with this content:

bat @echo off rem Stops Nember mining that the "Nember mining" task started. taskkill /IM kawpowminer.exe /F >nul 2>&1 schtasks /End /TN "Nember mining" >nul 2>&1

Both lines are needed: - the first one stops the miner; - the second one ends the start script, which would otherwise wait for a key press forever and block the next day's start.

  1. Create the two tasks. Open Command Prompt and run:

bat schtasks /Create /TN "Nember mining" /TR "C:\Nember\miner\start-mining.bat" /SC DAILY /ST 11:00 schtasks /Create /TN "Nember mining stop" /TR "C:\Nember\miner\stop-mining.bat" /SC DAILY /ST 16:00

  1. Try it now without waiting for the time:

bat schtasks /Run /TN "Nember mining" schtasks /Run /TN "Nember mining stop"

The miner window opens with the first command and closes with the second.

To change the times later, use the Task Scheduler app. To remove both tasks:

bat
schtasks /Delete /TN "Nember mining" /F
schtasks /Delete /TN "Nember mining stop" /F

The tasks run only while you are signed in to Windows, and the miner window is visible.

Linux

The examples assume the miner is in ~/nember-miner. Open your schedule with crontab -e and add two lines:

terminal
0 11 * * * cd ~/nember-miner && nohup ./start-mining.sh >/dev/null 2>&1 &
0 16 * * * pkill -x kawpowminer

The start script hands over to the miner, so stopping the miner stops everything.

Solar surplus

If you have solar panels, the miner can start when your home sends power to the grid and stop when it no longer does. Home Assistant is free home-automation software that does this for many households. It already runs heaters, heat pumps and car chargers on solar surplus.

You need:

  • A sensor for the power going to the grid. It can come from your inverter, a smart meter reader or an energy monitor that Home Assistant supports. Many installations call it export power or grid feed-in.
  • A way for Home Assistant to start and stop the miner:
  • Windows: install HASS.Agent, a free companion app for Windows. Add two commands of the type Custom:

    • one that runs schtasks /Run /TN "Nember mining";
    • one that runs C:\Nember\miner\stop-mining.bat.

    Create the "Nember mining" task once as in Set hours; it does not need a daily time. Each command then shows up in Home Assistant as a button. - Linux: a shell command that connects to the mining computer with an SSH key and runs the start or stop line from Set hours.

The automation

The example below is for a card that draws about 130 W. Change the names after entity_id: to your own sensor and buttons.

yaml
alias: Nember mining on solar surplus
mode: single
triggers:
  # Start: more than the card's power has gone to the grid for 5 minutes
  - trigger: numeric_state
    entity_id: sensor.grid_export_power
    above: 250
    for: "00:05:00"
    id: start
  # Stop: almost nothing has gone to the grid for 10 minutes
  - trigger: numeric_state
    entity_id: sensor.grid_export_power
    below: 20
    for: "00:10:00"
    id: stop
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: start
        sequence:
          - action: button.press
            target:
              entity_id: button.my_pc_nember_start
      - conditions:
          - condition: trigger
            id: stop
        sequence:
          - action: button.press
            target:
              entity_id: button.my_pc_nember_stop

How it works:

  • Two different limits with a gap between them: start above 250 W, stop below 20 W.
  • When the miner starts, it uses part of the surplus itself, so the export power drops.
  • The gap keeps the miner running instead of switching straight off again.
  • Set the start limit to your card's power plus about 100 W.
  • The waiting times (5 and 10 minutes) stop a passing cloud from switching the miner off and on again.
  • With a home battery, power usually goes to the grid only after the battery is full. Mining then starts later in the day, which is usually what you want.

Low price

Some electricity contracts change price every hour or every 15 minutes. For many regions there is a Home Assistant integration that shows the current price: see the energy price integrations.

Use the same automation as for solar surplus, with two changes:

  • use the price sensor in place of the export power sensor;
  • swap the limits: start when the price is below your limit, stop when it is above a slightly higher one.

Remember that the price on your bill also includes network fees and taxes. A low market price does not always mean cheap power for you.

Tips

  • Lower the power limit of the card a little (for example to 70–80%). Speed drops less than power does, so each watt goes further.
  • Check that it runs the first few days:
  • look at the miner window, or the pool page if you use one;
  • make sure the miner stops when it should.
  • On a shared computer, tell the others that it starts by itself.

For more ways to use the warm air and to make a card use fewer watts, see Put the heat to use.