This is the final part of mining monitoring series. This Part 4 will auto restart your mining rig if it freezes.Free online service will be used which will ping your mining rig continously, in case of rig freeze when the service can’t ping your rig ,then smart plug will reset the power and will make the rig to boot up.
In previous parts I have created Powershell script which can restart miner,rig, provide notification and connect to different network if no Internet found. All these can happen if mining rig is not hanged up, if somehow rig is frozen/deadlocked then no program can work not even my Powershell script. So in this article you will know how to restart mining rig automatically if it is hanged up.
Check Previous Parts of this Mining Monitoring Series
- 0.1 Auto restart miner after crash : Part 1
- 0.2 Email Notification if Minning Stopped : Part 2
- 0.3 If No Internet then connect to Different Network : Part 3
- 1 Getting a Static IP
- 2 Auto Restart Mining Rig if Freezes
Getting a Static IP
You need to have static IP address,don’t worry if you don’t have one.If you are already having a static IP address then skip this part but if your ISP provides you a dynamic address then follow the steps below to get free static IP address.
How to Get Free Static IP Address from Dynamic Address?
1. Go to www.noip.com
2. Complete registration.
3. At noip go to Dynamic DNS >> Hostname >> Create Hostname.
4. Enter any hostname, check image below for reference.
5. Download their dynamic update client and configure it.
6. Open your router settings and go to DDNS and do the following as shown in image below.
On your router setting page you have to find DDNS setting, UI of each router will be different.
7. That’s all, you get DDNS which will act as a static IP address, for me it is jkcrypto.ddns.com.
Auto Restart Mining Rig if Freezes
1. Considering you have a static IP address, now you have to register on monitoring service.
3.Use any of the above service, for this tutorial I am using Uptimerobot.
4. Register on uptimerobot and click on “Add New Monitor ”
5. Choose Monitor type Ping and in IP (or Host) enter your static IP address or DDNS address.
6. Now you need to enable ICMP ping request. So that uptime robot can ping your rig remotely to check its status.
7. To Enable ICMP : Open command prompt in administrator mode
8. Copy and paste the following command and hit Enter.
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
9. That is it. If your rig is powered off or hanged up then it can’t be pinged by remote service. You will get rig down notification via email.
Creating Label in Gmail :
1. Open gmail and go to gear icon on top right >> Settings.
2. Now go to Filters and Blocked Addresses >> Create a new filter .
3. Considering this tutorial for uptimerobot and if you are using spiceworks network monitor then make changes accordingly.
- In From field enter ” [email protected] “
- In Subject field enter ” Monitor is DOWN”
4. Click on Create filter with this search >> Apply the label >> New label >> name it minerdown
Configuring Smart Plug
1. Buy Wemo Insights Smart Plug
2. Connect Wemo with PSU and download wemo app and configure it.
3. In Wemo app connect to IFTTT and follow the steps
4. Visit IFTTT and register
5. Create new applet >> search for gmail >> ” New email in box labeled”
6. Enter the label name which you created previously, e.g minerdown.
7. Create trigger >> Wemo >> Wemo Insight Switch >> Turn On then Off.
Hope you like this article about how to automatically restart mining rig after crash.If facing problems in setup feel free to ask via comments below, always ready to help.