Pages:
Author

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

full member
Activity: 350
Merit: 100
I reconsider this idea and found that it is perfect. I've bought a Raspberry Pi and a 8 way relay board to run it.

I'd like to run a web server in the Raspberry Pi, the rigs report their status (including gpu, cpu ,memory, disk usage, miner hashrates, temp, fan speed etc) to the Raspberry Pi at regular intervals. If a rig doesn't report status in minutes, Raspberry Pi knows the rig was dead, restart it.
We can add some web pages to show rig status and add some button to restart the bigs by hand.

I've never learned the go language, if it was nodejs, I can contribute codes Roll Eyes.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Hello,

Type in RPi terminal "ping SOME_LOCAL_IP" and paste the output here.

Thanks
member
Activity: 72
Merit: 10
hello,

I am currently testing your code with a rpi B+ and 5V relay.
 i am off the network  (no internet/local network)  all thinking the relays will clics since the ping will fail, but no, its says host online.
What did i do wrong ?

thanks.
newbie
Activity: 5
Merit: 0
Thanks Kasmetski  Smiley
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
nice job, but Raspberry Pi is too expensive, an usb watchdog can do the same work, Only 7$ or less.
Is this USB watchdog for 1 PC?
I use my Raspberry Pi for many machines and you can easily extend  the number of GPIO pins to control even more. Also the RPI can control simple boards like ESP8266, which costs only $2, not $7.

Also I'm using the RPi like a main station. Connected with a simple usb cam to watch what is happening there. Also when I make the new ventilation it will be controlled from the RPI Smiley
Now I'm making an rearagment of the farm, but after everything is done. I have a ton of sensors to connect.. for temperature, moisture, water level if something unexpected happenes. And many more of course Smiley
full member
Activity: 350
Merit: 100
USB Watchdog?
With Linux support?
Can you post a link, please?
it doesn't support linux right now, but i talked to the seller,  we can control it via serial port, not very hard to implement.
IMO, linux is stabler than Windows, it doesn't need A  hardware watchdog, software watchdog works well.
member
Activity: 118
Merit: 10
USB Watchdog?
With Linux support?
Can you post a link, please?
full member
Activity: 350
Merit: 100
nice job, but Raspberry Pi is too expensive, an usb watchdog can do the same work, Only 7$ or less.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
This is awesome, going to set this up tonight. I do have one question : what of the 3 pins goes into positive and negative of the relay goes into the motherboard?
The relays aren't here so I can not take a picture but you should connect the cables in NO and COM. If they are front of you this are the left and center one.


I've had computers before that would crash but still respond to ICMP requests. All the popular miners have an API so using an HTTP GET should be more reliable.
Yep, this is in the ToDo list.
Next week I will have a free day and will do the web server first and after that statistics and json-check.
newbie
Activity: 13
Merit: 0
Hello everyone!

This is a good topic. I was thinking building the same device with Raspberry Pi. So far no enough time but I found easy solution with some TP-Link Smart Plug with energy usage monitoring. I have two rigs which are stable and this works. For many rigs this solution is good.
hero member
Activity: 630
Merit: 502
I've had computers before that would crash but still respond to ICMP requests. All the popular miners have an API so using an HTTP GET should be more reliable.
newbie
Activity: 5
Merit: 0
This is awesome, going to set this up tonight. I do have one question : what of the 3 pins goes into positive and negative of the relay goes into the motherboard?
full member
Activity: 254
Merit: 100
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


jr. member
Activity: 50
Merit: 3
Searchin` perfection!
To turn on the machine after that hard reset, the program makes quick short for about 0.108 sec.
You can edit the code very easy. Open machines.go and edit line 26
https://github.com/Kasmetski/auto-hard-reset/blob/master/machines.go#L26

from
Code:
	r[i].Restarter()
to this
Code:
	r[i].TurnOn()

This should work Smiley
newbie
Activity: 9
Merit: 0
Outstanding. Like I mentioned, I'm no programmer, but your code is certainly well labeled and logical so I feel I can make some sense out of it.. Last time I really did any programming Applesoft was all the rage! Yeah, I'm old... Don't judge. Cheesy

Reset requires just a quick short of the reset pins on the motherboard, no longer than 1 second, but 500ms should prove more then adequate. Really just long enough to close and open the relay.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Thank you for the comment.

Machines are not here with me so I can't test the logic you want. Please test it by yourself and I will tell you how to mod the code (take a screwdriver and see how many seconds you need to hold for reset). If you want just to "click" the button for 0.1 sec... the code will be just turn-off and tun-on with 0.1 sec delay between the two.

About the webserver soon I will have more free time and will make a web page with statistics, easy config and manual control.
newbie
Activity: 9
Merit: 0
Kasmetski thanks for this!  I think it is ALMOST exactly what I am looking for. The only thing I would like is to hook it through the reset button vs the power button, which means instead of a "press-hold, reset, press" I just simply need the "press" part of the reset sequence. I'm no programmer at all, but looking at the code you have am i right that I could simply remove the "ForceShutDown" portion and leave the "TurnOn" portion and it will just run that part? Or is it more complicated then that?

Is there a way to embed this logic into a PHP form so that in addition to this I can also log in and see the status in real time and manually reset or shut down the servers via the webpage?

P.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Uploaded binary files for Raspberry Pi and easy configuration from json file.

You can download them from here - https://github.com/Kasmetski/auto-hard-reset/releases

Mby i but together some cloud monitoring/handling for this kind of software?

I didn't understand the question, could you clarify?

arduino support please Smiley

I don't plan to build arduino version, only to use them as extension of the RPi.
I can code a simple script to reset computers, but I don't have Ethernet shield to test it
legendary
Activity: 1848
Merit: 1165
My AR-15 ID's itself as a toaster. Want breakfast?
arduino support please Smiley

I'll have to buy an Ethernet shield and try and port the code at some point....  idk if the OP will....  the network libraries will be the hard part to transpose possibly.
newbie
Activity: 51
Merit: 0
arduino support please Smiley
Pages:
Jump to: