Bitcoin Forum
December 13, 2024, 08:11:43 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
Author Topic: [DIY] auto-hard-reset mining rigs with Raspberry Pi  (Read 8552 times)
nikola_p
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
July 19, 2017, 08:53:55 PM
 #21

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.
Kasmetski (OP)
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Searchin` perfection!


View Profile
July 29, 2017, 03:15:13 PM
 #22

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.

Makefinity - Unleash Your Creativity
car1999
Full Member
***
Offline Offline

Activity: 350
Merit: 100


View Profile
July 29, 2017, 03:50:23 PM
 #23

nice job, but Raspberry Pi is too expensive, an usb watchdog can do the same work, Only 7$ or less.
MnngSprvsr
Member
**
Offline Offline

Activity: 118
Merit: 10


View Profile
July 30, 2017, 02:01:33 AM
 #24

USB Watchdog?
With Linux support?
Can you post a link, please?
car1999
Full Member
***
Offline Offline

Activity: 350
Merit: 100


View Profile
July 30, 2017, 02:23:33 AM
 #25

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.
Kasmetski (OP)
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Searchin` perfection!


View Profile
July 31, 2017, 03:59:59 PM
 #26

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

Makefinity - Unleash Your Creativity
Mahuro
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
July 31, 2017, 05:50:20 PM
 #27

Thanks Kasmetski  Smiley
alred911
Member
**
Offline Offline

Activity: 72
Merit: 10


View Profile
August 01, 2017, 09:50:32 PM
 #28

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.
Kasmetski (OP)
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Searchin` perfection!


View Profile
August 02, 2017, 02:26:16 PM
 #29

Hello,

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

Thanks

Makefinity - Unleash Your Creativity
car1999
Full Member
***
Offline Offline

Activity: 350
Merit: 100


View Profile
September 10, 2017, 01:10:25 PM
 #30

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.
goen
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
October 02, 2017, 03:00:58 AM
 #31

this is awesome.
thanks Kasmetski.
i'll get the material ready tomorow for testing.

btw, there are 12v and 5v version of relay board.
which one should i use?


rgds,

car1999
Full Member
***
Offline Offline

Activity: 350
Merit: 100


View Profile
October 02, 2017, 06:17:29 AM
 #32

this is awesome.
thanks Kasmetski.
i'll get the material ready tomorow for testing.

btw, there are 12v and 5v version of relay board.
which one should i use?


rgds,


use 5v, this is my build:
https://imgur.com/a/VkduO
puwaha
Sr. Member
****
Offline Offline

Activity: 700
Merit: 294


View Profile
October 08, 2017, 07:05:18 AM
Last edit: October 08, 2017, 07:44:51 AM by puwaha
 #33

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.

I have a similar problem.  I have everything setup, and to run a test, I pulled the ethernet cable from one of my rigs a minute or so before the timer was finished.  It said that the host was online, but that's impossible.  If I ping the rig with the ethernet cable pulled from the raspberry pi there's nothing after the ping statement ... no replies (obviously) and no unreachable statements.  I hit CTRL+C to break out of the ping command, plug the cable back in... ping again... and I get replies.

It's odd.  I haven't examined the code yet, but how is the go program determining if a rig is alive?  What output is it looking for?  Seems to me that it should consider anything but replies as an offline condition.

EDIT:

I looked at the code that parses the ping results, and I replicated the issue by pinging a VM (easier to test with as you can yank the virtual network cable).   When I ping the VM with the virtual network cable disconnected using the parameters in the machines.go code I don't get any replies.

Code:
pi@raspberrypi:~ $ ping 192.168.2.207 -c 3 -i 3 -w 10
PING 192.168.2.207 (192.168.2.207) 56(84) bytes of data.

--- 192.168.2.207 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 9149ms
puwaha
Sr. Member
****
Offline Offline

Activity: 700
Merit: 294


View Profile
October 08, 2017, 08:15:52 AM
Last edit: October 08, 2017, 08:37:02 AM by puwaha
 #34

I think I found out what the issue is with the ping not working correctly.  With the linux version of the ping command it doesn't display any "Request timed out" messages (the microsoft version does).  It will only display the "Host Unreachable" messages when the ARP cache is flushed.  But the garbage collector will not flush the ARP cache until some large thresholds are reached (minimum of 128 entries)  So unless you have 128 rigs, you aren't going to hit that minimum.

If I manually flush, then linux does then return the "Host Unreachable" message with a ping after I pull the network cable.  But the problem will still remain.  When the rig reboots, it will reply to pings and populate the ARP cache again... then it will not return a "Host Unreachable" message until you flush manually again or do a manual flush.  You could code in a manual flush in each cycle of the main routine... but I beleive a manual ARP table flush requires SUDO ability.  Sad

Or... you could change the phrase the code is looking for to something like "0 received" or "100% packet loss" instead?

So I'm curious as to what testing or actual valid rig resets you are seeing?
Kasmetski (OP)
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Searchin` perfection!


