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
€18.99 per month
Paperback Jan 2019 206 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Santos Profile Icon Enio Moura
Arrow right icon
€18.99 per month
Paperback Jan 2019 206 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781789132243
Vendor :
IBM
Category :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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 €5 each
Feature tick icon Exclusive print discounts
€264.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 €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 91.97
Hands-On IoT Solutions with Blockchain
€29.99
Blockchain By Example
€36.99
Blockchain Quick Start Guide
€24.99
Total 91.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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.