mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 13, 2016, 09:24:50 PM |
|
I was unable to manage Remote Manager to send me email or even sms in case of alarm, so after spending some time searching the internet how to make .bat file to send sms and email I came up with an idea to send sms and email with python script and make but file to run these scripts. It's very helpful for me to manage my rigs even if I'm offline. First you need to install python 3.5.2 and don't forget to check both boxes: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FceS9iL9.jpg&t=665&c=24c9RJ3N29zp8g) After fresh installing the python lets configure Twilio account. Sign up for Twilio account and create API https://www.twilio.com/try-twilio Step 1: Create an API Key
First, you need to create an API Key, which contains a secret used to sign Access Tokens. You can create API Keys from the Twilio Console or using the REST API. At the time you create the API Key, you'll be shown the Key's secret. For security, you will only be shown the secret when the key is created. You should store it with the Key's SID in a secure location for the next step.
Step 2: Generate an Access Token
Next, you'll use the the secret of the API Key you created in step 1 to generate an access-token using the Twilio Helper Library. Each token is granted access to specific client features. then make a .py file and fill it with this(replace _sid and _token to your live _sid and _token and also replace numbers): # Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient
# Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_sid, auth_token)
message = client.messages.create(to="+12316851234", from_="+15555555555", body="Hello there!") Then run this in CMD: ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2F7ePDhHs.jpg&t=665&c=N0gEGc3b8qnIFg) Now you can test sms.py file by double clicking on it, after few second you should get sms from Twilio number with your own text. Configure email sender:Open CMD and type: >python >>> import smtplib ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FZbxr5rO.jpg&t=665&c=KBVzb7Gn6hyAVQ) After this replace email accounts in code above and save it as email.py: import smtplib server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login("YOUR EMAIL ADDRESS", "YOUR PASSWORD") msg = "YOUR MESSAGE!" server.sendmail("YOUR EMAIL ADDRESS", "THE EMAIL ADDRESS TO SEND TO", msg) server.quit() If you will using gmail don't forget to allow "less secure apps" to access your account. After these steps you can create simple .bat file to use in remote manager to run these two python scripts in case of alarm @ECHO OFF
start C:\******\gmail.py start C:\******\sms.py P.S. I've done these steps and everything is working fine for me, I didn't write neither sms sender script nor email sender one, use them on your discretion. sources used: Twilio API creation https://www.twilio.com/docs/api/rest/access-tokensSMS .py file https://www.twilio.com/docs/quickstart/python/sms/sending-via-restemail stuff http://naelshiab.com/tutorial-send-email-python/
|
|
|
|
eckmar
Legendary
Offline
Activity: 1878
Merit: 1038
Telegram: https://t.me/eckmar
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 13, 2016, 09:35:42 PM |
|
Great job for sharing this scripts. Anyway I was just looking at Twilio website and can't find any fees/pricing per sms or anything. Can you share that information ?
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 13, 2016, 09:50:48 PM |
|
Great job for sharing this scripts. Anyway I was just looking at Twilio website and can't find any fees/pricing per sms or anything. Can you share that information ?
this is totally free, I'm using it for two month now. As I know if you want to use some kind of special number or clean text that costs min 20$ as I remember (when you enter you own text like: "rig is down" you get sms "Sent from your Twilio trial account - rig is down")
|
|
|
|
clipto
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 311
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 13, 2016, 10:45:24 PM |
|
Perfect solution, was working this out earlier tonight with mettalmag. Thanks for sharing mate! ![Grin](https://bitcointalk.org/Smileys/default/grin.gif)
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 13, 2016, 10:48:15 PM |
|
Perfect solution, was working this out earlier tonight with mettalmag. Thanks for sharing mate! ![Grin](https://bitcointalk.org/Smileys/default/grin.gif) Thanks for your response I hope this will make things easyer
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 14, 2016, 04:09:36 AM |
|
a telegram bot could be a better solution
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 14, 2016, 09:03:32 AM |
|
a telegram bot could be a better solution
I'm sorry what ? You can share detailed info instead of posting meaningless posts like this!
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 03:10:34 AM |
|
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 06:32:48 AM |
|
Have you done it already ? can you share how one can do this ? some kind of tutorial maybe ? or you are just aware that telegram bot exists and that's it ? share more info not links
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 07:28:02 AM |
|
there is a free rig/gpu monitoring tool called fermtools https://github.com/Dimasin/fermtoolsit monitors gpus (fans, temps etc), it can reset rigs and it can send emails or messages via telegram bot if someone could upgrade this tool to monitor miners (like claymore or ccminer or whatever with api) directly, not only gpus
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 07:34:43 AM |
|
there is a free rig/gpu monitoring tool called fermtools https://github.com/Dimasin/fermtoolsit monitors gpus (fans, temps etc), it can reset rigs and it can send emails or messages via telegram bot if someone could upgrade this tool to monitor miners (like claymore or ccminer or whatever with api) directly, not only gpus have you tested it ? It seems very interesting and I'm willing try as soon as I get to my farm, I'll post news after trying this out. Especially I liked the part were it is possible to see on what slot is GPU connected
|
|
|
|
eckmar
Legendary
Offline
Activity: 1878
Merit: 1038
Telegram: https://t.me/eckmar
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 10:36:42 AM |
|
there is a free rig/gpu monitoring tool called fermtools https://github.com/Dimasin/fermtoolsit monitors gpus (fans, temps etc), it can reset rigs and it can send emails or messages via telegram bot if someone could upgrade this tool to monitor miners (like claymore or ccminer or whatever with api) directly, not only gpus I think this is made for miners at the first place since guy who made it accepting ETH donations. What you mentioned, it can't be standalone tool that can connect to any miner (well it can but it's hard to make, if someone do make this it wont be free) but it can be connected to claymore miner same way remote manager is for example.
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 02:56:36 PM |
|
yes i tested it, it can reset rigs remotely via telegram command, it can show all or some specific parameters like temps by sending commands manually or i can receive statuses if monitoring is enabled the problem is that there is no complete manual for this tool, only the dev can explain some options and that slot number info is veeeery cool! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 02:59:40 PM |
|
yes i tested it, it can reset rigs remotely via telegram command, it can show all or some specific parameters like temps by sending commands manually or i can receive statuses if monitoring is enabled the problem is that there is no complete manual for this tool, only the dev can explain some options and that slot number info is veeeery cool! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) that's exactly what I liked most in this, if there would be some nice and clean tutorial I'd be glad to test it, but building from scratch will take huge time I think...
|
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 03:46:19 PM |
|
1. create a new telegram bot by using @BotFather bot and sending it /start. follow botfather's steps and get your bot token 2. input your token, bot name, your telegram nick and rig name in fermtools settings 3. add your bot to contact list and send /start. then send for example /all to get all info from your rig commands are /fgpu, /fmem, /lgpu, /lmem, /tgpu, /fanr, /fanp, /all /resetoff - turns rig reset mode off (also turns automatic monitoring messages off, manual commands like /fgpu work) /reseton - turns rig reset mode on /resetget - get reset mode status
enable monitoring - tick a specific parameter in settings (first tab)
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 03:47:54 PM |
|
1. create a new telegram bot by using @BotFather bot and sending it /start. follow botfather's steps and get your bot token 2. input your token, bot name, your telegram nick and rig name in fermtools settings 3. add your bot to contact list and send /start. then send for example /all to get all info from your rig
in case of any error will you notified automaticaly?
|
|
|
|
mikhan
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 84
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 03:53:11 PM |
|
i hope so ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) didn't try to emulate a problem also the author will work on usb watchdogs support, for example like this one http://open-dev.ru/watchdog (in russian, i didn't find an english page)
|
|
|
|
|
mettalmag (OP)
Legendary
Offline
Activity: 1084
Merit: 1003
≡v≡
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 15, 2016, 04:27:36 PM |
|
- Support for some hardware watchdog timers to automatically restart the computer when the computer freezes or fails, a video card how can PC restart or reset when it freezes ![Huh](https://bitcointalk.org/Smileys/default/huh.gif)
|
|
|
|
|