View Profile
October 09, 2017, 02:02:54 PM
 #35

Hello everyone.

I've started using ping at first, just because it was the simplest and fastest solution, until I do the JSON validation. You're right, the program thinks computers are offline only when it reads "Host Unreachable" and I will fix it to work better.

I've decided to not make a webserver, because to use it I still need to log in VNC server (If I'm not connected to the local network). That's way I've made the remote control from Telegram. Now I can control and inspect my machines very easy. I will upload the updates until end of the week after I made the telegram bot more convenient  to use.

Makefinity - Unleash Your Creativity
puwaha
Sr. Member
****
Offline Offline

Activity: 700
Merit: 294


View Profile
October 10, 2017, 05:02:30 AM
 #36

I changed it to "100?% packet loss" and the power off time to 6 seconds... recompiled it and it seems like it worked.
 
car1999
Full Member
***
Offline Offline

Activity: 350
Merit: 100


View Profile
October 10, 2017, 06:16:54 AM
 #37

Hello everyone.

I've started using ping at first, just because it was the simplest and fastest solution, until I do the JSON validation. You're right, the program thinks computers are offline only when it reads "Host Unreachable" and I will fix it to work better.

I've decided to not make a webserver, because to use it I still need to log in VNC server (If I'm not connected to the local network). That's way I've made the remote control from Telegram. Now I can control and inspect my machines very easy. I will upload the updates until end of the week after I made the telegram bot more convenient  to use.
I've rewrited the codes using node js, looking forward your update Cheesy
telegram is blocked in my country, I use a cloud server, RPi reports farm status to the server, server sends email to me if there are Some rigs were resetted.
Kasmetski (OP)
Jr. Member
*
Offline Offline

Activity: 50
Merit: 3

Searchin` perfection!


View Profile
October 10, 2017, 09:42:52 AM
Last edit: October 10, 2017, 01:07:30 PM by Kasmetski
 #38

.....



Emails was my first idea but It's easier for remote control with Telegram.
I really don't have enough time to do everything I want, but the project is open for commits. Smiley



But for now I can make only simple commands and manual control. These days I will implement it to give more info when something happens in the farm.


Makefinity - Unleash Your Creativity
stef_stef
Full Member
***
Offline Offline

Activity: 144
Merit: 100


View Profile
November 05, 2017, 08:45:34 PM
 #39

Okay, so I am officially stuck with the installation.


I have installed golang on my PI2, and executed this command

go get -u -v github.com/kasmetski/auto-hard-reset

However, I do not know how to go on. Any help would be appreciated.


Thanks
FFI2013
Hero Member
*****
Offline Offline

Activity: 906
Merit: 507


View Profile
November 06, 2017, 01:12:34 AM
Last edit: November 06, 2017, 01:25:49 AM by FFI2013
 #40

Glad I found this I have a extra pi kicking around just a quick question I need the 5v 8 channel board and on the motherboard the pins get connected to the reset or power thanks
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!