Site updated at 2016-03-28 03:56:49 UTC

This commit is contained in:
Travis CI 2016-03-28 03:56:49 +00:00
parent 0fbe06a0cb
commit aaafbb1c55
25 changed files with 280 additions and 237 deletions

View file

@ -136,7 +136,7 @@
<li>The <strong>Event Bus</strong> facilitates the firing and listening of events. This is the beating heart of Home Assistant.</li>
<li>The <strong>State Machine</strong> keeps track of the states of things. Fires a <code>state_changed</code> event when a state has been changed.</li>
<li>The <strong>Service Registry</strong> listens on the event bus for <code>call_service</code> events and allows other code to register services.</li>
<li>The <strong>Timer</strong> will send every 1 second a <code>time_changed</code> event on the event bus.</li>
<li>The <strong>Timer</strong> will send a <code>time_changed</code> event every 1 second on the event bus.</li>
</ul>
<p class="img">
@ -146,16 +146,18 @@
Overview of the Home Assistant core architecture
</p>
<p>Home Assistant can be extended by <strong>components</strong>. Each component is responsible for a specific domain within Home Assistant. Components can listen for- or trigger events, offer services and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of <a href="/components/">built-in components</a>.</p>
<p>Home Assistant can be extended by <strong>components</strong>. Each component is responsible for a specific domain within Home Assistant. Components can listen for or trigger events, offer services and maintain states. Components are written in Python and can do all the goodness that Python has to offer. Out of the box, Home Assistant offers a bunch of <a href="/components/">built-in components</a>.</p>
<p>We can differentiate between two different types ofcomponents within Home Assistant.</p>
<p>We can differentiate between two different types of components within Home Assistant.</p>
<h4><a class="title-link" name="components-that-interact-with-an-internet-of-things-domain" href="#components-that-interact-with-an-internet-of-things-domain"></a> Components that interact with an Internet of Things domain</h4>
<p>These components will track devices within a specific domain and exist of a core part and platform specific logic. These components make their information available via the State Machine and the Event Bus. The component will also register services in the Service Registry to expose control of the devices.</p>
<p>These components will track devices within a specific domain and consist of a core part and platform-specific logic. These components make their information available via the State Machine and the Event Bus. The component will also register services in the Service Registry to expose control of the devices.</p>
<p>For example, one of the built-in components is the <code>switch</code> component. This component is responsible for interaction with different types of switches.</p>
<p>A platform provides support for a particular kind/brand of device. For example, a switch could use a WeMo or Orvibo platform, and a light component might interact with the Hue or LiFX platform.</p>
<p>If you are planning to add support for a new platform, please check out the <a href="/developers/add_new_platform/">add new platform section</a>.</p>
<h4><a class="title-link" name="components-that-respond-to-events-that-happen-within-home-assistant" href="#components-that-respond-to-events-that-happen-within-home-assistant"></a> Components that respond to events that happen within Home Assistant</h4>
@ -201,7 +203,7 @@
Overview of the full Home Assistant architecture with a couple of loaded components and platforms.
</p>
<p>Components platform logic uses 3rd party Python libraries to communicate with the devices. This is done so that we can leverage great device libraries that are out there in the Python community.</p>
<p>The platform logic for components uses 3rd party Python libraries to communicate with the devices. This is done so that we can leverage great device libraries that are out there in the Python community.</p>
<h2><a class="title-link" name="multiple-connected-instances" href="#multiple-connected-instances"></a> Multiple connected instances</h2>
@ -214,7 +216,7 @@
Overview of the Home Assistant architecture for multiple devices.
</p>
<p>A slave instance can be started with the following code and has the same support for components as a master-instance.</p>
<p>A slave instance can be started with the following code and has the same support for components as a master instance.</p>
<div class="highlighter-coderay"><div class="CodeRay">
<div class="code"><pre><span class="keyword">import</span> <span class="include">homeassistant.remote</span> <span class="keyword">as</span> remote
@ -237,7 +239,7 @@ hass.block_till_stopped()
</div>
<p class="note">
Because each slave maintains its own ServiceRegistry it is possible to have multiple slaves respond to one service call.
Because each slave maintains its own Service Registry it is possible to have multiple slaves respond to one service call.
</p>