Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ESP8266 Home Automation Projects

You're reading from  ESP8266 Home Automation Projects

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781787282629
Pages 196 pages
Edition 1st Edition
Languages
Authors (2):
Catalin Batrinu Catalin Batrinu
Profile icon Catalin Batrinu
Constantin Tambrea Constantin Tambrea
Profile icon Constantin Tambrea
View More author details
Toc

Streaming data from ESP8266


To stream data from ESP8266 we need first to establish a WebSocket connection between the ESP8266 and a server; data that will be streamed over the WebSocket connection will be the acceleration values for the X, Y and Z axes. ESP8266 will read them from an ADXL345 chip and will send them to a nodeJS server. From the server, data can be sent to a connected browser on the same server or can be written to a database for further analysis:

The final circuit can also include a time-series database such as InfluxDb, for storing the values transmitted by the ADXL345.

Adding a database can let you collect various data from multiple acceleration sensors, store them in the database, retrieve them on request to compare them with the current values, or draw nice graphs with the current and historical data.

A server can also react to some values and send alerts (email, SMS) and send data to other ESP8266 modules to react, or to other servers.

ADXL345 accelerometer

Produced by the...

lock icon The rest of the chapter is locked
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 €14.99/month. Cancel anytime}