欧宝娱乐

Jump to ratings and reviews
Rate this book

Raspberry Pi Home Automation with Arduino

Rate this book
Unleash the power of the most popular microboards to build convenient, useful, and fun home automation projects If you are new to the Raspberry Pi, the Arduino, or home automation and wish to develop some amazing projects using these tools, then this book is for you. Any experience in using the Raspberry Pi would be an added advantage. Revolutionize the way you interact with your home and become part of the rapidly growing group of hobbyists and enthusiasts by combining the powerful Raspberry Pi with an Arduino board. Starting with an introduction to the Raspberry Pi and Arduino boards you will set up your very own home automation system through a series of exciting projects, making your life a lot easier. Build a thermostat, a Raspberry Pi control device, a parcel delivery detector, and a water and damp detector, and then move on to more complex projects including a motor mechanism to control your curtains. By the end of this practical guide, you will be a confident user who can program, set up, and run a wide range of applications using both the Raspberry Pi and the Arduino.

131 pages, Paperback

First published February 1, 2013

7 people are currently reading
79 people want to read

About the author

Andrew K. Dennis

4books1follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (8%)
4 stars
12 (35%)
3 stars
15 (44%)
2 stars
4 (11%)
1 star
0 (0%)
Displaying 1 - 13 of 13 reviews
3 reviews
March 19, 2013
Hello gentle readers ... "This is scribendor 'quilling'"
As someone who runs a technical training company and a small technical bookshop it should come as no surprise that I would be interested in just this kind of book ... Raspberry Pi Home Automation with Arduino
Actually I came across it via a discussion thread in LinkedIn ... thanks due to Kevin ..
So, following Kevin's example I expressed an interest and obtained a review copy.
Actually I quite a fan of Packt publishing ... Many's the time that some of their books have provided timely material that has helped me in developing one esoteric course or other. The most recent one being an nginx course ... ran recently for a large internet retailer in the US.

I really like the book ... and posted reviews on LinkedIn (RaspberryPi workshops group) and Facebook.
Without any more ado here is the review (political sermon and all).

A review of a nice little book dealing with "would you believe it" - Home Automation !!!

RaspberryPi - Home automation ...
[...]
It is still "early days" for the RaspberryPi .. "the little Linux board that could"
As with many successful "open source'ish" initiatives the RasPi has thrived on the basis of an active network of enthusiasts ably "nudged" by Liz Eben ... the partner and supporter of the "inventor of the RasPi.

Home automation is one of those topics that attracts both professionals, "big electronica", as well as amateurs. This book is firmly aimed at amateurs.
If you were to do home automation really professionally then you would probably implement something like BACNET or KNX ... not so easy !!

Hobbyists want projects that are relatively easy to build, to program and to understand.
This book "fits the bill".

Of particular interest is that it makes extensive use of the Arduino Bridge Shield developed by "Cooking Hacks" a Spanish company, Libelium, that sells a variety of AdHoc sensor networking systems and hubs (Waspmote) as well as Arduino add ons. Its good to see that there are Spanish
companies doing good things in the "electronics sector" , despite the terrible damage done to the Spanish economy by those "evil bankers and ... their politician and big business lackeys" [ Here endeth this particular sermon ... ], and who, in general have very little understanding of the needs and problems faced by small high tech enterprises, to quote from my ( fairly useless ) small business manager "I don't really understand what your company is doing ... " when I was trying to explain some of the advanced embedded and real time courses we were developing and running.

Particularly interesting for some will be the inclusion of the arduPi library by Cooking Hacks, which makes it possible to write Arduino applications and use them on the Raspberry Pi without needing a separate microcontroller such as an Uno board. I wish I had "thought of that".

The book starts of with typical Arduino like projects such as flashing an LED and obtaining temperature readings ... designed to provide background knowledg and to build up confidence.
It then goes on to cover some basic (from the point of view of home automation) projects, starting off with the construction of a thermostat controller which can save readings to an Sqlite database. These readings can then be retrieved via a web browser courtesy of HTSQL (HypertextStructure Query Language). HTSQL is something that is worth knowing about.

