Site updated at 2015-09-18 06:41:51 UTC

This commit is contained in:
Paulus Schoutsen 2015-09-17 23:41:51 -07:00
parent 9a3bd15c40
commit 5ccad30d25
73 changed files with 2022 additions and 1055 deletions

View file

@ -146,94 +146,14 @@ A word of caution: The Arduino boards are not storing states. This means that wi
</p>
<h2>Switch Configuration</h2>
<p>Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on a Arduino Uno) is not supported yet.</p>
<p>To enable the Arduino switch pins with Home Assistant, add the following section to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">switch</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">arduino</span>
</span><span class='line'> <span class="l-Scalar-Plain">pins</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">11</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Fan Office</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">digital</span>
</span><span class='line'> <span class="l-Scalar-Plain">12</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Light Desk</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">digital</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<h2>Building on top of the Arduino component</h2>
<ul>
<li><strong>pins</strong> array (<em>Required</em>): Pins to use.
<ul>
<li><strong>name</strong>: Name that will be used in the frontend for the pin.</li>
<li><strong>type</strong>: The type of the pin. At the moment only &lsquo;digital&rsquo; is supported.</li>
</ul>
</li>
<li><a href="/components/sensor.arduino.html">Arduino Sensor</a></li>
<li><a href="/components/switch.arduino.html">Arduino Switch</a></li>
</ul>
<p>The digital pins are numbered from 0 to 13. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.</p>
<h2>Sensor Configuration</h2>
<p>The sensor platform allow you to get an numerical values from an analog input pin. Usually between 0 and 1024.</p>
<p>To enable an Arduino sensor with Home Assistant, add the following section to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">arduino</span>
</span><span class='line'> <span class="l-Scalar-Plain">pins</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">1</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Door switch</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">analog</span>
</span><span class='line'> <span class="l-Scalar-Plain">0</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Brightness</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">analog</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>pins</strong> array (<em>Required</em>): Pins to use.
<ul>
<li><strong>name</strong>: Name that will be used in the frontend for the pin.</li>
<li><strong>type</strong>: The type of the pin. At the moment only &lsquo;analog&rsquo; is supported.</li>
</ul>
</li>
</ul>
<p>The 6 analog pins are numbered from A0 to A5.</p>
</article>

View file

@ -0,0 +1,185 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Foscam IP camera support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate Foscam IP cameras within Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Foscam IP camera support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/camera.foscam.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate Foscam IP cameras within Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
Foscam IP Camera Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/foscam.png' class='brand pull-right' />
The foscam platform allows you to watch the live stream of your <a href="http://www.foscam.com/">Foscam</a> IP camera in Home Assistant.</p>
<p>To enable your Foscam IP camera in your installation, add the following to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">camera</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">foscam</span>
</span><span class='line'> <span class="l-Scalar-Plain">ip</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">192.168.0.123</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Door Camera</span>
</span><span class='line'> <span class="l-Scalar-Plain">port</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">88</span>
</span><span class='line'> <span class="l-Scalar-Plain">username</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">USERNAME</span>
</span><span class='line'> <span class="l-Scalar-Plain">password</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">PASSWORD</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>ip</strong> <em>Required</em>: The IP address your camera.</li>
<li><strong>port</strong> <em>Optional</em>: The port that the camera is running on. The default is 88.</li>
<li><strong>name</strong> <em>Optional</em>: This parameter allows you to override the name of your camera.</li>
<li><strong>username</strong> <em>Required</em>: The username for accessing your camera.</li>
<li><strong>password</strong> <em>Required</em>: The password for accessing your camera.</li>
</ul>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -129,16 +129,20 @@
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry for Netgear device</span>
</span><span class='line'><span class="l-Scalar-Plain">device_tracker</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">netgear</span>
</span><span class='line'> <span class="l-Scalar-Plain">host</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">192.168.1.1</span>
</span><span class='line'> <span class="l-Scalar-Plain">username</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">admin</span>
</span><span class='line'> <span class="l-Scalar-Plain">password</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">YOUR_PASSWORD</span>
</span><span class='line'> <span class="l-Scalar-Plain">track_new_devices</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">yes</span>
</span></code></pre></td></tr></table></div></figure>
<p>Once tracking, the <code>device_tracker</code> component will maintain a file in your config dir called <code>known_devices.csv</code>. Edit this file to adjust which devices have to be tracked. Here you can also setup a url for each device to be used as the entity picture.</p>
<p>By default, the device tracker will add all found devices into the <code>known_devices.yaml</code>. It will default to displaying them in the UI as well. To disable displaying new devices in the UI, change the value of <code>track_new_devices:</code> to <code>no</code>.</p>
<p>Once tracking, the <code>device_tracker</code> component will maintain a file in your config dir called <code>known_devices.yaml</code>. Edit this file to adjust which devices have to be tracked. Here you can also setup a url for each device to be used as the entity picture and set whether the device will be show in the UI when in away state..</p>
</article>

