<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ smart home - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ smart home - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 26 Jul 2026 11:17:20 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/smart-home/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Use Node, a Raspberry Pi, and an LCD Screen to Monitor the Weather ]]>
                </title>
                <description>
                    <![CDATA[ By Stan Georgian Over the last few years, smart home devices have gone from less than 300,000 back in 2015 up to almost 1.2 billion in 2020. And they’re expected to grow to 1.5 billion by 2021.  So it's likely you have at least some smart devices in ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/monitor-the-weather-with-node-and-raspberry-pi/</link>
                <guid isPermaLink="false">66d45ee0230dff0166905801</guid>
                
                    <category>
                        <![CDATA[ hardware ]]>
                    </category>
                
                    <category>
                        <![CDATA[ projects ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Raspberry Pi ]]>
                    </category>
                
                    <category>
                        <![CDATA[ smart home ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 30 Jun 2020 18:34:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/06/vinicius-amnx-amano-ALpEkP29Eys-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Stan Georgian</p>
<p>Over the last few years, smart home devices have gone from less than 300,000 back in 2015 up to almost 1.2 billion in 2020. And they’re expected to grow to <a target="_blank" href="https://www.omdia.com/resources/product-content/how-the-smart-home-will-develop-by-2021">1.5 billion by 2021</a>. </p>
<p>So it's likely you have at least some smart devices in your home, given that the average will reach 8.7 smart devices per home by 2021.</p>
<p>As developers, we have some advantage in this domain, since we can build our own smart home devices.</p>
<p>It’s not only the devices that have experienced rapid development. The development boards used for them have started to become more and more commercial and accessible. </p>
<p>In this article, we will see how we can use a Raspberry Pi, an LCD screen, and a few lines of code to monitor the weather outside or for a specific location.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/ezgif-6-8af115ff0d25.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Because this is a Do It Yourself (DIY) project, there are some prerequisites that we need for this device.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li>Raspberry Pi 3 (or higher)</li>
<li>LCD Screen</li>
<li>Connection Wires</li>
<li>Potentiometer (Optional)</li>
<li>Breadboard (Optional)</li>
</ul>
<h1 id="heading-how-to-build-it">How to Build It</h1>
<p>As soon as we have everything we need we can start. Let's take it step by step.</p>
<h2 id="heading-step-i-base-configuration">Step I - Base Configuration</h2>
<p>The first step consists of the basic setup and a verification of all the components.</p>
<p>For this demo, we will use the ClimaCell Weather API as a weather data provider, as they have a large number of indicators, including air quality indicators, for us to use.</p>
<p>To use their API we must open an account on their platform and get an API key, which we’ll use to sign our requests.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/bQHbP2FU.png" alt="Image" width="600" height="400" loading="lazy">
<em>ClimaCell API Limit</em></p>
<p>The account is free to open and it comes with a 100-hour limit of API calls, which is more than enough for our project.</p>
<p>As soon as we have this API key, we can move to the hardware configuration and connect the LCD screen to our Raspberry Pi. You should turn the Raspberry Pi off while you make the wire connection.</p>
<p>The pin layout for Raspberry Pi 3 can be seen in the next image.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/emiVLiHU.png" alt="Image" width="600" height="400" loading="lazy">
<em>Raspberry Pi 3 Pins</em></p>
<p>The wire connection between the LCD and the development board is the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/WWjB6lbg.png" alt="Image" width="600" height="400" loading="lazy">
<em>Connection between Raspberry PI and LCD</em></p>
<p>This hardware connection will make the LCD screen be on full brightness and full contrast. The brightness level is not a problem, but contrast is because we won’t be able to see the characters on the screen. </p>
<p>That’s why we need to introduce at least one potentiometer with which to set the contrast level.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/DFu8N63z.png" alt="Image" width="600" height="400" loading="lazy">
<em>Schematic</em></p>
<p>At this point, we can turn on our Raspberry Pi and we should see the LCD screen alive. With the help of variable resistance we should be able to control the contrast.</p>
<h2 id="heading-step-ii-project-configuration">Step II - Project Configuration</h2>
<p>As a programming language, we’ll use <a target="_blank" href="https://nodejs.org/en/">NodeJS</a> to write the code. If you don’t already have NodeJS installed on your Raspberry then you can follow these <a target="_blank" href="https://www.instructables.com/id/Install-Nodejs-and-Npm-on-Raspberry-Pi/">simple instructions</a>.</p>
<p>In a new folder, run the command <code>npm init -y</code> to set up a new npm package, followed by the command <code>npm install lcd node-fetch</code> to install these 2 necessary dependencies.  </p>
<ul>
<li><code>lcd</code> will be used to communicate with the LCD Screen</li>
<li><code>node-fetch</code>  will be used to make <a target="_blank" href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol">HTTP</a> requests to ClimaCell API.</li>
</ul>
<p>We said that we need an API key to communicate with the weather data provider. You place your secret API key directly in the main code, or you can create a <code>config.json</code> file in which you can place this key and any other code-related configuration you may have.</p>
<p><code>config.json</code></p>
<pre><code class="lang-javascript">{  <span class="hljs-string">"cc_key"</span>: <span class="hljs-string">"&lt;your_ClimaCell_API_key&gt;"</span>}
</code></pre>
<p>Lastly, let’s create the main file of our project and include all these things we talked about.</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// * Dependencies</span>
<span class="hljs-keyword">const</span> Lcd = <span class="hljs-built_in">require</span>(<span class="hljs-string">"lcd"</span>);
<span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">"fs"</span>);
<span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">"node-fetch"</span>);

<span class="hljs-comment">// * Globals</span>
<span class="hljs-keyword">const</span> { cc_key } = <span class="hljs-built_in">JSON</span>.parse(fs.readFileSync(<span class="hljs-string">"./config.json"</span>));
</code></pre>
<h2 id="heading-step-iii-the-lcd">Step III - The LCD</h2>
<p>Writing on the screen is a piece of cake using the lcd module. This library acts as a layer of abstraction over how we communicate with the device. In this way we don’t need to micro-manage each command individually.</p>
<p>The entire code for our LCD screen is the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/MidH14Tk.png" alt="Image" width="600" height="400" loading="lazy">
<em>[RAW](https://carbon.now.sh/?bg=rgba(171%2C%20184%2C%20195%2C%201)&amp;t=seti&amp;wt=none&amp;l=javascript&amp;ds=true&amp;dsyoff=20px&amp;dsblur=68px&amp;wc=true&amp;wa=true&amp;pv=56px&amp;ph=56px&amp;ln=false&amp;fl=1&amp;fm=Hack&amp;fs=14px&amp;lh=133%25&amp;si=false&amp;es=2x&amp;wm=false&amp;code=const%2520lcd%2520%253D%2520new%2520Lcd(%257B%2520rs%253A%252026%252C%2520e%253A%252019%252C%2520data%253A%2520%255B13%252C%25206%252C%25205%252C%252011%255D%252C%2520cols%253A%252016%252C%2520rows%253A%25202%2520%257D)%253B%250A%250A%250Afunction%2520writeToLcd(col%252C%2520row%252C%2520data)%2520%257B%250A%2520%2520return%2520new%2520Promise((resolve%252C%2520reject)%2520%253D%253E%2520%257B%250A%2520%2520%2520%2520lcd.setCursor(col%252C%2520row)%253B%250A%2520%2520%2520%2520lcd.print(data%252C%2520(err)%2520%253D%253E%2520%257B%250A%2520%2520%2520%2520%2520%2520if%2520(err)%2520%257B%250A%2520%2520%2520%2520%2520%2520%2520%2520reject()%253B%250A%2520%2520%2520%2520%2520%2520%257D%250A%2520%2520%2520%2520%2520%2520resolve()%253B%250A%2520%2520%2520%2520%257D)%253B%250A%2520%2520%257D)%253B%250A%257D)</em></p>
<p>The first step was to create a new <code>lcd</code> object and to pass as argument the pins we’ve used.</p>
<p>The keys <code>cols</code> and <code>rows</code> represent the number of columns and rows of our LCD display. 16x2 is the one I used in this example. If your LCD has just 8 columns and 1 row, then replace 16 and 2 with your values.</p>
<p>To write something on the display we need to use these two methods successively:</p>
<ul>
<li>lcd.setCursor() - selecting the position from which to start writing</li>
<li>lcd.print()</li>
</ul>
<p>At the same time, we wrapped these two functions in a promise to make use of <code>async/away</code> keywords.</p>
<p>At this point, you can use this function and print something on your display. <code>writeToLcd(0,0,'Hello World')</code> should print the message <code>Hello World</code> on the first row starting from the first column.</p>
<h2 id="heading-step-iv-the-weather-data">Step IV - The Weather Data</h2>
<p>The next step is to get the weather data and print it on the display.</p>
<p>ClimaCell provides a lot of weather data information, but also air quality and pollen, fire and other information. The data is vast, but keep in mind that your LCD screen only has 16 columns and 2 rows – that’s just 32 characters.</p>
<p>If you want to display more types of data and this limit is too small for you, then you can use a scroll effect.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/81w9nkUg.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>For this demo we’ll keep it simple and we’ll print on the LCD screen the following data:</p>
<ul>
<li>current date (hour, minutes, seconds)</li>
<li>temperature</li>
<li>precipitation intensity</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/zj8FQisB.png" alt="Image" width="600" height="400" loading="lazy">
_[RAW](https://carbon.now.sh/?bg=rgba(171%2C%20184%2C%20195%2C%201)&amp;t=seti&amp;wt=none&amp;l=javascript&amp;ds=true&amp;dsyoff=20px&amp;dsblur=68px&amp;wc=true&amp;wa=true&amp;pv=56px&amp;ph=56px&amp;ln=false&amp;fl=1&amp;fm=Hack&amp;fs=14px&amp;lh=133%25&amp;si=false&amp;es=2x&amp;wm=false&amp;code=async%2520function%2520getWeatherData(apiKey%252C%2520lat%252C%2520lon)%2520%257B%250A%2520%2520const%2520url%2520%253D%2520%2560https%253A%252F%252Fapi.climacell.co%252Fv3%252Fweather%252Frealtime%253Flat%253D%2524%257Blat%257D%2526lon%253D%2524%257Blon%257D%2526unit_system%253Dsi%2526fields%253Dtemp%2526fields%253Dprecipitation%2526apikey%253D%2524%257BapiKey%257D%2560%253B%250A%250A%2520%2520const%2520res%2520%253D%2520await%2520fetch(url)%253B%250A%2520%2520const%2520data%2520%253D%2520await%2520res.json()%253B%250A%2520%2520return%2520data%253B%250A%257D%250A%250Aasync%2520function%2520printWeatherData()%2520%257B%250A%2520%2520const%2520%257B%2520temp%252C%2520precipitation%2520%257D%2520%253D%2520await%2520getWeatherData(cc<em>key%252C%252045.658%252C%252025.6012)%253B%250A%250A%2520%2520%252F%252F%2520<em>%2520first%2520row%250A%2520%2520await%2520writeToLcd(0%252C%25200%252C%2520Math.round(temp.value)%2520%252B%2520temp.units)%253B%250A%250A%2520%2520%252F%252F%2520</em>%2520second%2520row%250A%2520%2520const%2520precipitationMessage%2520%253D%250A%2520%2520%2520%2520%2522Precip.%253A%2520%2522%2520%252B%2520precipitation.value%2520%252B%2520precipitation.units%253B%250A%2520%2520await%2520writeToLcd(0%252C%25201%252C%2520precipitationMessage)%253B%250A%257D)</em></p>
<p>To get data from ClimaCell for a specific location, then you need to send its geographical coordinates, latitude and longitude.</p>
<p>To find your city’s coordinates, you can use a free tool like <a target="_blank" href="https://www.latlong.net/place/new-york-city-ny-usa-1848.html">latlong.net</a> and then you can save them in <code>config.json</code> file along with your API key, or you can write them directly in the code.</p>
<p>At this point the data format returned by the API call is the following:</p>
<pre><code class="lang-javascript">{
  <span class="hljs-attr">lat</span>: <span class="hljs-number">45.658</span>,
  <span class="hljs-attr">lon</span>: <span class="hljs-number">25.6012</span>,
  <span class="hljs-attr">temp</span>: { <span class="hljs-attr">value</span>: <span class="hljs-number">17.56</span>, <span class="hljs-attr">units</span>: <span class="hljs-string">'C'</span> },
  <span class="hljs-attr">precipitation</span>: { <span class="hljs-attr">value</span>: <span class="hljs-number">0.3478</span>, <span class="hljs-attr">units</span>: <span class="hljs-string">'mm/hr'</span> },
  <span class="hljs-attr">observation_time</span>: { <span class="hljs-attr">value</span>: <span class="hljs-string">'2020-06-22T16:30:22.941Z'</span> }
}
</code></pre>
<p>We can deconstruct this object and get the temp and the precipitation values and print them on the first and second row.</p>
<h2 id="heading-step-v-wrap-it-up">Step V - Wrap it Up</h2>
<p>All we need to do now is to write the logic for our script, and update the LCD screen when new data arrives.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/oeM4lSfQ.png" alt="Image" width="600" height="400" loading="lazy">
<em>[RAW](https://carbon.now.sh/?bg=rgba(171%2C%20184%2C%20195%2C%201)&amp;t=seti&amp;wt=none&amp;l=javascript&amp;ds=true&amp;dsyoff=20px&amp;dsblur=68px&amp;wc=true&amp;wa=true&amp;pv=56px&amp;ph=56px&amp;ln=false&amp;fl=1&amp;fm=Hack&amp;fs=14px&amp;lh=133%25&amp;si=false&amp;es=2x&amp;wm=false&amp;code=async%2520function%2520main()%2520%257B%250A%2520%2520await%2520printWeatherData()%253B%250A%250A%2520%2520setInterval(()%2520%253D%253E%2520%257B%250A%2520%2520%2520%2520printWeatherData()%253B%250A%2520%2520%257D%252C%25205%2520<em>%252060%2520</em>%25201000)%253B%250A%250A%2520%2520setInterval(async%2520()%2520%253D%253E%2520%257B%250A%2520%2520%2520%2520await%2520writeToLcd(8%252C%25200%252C%2520new%2520Date().toISOString().substring(11%252C%252019))%253B%250A%2520%2520%257D%252C%25201000)%253B%250A%257D%250A%250Alcd.on(%2522ready%2522%252C%2520main)%253B%250A%250A%252F%252F%2520*%2520If%2520ctrl%252Bc%2520is%2520hit%252C%2520free%2520resources%2520and%2520exit.%250Aprocess.on(%2522SIGINT%2522%252C%2520(</em>)%2520%253D%253E%2520%257B%250A%2520%2520lcd.close()%253B%250A%2520%2520process.exit()%253B%250A%257D)%253B)_</p>
<p>The weather data is updated every 5 minutes. But because we have a limit of 100 API Calls / Hour imposed by ClimaCell, we can go even further and update the weather data each minute.</p>
<p>For the current date, we have two options: </p>
<ul>
<li>we can use the property <code>observation_time</code> and display the date at which the data was received, or </li>
<li>we can make a real clock and display the current time.</li>
</ul>
<p>I chose the second option, but feel free to do it as you please.</p>
<p>To print the time in the upper right corner, we must first calculate the starting column so that the text fits snugly. For this we can use the next formula <code>total columns number</code> minus <code>text to display length</code></p>
<p>The date has 8 characters and because he has 16 columns, we must start from column number 8.</p>
<p>The LCD setting is asynchronous, so we must use the method <code>lcd.on()</code> provided by the related library, so we know when the LCD has been initialized and is ready to be used.</p>
<p>Another best practice in embedded systems is to close and free the resources that you use. That’s why we use the <code>SIGNINT</code> event to close the LCD screen when the program is stopped. Other events like this one include:  </p>
<ul>
<li><code>SIGUSR1</code> and <code>SIGUSR2</code> - to catch "kill pid” like nodemon restart</li>
<li><code>uncaughtException</code> - to catch uncaught exceptions</li>
</ul>
<h2 id="heading-step-vi-run-it-forever">Step VI - Run it Forever</h2>
<p>The script is complete and at this point we can run our program. We just have one more thing we must do before we can finish. </p>
<p>At this point you’re probably connected to your Raspberry Pi using SSH or directly with an HDMI cable and a monitor. No matter what, when you close your terminal the program will stop. </p>
<p>At the same time if you power off your device and after some time or immediately power it on again, the script will not start and you’ll have to do it manually.</p>
<p>To solve this problem, we can use a process manager like <a target="_blank" href="https://www.npmjs.com/package/pm2">pm2</a>.</p>
<p>Here are the steps:  </p>
<ol>
<li><code>sudo npm install pm2 -g</code> - install pm2</li>
<li><code>sudo pm2 startup</code> - create a startup script for pm2 manager</li>
<li><code>pm2 start index.js</code> - start an application</li>
<li><code>pm2 save</code> - save your process list across server restart</li>
</ol>
<p>Now you can reboot your board and the script will start automatically when the device is ready.</p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>From this point you can customize your new device however you want. If you find this weather data important for you (or any other data from ClimaCell, like air pollution, pollen, fire index or road risk), you can create a custom case to put the Raspberry Pi and the LCD display in it. Then after you added a battery you can place the device in your house.</p>
<p><a target="_blank" href="https://www.raspberrypi.org/">Raspberry Pi</a> is like a personal computer, so you can do much more on it than you would normally do on a microcontroller like <a target="_blank" href="https://www.arduino.cc/">Arduino</a>. Because of this, it's easy to combine it with other devices you have in your house.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Best and Brightest AI Smart Cameras ]]>
                </title>
                <description>
                    <![CDATA[ By Gant Laborde Every home is becoming a smart home. I remember showing off my voice-controlled lights and live video feed of my dogs to friends like I was some kind of digital wizard. In 2016, the game was to find any smart device and get it connect... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/best-of-ai-smart-cams/</link>
                <guid isPermaLink="false">66d45edb3a8352b6c5a2aa51</guid>
                
                    <category>
                        <![CDATA[ AI ]]>
                    </category>
                
                    <category>
                        <![CDATA[ arlo ]]>
                    </category>
                
                    <category>
                        <![CDATA[ arlo pro ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ smart home ]]>
                    </category>
                
                    <category>
                        <![CDATA[ wyze ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 16 Oct 2019 19:20:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/10/undraw_smart_home_28oy-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Gant Laborde</p>
<p>Every home is becoming a smart home. I remember showing off my voice-controlled lights and live video feed of my dogs to friends like I was some kind of digital wizard.</p>
<p>In 2016, the game was to find any smart device and get it connected with your existing system, if you could. But the truth is today my 70+ year-old mom can do all the cool things I used to do, and she has more cameras... and more dogs.</p>
<p>It's a new world where we've all got options. Every aspect of our home gets more connected and noisy. As our houses are filling up with smart streaming devices, the "smart" and the price become critical. We don't want to drown in expensive push notifications. The future of digital life is about intelligent and dependable notifications. This is where AI says, “hold my beer.”</p>
<p>Originally, cameras only supported simple motion detection. They should have come with a warning, "This will go off so often you will hate your life. If a paper moves, or squirrel visits, expect false notifications!" With basic motion, devices cry wolf over and over to the point where you disable the "feature" altogether. It was the intention that cameras relay information and security, but you'll get neither if you've got hundreds of false alarms.</p>
<p>That’s why I’m leaning hard on AI to be the next big thing in home security. AI watches tirelessly and helps you regain certainty over your domain because that’s why you wanted a home camera in the first place.</p>
<p>As an AI and smart home enthusiast, I've been adding gadgets, cameras, locks, sensors, and lights for years now. I'm familiar with the reliable and unreliable devices on the market, their artificial intelligence, and their natural stupidity.</p>
<p>Constantly experimenting, my home camera system has a Ring Doorbell, Vivint Smarthome, a Wyze camera, and an Arlo Pro 2 system. With all these options, a comparison of all would be too wild of a ride, even for me.</p>
<p>So I'm going to choose two cameras for an AI contrast. I think both of these have been and will continue to be significant influencers in what we can expect from home camera systems. Join me in digging into the AI of the Arlo Pro 2 and Wyze cam!</p>
<h2 id="heading-what-kind-of-ai-can-we-get">What kind of AI can we get?</h2>
<p>All the cameras mentioned above have excellent video, 2-way audio, voice-assisted service, and regional scope detection. While their individual memory, rolling cloud coverage, and looks are significantly different, I’ll be focusing on the AI features so we can best get a handle on features of the future.</p>
<h2 id="heading-the-wyze-cam-v2">The Wyze Cam v2</h2>
<p>The Wyze Cam v2 is small and cute. It reminded me of a scene from Rick and Morty, so I named mine “Butter Bot”.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/bot.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can see instantly from the packaging that it’s compact and quite impressive to fit a 1080p smart device. Even set up for the device uses computer vision to find and setup via QR code!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/wyze.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-the-ai">The AI</h3>
<p>The green bounding box indicates areas of motion that caused detection to start - note that this is not the person detection.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/motion.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now let’s talk about person detection. The person detection on the Wyze Cam v2 (and also the original Wyze cam) is powered by Xnor.ai’s deep learning technology. You may recognize the company when they exploded onto the scene by creating a <a target="_blank" href="https://www.xnor.ai/solar-powered-ai">small, light-weight, AI device that was solar-powered</a>, and light enough to be lifted by a balloon.</p>
<p>Xnor.ai leverages specialized deep learning techniques that allow simple CPU-based devices to hold their weight next to much larger GPU-driven devices. Because the person detection states “Powered by Xnor.ai” it’s safe to say the service is happening directly on the camera. <a target="_blank" href="https://www.geekwire.com/2019/seattle-startups-vs-amazon-wyze-xnor-ai-partner-new-person-recognition-feature-20-security-camera/">This is corroborated by articles that accompanied the announced feature</a>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/person.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Especially following the privacy outrage by FaceApp, <a target="_blank" href="https://www.forbes.com/sites/thomasbrewster/2019/07/17/faceapp-is-the-russian-face-aging-app-a-danger-to-your-privacy/#17bbf72c2755">which was an AI app that claimed copyright to your photos when using them</a>, this is a refreshing advantage. As firmware updates occur, we could possibly get new services with no fees, because everything is run on device.</p>
<p>Another nifty application of AI that the Wyze cam uses is that it can send you notifications if it hears a smoke or CO2 alarm go off. Not just any sound, like my dogs barking, but an actual alarm sound can trigger a notification. Pretty nifty!</p>
<h2 id="heading-the-arlo-pro-2">The Arlo Pro 2</h2>
<p>It’s not hard to get your hands on an Arlo. These devices are everywhere. The sleek design comes with a good size package, and assumes that you’ve already got an Arlo Pro base station to connect.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/arlo.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-the-ai-1">The AI</h2>
<p>By default, the Arlo starts off with only motion and audio detection. There’s not really anything AI about the device out-of-box.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/kitchen.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>To crack open the AI aspects, we’ll have to jump in with a smart plan. Here’s the pricing in USD:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/smart-plans.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>US Prices Listing - See UK here</em> <a target="_blank" href="https://www.arlo.com/uk/landing/arlosmart/"><em>https://www.arlo.com/uk/landing/arlosmart/</em></a></p>
<p>These tack-on prices to the camera for added AI likely means the AI services for these devices is handled in the cloud rather than on-device. However, the features provided by Arlo Smart plans have a wide variety of detection schemes.</p>
<p>AI Features via Arlo Smart:</p>
<ul>
<li><p>Person Detection</p>
</li>
<li><p>Vehicle Detection</p>
</li>
<li><p>Animal Detection</p>
</li>
<li><p>Package Detection</p>
</li>
</ul>
<p>Unaccounted for on the site (but a good to know fact), the Arlo Smart plan includes the Fire/CO alarm alert in their smart notifications.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/smartnotif.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>These are awesome things to detect! Vehicle detection could help you identify the comings and goings of cars near your home. Animal detection will help you keep track of your dogs, and package detection is perfect for those non-Amazon packages to still give you a notification.</p>
<p>One of the caution points I’ll express here is that the AI is deeply rolled into the “Smart” plan, which means your entire detection system is probably completely tied to how well your network connection is running at the time of the event. While we’re in a significantly connected world, a network issue or downtime could miss an event, and leave you none the wiser.</p>
<p>Another significant caution is that cloud-based detection must send everything to a server to detect people, as compared to Wyze who could trigger cloud recording only if a person is already detected. As you add cameras it seems like you might be adding some unwanted congestion to your vastly connected home. The AI cloud solution seems to have some significant drawbacks associated with sending data in and out, such as reduced data privacy, high bandwidth usage, and likely increased power consumption as well.</p>
<h1 id="heading-evaluating-the-two-in-contrast">Evaluating the Two in Contrast</h1>
<h2 id="heading-person-detection">Person Detection</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/undraw_surveillance_kqll.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now it’s hard to create concrete tests for person detection without getting raw access to the Machine Learning models powering each system, but it’s worth performing a few simple experiments. Here are the three experiments I performed (yes, I looked crazy doing these).</p>
<p><strong><em>Spoiler Alert:</em></strong> <em>they both performed exactly the same</em></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>The Sprint Test</strong> - Quickly run past the device</td></tr>
</thead>
<tbody>
<tr>
<td><em>Wyze Cam v2</em></td><td><em>Arlo Pro 2</em></td></tr>
<tr>
<td>A quick sprint did not trigger person detection, only motion.  </td></tr>
</tbody>
</table>
</div><p>Walking speed triggered person detection. | A quick sprint did not trigger person detection, only motion.<br>Walking speed triggered person detection. |</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>The Hand Test</strong> - Only show the camera a hand</td></tr>
</thead>
<tbody>
<tr>
<td><em>Wyze Cam v2</em></td><td><em>Arlo Pro 2</em></td></tr>
<tr>
<td>Hands would set off motion but not be indicated as a person.</td><td>Hands would set off motion but not be indicated as a person.</td></tr>
</tbody>
</table>
</div><div class="hn-table">
<table>
<thead>
<tr>
<td><strong>The Person Test</strong> - Be a person! Does it detect me?</td></tr>
</thead>
<tbody>
<tr>
<td><em>Wyze Cam v2</em></td><td><em>Arlo Pro 2</em></td></tr>
<tr>
<td>Yup! Stand still and be a person, you’ll be detected.</td><td>Yup! Stand still and be a person, you’ll be detected.</td></tr>
</tbody>
</table>
</div><p>While both of these platforms have room to improve, it’s a pretty wonderful feature set for smart cameras. Arlo did misclassify me as a pet, so maybe some tightening up to be done there, but maybe it could have been due to my untrimmed beard :)</p>
<h2 id="heading-money">Money</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/money.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As of right now, the Wyze camera is <strong>$19.99 USD</strong> and comes with a rolling recording of videos for 14-days. You can get extended recordings per device by adding an SD card to the camera. The person detection is a free service that you enable. That’s it. There are no subscriptions, trials, or up-sells.</p>
<p>I find this model very refreshing. This price point, the privacy of on-device storage and AI makes this a pretty nice gift. This is a big benefit of AI on-device vs cloud.</p>
<p>The Arlo Pro 2 retails for about <strong>$179.99 USD</strong>, and requires a pro base station (<strong>$70</strong>). The free plan comes with 7 days rolling recording in the cloud. To add the AI functionality you’ll need to add <strong>$2.99 a month per camera</strong>, OR <strong>$9.99 a month</strong> for up to 10 cameras, OR <strong>$14.99 USD a month</strong> for up to 20 cameras. So it’s safe to say you’re looking at about 10x the price of the Wyze camera.</p>
<p>I’m a fan of the Arlo camera system - I think Arlo innovates and creates quality products. While I’m always willing to pay for quality, I’m sure Arlo’s device could use some improvements that justify the advanced price tag. It’s going to become an interesting market as AI precipitates from the cloud to each edge device.</p>
<h2 id="heading-value">Value</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/10/value-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Ten times the price (not including the base station) in order to manage 3 AI features that should be handled locally is rich, even for a techie like me. Especially knowing there’s nothing limiting Wyze from pushing a new firmware update to bridge the gap. Package, animal, and car detection are relatively simple AI models that could show up in a firmware upgrade and exist as possible <em>free</em> features, or maybe one time purchases. Essentially leveling the playing field.</p>
<p>AI for edge devices seems to be more powerful as a distributed architecture, rather than 100% cloud-based. Apple has announced all kinds of initiatives to protect privacy by doing just that, and I’d assume any business not doing so will fall behind while the competition passes savings on to their clients.</p>
<p>All things considered, I’ll be buying more Wyze devices after this evaluation. Both devices performed exceedingly well with person detection, and that’s the big feature for me. But Wyze provided my most important features in a bundle that won’t choke my WiFi or my wallet.</p>
<h2 id="heading-what-does-this-mean-for-the-industry-and-other-home-security-companies">What does this mean for the industry and other home security companies?</h2>
<p>The Wyze cam is small, low-power, continuously recordable on local memory, and AI-enabled, all for $19.99. Features like person, package, pet, and car detection are the future of scalable smart home security.</p>
<p>High-signal, low-noise AI-enabled devices at affordable prices will be the new standard in smart homes. Home camera companies will likely need to embrace AI on each device to meet the increasing standards of AI, and superstar AI companies that optimize detection for devices will grow with this increased demand. It’s an exciting future for people interested in homes that aren’t just smart, but smarter.</p>
<hr>
<h3 id="heading-tell-me-about-your-camera-ai-experiences-on-twitter">Tell me about your Camera AI experiences on Twitter:</h3>
<h2 id="heading-gantlabordehttpstwittercomgantlaborde"><a target="_blank" href="https://twitter.com/GantLaborde">@GantLaborde</a></h2>
<p><a target="_blank" href="http://gantlaborde.com/">http://gantlaborde.com/</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How To Add Wemo to Homekit With This Powerful Tool ]]>
                </title>
                <description>
                    <![CDATA[ By Jared Wolff This post is originally from www.jaredwolff.com I’ve been nerding out. It’s something I just can’t stop sometimes. Most recently working on making our home more connected and efficient. Part of the effort was experimenting with some We... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-add-wemo-to-homekit-with-this-powerful-tool/</link>
                <guid isPermaLink="false">66d850499cec6e68c5591f80</guid>
                
                    <category>
                        <![CDATA[ smart home ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 03 Jun 2019 21:42:19 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/Copy-of-Dashboard.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jared Wolff</p>
<p><strong>This post is originally from <a target="_blank" href="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/">www.jaredwolff.com</a></strong></p>
<p>I’ve been nerding out. It’s something I just can’t stop sometimes.</p>
<p>Most recently working on making our home more connected and efficient. Part of the effort was experimenting with some Wemos I had purchased off of eBay about a month ago. The Wemo app works alright but there’s definitely more to be desired there. (Plus it makes me cringe to think every Wemo is running DDWRT)</p>
<p>The main problem? Wemo doesn’t support Apple Homekit.</p>
<p>So I got to researching and found the <a target="_blank" href="https://github.com/nfarina/homebridge">Homebridge</a> project to be just what I was looking for. Basically, it emulates a device that operates on the HAP protocol that Apple supports for Homekit. Within Homebridge, you can configure as many devices via as many different interfaces you could imagine. Deploying it to a Raspberry Pi, or similar, can be troublesome and wrought with errors. So why not take a different approach?</p>
<p><em>Enter Resin OS.</em></p>
<p>Some advantages of Resin OS are:</p>
<ul>
<li>Deploying a pre-optimized image for the Yocto platform</li>
<li>No configuring of any Linux anything (except for the config.json)</li>
<li>Get up and running in a few minutes (mostly flashing and container initialization)</li>
</ul>
<p>I originally played around with Resin’s online platform which shows some promise. For those developers who don’t want to spend time writing code for OTA updates and building Yocto images manually, you should definitely take a look at Resin.io.</p>
<p>(By the way, I have no affiliation with Resin, I think they’ve done a great job and they’ve contributed to the community significantly with their open source tools: <a target="_blank" href="http://resinos.io/">http://resinos.io</a> , <a target="_blank" href="https://etcher.io/">https://etcher.io</a> , <a target="_blank" href="https://www.balena.io/">https://www.balena.io</a> )</p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*duqqYCYgcr1F3f8MNkj0Sg.jpg" alt="HomeKit on iPhone" width="730" height="488" loading="lazy"></p>
<p><em>So how do I get a Wemo working with Homekit?</em></p>
<p>Resin themselves have some fantastic documentation. I barely had to look anywhere when error messages came up when developing my first crack at the Docker container. (I was originally using the <em>slim</em> image which does not have all the needed utilities that Homebridge requires, easier to just use the <em>latest</em> image instead)</p>
<p>The instructions are as follows:</p>
<ol>
<li><p>Install dependencies. On Mac, <em>Node</em> is the only thing you may need to install. Homebrew works best here.</p>
<pre><code>brew install node
</code></pre></li>
<li><p>Download and install the resin-cli:</p>
<pre><code>npm install —<span class="hljs-built_in">global</span> —production resin-cli
</code></pre></li>
<li><p>Download your image from the <a target="_blank" href="https://resinos.io/#downloads">download link</a> if you haven’t already.</p>
</li>
<li><p>Modify the image to your liking by using the cli.</p>
<pre><code>$ sudo resin local configure ~<span class="hljs-regexp">/Downloads/</span>resin.img
? Network SSID Wolff Den
? Network Key This is not our password.
? Do you want to set advanced settings? Yes
? Device Hostname resin
? Do you want to enable persistent logging? no
Done!
</code></pre></li>
<li><p>“Flash” the image to an SD card. Make sure you have a free device to write to!</p>
<pre><code>$ sudo resin local flash ~<span class="hljs-regexp">/Downloads/</span>resin.img
<span class="hljs-attr">Password</span>:
? Select drive (Use arrow keys)
❯ /dev/disk1 (<span class="hljs-number">32</span> GB) - RESIN
</code></pre></li>
<li><p>Wait for the process to complete and then eject the card. Pop it into the device you’ve configured the image for.</p>
</li>
<li><p>Once booted, you should be able to ping the device.</p>
<pre><code>ping resin.local
PING resin.local (<span class="hljs-number">192.168</span><span class="hljs-number">.7</span><span class="hljs-number">.45</span>): <span class="hljs-number">56</span> data bytes
<span class="hljs-number">64</span> bytes <span class="hljs-keyword">from</span> <span class="hljs-number">192.168</span><span class="hljs-number">.7</span><span class="hljs-number">.45</span>: icmp_seq=<span class="hljs-number">0</span> ttl=<span class="hljs-number">64</span> time=<span class="hljs-number">9.004</span> ms
<span class="hljs-number">64</span> bytes <span class="hljs-keyword">from</span> <span class="hljs-number">192.168</span><span class="hljs-number">.7</span><span class="hljs-number">.45</span>: icmp_seq=<span class="hljs-number">1</span> ttl=<span class="hljs-number">64</span> time=<span class="hljs-number">6.411</span> ms
<span class="hljs-number">64</span> bytes <span class="hljs-keyword">from</span> <span class="hljs-number">192.168</span><span class="hljs-number">.7</span><span class="hljs-number">.45</span>: icmp_seq=<span class="hljs-number">2</span> ttl=<span class="hljs-number">64</span> time=<span class="hljs-number">4.337</span> ms
<span class="hljs-number">64</span> bytes <span class="hljs-keyword">from</span> <span class="hljs-number">192.168</span><span class="hljs-number">.7</span><span class="hljs-number">.45</span>: icmp_seq=<span class="hljs-number">3</span> ttl=<span class="hljs-number">64</span> time=<span class="hljs-number">4.374</span> ms
</code></pre></li>
<li><p>Modify the config.json file to your liking. Highly suggest changing the pin to something different as this is the one that Homebridge uses in their examples.</p>
</li>
<li>Also, feel free to modify the Dockerfile to match your needs. In this example the only thing that you may want to change is the image name. By default I have hummingboard-node:latest as the main image.</li>
<li><p>You can now push the included Homebridge Docker file and associated files directly to your embedded device.</p>
<pre><code>sudo resin local push resin.local —source .
</code></pre><p><em>Note: this will take several minutes as it will be building the docker image on the embedded device. This takes much less time using the Resin.io platform as it builds on your local machine and then sent to the embedded device as a complete image</em></p>
</li>
<li><p>Wait to see the output from Homebridge indicating it’s running.
rdt push completed successfully!</p>
<pre><code>Streaming application logs..
*** WARNING *** The program ‘node’ uses the Apple Bonjour compatibility layer <span class="hljs-keyword">of</span> Avahi.
*** WARNING *** Please fix your application to use the native API <span class="hljs-keyword">of</span> Avahi!
*** WARNING *** For more information see &lt;http:<span class="hljs-comment">//0pointer.de/avahi-compat?s=libdns_sd&amp;e=node&gt;</span>
*** WARNING *** The program ‘node’ called ‘DNSServiceRegister()’ which is not supported (or only supported partially) <span class="hljs-keyword">in</span> the Apple Bonjour compatibility layer <span class="hljs-keyword">of</span> Avahi.
*** WARNING *** Please fix your application to use the native API <span class="hljs-keyword">of</span> Avahi!
*** WARNING *** For more information see &lt;http:<span class="hljs-comment">//0pointer.de/avahi-compat?s=libdns_sd&amp;e=node&amp;f=DNSServiceRegister&gt;</span>
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] Loaded plugin: homebridge-platform-wemo
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] Registering platform ‘homebridge-platform-wemo.BelkinWeMo’
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] —
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] Loaded config.json <span class="hljs-keyword">with</span> <span class="hljs-number">0</span> accessories and <span class="hljs-number">1</span> platforms.
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] —
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] Loading <span class="hljs-number">1</span> platforms…
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] [WeMo Platform] Initializing BelkinWeMo platform…
Scan <span class="hljs-built_in">this</span> code <span class="hljs-keyword">with</span> your HomeKit App on your iOS device to pair <span class="hljs-keyword">with</span> Homebridge:

    ┌────────────┐
    │ <span class="hljs-number">031</span><span class="hljs-number">-45</span><span class="hljs-number">-154</span> │
    └────────────┘

[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] Homebridge is running on port <span class="hljs-number">51826.</span>
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] [WeMo Platform] Found: Master Den [<span class="hljs-number">123456789</span>ABC]
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] [WeMo Platform] Found: Jarchel Den [<span class="hljs-number">123456789</span>BAC]
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">43</span>] [WeMo Platform] Found: Front Door Light [<span class="hljs-number">123456789</span>CBA]
[<span class="hljs-number">2017</span><span class="hljs-number">-11</span><span class="hljs-number">-2</span> <span class="hljs-number">02</span>:<span class="hljs-number">09</span>:<span class="hljs-number">44</span>] [WeMo Platform] Jarchel Den - Get state: On
</code></pre></li>
<li><p>Pop open your phone and look for an available accessory in HomeKit. You will likely have to tap on “Don’t Have a Code or Can’t Scan?” and enter the number manually.</p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*UuC6kIPSdoqRwc1nxssJ0g.jpg" alt="Camera add accessory" width="375" height="667" loading="lazy"></p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*xEiX3rxFoTnR4uuZNNR_8Q.jpg" alt="Add accessory" width="375" height="667" loading="lazy"></p>
</li>
<li><p>Add your accessory by entering the passcode displayed earlier.</p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*GerWvbaN_jAiXQlHKRaP3Q.jpg" alt="Add accessory with code." width="375" height="667" loading="lazy"></p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*KcnojEomHxORpWHtCYC2yg.jpg" alt="Homebridge added success!" width="375" height="667" loading="lazy"></p>
</li>
</ol>
<p>Congrats! All your Wemo devices should show up now. Enjoy using Siri with your Wemo devices.</p>
<p><img src="https://www.jaredwolff.com/how-to-deploy-homebridge-on-raspberry-pi-w-resin/images/1*dHFYz4MWLa5RKIP7w9O67w.jpg" alt="Default screen" width="375" height="667" loading="lazy"></p>
<p>Found this tutorial useful? <a target="_blank" href="https://www.jaredwolff.com/tags/raspberry-pi/">Here are some of my other Raspberry Pi related posts.</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How I built a Smart Mirror, with a little help from my daughter and her grandpa ]]>
                </title>
                <description>
                    <![CDATA[ By Coding with Cookie This month I built a smart mirror with my dad and daughter. This project spanned across three generations. The idea started a few years ago with the novelty of a smart mirror. But before I was going invest the time and money to ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/crafting-a-smart-mirror-with-my-dad-and-daughter-c3bdd151fefd/</link>
                <guid isPermaLink="false">66c347ef12c88d894ffd1f62</guid>
                
                    <category>
                        <![CDATA[ Internet of Things ]]>
                    </category>
                
                    <category>
                        <![CDATA[ life ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Raspberry Pi ]]>
                    </category>
                
                    <category>
                        <![CDATA[ smart home ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 21 Aug 2017 04:31:11 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*0MC93WQzKqFGisGM2WisVQ.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Coding with Cookie</p>
<p>This month I built a smart mirror with my dad and daughter. This project spanned across three generations.</p>
<p>The idea started a few years ago with the novelty of a smart mirror. But before I was going invest the time and money to make one, I needed a practical reason to build one. Recently that reason presented itself.</p>
<p>In our kitchen we have a whiteboard where we list out our dinner plans for the week and I wanted to upgrade it. I submitted a presentation idea for the smart mirror at local tech conference. My smart mirror presentation was <a target="_blank" href="https://seattle.codecamp.us/Session/Details/217">selected</a>. This accelerated my timeline.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/DeTO06lHtTL-b0AmprtydowA3tWFIwc4dern" alt="Image" width="800" height="449" loading="lazy">
<em>Programming the Smart Mirror with my Daughter</em></p>
<p>I needed help with the design of the smart mirror frame</p>
<p>since I live in the digital world designing software that lives in the cloud. My dad is a Mechanical Engineer who lives in the physical world designing the planes we fly though the clouds everyday. While talking with my dad one evening, he suggested to create some initial sketches of the mirror.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/VYfIYuOgsKPTY5nsFkZmxPsY83hYF2SFfNkd" alt="Image" width="799" height="1066" loading="lazy">
<em>Initial Design of Smart Mirror</em></p>
<p>After a few more conversations with my dad and several design revisions, we settled on a simple box design for the frame. My dad knew more about woodworking than I did, and he had a few suggestions for me.</p>
<p>Like using cabinet draw sides for the sides of the frame as they already came with a groove to hold the glass. And using <a target="_blank" href="https://en.wikipedia.org/wiki/French_cleat">french cleats</a> to secure the mirror to the wall. This also allowed it to be easily removed for transport.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/eq70lB300bPWUI2zzdVaTePyHuCQWh0CaEDa" alt="Image" width="800" height="600" loading="lazy">
<em>Revised Design of the Smart Mirror</em></p>
<p>My wife was a huge support in this endeavor. She helped by sorting through dozens of televisions looking for the right price and features. The size had to be large enough for our kitchen, but not too large to make transporting a hassle. Finally she was able to get a television from Best Buy that had everything I was looking for. And the best part was that it was on sale.</p>
<p>The most noticeable part of the smart mirror is the reflective mirror. Most household mirrors are made from glass. But the biggest downside to using glass is that it’s fragile and doesn’t transport well. I chose plastic as it’s lighter, more transparent, and more durable.</p>
<p>It’s nice to talk to experts and I live in Seattle which has a great local <a target="_blank" href="https://www.tapplastics.com/">plastic supplier</a>. They were excellent and able to help me select the correct plastic. They suggested acrylic and we even tested the mirror film I had acquired on a sample they had. And this was not the first smart mirror they had supplied the plastic for so I knew I was on the right track.</p>
<p>The choice was simple when it came to deciding where to assemble the frame. My dad has a new workshop and all the tools we needed and I have a garage and a single toolbox. Once I had acquired the wood, acrylic, and mirror film, I went over to my dad’s workshop to assemble the frame.</p>
<p>I thought it would take 4–5 hours. But it took around 15 hours to assemble the mirror. That may be due to refining the design as we were making the mirror. It may also be due to me asking a lot of questions, like why glue this instead of screw that. Or it was due to having a good time with my dad. Looking back it was a combination of all the above.</p>
<p>Over three separate days we cut, glued, nailed, and screwed the frame together. It would hold the television, acrylic mirror, and Raspberry Pi.</p>
<p>Several power tools were used including a table saw, chop saw, and nail gun so my daughter didn’t help with that part. But she was able to help with the final assembly when the acrylic mirror was inserted. She was even able to use the power drill to screw in the top during the final assembly.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/image/not-found.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>My Daughter using a Power Drill to Screw in the Top of the Mirror</em></p>
<p>With all the woodworking completed, my daughter and I started wiring everything together. As pink is her favorite color, it was obvious that the only choice was to 3D print the Raspberry Pi case in pink.</p>
<p>We put the Raspberry Pi into the pink case and attached it to the back of the TV via adhesive Velcro.</p>
<p>By using Velcro, the Raspberry Pi can be disconnected. Thus I can show the size of the computer transforming the mirror into a smart mirror.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/Kv-0LGWfO0ueT1o-xHr6C-znSspCJIJMBuX8" alt="Image" width="800" height="600" loading="lazy">
<em>3D Printed Pink Raspberry Pi Case</em></p>
<p>Modern televisions usually include a USB port, and the one my wife found did indeed have one. I tested it out the USB Port on the TV and it was able to supply enough power to the Raspberry Pi. This meant that the TV Power cord was the only cable I needed to plug into the wall outlet.</p>
<p>Then we plugged the USB and HDMI cables into both the Raspberry Pi and TV and we were ready to go.</p>
<p>With the on board WiFi I connected the smart mirror to the internet without any other wires. And when the power is out it will still work as a traditional non-smart mirror.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/image/not-found.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>My Daughter and I Connecting all the Wires on the Back of the Smart Mirror</em></p>
<p>When you are 4, typing on a keyboard and coding are cool. We’ll see how she feels when she’s 14.</p>
<p>My daughter got to help a lot on the software part of the smart mirror. Since her spelling abilities end with her name, she was able to type that and was very excited when she saw it on the smart mirror.</p>
<p>To get her name to appear, we used HTML. To keep it simple a static HTML page with inline styling via Chrome, fullscreen <code>F11</code>, was all we had to do to get it working. The background needs to be as dark as possible to minimize the light coming though the mirror.</p>
<p>When the screen is off or completely black it appears as a common mirror. The text and graphics need to be as bright as possible to show through, transforming it into a smart mirror. On my mirror I was able to find a film with 5% transparency.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/a-EnHz7xBvtQyA7VmWtqAGQOnGUwSV3DTJNx" alt="Image" width="799" height="1066" loading="lazy">
<em>Installing the Acrylic Mirror into the Frame</em></p>
<p>In reviewing my mirror thus far, I would do a few things different next time. First, I would get a slimmer television. Right now the mirror frame is 4.5 inches deep, which is deep enough that you notice, but not so deep that it’s obtrusive.</p>
<p>Next, I would order acrylic with the mirror film already installed. My dad and I were able to install the film in 20 min, but this resulted in several small bubbles. Most likely due to a few small pieces of dust trapped between the film and acrylic.</p>
<p>Also, I would add a more stylized front. If you take a look at the corners of my smart mirror, you will see all the layers of plywood. This could be hidden with some nice wood to more resemble a picture frame.</p>
<p>Finally, I would add a small gap between the TV and acrylic. Currently, the acrylic is helping to support the TV. This is putting pressure on the acrylic causing it to bend slightly. This results in a slight distortion of the mirror.</p>
<p>Building the Smart Mirror has been a great experience and if you have any questions please <a target="_blank" href="https://codingwithcookie.com/contact/">reach out</a>.</p>
<p>The next project that my daughter and I are working on is wiring some sensors in the kitchen to track the temperature in the refrigerator and freezer. I’m hoping to get her more involved with this and future projects as she is excited to help and wire the sensors on a breadboard.</p>
<p>I look forward to sharing that story with you once she and I have completed it.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/8xBLYzrWXyZMltzMYYVKY5C2ARAcu9nHZlZ9" alt="Image" width="799" height="1066" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
