Pages:
Author

Topic: [DIY] auto-hard-reset mining rigs with Raspberry Pi (Read 8492 times)

newbie
Activity: 28
Merit: 0
is there any way to add a telegram bot?

Can anybody share the telegram commands they use for multiple rigs?

Sorry to drag up an old topic but it's relevant for whoever else may be having this same issue...
Today I've setup a second Raspberry Pi using this script - absolutely love this script!!

I've got 6 rigs connected to it on an 8CH 5V Relay Board and noticed the same... no matter the command, the Telegram Bot would only trigger Rig 0:
/ping m0, m1, m2 etc
/restart m0, m1, m2 etc
/turnon m0, m1, m2 etc

After some digging... I found the cause... remove the 'm'

/restart 0
/restart 1
/restart 2

Without the 'm' it works perfectly... because in the code it looks for machine NUMBER not anything else.

I hope this helps.
newbie
Activity: 19
Merit: 0
Ok I figured out the wiring, I'm guessing LOW(relay light on) = not triggering reset and HIGH= (light off) = triggers reset button. Is there anyway to reverse this?
sr. member
Activity: 700
Merit: 294
Does anyone know the max cable lengths for the 5v run from the pi to the relay, the gpio runs from the pi to the relay, and from the relay to the motherboard reset pins?

I have my rigs in 3 separate racks and would like to utilize 1 pi in total and 1 relay per rack (3 relays total). The cable lengths from the pi to the racks would be 18 ft, 14 ft, & 16 ft respectively and the cable lengths from the 5v relays to the motherboards would be 3 ft, 4 ft, 5 ft, 6 ft & 7 ft respectively. I'm not too concerned about the runs from the relays to the boards but I'm worried that 14-18 runs from the pi to the relay are too long. Can anyone weigh in?

Those lengths shouldn't be a problem.  If you were talking about hundreds of feet, then maybe.  The relay boards can also be powered separately.
newbie
Activity: 19
Merit: 0
Does anyone know the max cable lengths for the 5v run from the pi to the relay, the gpio runs from the pi to the relay, and from the relay to the motherboard reset pins?

I have my rigs in 3 separate racks and would like to utilize 1 pi in total and 1 relay per rack (3 relays total). The cable lengths from the pi to the racks would be 18 ft, 14 ft, & 16 ft respectively and the cable lengths from the 5v relays to the motherboards would be 3 ft, 4 ft, 5 ft, 6 ft & 7 ft respectively. I'm not too concerned about the runs from the relays to the boards but I'm worried that 14-18 runs from the pi to the relay are too long. Can anyone weigh in?
newbie
Activity: 44
Merit: 0
You connect your relay in NO & COM to the PWR pins or the Reset pins?
newbie
Activity: 28
Merit: 0
I've got a strange issue...

I ssh into my raspberry pi and i run the script using:

cd Downloads
./auto-hard-reset-arm7

Then it starts... it pings the rig then it goes to timer "300s" because I made the timer for 5min rather than 30min. It works perfectly while my ssh connection is live and the telegram bot responds fine if I check /status

Soon as I kill ssh connection to the raspberry pi, the script stops working and even the bot is not responding in telegram... it's as if, when i kill the ssh connection it stops the script.

Can anyone help with this issue?

Use the screen utility in linux to keep the script running even if you close your ssh session.


Thank you! That worked perfectly.
The script is now running like a dream and Telegram bot is functional Smiley
Tomorrow I will replace my faulty risers and then hopefully this rig is finished and i can move to the next.
sr. member
Activity: 994
Merit: 278
Was wondering if someone had come up with something like this the other day. When my script restarts cast-xmr after a drop in hashrate it sometimes jams the whole system. Thank you
sr. member
Activity: 700
Merit: 294
I've got a strange issue...

I ssh into my raspberry pi and i run the script using:

cd Downloads
./auto-hard-reset-arm7

Then it starts... it pings the rig then it goes to timer "300s" because I made the timer for 5min rather than 30min. It works perfectly while my ssh connection is live and the telegram bot responds fine if I check /status

Soon as I kill ssh connection to the raspberry pi, the script stops working and even the bot is not responding in telegram... it's as if, when i kill the ssh connection it stops the script.

Can anyone help with this issue?

Use the screen utility in linux to keep the script running even if you close your ssh session.
newbie
Activity: 28
Merit: 0
I've got a strange issue...

