I built a very crude SRR circuitry for a Raspberry Pi to remotely reset a rig or switch it on/off (The raspberry Pi basically controls an optocoupler connected to the reset and poweron pins of the mobo).
For the moment the Raspberry Pi just detect if port 22 is open on the rig. If not, it assumes that the rig is not reachable by SSH and reset the rig.
I see that there is an SRR scrips on nvOC, that looks much more sophisticated than what I am doing. Unfortunately there is no mention of the watchdog software to run on the Raspberry Pi.
Anyone can give me a pointer to the software to run on the Raspberry Pi.
Cheers
I have some code to share with you but the site is blocking my input.
Trying to contact with an admin about.
Ok, have a look at this and see if can help:
https://bitcointalksearch.org/topic/m.22615430
I don't use Nvoc's temp control.
Here the latest version of script (removed reset bit and add var to use/not to use telegram alerts. I did not test the telegram bit so be aware):
https://pastebin.com/mcqmt9CF
It is possible to add code to nvoc's temp control (or wdog) and reset/poweroff/on the rig from a raspberry pi.
I just look forward to have a well configured rig and make it work stable instead of using wdog.
I do not trust wdog not because of the coders/scripts but because of so many gpus and drivers (from time to time they change the output of error codes, etc).
This is awsome!! I will modify the code according the my setup.
As far as I can see from a quick look at the the code, the script assumes a rig is frozen if it doesn't respond to pings. Is it correct?
In the past I had rigs that were clearly frozen, but were still responding to pings. That is why, instead of pinging I check if the SSH port is open on the rig using netcat:
(w5 is a timeout of 5 seconds)
Thanks again :-)
Since we are on RPi talks ...
How many rigs can be monitored and reboot/reset/hard reboot with one RPi?
What are the hardwares needed for multiple rig control?
I'm not much of a hardware guy but love to make a rig controller with RPi if its not too hard.
A Raspberry Pi 2B or 3B has up to 26 programmable digital pins (the original Raspberry Pi B has only 17).
You could connect each digital output to an optocoupler or a relay and control the power swithch and/or the reset button of the motherboard.
Suppose that you want to want to control both switch and reset of each mobo, that would make that you could monitor up to 13 mobo (26 if you just want to control the reset switch).
You can also connect digital temperature sensors to the pins (programming them in input mode).
You can find pretty inexpensive ready made relay boards with up to 16 relays.
In practice the hardware needed for for controlling 12 mobos would be:
1) 16 relay module. There are many on Amazon, for example https://www.amazon.com/SainSmart-101-70-103-16-Channel-Relay-Module/dp/B0057OC66U
2) 8 relay module.
3) Usb power supply
4) Optional external HDMI screen, unless you are running the RPi headless through SSH
5) Of course, a raspberry Pi
6) Plenty of cables with female Dupont connectors
The standard OS for the Raspberry Pi is Debian (Raspbian), but if you prefer you can have as well Ubuntu or Windows 10 IoT.
The advantage of Raspbian is that it comes with all the utilities for controlling directly the GPIO pins, either from Bash or a high level language like C++ or Python.
Awesome, Thanks a lot for the info
I have 3 RPi 2B that dont use any more because when 3B came out I replaced them for faster kodi
So I'm going to get a relay module and start playing with it, for sure I'm going to ask for more help on programming and connecting the relay to the board and ...
Thanks a lot mate
Keep calm and carry on mining
Just a thing, do not buy the board that I put in the link of my previous message. I justs realised that the inputs are for 5V signals while what you need is a board compatible with 3.3V signals. Look for a board that is specifically designed for the RPi.
I have 2 16-Channel Relay Modules with 5v, they work OK. One of them is 5v powered and another 12v powered, and I had to add 12v power supply for the second relay, so now the Rpi3 is powered by the second relay and doesn't need 3) Usb power supply and the first relay is powered by Rpi3.