Having mastered the basics it is time to go on to another fairly standard home automation application, namely "curtain automation" - that can open and close the curtains based on the ambient light level value.

As they say in the cartoons "That's all folks".
Well not quite, because there is a wrapup chapter with useful follow on suggestions.

I liked this book. "Genius level" hackers and engineers may "frown upon it" ... but it is not meant for such people, even though I think that there are things in there that they may not necessarily know about already.

For STEM teachers, college teachers and for use on introductory embedded systems courses it is a treasure trove of examples and resources. It will also, I feel help overcome the feeling by many owners of RaspberryPi's expressed in words such as "well, now I've got it what can I do with it".

When I have time I will port my Microchip multitasking programming notes (that implement a garden sprinkler controlled by a PIC16/PIC18 .. and even a PIC24 or a PIC32 if you want to get ambitious and add ethernet and a touch screen) to the Raspberry Pi.

For the more technically minded ... send me an email and we can start discussing more "exotic" home automation systems that support BACNET and/or KNX.

.. and, fame at last ... there was an appreciative comment on the review posted in LinkedIn (in the RaspberryPi workshops group) ...
"I like the review, very amusing indeed. You could not be more right in saying "well, now I've got it what can I do with it", I know a lot of people with that exact problem, perhaps I can point them in the direction of this book now" ... thank you Peter.

And, finally , a plug for a little book I am funding via Kickstarter - USB Microchip Programming - go take a look if you feel inclined to do so.
[...].Donations would be especially welcome, however, technical suggestions and interesting case studies and code snippets would also be very much appreciated.

Thank you kind readers
Scribendor.
2 reviews
March 20, 2013
It's hard to pin down exactly who this book is for. On one hand its got quite a specific audience, maybe you're interested in home automation, and maybe you've previously experimented with the Arduino platform and you now have a Raspberry Pi or want to use one for some reason (maybe that the power/size ratio has greater possibilities than the Arduino), and maybe you don't mind buying an expensive interface so that you can plug Arduino shields into your Pi, and maybe you don't mind writing Arduino-fashion code in C++ in a text editor and building it from the command line with makefiles). That's a lot of 'maybe'. If you are all of these, the book should serve you well enough to get you on your way, but the value of the book diminishes the more of these maybe's you eliminate.
On the other hand, it tries to touch a lot of subjects and covers the basics of installing software on the Pi, installing and using a free IDE (Geany), electronics, it mentions wiringPi, ... It doesn't go into any topic particularly deeply. Just enough to get started, or to confuse you, depending on where your experience level is.

Where you actually get to see the value of using the Pi, as opposed to just keeping it simple and sticking with an Arduino plus shield, is in the latter part of the book where the author shows and explains how to set up an SQL database for recording sensor information, how to set up a web server (why the author chose Apache and not a smaller faster web server like lighttpd?), and how to make them all play together to do something useful.

The book has Arduino in its title. Arduino was designed for people who don't necessarily want to use text editors, makefiles, or confusing IDEs with millions of features. Most Arduino people just want to create stuff and they have enough on their plate already just learning to code. While it can easily be justified to use Arduino shields with a Pi due to the fact that there is an abundance of shields on the market, you should ask yourself honestly if your future Arduino shield-based projects really need the processing power of the Pi, because it will cost you another 40 Euros or so for the interface board. Based on the above, I think the title of the book is quite misleading. A more appropriate title (but not as catchy I guess) would be something like "Re-purposing Arduino shields with the Raspberry Pi" or "Using your Raspberry Pi like an Arduino". I really don't see the necessity to actually mention home automation in the title because the book doesn't go into it that much (it more-or-less asks you to think enthusiastically about what you *could* do), and the most complicated project in the book 'opening curtains according to the ambient light' brings a home automation context, but in fact this same type of project is ubiquitous in the micro-controller hobby in general.

Summary:

I think the real value of this book is in treating it like an introduction to Pi, with an electronics slant. That's how I approached it and I am not that disappointed. If you are a beginner it will encourage you to wonder at what you can achieve with this credit card sized computer applied to micro-controller type projects, if you spend some time learning C and some basic electronics, and you're driven by the need to impress some of your relatives next time they pop round for tea.