I ssh into my raspberry pi and i run the script using:

cd Downloads
./auto-hard-reset-arm7

Then it starts... it pings the rig then it goes to timer "300s" because I made the timer for 5min rather than 30min. It works perfectly while my ssh connection is live and the telegram bot responds fine if I check /status

Soon as I kill ssh connection to the raspberry pi, the script stops working and even the bot is not responding in telegram... it's as if, when i kill the ssh connection it stops the script.

Can anyone help with this issue?
newbie
Activity: 28
Merit: 0
Hi Guys

Firstly, @Kasmetski for the amazing work on this rig resetter. It's exactly what I was looking for after weeks of headache with my rig hanging and I must drive 40 miles to reboot!.

I have purchased a Raspberry Pi 3 Model B and installed Raspbian just now. I have also enabled SSH and changed the password for user Pi for security.

Now, I am on Github but I'm not sure what to do from here...

Should I run:
Code:
sudo curl -O https://github.com/Kasmetski/auto-hard-reset/archive/master.zip
to download the file to the default directory?

After this, github mention to run:
Code:
tar -xvzf auto-hard-reset-arm7.tar.gz
chmod +x auto-hard-reset-arm7

But I checked in Github file list I don't see any auto-hard-reset-arm7.tar.gz filename.

Please help, sorry for the noob question... I'm sure I am overlooking something.

It's ok I've now got it working and Telegram working also.
newbie
Activity: 12
Merit: 0
Hi,

thx for the github project, works like a charm. Smiley

I have a few questions, maybe someone has an answer to it:

- I want to connect 3 relais boards (2x8 channel + 1x4 channel). I have connected the 2 relais with 8 channels to the 5v pins of my raspbery pi and the 4 channel relais to the 3.3v pin. The relais are all 5v, but I've connect the 1x4 channel relais to the 3.3v pin and it also works. Is this dangerous, or is it ok, to connect a 5v relais to the 3.3v pin?

- I have read somewhere, that you should use a resister between PI and relais boards, to limit the current. Is this really necessary?

- Some LEDs on my relais boards are lit very dim at startup and stays at this level. I think this is because of the default GPIO levels, after startup of the PI. If the relais is swichted one time, the LEDs are dark. Maybe you should initialize all the pins, at startup to LOW voltage state.

jr. member
Activity: 39
Merit: 5
muthafukin gem huntah
I have uploaded my Windows IoT rig rebooter for Rpi

https://github.com/ColossusFX/RigRebooter-UWP


https://prnt.sc/iyd3ci


Just add your IP address and corresponding GPIO pins

this is great! going to give this a shot, thank you so much!
newbie
Activity: 28
Merit: 0
Hi Guys

Firstly, @Kasmetski for the amazing work on this rig resetter. It's exactly what I was looking for after weeks of headache with my rig hanging and I must drive 40 miles to reboot!.

I have purchased a Raspberry Pi 3 Model B and installed Raspbian just now. I have also enabled SSH and changed the password for user Pi for security.

Now, I am on Github but I'm not sure what to do from here...

Should I run:
Code:
sudo curl -O https://github.com/Kasmetski/auto-hard-reset/archive/master.zip
to download the file to the default directory?

After this, github mention to run:
Code:
tar -xvzf auto-hard-reset-arm7.tar.gz
chmod +x auto-hard-reset-arm7

But I checked in Github file list I don't see any auto-hard-reset-arm7.tar.gz filename.

Please help, sorry for the noob question... I'm sure I am overlooking something.
newbie
Activity: 36
Merit: 0
I have uploaded my Windows IoT rig rebooter for Rpi

https://github.com/ColossusFX/RigRebooter-UWP


https://prnt.sc/iyd3ci


