Banking Internet-Of-Things!

I have been working on this idea to have a device connected to your bank account, or to a ‘pool’ inside your bank account.

I first spent sometime discovering the wonderful world of GPIO programming on Raspberry pi which was surprisingly easy as you can see in this video.


So Now it is time to put some infrastructure under this baby, I have built my solution on Liberty Profile on Bluemix (RESTful API) that connects to MongoDB hosted by MongoLabs.

Pasted_Image_2016-02-02__10_14_PM

So now the backend is ready

You can check your Account with the following URL.

http://coolbank.mybluemix.net/iotServer/mongo/Pools/sub002

Which will give you the sub-account balance for id ‘sub002’

The response will look something like this

{
balance: 850
_id“:{“$oid“: 56a514e5e4b0b62ca30bdcbd}
id: sub002
label: Cuba Vacation
soft“: true
target: 2800
}
So that is all what the device would need to know how far your progress is (You have saved 850$ out of the 2800$ target.
Now the traditional banking API’s would be something like the ‘deposit’ Action
Note: that this is a ‘Post’ not a ‘Get’
So now that we deposited 1000$ into our Account let us see how is Our Cuba Saving is doing ? we will issue the same query as early and the result came as !
{
balance: 930
_id“:{“$oid“: 56a514e5e4b0b62ca30bdcbd}
id: sub002
label: Cuba Vacation
soft“: true
target: 2800
}
So This new number (930) means that we added 80$ to our Cuba account, the secret to this is actually hidden in the ‘Account’ roles. The account contains a role that says
For Every Deposit in Account act001 , 8% will go into pool sub002
{
“id”: “account001”,
“type”: “chq”,
“pools”: [
….
{
“poolid”: “sub002”,
“freecash”: false,
“percentage”: 8
},…..
],
“balance”: 2000,
“total”: 4475
}

So Now the back end is ready for use and all what need to do is have my Raspberry pi light up Red, Yellow and Green to reflect the status of my cool bank account.

And Every time you deposit money into this account the savings will accumulate.

Pasted_Image_2016-02-02__10_33_PM

Now that the API is open on bluemix, Please , do not deposit a million dollars, I have not error proofed this, remember, I have a busy job and a three year old,time is a precious commodity here, so be nice :).

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s