I bought an ASIC that crashes every 30 minutes or so. I'm still working with the seller to get it replaced, and he is very adamant about getting it working, sending me new components, and has even offered to send me a refund for the days it hasn't been mining. Great guy, I'll post about the experience later when it's all settled.
Anyway... so the ASIC runs for 30 minutes at a pop and requires a reboot to get going again. I had a Wemo Insight smart plug that has some basic "turn on" and "turn off" applets at IFTTT. There is also an applet where you email IFTTT's email address with some hash tag in the subject line, it will trigger the applet. Light bulbs went off, and I realized I can use AM to track the ASIC and send an email to IFTTT to trigger the turn off and turn on Wemo applet.
So, in IFTTT, I setup two applets with one where the "if this" trigger is the mail applet with a hash tag of "#off" in the subject line... to perform the "then this" action to turn off the Wemo smart plug. I then setup the second applet to do nearly the same thing but look for a hash tag of "#on" in the subject line to perform the "then this" action to turn on the Wemo smart plug.
Then I go into AM's rules and setup a user rule. I setup the trigger to ping the IP address of the ASIC and if hasn't responded in 9 seconds to do the action. The action section is a small set functions in AM that run in sequence. The first action is to send an email to the IFTTT email address with a "#off" in the subject line. Then I put a Wait action for 10 seconds. Then put another email action to send an email to the IFTTT email address with a "#on" in the subject line. Finally, I put 6 individual wait actions for 60 seconds each. It basically runs like this:
If no response from IP address for 9 seconds then
Send and email with #off
wait 10 seconds
send another email with #on
wait for 60 seconds
wait for 60 seconds
wait for 60 seconds
wait for 60 seconds
wait for 60 seconds
wait for 60 seconds
I needed to put the waits in there at the end of the script because it takes a minute or two or three for the ASIC to fully power on and start responding to pings. Otherwise, every 9 seconds without a ping response would cause AM to trigger again, turning off the smart plug and back on again.
This opens up a whole new realm of possibilities with using Awesome Miner and smart devices using IFTTT. I have had a few problematic GPU rigs in the past that would hard-lock up and the only way to get them going again was to power cycle them. I have a Raspberry Pi with some relays setup on the power switch pins to do just that. There is some code that I modified to trigger the relays with a momentarily close the relay to "hold down power for 6 seconds" action and then wait 5 seconds, then momentarily close the relay for a half second to power on. It works mostly the same way as the AM/IFTTT/Wemo setup works above. If it doesn't receive a response from the rig by pinging every 30 minutes, then it assumes it's down and does the power cycle sequence. It doesn't always work correctly, because sometimes the rig will hard-lock, but still respond to pings!
The AM/IFTTT/Wemo setup is a million times easier to setup, and incredibly more flexible. It would be simple for anyone to use something similar to monitor their rigs for hard lockups. You don't have to just limit it to ping replies in AM, you could have dead device, offline, submitted shares, or hashrate thresholds as a trigger. AM makes this easy.
Suffice it to say, I'll be getting a few more Wemo smart plugs so that AM can monitor all my rigs and take appropriate action. There's not a worse feeling when you are out of town, look at your AM web page and see a rig that is down... and you won't be back to take any action for a few days. This also opens up easy automation opportunities for mining rigs you may have at another site.
This is awesome.
I just bought APC switched PDUs. I bet I could setup something very similar.