Pages:
Author

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

newbie
Activity: 8
Merit: 0
Any help from anyone?
newbie
Activity: 8
Merit: 0
Can someone help/guide me to set this up on raspberry pi3, i have purchased the relay switch and have connected it to the appropriate gpio pins as shown in the diagram.

The raspberry pi3 running raspbian

Look at the config.json file.  In this file is where you setup the IP address and the GPIO pin that it's connected to.  Find a pin-out of your pi3, select some GPIO pins and match them up in your JSON file.



I have setup the following -

 
GPIOI 39 - GND – Red                                         
GPIO 16 (pin36) – IN1- Yellow >>>>>>> MiningRig01
GPIO 12 (pin32) – IN2 – Green >>>>>>> MiningRig02
GPIO 36 – IN3 – Orange  >>>>>> Free
GPIO 29 – IN4 – Blue >>>>>>>>> Free
GPIO 4  - VCC – Black

 

What pins do I need to connect between motherboard and the switch

I have configured the config.json as follows (what other changes do i need to make to this) –

{
    "WaitSeconds": 1800,
    "StartupCheck" : true,
    "Log" : true,
    "RemoteNotify" : false,
    "TgBotActivate" : false,
    "TgAPIKey" : "API-KEY",
    "TgAdminUserName" : "USERNAME",
    "Pushover": false,
    "PushoverToken": "ACCESS-TOKEN",
    "PushoverUser": "USER-TOKEN",
    "Miners": [
        {   "Name": "machine 0", "Pin": "36", "Ip": "192.168.0.16", "Info": "MiningRig01"  },   
        {   "Name": "machine 1", "Pin": "32", "Ip": "192.168.0.38", "Info": "MiningRig02"   },   
    ]
}

How do i configure the raspberry pi with this config? i have seen mention of "Go" ?
sr. member
Activity: 700
Merit: 294
Can someone help/guide me to set this up on raspberry pi3, i have purchased the relay switch and have connected it to the appropriate gpio pins as shown in the diagram.

The raspberry pi3 running raspbian

Look at the config.json file.  In this file is where you setup the IP address and the GPIO pin that it's connected to.  Find a pin-out of your pi3, select some GPIO pins and match them up in your JSON file.

newbie
Activity: 8
Merit: 0
anyone please?
newbie
Activity: 8
Merit: 0
Can someone help/guide me to set this up on raspberry pi3, i have purchased the relay switch and have connected it to the appropriate gpio pins as shown in the diagram.

The raspberry pi3 running raspbian
newbie
Activity: 63
Merit: 0
I just messed with this for probably five hours (learning curve). I got it up and going now though, at least half, really awesome idea and it may or may not be "that difficult" for someone already experienced. It's a massive help here. So, thanks! I have been meaning to dive into a micro controller for a while, figured now is a good spot to start.

Now I just keep getting an error "Problem with the API key. Fix the problem or disable the TelegramBot from the config file" seems like the api key (around 32 letters/numbers) is correct to me..... I'll mess with it later

Ok, made it past that, now when I send a message from my phone to the bot it just says you're not my master. Skimming through the code it seems it checks something and says this before it can go further. So that's what I'm working on now, step by step pretty good learning experience.

Journey continues, bot now accepts commands, bot name, vs username changes, and everything else lol.

So, a question: Is telegram suppose to send me a message when a rig goes down? I looked through the code some more and I don't think it does currently, but I can't be sure lol

OK, Pushover notifications worked lol
member
Activity: 357
Merit: 26
Worth mentioning that the (most excellent) developer has used physical GPIO pinout definitions in the Go code.
(I started using BCM, which obviously didn't work)

Make sure you're using the right ones! Handy guide: https://tr.pinout.xyz/


newbie
Activity: 1
Merit: 0
Good job!
I run it on Orange Pi Pc, but it cannot run relay signal on PIN 40
Please help me
member
Activity: 357
Merit: 26
Excellent spot! Idiot here had downloaded your first version. Spent hours checking the code thinking I'd missed a space or something...duh.

Really appreciate the help - Telegram remote is up and running!

Just have to test the relays and I'll be in business... Thanks again!
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
What version did you download?
Is it the one from "release" pages or vie bin folder in the source?
When you start the tool, you should see message in the terminal like this:
12:18:04.231 ▶ NOTIC 00b ▶  TelegramBot Authorteleized on account XXXXXXXXXXXXXX
member
Activity: 357
Merit: 26
Thanks for the response! I've set tg activate to true, and I'm not getting any errors - altho my log files appear to be blank/empty. They're being created, but not filled.

This is my config:

"WaitSeconds": 60,
    "Log": true,
    "StartupCheck": true,
    "TgBotActivate": true,
    "TgAPIKey": "xxxx"
    "TgAdminUserName": "xxxxx",
    "Miners": [

I'm clearly missing something basic!
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Hello, did you change the tgactivate config.json option to true?
Also do you see any errors in the config file when you start the tool?
If you wrote everything correctly in the config you should see information in the log, or if there is problem with the api you will see error too.

Cheerz
member
Activity: 357
Merit: 26
Great project folks! On the telegram side, I've created a bot, and added the api key and admin details to the config file. I see there's a list of commands here: https://github.com/Kasmetski/auto-hard-reset/commit/0c370ced9ffe2c7156d353b83e66333082d67f99

but nothing seems to work. Is there another activation step I've missed? Thanks in advance...
newbie
Activity: 42
Merit: 0
I can preffer ubnt mpower , just add proper crontab script and thats all. You get power meter here also.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Did you try to put the file and config here "~/.config/lxsession/LXDE-pi/autostart"?

full member
Activity: 144
Merit: 100
I've been trying to make the script run on start up, but I am kind a lost. Has anyone done it?
full member
Activity: 144
Merit: 100
Just so that someone does not get lost like me Smiley

The config.json file that needs to be edited is located in the /bin folder.
jr. member
Activity: 50
Merit: 3
Searchin` perfection!
Hello, I'm back after some shitty things happened IRL and I will try to be more active in the forum.
II need to click mail notifications for this thread but If you need something urgent you can always find me on twitter with the same name.

'm starting to answer question I see.
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...
Be more specific? I will describe in general.. you need to make a Telegram bot. Write to BotFather https://telegram.me/botfather and follow the instructions there.
After that edit the config file with the bot-username and api key.

About the web interface I will be happy if someone make it.
First I need to refactor the code a little bit and make everything in modules,

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?

The download link is going to archlinux? But I can guess you ask about the Release page?
If yes, the only difference between Release archive and /bin/ directory in the repo is the second one is latest build from code but have some bugs. Binary files in the release page are older and don't have Telegram and Pushover integration.



If you need some help
 I'm here if something is urgent - twitter - https://twitter.com/Kasmetsk1
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

Sorry, I'm not the developer, nor do I use Telegram.  You might try to PM the developer.

Figured it out by myself by now. I PM'ed the developer a long time ago.
sr. member
Activity: 700
Merit: 294
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

Sorry, I'm not the developer, nor do I use Telegram.  You might try to PM the developer.
Pages:
Jump to: