Post
Topic
Board Mining (Altcoins)
How to get sms and email alerts with Claymore's Miners
by
plggy
on 04/10/2016, 19:08:31 UTC
I was looking for a way to get notifications about problem rigs while away from home.  In my experience, many pool's email notifications don't always work properly, can have a long delay, and are not necessarily relevant if your miners have just switched pools because of a problem with the pool or connection.
Luckily, because Claymore is awesome, his remote manager, ethman.exe, will execute a bat file if there is a problem with any of your rigs.  With a couple of small programs, you can use this bat file to send you an email, sms, or both.  I believe these added programs to be safe (kaspersky didn't find any viruses), but use at your own risk.

What you will need:

1. blat: http://www.blat.net/
    Blat is a Windows (32 & 64 bit) command line utility that sends eMail using SMTP or post to usenet using NNTP.

2. An email address that uses SMTP.  I believe you can use blat with other types, but SMTP is the easiest and what I use.  You can probably get one from your ISP.  It is probably best to also use a dedicated email address.

3. wget for windows (optional if you want to get detailed rig statistics): https://eternallybored.org/misc/wget/
    A command-line utility for retrieving files using HTTP, HTTPS and FTP protocols.
    *you only need to download wget64.exe

4. Your cell phone providers email to SMS gateway. (optional if you want to receive notifications as sms text messages).  I found mine here: http://mfitzp.io/list-of-email-to-sms-gateways/

SETUP:

1. Download blat.exe and wget64.exe and put both in the "Remote manager" folder.
2. Open a command prompt in the "Remote manager" folder and run
Code:
Blat -install

**You must replace with your email providers smtp server and with the email address you will be using to send the notifications.  Please see http://www.blat.net/syntax/syntax.html if you are using NNTP or POP3 or your email server requires authentication.

3. Edit sample.bat to read (you must change the email address):
Code:
@ECHO OFF

ECHO This is sample batch file that can do something useful if rig has problems
ECHO Rig name: %1

::Download current status of rigs
wget64 http://localhost:8000

::Create a file name so we can rename our file from above to the current time.
set h=%TIME:~0,2%
set m=%TIME:~3,2%
set s=%TIME:~6,2%
set timenice=%h%_%m%_%s%

ECHO %timenice%

::Send ourselves an sms text message
blat -s "%1 is DOWN %TIME%" -body "This rig has problems!" -to phone#@example-sms-gateway.net

::Email ourselves the detailed rig status
blat index.html -s "%1 is DOWN %TIME%" -to example@example.com

::Rename the file we download as the current time for future reference.  If you would prefer to just delete this file, change "ren" to "del".
ren index.html %timenice%.html

4. Save
5. Execute sample.bat and make sure everything is working.  You should receive a text and an email.


If you have left your ethman.exe settings as the defaults, this should be all that you need to do.

Now, if there is a problem with a rig, ethman will launch the example.bat.  This will download the detailed statistics provided by ethman, send you a text that tells you there is a problem, then sends an email with the details.  You can always skip the sms or the email if you prefer.  I use both because my emails don't update very often when I am off of wifi and I tend to ignore the "you've got mail" notification.  SMS alone can't provide the detailed information.  Use them both, one or the other, or none at all!  You can also customize the messages after -s and -body.

I am glad I can give a little something back and I hope this helps to alleviates some of the anxiety you may feel when you are away from your rigs. 

Feel free to tip!
  ETH - 0x3aF001CAC4F494CdA54919C8f2fd95c7DaaD75fF
  XMR - Address:47sghzufGhJJDQEbScMCwVBimTuq6L5JiRixD8VeGbpjCTA12noXmi4ZyBZLc99e66NtnKff34fHsGR oyZk3ES1s1V4QVcB Payment ID: 85f393c9b0769708fc57253d3fa5619d2b5ef1a56ddfd206bcbf0c5d6d421026
  BTC - 1EMpEZoCHm88bMiE4zXAkq7hueibkDpLxG