Most home electronics sit idle for the majority of the day, waiting to be used. The home miner project puts these idle computers to work to make money for their owners by mining bitcoin only when it is profitable to do so, and is controllable through Amazon Alexa.
Requirements:- PC running Windows 10
- Amazon Alexa or Alexa-capable device
Step 1: Download Required Files- Go to https://bitbucket.org/mkukar/home_miner and clone or download all the files in the repo. This contains the schematics, python code, and arduino code.
- Download NiceHash miner and get set up following the instructions here.
- Make sure you have Python3 and the Arduino Create cloud client installed on your computer
Note - household power lines are dangerous. Do not attempt to assemble this on your own without taking proper precautions.
The circuit for the Arduino MKR1000 is very simple, and can be made by following the above schematic.
- Ensure that the ACS712 is placed in between the wiring of the two outlet ends, ideally across the HOT (white or silver) wire.
- Attach the sense line to the Arduino A1 port and provide 5V and GND to the ACS712
- Place the project in a secure enclosure and plug in to a power strip. This is important as the power strip will provide one additional level of security in case you wired the project incorrectly or it shorts out.
To upload the software to the Arduino MKR1000, connect the Arduino to your computer over USB.
Follow these instructions to set up your Arduino create cloud and upload the sketch in the folder "MKR1000_home_miner_udp".
Update the "arduino_secrets.h" file with your wifi network and password (Note - Will only work with 2.4GHz networks, not 5GHz).
Upload the sketch to your Arduino. You now can unplug your arduino and plug it into a wall outlet or other USB not directly connected to your computer.
Step 4: Main Python ScriptThe main python script is in the repository and is called "main.py". You can call this script by double-clicking it or right-click and select "open with -> python.exe". It will open a small monitor window.
Click on the "Settings" button and enter the following:
- The minimum profitability. If 0, the miner will only mine if it will make above $0 an hour, preventing it from ever mining if it is unprofitable.
- The power cost in your area in kWh. Check your electricity bill, or use the national average of $0.12.
- The BTC Address. This is found on the NiceHash miner dashboard circled in red below:
- The API ID and Key are found in the NiceHash dashboard under Settings -> API. You may have to generate your API keys the first time. Home Miner only requires a read-only key, but either API key is accepted.
Now click the "Save" button and close the window. The miner should automatically connect to the Arduino and start working. To force it to stop, press the "STOP" button and mining will not occur until the "RESUME" button is pressed.
Step 5: Install Alexa SkillTo control the miner anywhere with just your voice using Amazon Alexa, install the Alexa Skill entitled "Home Miner".
Open your Alexa app, select "Skills" and search for "Home Miner". Click the install button and enter your credentials. Your app should now automatically discover a "Home miner" device and will be ready to use.
Step 6: Try it!Now you can say "Alexa, turn off home miner" to pause mining operations at any time, and "Alexa, turn on home miner" to resume. You can also use the GUI button to have the same effect.
Happy mining!
Comments