+ Has computer-related instructions for Mac, Linux and PC users where necessary
+ Uses simple language and assumes the reader has zero to little experience with programming or electronics
+ Has a large collection of links for future reading in the reference section
+ Enthusiastic tone and encourages to consider what's achievable

- Title is misleading
- No photos of any interface boards or project setups in the book, just block diagrams
- Tries to cover a lot of concepts but doesn't go deeply enough generally
- Occasionally brings up somewhat irrelevant topics (there was no X10 project but there is a whole section on X10 in the book, for example)
- Using BerryBoot is debatable for this kind of application, I would have like to seen justification in the text other than "It's by far the easiest way to install Raspbian" which I happen to agree with
- To make good use of the book's example projects you will have to buy a specific interface board which is more expensive than the Raspberry Pi or the Arduino itself

Review is based on the e-book from:
2 reviews
March 22, 2013
is a book written by Andrew K. Dennis, and edited by Packt. With this book, the reader learns how to achieve automation tasks using a Raspberry Pi coupled with an Arduino.

After the classical Raspberry / Linux setup and requirements, the book covers several commons task in home automation :
* Thermometer, to retrieve temperatures from several sensors
* Thermostat, to control an heating system by switching relays based on Thermometer project
* Data Storage, to log temperatures
* Curtain Automation, based on an ambiant sensor and motor control
* Finally, the book give few tips to help prototyping with Raspberry Pi.

All the book relies on the Cooking-Hacks RPi-to-Arduino bridge shield. All hardware stuff use the Arduino instead of directly use GPIO. As you will notice with upcoming WebIOPi 0.6, we can use GPIO to make many things, quite easily. We can connect sensors and also control motors without using many devices.

The RPi-to-Arduino bridge and so the book also require the arduPi firmware for the Arduino. In my opinion, the book is more about learning the bridge and arduPi firmware than learning all Raspberry Pi possibilities.

When the reader knows that, I have to admit the book is well written, with good explanations and code snippets. Moreover, using an Arduino with a Raspberry Pi is one of the best combo and a must have for any hobbyist geek and prototype builder. I say that to my friends and co-workers since the Raspberry Pi has been released. It gives the Pi missing hardware PWM output and Analog input with a single extension.

With passing time, I now rather think that the Raspberry Pi should be directly used for many common things, only using a cheap ADC like Microchip MCP3000 series or TI ADS1000 ones. It simplifies the circuit, consumes less, and allow to learn more on electronic components and industrial uses. Arduino should come only to help the Pi in several time critical task. For instance, measuring a PWM signal or using a wheel encoder.

The book is well enough written to reuse explanations in other contexts, and replacing the Arduino with something else should be easy as we can found many explanation on Internet. The Raspberry Pi forum and the Mag Pi are good starts, there is also many hobbyist blogs. But reading components data sheets is more interesting, exciting and provides more precise information. Combining stuff from the book and Internet will providing a powerful set of stuff to unleash the Raspberry Pi power in your electronic projects.

Advanced hobbyist who are already familiar with data sheet reading and implementation should pass away this book.

Intermediate skilled people should get this book to frame their knowledge and lead them further.

Beginners and people who already have both Arduino and Raspberry, but still don鈥檛 know how to connect them together it with the Cooking-Hack bridge. It will ensure a success in your Home Automation projects and learn you many things.
36 reviews20 followers
July 27, 2017
This should have been a tutorial on
It is almost useless unless you are using the shield and software from this website.
Profile Image for Nick Bair.
16 reviews
March 3, 2020
I didn't really find anything interesting or useful in this book.
1 review
March 12, 2013


There are very few books on the market that discuss the Raspberry Pi target device and how to develop programs for it. One such new book that was just published is "Raspberry Pi Home Automation with Arduino" by Andrew K. Dennis.

Dennis is an R&D software developer at Prometheus Research, which provides research data management. His background spans from open source projects to home automation technology. His writing style is direct and understandable with a right amount of technical language.