View file

@ -126,7 +126,7 @@ Before this scanner can be used you have to install the luci RPC package on Open
<ul>
<li><strong>host</strong> (<em>Required</em>): The IP address of your router, e.g. 192.168.1.1.</li>
<li><strong>username</strong> (<em>Required</em>: The username of an user with administrative privileges, usually <em>admin</em>.</li>
<li><strong>username</strong> (<em>Required</em>): The username of an user with administrative privileges, usually <em>admin</em>.</li>
<li><strong>password</strong> (<em>Required</em>): The password for your given admin account.</li>
</ul>

View file

@ -0,0 +1,185 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>MQTT device tracker support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate MQTT based trackers into Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="MQTT device tracker support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/device_tracker.mqtt.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate MQTT based trackers into Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
MQTT Device Tracker Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/mqtt.png' class='brand pull-right' />
Before this tracker allows the detection of devices which are able to send MQTT messages.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">device_tracker</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">mqtt</span>
</span><span class='line'> <span class="l-Scalar-Plain">qos</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">1</span>
</span><span class='line'> <span class="l-Scalar-Plain">devices</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">paulus_oneplus</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">/location/paulus</span>
</span><span class='line'> <span class="l-Scalar-Plain">annetherese_n4</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">/location/annetherese</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>qos</strong> (<em>Required</em>): Quality of service, default to 0.</li>
<li><strong>devices</strong> (<em>Required</em>): Array of devices to track.
<ul>
<li><strong>&lsquo;device_name&rsquo;</strong> (<em>Required</em>): Name to use followed by the topic.</li>
</ul>
</li>
</ul>
<p>See the <a href="/components/device_tracker.html">device tracker component page</a> for instructions how to configure the people to be tracked.</p>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -219,7 +219,7 @@
<tr>
<td><a href='/components/sensor.arest.html'><img src='/images/supported_brands/arest.png' class='brand overview' /></a></td>
<td>aREST <a href='/components/sensor.arest.html'>sensors</a> monitors values from aREST enabled devices and <a href='/components/switch.arest.html'>switch</a> toggles those pin.</td>
<td>aREST <a href='/components/sensor.arest.html'>sensors</a> observe and <a href='/components/switch.arest.html'>switches</a> controls the pins of aREST enabled devices.</td>
</tr>
</table>
@ -270,6 +270,11 @@
<td><a href='/components/device_tracker.luci.html'>OpenWRT routers</a></td>
</tr>
<tr>
<td><a href='/components/device_tracker.mqtt.html'><img src='/images/supported_brands/mqtt.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.mqtt.html'>MQTT devices</a></td>
</tr>
<tr>
<td><a href='/components/device_tracker.netgear.html'><img src='/images/supported_brands/netgear.png' class='brand overview' /></a></td>
<td><a href='/components/device_tracker.netgear.html'>Netgear routers</a></td>
@ -368,6 +373,10 @@
<td><a href='/components/camera.generic.html'>IP camera</a> integrates a generic IP camera or image url.</td>
</tr>
<td><a href='/components/camera.foscam.html'><img src='/images/supported_brands/foscam.png' class='brand overview' /></a></td>
<td><a href='/components/switch.Foscam.html'>Foscam</a> let you see your live stream.</td>
</tr>
<tr>
<td><a href='/components/sensor.sabnzbd.html'><img src='/images/supported_brands/sabnzbd.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.sabnzbd.html'>SABnzbd clients</a> monitors queue and download speeds.</td>
@ -387,7 +396,12 @@
<tr>
<td><a href='/components/switch.command_switch.html'><img src='/images/supported_brands/utilities-terminal.png' class='brand overview' /></a></td>
<td><a href='/components/switch.command_switch.html'>Command line</a> issues command line commands.</td>
<td>Command line <a href='/components/switch.command_switch.html'>switches</a> and <a href='/components/sensor.command_sensor.html'>sensors</a> issues command line commands to do or the get something.</td>
</tr>
<tr>
<td><a href='/components/sensor.glances.html'><img src='/images/supported_brands/glances.png' class='brand overview' /></a></td>
<td><a href='/components/sensor.glances.html'>Glances</a> tracks system information on remote hosts.</td>
</tr>
</table>

View file

@ -109,9 +109,12 @@
<a href="https://github.com/maddox/itunes-api">itunes-api</a> from Home Assistant. Play,
pause, or skip songs remotely on iTunes running on your Mac.</p>
<p> Your AirPlay speakers will also be exposed as simple media players inside Home
Assistant. They will be available to be turned on or off or set their volume.</p>
<p class='note'>
iTunes itself can not be remotely controlled. In order to control your iTunes,
you&#8217;ll need to install middleware named `itunes-api`. `itunes-api` is a simple REST
you&#8217;ll need to install middleware named itunes-api. itunes-api is a simple REST
server that talks to a local instance of iTunes via Applescript. It&#8217;s very easy to set up
and run. You can find more about it on it&#8217;s [GitHub repo](https://github.com/maddox/itunes-api).
</p>

View file

@ -115,6 +115,16 @@
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">scene</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Romantic</span>
@ -124,6 +134,16 @@
</span><span class='line'> <span class="l-Scalar-Plain">state</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">on</span>
</span><span class='line'> <span class="l-Scalar-Plain">color</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">0.33</span><span class="p-Indicator">,</span> <span class="nv">0.66</span><span class="p-Indicator">]</span>
</span><span class='line'> <span class="l-Scalar-Plain">brightness</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">200</span>
</span><span class='line'>
</span><span class='line'><span class="-Error"> </span><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">all_lights_on</span>
</span><span class='line'> <span class="l-Scalar-Plain">entities</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">group.all_lights</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">state</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">on</span>
</span><span class='line'>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">all_lights_off</span>
</span><span class='line'> <span class="l-Scalar-Plain">entities</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">group.all_lights</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">state</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">off</span>
</span></code></pre></td></tr></table></div></figure>

View file

@ -0,0 +1,193 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Arduino sensor support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate Arduino boards within Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Arduino sensor support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/sensor.arduino.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate Arduino boards within Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
Arduino Sensor Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/arduino.png' class='brand pull-right' />
The arduino sensor platform allows allow you to get an numerical values from an analog input pin of an <a href="https://www.arduino.cc/">Arduino</a> board. Usually the value is between 0 and 1024.</p>
<p>To enable an Arduino sensor with Home Assistant, add the following section to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">arduino</span>
</span><span class='line'> <span class="l-Scalar-Plain">pins</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">1</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Door switch</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">analog</span>
</span><span class='line'> <span class="l-Scalar-Plain">0</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Brightness</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">analog</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>pins</strong> (<em>Required</em>): Array of pins to use. The number corresponds with the pin numbering schema of your board.
<ul>
<li><strong>name</strong>: Name that will be used in the frontend for the pin.</li>
<li><strong>type</strong>: The type of the pin. At the moment only &lsquo;analog&rsquo; is supported.</li>
</ul>
</li>
</ul>
<p>The 6 analog pins of an Arduino UNO are numbered from A0 to A5.</p>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -0,0 +1,279 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Command line sensors support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate commandline sensors into Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Command line sensors support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/sensor.command_sensor.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate commandline sensors into Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
Command Line Sensors Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/utilities-terminal.png' class='brand pull-right' />
A sensor platform that issues specific commands git get data. This might very well become our most platform as it allows anyone to integrate any type of switch into Home Assistant that can be controlled from the command line, including calling other scripts!</p>
<p>To enable it, add the following lines to your <code>configuration.yaml</code>:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">command_sensor</span>
</span><span class='line'> <span class="l-Scalar-Plain">command</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">SENSOR_COMMAND</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="s">&quot;Command</span><span class="nv"> </span><span class="s">sensor&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">unit_of_measurement</span><span class="p-Indicator">:</span> <span class="s">&quot;°C&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">correction_factor</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">0.4921</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>command</strong> (<em>Required</em>): The action to take to get the value.</li>
<li><strong>name</strong> (<em>Optional</em>): Name of the command sensor.</li>
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the units of measurement of the sensor, if any.</li>
<li><strong>correction_factor</strong> (<em>Optional</em>): A float value to do some basic calculations.</li>
</ul>
<h2><a class='title-link' name='examples' href='#examples'></a> Examples</h2>
<p>In this section you find some real life examples of how to use this sensor.</p>
<h3><a class='title-link' name='hard-drive-temperature' href='#hard-drive-temperature'></a> Hard drive temperature</h3>
<p>There are several days to get the temperature of your hard drive. A simple solution is to use <a href="https://savannah.nongnu.org/projects/hddtemp/">hddtemp</a>.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>hddtemp -n /dev/sda
</span></code></pre></td></tr></table></div></figure>
<p>To use those information, the entry for a sensor in the <code>configuration.yaml</code> file will look like this.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">command_sensor</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">HD Temperature</span>
</span><span class='line'> <span class="l-Scalar-Plain">command</span><span class="p-Indicator">:</span> <span class="s">&quot;hddtemp</span><span class="nv"> </span><span class="s">-n</span><span class="nv"> </span><span class="s">/dev/sda&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">unit_of_measurement</span><span class="p-Indicator">:</span> <span class="s">&quot;°C&quot;</span>
</span></code></pre></td></tr></table></div></figure>
<h3><a class='title-link' name='cpu-temperature' href='#cpu-temperature'></a> CPU temperature</h3>
<p>Thanks to the <a href="https://en.wikipedia.org/wiki/Procfs"><code>proc</code></a> file system various details about a system can be retrieved. Here the CPU temperature
is of interest. Add something similar to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">command_sensor</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">CPU Temperature</span>
</span><span class='line'> <span class="l-Scalar-Plain">command</span><span class="p-Indicator">:</span> <span class="s">&quot;cat</span><span class="nv"> </span><span class="s">/sys/class/thermal/thermal_zone0/temp&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">unit_of_measurement</span><span class="p-Indicator">:</span> <span class="s">&quot;°C&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">correction_factor</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">0.001</span>
</span></code></pre></td></tr></table></div></figure>
<p>The <code>correction_factor</code> will make sure that the value is shown in a useful format in the frontend.</p>
<h3><a class='title-link' name='use-an-external-script' href='#use-an-external-script'></a> Use an external script</h3>
<p>The example is doing the same as the <a href="/components/sensor.arest.html">aREST sensor</a> but with an external Python script. It should give you an idea about interacting with devices which are exposing a REST API.</p>
<p>The one-line script to retrieve a value is shown below. Of course would it be possible to use this directly in the <code>configuration.yaml</code> file but need extra care about the quotation marks.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'><span class="n">python3</span> <span class="o">-</span><span class="n">c</span> <span class="s">&quot;import requests; print(requests.get(&#39;http://10.0.0.48/analog/2&#39;).json()[&#39;return_value&#39;])&quot;</span>
</span></code></pre></td></tr></table></div></figure>
<p>The script (saved as <code>arest-value.py</code>) that is used looks like the example below.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'><span class="c">#!/usr/bin/python3</span>
</span><span class='line'><span class="c">#</span>
</span><span class='line'><span class="kn">from</span> <span class="nn">requests</span> <span class="kn">import</span> <span class="n">get</span>
</span><span class='line'><span class="n">response</span> <span class="o">=</span> <span class="n">get</span><span class="p">(</span><span class="s">&#39;http://10.0.0.48/analog/2&#39;</span><span class="p">)</span>
</span><span class='line'><span class="k">print</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">json</span><span class="p">()[</span><span class="s">&#39;return_value&#39;</span><span class="p">])</span>
</span></code></pre></td></tr></table></div></figure>
<p>To use the script you need to add something like the following to your <code>configuration.yaml</code> file.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">command_sensor</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Brightness</span>
</span><span class='line'> <span class="l-Scalar-Plain">command</span><span class="p-Indicator">:</span> <span class="s">&quot;python3</span><span class="nv"> </span><span class="s">/path/to/script/arest-value.py&quot;</span>
</span><span class='line'> <span class="l-Scalar-Plain">unit_of_measurement</span><span class="p-Indicator">:</span> <span class="s">&quot;°C&quot;</span>
</span></code></pre></td></tr></table></div></figure>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -0,0 +1,237 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Glances sensor support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate Glances sensors into Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Glances sensor support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/sensor.glances.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate Glances sensors into Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
Glances Sensor Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/glances.png' class='brand pull-right' />
The glances sensor platform is consuming the system information provided by the <a href="https://github.com/nicolargo/glances">Glances</a> API. This enables one to track remote host and display their stats in Home Assistant.</p>
<p>This sensors needs a running isntance of <code>glances</code> on the host:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>glances -w
</span><span class='line'>Glances web server started on http://0.0.0.0:61208/
</span></code></pre></td></tr></table></div></figure>
<p>To enable the glances sensor, add the following lines to your <code>configuration.yaml</code>:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">sensor</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">glances</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Glances sensor</span>
</span><span class='line'> <span class="l-Scalar-Plain">host</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">IP_ADDRESS</span>
</span><span class='line'> <span class="l-Scalar-Plain">port</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">61208</span>
</span><span class='line'> <span class="l-Scalar-Plain">resources</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;disk_use_percent&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;disk_use&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;disk_free&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;memory_use_percent&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;memory_use&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;memory_free&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;swap_use_percent&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;swap_use&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;swap_free&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;processor_load&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;process_running&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;process_total&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;process_thread&#39;</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="s">&#39;process_sleeping&#39;</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>host</strong> (<em>Required</em>): The IP address of your host, eg. 192.168.1.32.</li>
<li><strong>port</strong> (<em>Option</em>): The network port to connect to. Default is 61208.</li>
<li><strong>name</strong> (<em>Optional</em>): Name of the Glances sensor.</li>
<li><strong>resources</strong> (<em>Required</em>): Entries to monitor.
<ul>
<li><strong>&lsquo;disk_use_percent&rsquo;</strong>: Used disk space in percent</li>
<li><strong>&lsquo;disk_use&rsquo;</strong>: Used disk space</li>
<li><strong>&lsquo;disk_free&rsquo;</strong>: Free disk space</li>
<li><strong>&lsquo;memory_use_percent&rsquo;</strong>: Used memory in percent</li>
<li><strong>&lsquo;memory_use&rsquo;</strong>: Used memory</li>
<li><strong>&lsquo;memory_free&rsquo;</strong>: Free memory</li>
<li><strong>&lsquo;swap_use_percent&rsquo;</strong>: Used swap space in percent</li>
<li><strong>&lsquo;swap_use&rsquo;</strong>: Used swap space</li>
<li><strong>&lsquo;swap_free&rsquo;</strong>: Free swap space</li>
<li><strong>&lsquo;processor_load&rsquo;</strong>: Load</li>
<li><strong>&lsquo;process_running&rsquo;</strong>: Number of running processes</li>
<li><strong>&lsquo;process_total&rsquo;</strong>: Total number of processes</li>
<li><strong>&lsquo;process_thread&rsquo;</strong>: Number of threads</li>
<li><strong>&lsquo;process_sleeping&rsquo;</strong>: Number of sleeping processes</li>
</ul>
</li>
</ul>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

View file

@ -0,0 +1,193 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Arduino switch support - Home Assistant</title>
<meta name="author" content="Paulus Schoutsen">
<meta name="description" content="Instructions how to integrate Arduino boards within Home Assistant.">
<meta name="viewport" content="width=device-width">
<link rel="canonical" href="https://home-assistant.io">
<meta property="fb:app_id" content="338291289691179">
<meta property="og:title" content="Arduino switch support">
<meta property="og:site_name" content="Home Assistant">
<meta property="og:url" content="https://home-assistant.io/components/switch.arduino.html/">
<meta property="og:type" content="website">
<meta property="og:description" content="Instructions how to integrate Arduino boards within Home Assistant.">
<meta property="og:image" content="https://home-assistant.io/images/home-assistant-logo-2164x2164.png">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
<link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
</head>
<body >
<header>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
<a href="/" class="site-title">
<img width='40' src='/images/favicon-192x192.png'> Home Assistant
</a>
</div>
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
<nav>
<input type="checkbox" id="toggle">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
<ul class="menu pull-right">
<li>
<a href="/getting-started/">Getting started</a>
<ul>
<li><a href='/getting-started/'>Installing Home Assistant</a></li>
<li><a href='/getting-started/configuration.html'>Initial configuration</a></li>
<li><a href='/components/'>Component overview</a></li>
<li><a href='/getting-started/android.html'>Setting up Android</a></li>
</ul>
</li>
<li>
<a href="/developers/">Developers</a>
<ul>
<li><a href="/developers/architecture.html">Architecture</a></li>
<li><a href="/developers/frontend.html">Frontend development</a></li>
<li><a href="/developers/creating_components.html">
Creating components
</a></li>
<li><a href="/developers/add_new_platform.html">
Adding platform support
</a></li>
<li><a href="/developers/api.html">API</a></li>
<li><a href="/developers/credits.html">Credits</a></li>
</ul>
</li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
</ul>
</nav>
</div>
</div>
</div>
</header>
<div class="grid-wrapper">
<div class="grid grid-center">
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
<article class="page">
<header>
<h1 class="title indent">
Arduino Switch Support
</h1>
</header>
<hr class="divider">
<p><img src='/images/supported_brands/arduino.png' class='brand pull-right' />
The arduino switch platform allows you to control the digital pins of your <a href="https://www.arduino.cc/">Arduino</a> board. Support for switching pins is limited to high/on and low/off of the digital pins. PWM (pin 3,5,6,9,10, and 11 on an Arduino Uno) is not supported yet.</p>
<p>To enable the Arduino pins with Home Assistant, add the following section to your <code>configuration.yaml</code> file:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="c1"># Example configuration.yaml entry</span>
</span><span class='line'><span class="l-Scalar-Plain">switch</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">platform</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">arduino</span>
</span><span class='line'> <span class="l-Scalar-Plain">pins</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">11</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Fan Office</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">digital</span>
</span><span class='line'> <span class="l-Scalar-Plain">12</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Light Desk</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">digital</span>
</span></code></pre></td></tr></table></div></figure>
<p>Configuration variables:</p>
<ul>
<li><strong>pins</strong> (<em>Required</em>): Array of pins to use. The number corresponds with the pin numbering schema of your board.
<ul>
<li><strong>name</strong>: Name that will be used in the frontend for the pin.</li>
<li><strong>type</strong>: The type of the pin. At the moment only &lsquo;digital&rsquo; is supported.</li>
</ul>
</li>
</ul>
<p>The digital pins are numbered from 0 to 13. The available pins are 2 till 13. For testing purposes you can use pin 13 because with that pin you can control the internal LED.</p>
</article>
</div>
</div>
</div>
<footer>
<div class="grid-wrapper">
<div class="grid">
<div class="grid__item">
<p class="copyright">
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a>, <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>. Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>.</span>
</p>
</div>
</div>
</div>
</footer>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<script>
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>