Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Internet of Things with Arduino Cookbook

You're reading from   Internet of Things with Arduino Cookbook Build exciting IoT projects using the Arduino platform

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781785286582
Length 188 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Marco Schwartz Marco Schwartz
Author Profile Icon Marco Schwartz
Marco Schwartz
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Internet of Things with Arduino Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Connecting an Arduino to the Web 2. Cloud Data Monitoring FREE CHAPTER 3. Interacting with Web Services 4. Machine-to-Machine Interactions 5. Home Automation Projects 6. Fun Internet of Things Projects 7. Mobile Robot Applications Index

Securing your online data


We are now going to learn how to protect the data that was stored by your devices. Indeed, using the recipes we saw so far, anyone can log data to your devices and then retrieve this data via a simple web request.

Getting ready

The key to protecting your data stored on Dweet.io is to use locks. You can learn more about locks at:

https://dweet.io/locks

Basically, you can buy a lock to protect your devices, and then to access them or log new data you will need to always provide the key associated with this lock.

How to do it...

The first step is to lock the device, which is done by calling the URL, passing your thing name, lock, and key:

https://dweet.io/lock/{thing_name}?lock={your_lock}&key={your_key}

To actually log data to a device protected by a lock, you need to provide the lock and the key whenever you are calling the API from the Arduino board. For example:

https://dweet.io/dweet/for/{my_locked_thing}?key={my_key}&hello=world&foo=bar

The same is then...

You have been reading a chapter from
Internet of Things with Arduino Cookbook
Published in: Sep 2016
Publisher: Packt
ISBN-13: 9781785286582
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images