The book is split up into 5 major sections: Introduction, Set-Up, Basic Temperature Project, Curtain Automation Project, and Conclusion.

The first section gives a good introduction to the Raspberry Pi and Arduino micro-controller. There was some general history given of the how the Raspberry Pi came about and a brief overview of the hardware specs. The diagram of the hardware was lacking though, and a photo of the Raspberry Pi itself would have been better served here instead of the block diagram given. Next, the Arduino shield was described and how that was to be used with the Raspberry Pi in this book.

The parts that covered X-10 and the dot.com boom seemed outdated and out-of-place, since these sections did not add to the book's focus or value on current technology and how to use it for home automation, instead of the obsolete technologies from the past such as X-10. The first 21 pages could have been better done in 5 or 6 pages instead, in order to skip the unneeded background and get to the subject at hand.

The section on setting up the Raspberry Pi was very detailed and straight-forward, although not enough detail was given for the exact Raspbian bundle that the reader should download (such as the bundle name and URL). Instead, the instructions were specific to Berry Boot, which seemed too restrictive and not flexible to a knowledgeable reader who is familiar with the Web. Chapter 2 seemed too dry with too many instructional steps instead of a better description of what was going on overall.

Chapter 3 on setting up the Arduino shield could have had a better photo instead of the block diagram. The chapter also seem disjointed and out of place, since it covered the Arduino and how it could be used for development instead of focusing of the first subject of the book which should be more Raspberry Pi based. The Basic Temperature Project seemed to concentrate too much on the low-level details such as the 10K ohm resistor, wires, and breadboard, when it could have dived into the steps for connecting everything quicker and with greater detail. Also, the introduction to Makefiles seemed to be disjointed with the rest of the chapter. The Thermostat Project built on the temperature chapter but seemed too focused again on low-level details such as cURL, instead of focus on the project itself on a higher level.

The chapter on Temperature Storage never got into why using a database was advantageous on a small device such as a Raspbery Pi, so seemed lost. It seemed to focus too much on the novelty of the idea of using a database to store temperature readings instead of the practical use for it and why it would be valuable to the reader.

The chapter on Curtain Control seemed interesting with a better balance of the technical details and why the reader would be interested in doing this project. The example code in this chapter was better presented and gave a better/higher level of detail than the other chapters.

The Wrap-Up chapter seemed to be a general sweep-up of all miscellaneous and reference topics of the book. It seemed out of place and abrupt in the general flow of the book.

Overall, the book was well written with good use of language, but could have been better served on the Web as a free-of-cost series of blog posts with more detailed photos and reference links instead of a $15 ebook / $27 book. Also, a series of free blog posts on the Web would be more interactive with comments from readers and answers from the author. As a book or ebook, this topic seems incomplete since it is a one-way telling of only a few projects and technology. The best part of the book was the Curtain Control chapter, but again that might have been better served as a blog post, not a book or eBook. I cannot recommend people buying this book at $27 for the book or $15 for the ebook.
Profile Image for Ivan.
9 reviews
March 28, 2013
As a newbie in the field of not only Raspberry Pi, but of electronics as a whole, I needed a lot of background to catch up with. All of these resistors, thermistors, bread-boards, shields, wire-color-codes, etc. - the book is not a theoretical guide in the filed but give just enough explanations for all the hardware involved. The book's chapters are typically organised as a set of tutorials. This makes it comfortably structured, and allows for quicker reading and jumping directly to your level or particular sub-theme of interest.

So lets be a bit more specific and see what is in the book. The first chapter is introductory in sense of providing historical background to the both platforms - Raspberry Pi and Arduino, and automation of the home environment. In the end we are convinced that the Pi (equipped with the Arduino shield) really represents a little revolution in the field.

The next two chapters provide the initial set-up for our automating system. From installing the operating system of choice, through constructing the shielded device, to the programming tools required for managing the test system. Here the chosen OS is the "default" option for Raspberry Pi - Raspbian Wheezy. Once the shield is installed, the programmatic communication with it needs to be carried through some library. It is shown, how to check which version of the provided arduPi library is the right one for our Pi. When ready and after the mandatory Blinking LED test we're set and ready to dive.

