Pages:
Author

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

full member
Activity: 144
Merit: 100
Sorry, I don't use Telegram, so I can't help... not a helpful post... I know.   Undecided
Kind of disappointed from the lack of support in this thread, but it is what it is
sr. member
Activity: 700
Merit: 294
Sorry, I don't use Telegram, so I can't help... not a helpful post... I know.   Undecided
full member
Activity: 144
Merit: 100
Cmoon guys, I am desperate for some help.
full member
Activity: 144
Merit: 100
I have the script up and running on mi pi2, however I am trying to set up Telegram.

Would anyone offer some hints? I'd really appreciate that. I have set up the bot, edited the config file with the bot API and my telegram username as admin, but I am not getting any response in return.
full member
Activity: 350
Merit: 100
Hope to see some more development on it, lots of cool potential here!
full member
Activity: 144
Merit: 100
Are there any updates on this project? Smiley
newbie
Activity: 14
Merit: 0
Sorry for the super noob questions but when you say:

Quote
Depending of your Raspberry Pi version, download one of the archives arm6 - (Raspberry Pi A, A+, B, B+, Zero) arm7 - (Raspberry Pi 2, 3)

Are you saying to download an archive from here: https://archlinuxarm.org/about/downloads ?

And then when you say:

Quote
Open the folder from the console and type (example with arm7)

Are you referring to the folder of the downloaded archive? Or are you referring to a folder in the repo?
newbie
Activity: 3
Merit: 0
Hi !

Might you kindly provide more information about the telegram interface ?

I can help to improve some features in the project such as web interface and dashboards...

Thank you!
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
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

You need to install golang and use "go get" only i if you want to edit the source code or build it by yourself.
If you just want to run the program, use the latest binary files from '/bin/' directoryor better use the binary
files of v0.1 - https://github.com/Kasmetski/auto-hard-reset/releases
Download the version for your RPI open folder in the terminal and start the tool with "./auto-hard-reset-arm6(7)"

After I fix some bugs with the TelegramBot, the version of the tool will be updated.


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

Connect them like a power button.
full member
Activity: 144
Merit: 100
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

You connect them to the reset pins Smiley The logic is that when the relay closes, it connects those two pins, and the rig restarts
hero member
Activity: 906
Merit: 507
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
full member
Activity: 144
Merit: 100
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
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
.....



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.

full member
Activity: 350
Merit: 100
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.
sr. member
Activity: 700
Merit: 294
I changed it to "100?% packet loss" and the power off time to 6 seconds... recompiled it and it seems like it worked.
 
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
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.
sr. member
Activity: 700
Merit: 294
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?
sr. member
Activity: 700
Merit: 294
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
full member
Activity: 350
Merit: 100
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
member
Activity: 77
Merit: 10
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,

Pages:
Jump to: