Simple IOT project with Raspberry Pi and Nod-Red

Introduction

Raspberry Pi

The Raspberry Pi is a credit-card-sized computer that plugs into your TV and a keyboard. It is a capable little computer which can be used in electronics projects, and for many of the things that your desktop PC does, like spreadsheets, word processing, browsing the internet, and playing games. It also plays high-definition video.

Nod-Red

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network on low-cost hardware such as the Raspberry Pi as well as in the cloud.

What do we want?

We want to get latest price of famous CryptoCurrencies and send it via email to users.

Project steps

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
npm i node-red-node-email
node-red

http://<Raspberry Pi IP adress>:1880

var item;
var newMsg = {};
for (item in msg.payload.data) {
    newMsg[msg.payload.data[item].name] = msg.payload.data[item].quotes.USD.price+' $';
}
msg.cryptos = newMsg;
return msg;

Conclusion

We made a system with Raspberry Pi and Node-RED which get json package data from an API and extract it for our use and send it via email service rapidly and easily.

You can check other fantastic projects in hasker.io website.

Also you can contact me with this email: alitaqizadeh@gmail.com

❤️