Just add your IP address and corresponding GPIO pins
newbie
Activity: 81
Merit: 0
I've made a remote power rig manager, so i can send commands to my pi, that send command to my relay and the magic happens
I can press the power button for soft On/Off, i can pres the reset so the machine shut off and turn on again, or i can press Hard button, for a hard reset if the machine is stuck( it ill hold power for 6 seconds, wait 10 seconds, and them start the machine again

the design is pretty bad , but it works


https://i.imgur.com/NXb9hx6.png

Hi, can you share this html?

Thanks!

And thanks @Kasmetski for this awesome tool.
sr. member
Activity: 700
Merit: 294
You wouldn't run Awesome Miner on your rig, it should be a separate machine or virtual machine.  Otherwise, like you thought... how could it reboot a rig?



I see.  And I am guessing it needs to be running on the same network?

Yes, same network for simplicity, or you have a VPN connection between locations if your miners are at a different location than the Awesome Miner computer.


Quote
Also,  I have observed instances where the ping requests work even though miner would've crashed.  how does it tackle those situations?

You have other rules in Awesome Miner that will take care of restarting the miner if it crashes.  You can even have it reboot the rig if you think it's necessary.

We should probably discuss it on the other thread and not junk up this thread about using Raspberry Pis.


Quote
EDIT: I have tested the following components for my script so far.

1.  get power readings for my rigs
2.  reboot rig if power is below a threshold and notify via. an email
3.  script can run remotely.  I was actually trying to figure out to keep this running on a cellphone.

Just need to workout all these with wait time before/after reset.


Use my script in the other thread as a guide.  You definitely want a few 60 second waits to allow the rig to boot back up so that Awesome Miner doesn't run the rule again because the rig hasn't fully rebooted to start responding to pings.
full member
Activity: 729
Merit: 114
I am planning to use energy monitoring capabilities of smartplug to auto-reboot rigs based.  
Have observed typically on miner/OS crashes the power consumption would drop.  Thankfully haven't faced a hard hang with GPUs running at max clocks/volts.

I have figured out how to do this remotely on tp-link HS110.  (Doesn't even have to be in same network)

I have built something like this... It works very well:

https://bitcointalksearch.org/topic/how-to-puwahas-poor-mans-networked-pdu-using-smart-plugs-and-awesome-miner-2866608

Good one.  What happens if the OS crashes?  How does the awesome miner send a signal then?

You wouldn't run Awesome Miner on your rig, it should be a separate machine or virtual machine.  Otherwise, like you thought... how could it reboot a rig?



I see.  And I am guessing it needs to be running on the same network?
Also,  I have observed instances where the ping requests work even though miner would've crashed.  how does it tackle those situations?

EDIT: I have tested the following components for my script so far.

1.  get power readings for my rigs
2.  reboot rig if power is below a threshold and notify via. an email
3.  script can run remotely.  I was actually trying to figure out to keep this running on a cellphone.

Just need to workout all these with wait time before/after reset.
member
Activity: 357
Merit: 26
is there any way to add a telegram bot?

Can anybody share the telegram commands they use for multiple rigs?
sr. member
Activity: 700
Merit: 294
I am planning to use energy monitoring capabilities of smartplug to auto-reboot rigs based. 
Have observed typically on miner/OS crashes the power consumption would drop.  Thankfully haven't faced a hard hang with GPUs running at max clocks/volts.

I have figured out how to do this remotely on tp-link HS110.  (Doesn't even have to be in same network)

I have built something like this... It works very well:

https://bitcointalksearch.org/topic/how-to-puwahas-poor-mans-networked-pdu-using-smart-plugs-and-awesome-miner-2866608

Good one.  What happens if the OS crashes?  How does the awesome miner send a signal then?

You wouldn't run Awesome Miner on your rig, it should be a separate machine or virtual machine.  Otherwise, like you thought... how could it reboot a rig?

full member
Activity: 729
Merit: 114
I am planning to use energy monitoring capabilities of smartplug to auto-reboot rigs based. 
Have observed typically on miner/OS crashes the power consumption would drop.  Thankfully haven't faced a hard hang with GPUs running at max clocks/volts.

I have figured out how to do this remotely on tp-link HS110.  (Doesn't even have to be in same network)

I have built something like this... It works very well:

https://bitcointalksearch.org/topic/how-to-puwahas-poor-mans-networked-pdu-using-smart-plugs-and-awesome-miner-2866608

Good one.  What happens if the OS crashes?  How does the awesome miner send a signal then?

What I have tested so far is use GET/POST curl command requests so basically needs no signal from the Rig actually.  All I am doing is communicating with the smart plug and monitoring power consumption.  Reboot if the power consumption falls below a threshold level for sometime.  I can see a point of failure still - authentication token expires for my curl command requests (smart plug goes bad and network is down can't be handled anyways)
Pages:
Jump to: