Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On IoT Solutions with Blockchain
Hands-On IoT Solutions with Blockchain

Hands-On IoT Solutions with Blockchain: Discover how converging IoT and blockchain can help you build effective solutions

Arrow left icon
Profile Icon Santos Profile Icon Enio Moura
Arrow right icon
S$29.99 S$42.99
eBook Jan 2019 206 pages 1st Edition
eBook
S$29.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial
Arrow left icon
Profile Icon Santos Profile Icon Enio Moura
Arrow right icon
S$29.99 S$42.99
eBook Jan 2019 206 pages 1st Edition
eBook
S$29.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial
eBook
S$29.99 S$42.99
Paperback
S$52.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Hands-On IoT Solutions with Blockchain

Creating Your First IoT Solution

In the previous chapter, we explored the Internet of Things (IoT) as well as the IBM Watson IoT Platform. We also created our first simple solution. In this chapter, we will put this into practice by creating a simple end-to-end solution, from selecting the device to creating the device firmware and an application designed to control a simple garden watering system.

The following topics will be covered in this chapter:

  • Understanding how to set up a solution
  • Creating a connected device
  • Creating a simple application connected to the platform
  • Publishing and processing device events
  • Publishing actions to devices
  • How to get help when you're in trouble

Technical requirements

The first IoT solution – the gardening solution

Watering systems are common first projects for using IoT in the DIY community. We too will use it as an example project to get started on the IBM Watson IoT Platform. 

Requirements overview

Good solutions are based on problems that really matter to people. So let's start our solution with an introduction to the actual problem:

John lives alone in an apartment in the city. He is a businessman who has to travel for work for 3-4 days in a week. When not travelling or working, John likes to take care of his plants. However, since he is not home for half the week, John is struggling to keep his garden healthy and beautiful.

John has faced several challenging...

Coding the device firmware

Next, we will create a device application (firmware) that reads the sensor data and sends it to the backing application. In the previous chapter, we used Node.js to publish events from a device simulator, and now we're going to use this method to leverage the previous chapter's code. Remember that the objective of this solution is to water a plant whenever the temperature is high or the soil moisture is too low.

The next section shows the code needed in order to create the firmware that reads all the sensor data and publishes events to the IBM Watson IoT Platform.

Measuring soil moisture

The sensor probe used in this project is a resistive sensor, which measures the current that is passed...

Creating the backend application

With the device firmware setup completed, it's now time to focus on developing the application that will process the device events and send commands so that John's plant will get watered when he's not home.

The code for the application will run on the IBM Cloud Platform (Bluemix). Since this is just an example application, we're going to use environment variables to store parameters (temperature and soil moisture thresholds).

Creating a Cloud Foundry application in the IBM Cloud Platform

  1. To create an application in IBM Cloud, access https://console.bluemix.net, select the Create Resource option, and select Cloud Foundry Apps in the left menu, followed...

Summary

In this chapter, we developed a solution running on a real device that supports Node.js. We also used the low-level mraa library, which interacts with the device GPIO (General Purpose IO), reads analog sensors (temperature and soil moisture sensors) and uses digital pins to switch a relay on and off. This looks very simple but most devices have sensors and actuators, which may change the way in which they are used. However, they essentially follow the same concept.

We created a dashboard in the IBM Watson IoT Platform that is helpful for looking at what real-time data devices are publishing. We also created an application in the IBM Cloud Platform (Bluemix) and attached backing services (the IBM Watson IoT Platform organization) to the application in order to leverage configuration data to connect to the service and deploy the application using the Bluemix command...

Further reading

Most of the resources needed to complete solutions using the IBM Watson IoT Platform can be found in the official documentation at the following link: https://console.bluemix.net/docs/services/IoT/index.html#gettingstartedtemplate. There are also many recipes published by the community that uses IBM Watson IoT, and these are available at the developerWorks Recipes website here: https://developer.ibm.com/recipes/tutorials/category/internet-of-things-iot/.

It's also very helpful to understand how to upload a project to a GitHub repository and how to create a delivery pipeline to automatically build, test, and deploy an application whenever a new change is pushed to the repository. Doing this is not within the scope of this book, but it's still a really good practice to use.

Further information on Grove system platforms, modules, bundles, and component specifications...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore practical implementation of ledger technology in the IoT architecture
  • Study security best practices for your smart devices
  • Understand Blockchain implementation for end-to-end IoT solutions

Description

Blockchain has been the hot topic of late thanks to cryptocurrencies. To make matters more interesting, the financial market is looking for ways to reduce operational costs and generate new business models, and this is where blockchain solutions come into the picture. In addition to this, with Internet of Things (IoT) trending and Arduino, Raspberry Pi, and other devices flooding the market, you can now create cheap devices even at home. Hands-On IoT Solutions with Blockchain starts with an overview of IoT concepts in the current business scenario. It then helps you develop your own device on the IBM Watson IoT platform and create your fi rst IoT solution using Watson and Intel Edison.Once you are familiar with IoT, you will learn about Blockchain technology and its use cases. You will also work with the Hyperledger framework and develop your own Blockchain network. As you progress through the chapters, you'll work with problem statements and learn how to design your solution architecture so that you can create your own integrated Blockchain and IoT solution. The next set of chapters will explain how to implement end-to-end Blockchain solutions with IoT using the IBM Cloud platform. By the end of this book, you will have mastered the convergence of IoT and Blockchain technology and exploited the best practices and drivers to develop a bulletproof integrated solution.

Who is this book for?

Hands-On IoT Solutions with Blockchain is for you if you are an Internet of Things (IoT) analyst, architect, engineer, or any stakeholder responsible for security mechanisms on an IoT infrastructure. This book is also for IT professionals who want to start developing solutions using Blockchain and IoT on the IBM Cloud platform. Basic understanding of IoT will assist you in understanding key concepts covered in the book.

What you will learn

  • Understand the key roles of IoT in the current market
  • Study the different aspects of IBM Watson IoT platform
  • Create devices, gateways, and applications connected to the platform
  • Explore the fundamentals of Blockchain
  • Define good use cases for Blockchain
  • Discover the Hyperledger Fabric and Composer frameworks
  • Develop an IBM Watson IoT application using a Intel Edison
  • Integrate IoT with the Blockchain platform

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 08, 2019
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789133264
Vendor :
IBM
Category :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Jan 08, 2019
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789133264
Vendor :
IBM
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 164.97
Hands-On IoT Solutions with Blockchain
S$52.99
Blockchain By Example
S$66.99
Blockchain Quick Start Guide
S$44.99
Total S$ 164.97 Stars icon

Table of Contents

10 Chapters
Understanding IoT and Developing Devices on the IBM Watson IoT Platform Chevron down icon Chevron up icon
Creating Your First IoT Solution Chevron down icon Chevron up icon
Explaining Blockchain Technology and Working with Hyperledger Chevron down icon Chevron up icon
Creating Your Own Blockchain Network Chevron down icon Chevron up icon
Addressing Food Safety - Building around the Blockchain Chevron down icon Chevron up icon
Designing the Solution Architecture Chevron down icon Chevron up icon
Creating Your Blockchain and IoT Solution Chevron down icon Chevron up icon
The IoT, Blockchain, and Industry 4.0 Chevron down icon Chevron up icon
Best Practices for Developing Blockchain and IoT Solutions Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.