Raspberry Pi stake notification script

Hi Everyone

So I (like many of us) have a Raspberry Pi and reddcoind staking my coins 24/7 - which is just brilliant. What it was missing was a notification that the device had found a block - so I created a Python script that checks the total stake amount and beeps a small speaker (attached to one of the RPi’s GPIO pins) + sends you a date stamped email with the amount generated when a block arrives. The combination of these two notifications means I always know (where ever I am) when a stake amount comes in.

It’s quite crude in its operation and im sure it can be improved upon, however it certainly works in its current state :smiley:

There is also a Python based wallet unlock function in the script to avoid having to clear your terminal history after every time you unlock the wallet for staking (you DO clear your terminal history right?)

Check out the GitHub project I set-up to give it a try yourself:




+ Master branch now updated with audio_options changes :slight_smile:
+ rpcport and rpcaddress moved to .conf file for ease of use :slight_smile:


+ Added total interest generated value to end of e-mail notification


Congrats fineredd!

You just gave me a good reason to program my Pi now!

ok, I have added .wav file support under the audio_options branch (will merge with the branch master in due course after I have let it soak test a bit). So if you plug in some speakers to the RPi’s audio jack you can play any .wav file you like when a stake comes in (I currently have the super Mario coin sounds :D)

+ A a far better written script with .conf file support! (new to Python)


finitered This is sounding like its getting awesome. I know I personally wanted to see something like this, and plan to pass some tips around once I catch my bearings.

During your research, have you looked into any text to speak functions that may be able to read aloud the staking amount or similar?

Indeed, I did have a brief look at text to speech and aparently there is a raspberry pi application that will do it, so all the script has to do is launch the text to speech program and pass it the text to say out loud. Will look at this Monday :slight_smile:

1 Like

Project update:

Everything is working as intended, got two emails at random points today informing me of new stake events:

New Reddcoin stake event at 15:25:05:
New stake event totalling 3052.83251887 coins

SO damn cool (even if I do say so myself!) :smiley:

1 Like

NOICE! Yeah, somewhere along my searching I came across a script that will create json variables from the notify portion of the wallet.

I wonder if something can be created to filter that, which would in turn allow a custom message. Something along the lines of:

“Mr Big… I have just been notified that you now have an additional 512 reddcoins in your possession… Congratulations Sir” or something similar lol

I will have to find where I saw this and link to it. Its something I can grasp, but its outside my scope of understanding creation wise.

One thing I do know, is that Im willing to help get it on hackaday if needed. Not that I have any connections but I have had a few things featured and would be happy to share any tips or send emails.

finitered I have a small change request. Please add the rpc address and port to the config and also the possibility to disable the pc speaker beep. This would be great if you want to run the script on another device in your home network.

1 Like

ReddcoinRocks Hiya RR - I can certainly move the RPC address and port to the .conf file no worries, might have to create a new branch for the non-RPi version as the script imports specific RPi libraries to access the GPIO pins.

Ill have a go and update the OP :slight_smile:

1 Like

RPC address and port have been moved to the .conf file no problem, I will branch the git repo to create a a PC version of the script as it will need to exclude the GPIO library when not running on a RPi. :slight_smile:

Also Merry Christmas everyone!

1 Like

Just added a minor tweak to display the total number of coins generated from staking wallet to each e-mail:

New stake event totalling 1421.74352132 coins, 90255.58074352 total interest generated.