Chapter four is very important, because it is a proof of concept. Guiding us through making the hardware set-up of digital thermometer and finally the code that reads the measurements, it is actually the first example of a real world application of the Pi. Just reading through this chapter and automation ideas might start to pop out. And since the home is a physical environment, the underlying laws and principles are explained when necessary up to the mathematical equation and its corresponding arduPi code. We're hinted that for further and more complex experimentation the simple Geany IDE could be of great help to automate the process of compiling and running the executable binaries.

The next chapter five is the fore mentioned increasing (although quite slight) of complexity - it shows how to turn the thermometer into a thermostat. On the level of hardware the relays are introduced. On the level of software the screen and the cURL were installed in order to keep the application as an autonomously running process on Raspbian, and for the application to communicate to other programs (code) through URLs respectively.

Chapter six is dedicated to making things permanent - to better control the data by recording the measurements to a database. The mixture of SQLite, HTSQL, Apache HTTP server with WSGI (server side Python implementation) is gradually tied up so in the end all the results are written into the SQLite database file. Its data can conveniently be displayed in the simple web application just created.

The seventh chapter takes a little step aside, by exploring the task of using the combination of photoresistor and a motor shield, which is a bit different look of the previous task. They're used to automatically close/open blinds regarding the environment's luminosity. Thus it is shown that there is abundance of ideas floating around and only the lack of imagination can make them remain invisible. Discovering the new projects is subjective to everyone and hinting to some of them is the task of the last chapter eight. Here the tone is set for the real world problems. The hardware presented is the Gertboard, the GPIO pins and their meanings, the components from the previous tasks are provided with some more advanced details. Some possible applications are mentioned (like the modern 3D printing for instance).

So if you're this type of electronics enthusiast who is new to Raspberry Pi, this book is for you, regardless of your experience with soldering components. The book has a real practical value. But only if you're not afraid to get your hands a little bit dirty.
9 reviews
May 6, 2013


If you come from the Arduino world and want to make a soft transitions to the Raspberry Pi, this could be your book, if not, keep reading.

All the book is based on the "Arduino way" to do things, meaning you use an Arduino library and bridge board to do the projects (but there is no Arduino board in any of the projects). Most of them can be done from the Raspberry Pi board using other auxiliary boards and it's own programming language, this is where the strange point of view comes in.

Besides that, the book is a good introduction to the automation topic but don't expect to have a fully connected home by the end of the book.

The first real project is a thermometer, the second a thermostat, but all it does is switching a relay on and off pretending that could be your real heating system. Then it moves to data storage from this project so it can introduce some more concepts like a database and a web server, but you have to trust what the book says when it comes to use "make files" and to compile source code from the command line. If you are starting in programming it may be confusing as no one has introduced all the programming stuff. "Do this, then that, and it works".

After that comes motor manipulation to do blinds and curtains automation. No security measures are taken here. You better don't have your head out of the window when the curtain or blind starts moving, as all it does is having a timer to control the time the motor has to be working.

In summary, the book has a good theory part and an easy learning curve (if you just believe what it says when it comes to make files and source compiling and type it without questions about those topics) but I wouldn't apply the projects to my own home as they lack security measures. They are original as they want to have more real world stuff than blinking leds projects to motivate the reader but they are not real home automation projects. Good book if moving from an Arduino, not the best fit if not. There are easier ways to do these projects using a Raspberry Pi alone (with auxiliary boards when needed).
Profile Image for John.
Author听1 book
March 4, 2013
While the information presented in the is definitely useful, the end result is a bit of a platform identity crisis, as no Arduino is ever actually being used. The Home Automation part of the title is somewhat loosely coupled, but it does serve as a convenient context for the examples presented and is a nonetheless a prime candidate for Raspberry Pi/Arduino projects.

This book focuses on using the Raspberry Pi like an Arduino. If you are already familiar with developing projects on the Arduino, this can be a good thing as you will be almost immediately productive with the Raspberry Pi by following the suggestions in this book. On the other hand, using the Raspberry Pi like an Arduino may not be the cleanest way to do things and you may miss out on some of the the advantages of the Raspberry Pi, like being able to code to the GPIO using a higher level language such as Python rather than C/C++.

The concepts presented in the book are useful even outside of the context presented in the book itself, and for this I give the text high marks. However, I feel that there was too much of an emphasis on programming the Raspberry Pi following the Arduino way of doing things rather than looking at programming it to get similar results as the Arduino but using what the Raspberry Pi itself has to offer. Perhaps the title should have been "Raspberry Pi Home Automation AS Arduino" instead of "Raspberry Pi Home Automation WITH Arduino".
684 reviews27 followers
June 18, 2014
The book I read to research this post was Raspberry Pi Home Automation With Arduino by Andrew K Dennis which is quite a good book which I read at . This books looks at various projects using the raspberry pi and arduino in home automation. It does these projects step by step but there isn't much information in general on the arduino and raspberry pi. It's useful if you plan on doing one of these projects and does guide you through the steps of installing an operating system on your raspberry pi. There are 2 operating systems mentioned raspbian at & berry boot. Some companies sell operating systems for a raspberry pi preloaded on a SD card which is probably a good idea. Mac OS X, Windows 7 & Linux work equally well at downloading the software which is Linux based. You may need a native database which you can use SQL Lite & HTSQL with the latter for performing queries. I think you need quite a high level of computer knowledge prior to reading this book. The raspberry and arduino are open source computer kits which actually represent good value for money in terms of what you get. They have revolutionized home automation and there is a whole new breed of open source components that work with them and are interchangeable from manufacturer to manufacturer. These components also tend to be quite cheap so you can automate your home on a small budget. I quite enjoyed reading it but it was somewhat short and I would have liked more general information I could apply to projects in general.
Profile Image for Marcin.
79 reviews32 followers
June 20, 2013
If you've got both arduino and raspberry pi, and lots of external boards you might have used or tried to use to get your arduino home system to even better functionality but got bored or distracted it's a good read. You'll use what you have, you'll play with rasp's great interfaces and you'll get back to the topic of "supah home intelligence", as the previous book owner expressed the state after having it read (while giving me this book). And as I love to tinker with some toys and had similar things done at work already it was clear to me that the book might change my work and use more of the rasp's potential. I was right, yet I was also in a comfortable situation of having my "board garbage collection" a little bit slimmer. If you own only a rasp pi you would have needed to procure a few of such external interfaces to finish the basic projects. But if you used rasp pi only as a home network file server/media streamer this migh show you how you can change it into your very own HAL9000 bastard progeny. You might also spend a few bucks in the process, but it's not equivalent to your average lady on a shopping spree shoe/bag/clothes hunt ;) So quite interesting projects, easy to follow instructions and you're off hidden in your workshop for some time.
Profile Image for Matt Heavner.
1,064 reviews14 followers
July 8, 2013
It would be tough to write a good tech "how to" book these days -- this one actually does a good job! Despite a few "single command & output" screen shot (with black background not less!), overall there is not too much material (in opposition to many "how to" tech books these days). This book does a great job of coverage (breadth) with a good balance of depth (not too shallow, not too deep). It does cover C++, python, web servers, electronics, ... and so does require some previous knowledge. The book does a good job of building up three separate projects which are quite illustrative. There is a good balance of external links to reference (primarily URLs) -- a few times it is overboard (such as the 3D printers and EEG inputs), but overall good match. I can see where lots of criticism could be leveled, but I think in the balance, this book his the mark.
1 review
March 22, 2013
This offers a good intoduction to Raspbery Pi for a beginner. It covers a lot of ground in a concise format: install a web sever, program in Python, SQL, HTSQL, and has an introduction to electronics: breadboards, soldering, etc.).

The "home automation" and "arduino" terms are misleading. No Arduinos were hurt in making it, as it only simulates the function of an Arduino through arduPi. The pojects described can control a relay, or a motor. Not much more. Good enough though to get an enthusiast started. Any further information is freely available in blogs and various websites.
Displaying 1 - 13 of 13 reviews

Can't find what you're looking for?

Get help and learn more about the design.