Merge remote-tracking branch 'origin/current' into next
This commit is contained in:
commit
c1148f8ec4
89 changed files with 1460 additions and 186 deletions
|
@ -14,7 +14,7 @@ Before we dive into the Home Assistant architecture, let's get a clear overview
|
|||
For more information about each part in this overview, <a href='/blog/2014/12/26/home-control-home-automation-and-the-smart-home/'>check out our blog</a>. Here's the tl;dr version of the blog:
|
||||
|
||||
* Home Control is responsible for collecting information and controlling devices.
|
||||
* Home Automation triggers command based on user configurations.
|
||||
* Home Automation triggers commands based on user configurations.
|
||||
* Smart Home triggers commands based on previous behaviour.
|
||||
|
||||
<p class='img'>
|
||||
|
@ -25,9 +25,9 @@ For more information about each part in this overview, <a href='/blog/2014/12/26
|
|||
Overview of the home automation landscape
|
||||
</p>
|
||||
|
||||
The Home Assistant core is responsible for Home Control. Home Assistant has four parts to make this possible:
|
||||
The Home Assistant core is responsible for Home Control. Home Assistant contains four parts which make this possible:
|
||||
|
||||
* **Event Bus**: facilitates the firing and listening of events--the beating heart of Home Assistant.
|
||||
* **Event Bus**: facilitates the firing and listening of events -- the beating heart of Home Assistant.
|
||||
* **State Machine**: keeps track of the states of things and fires a `state_changed` event when a state has been changed.
|
||||
* **Service Registry**: listens on the event bus for `call_service` events and allows other code to register services.
|
||||
* **Timer**: sends a `time_changed` event every 1 second on the event bus.
|
||||
|
|
|
@ -16,19 +16,19 @@ Home Assistant can be extended with **components**. Each component is responsibl
|
|||
Diagram showing interaction between components and the Home Assistant core
|
||||
</p>
|
||||
|
||||
There are two types of components within Home Assistant: components that interact with an Internet-of-Things domain, and components that respond to events that happen within Home Assistant. Read on to learn about each type!
|
||||
There are two types of components within Home Assistant: components that interact with an Internet of Things domain, and components that respond to events that happen within Home Assistant. Read on to learn about each type!
|
||||
|
||||
#### {% linkable_title Components that interact with an Internet-of-Things domain %}
|
||||
|
||||
These components 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 components also register services in the Service Registry to expose control of the devices.
|
||||
|
||||
For example, the built-in [`switch` component](/components/switch/) is responsible for interaction with different types of switches. A platform provides support for a particular kind or 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.
|
||||
For example, the built-in [`switch` component](/components/switch/) is responsible for interaction with different types of switches. A platform provides support for a particular kind or 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.
|
||||
|
||||
If you want to add support for a new platform, check out the [add new platform section](/developers/add_new_platform/).
|
||||
|
||||
#### {% linkable_title Components that respond to events that happen within Home Assistant %}
|
||||
|
||||
These components provide small pieces of home automation logic or services that do common tasks within your house.
|
||||
These components provide small pieces of home automation logic or involve services that do common tasks within your house.
|
||||
|
||||
For example, the [`device_sun_light_trigger` component](/components/device_sun_light_trigger/) tracks the state of devices and the sun to make sure that the lights are turned on when it gets dark and people are home. The component uses logic like this:
|
||||
|
||||
|
@ -50,11 +50,11 @@ For example, the [`device_sun_light_trigger` component](/components/device_sun_l
|
|||
Turn on the lights
|
||||
```
|
||||
|
||||
Look [here](https://github.com/home-assistant/home-assistant/blob/master/config/custom_components/example.py) for an extended example of a home automation component.
|
||||
Look [here](https://github.com/home-assistant/home-assistant/blob/master/config/custom_components/example.py) for a comprehensive example of a home automation component.
|
||||
|
||||
### {% linkable_title The full picture %}
|
||||
|
||||
When we put all the different pieces of Home Assistant together, it's a close match for the initial home automation overview sketch. The smart home AI is not implemented yet, so it's not included in this picture.
|
||||
When we put all the different pieces of Home Assistant together, it's a close match for the initial home automation overview sketch. The smart home AI has not been implemented yet, so it's not included in this picture.
|
||||
|
||||
<p class='img'>
|
||||
<a href='/images/architecture/ha_full_architecture.png'>
|
||||
|
@ -63,4 +63,4 @@ When we put all the different pieces of Home Assistant together, it's a close ma
|
|||
Overview of the full Home Assistant architecture with a couple of loaded components and platforms
|
||||
</p>
|
||||
|
||||
The platform logic for components uses third-party Python libraries to communicate with the devices so we can leverage the great device libraries in the Python community.
|
||||
The platform logic for components uses third-party Python libraries to communicate with the devices. Through this, we can leverage some of the best libraries in the Python community.
|
||||
|
|
|
@ -38,6 +38,7 @@ During development on a specific file, speed up your workflow by running tests a
|
|||
```bash
|
||||
$ flake8 homeassistant/core.py
|
||||
$ pylint homeassistant/core.py
|
||||
$ pydocstyle homeassistant/core.py
|
||||
$ py.test tests/test_core.py
|
||||
```
|
||||
|
||||
|
|
|
@ -9,11 +9,10 @@ sharing: true
|
|||
footer: true
|
||||
---
|
||||
|
||||
There are a bunch of online services which can help you if you are developing for Home Assistant or maintaining platforms/components. Some are directly connected to Pull Requests and the repositories itself, others are only publishing details and updates in our [gitter.im](https://gitter.im/home-assistant/home-assistant/devs) chatroom.
|
||||
There are a bunch of online services which can help you if you are developing for Home Assistant or maintaining components. Some of these are directly connected to Pull Requests and the repositories, while others publish details and updates in our [Gitter.im](https://gitter.im/home-assistant/home-assistant/devs) chatroom.
|
||||
|
||||
- [Coveralls](https://coveralls.io/github/home-assistant/home-assistant)
|
||||
- [Travis CI](https://travis-ci.org/home-assistant/home-assistant)
|
||||
- [gemnasium](https://gemnasium.com/github.com/home-assistant/home-assistant)
|
||||
- [Requires.io](https://requires.io/github/home-assistant/home-assistant/requirements/?branch=dev)
|
||||
- [Pivotal Tracker](https://www.pivotaltracker.com/n/projects/1250084)
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ Returns an array of state changes in the past. Each object contains further deta
|
|||
},
|
||||
"entity_id": "sensor.weather_temperature",
|
||||
"last_changed": "2016-02-06T22:15:00+00:00",
|
||||
"last_updated": "2016-02-06T22:15:00+00:00"",
|
||||
"last_updated": "2016-02-06T22:15:00+00:00",
|
||||
"state": "-3.9"
|
||||
},
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ The return code is 200 if the entity existed, 201 if the state of a new entity w
|
|||
},
|
||||
"entity_id": "sun.sun",
|
||||
"last_changed": "2016-05-30T21:43:29.204838+00:00",
|
||||
"last_updated": "2016-05-30T21:47:30.533530+00:00"
|
||||
"last_updated": "2016-05-30T21:47:30.533530+00:00",
|
||||
"state": "below_horizon"
|
||||
}
|
||||
```
|
||||
|
@ -364,7 +364,7 @@ You can pass an optional JSON object to be used as `event_data`.
|
|||
|
||||
```json
|
||||
{
|
||||
next_rising":"2016-05-31T03:39:14+00:00",
|
||||
"next_rising":"2016-05-31T03:39:14+00:00",
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -447,7 +447,7 @@ Set up event forwarding to another Home Assistant instance.
|
|||
|
||||
Requires a JSON object that represents the API to forward to.
|
||||
|
||||
```json
|
||||
```javascript
|
||||
{
|
||||
"host": "machine",
|
||||
"api_password": "my_super_secret_password",
|
||||
|
@ -468,7 +468,7 @@ Cancel event forwarding to another Home Assistant instance.<br>
|
|||
|
||||
Requires a JSON object that represents the API to cancel forwarding to.
|
||||
|
||||
```json
|
||||
```javascript
|
||||
{
|
||||
"host": "machine",
|
||||
"api_password": "my_super_secret_password",
|
||||
|
|
|
@ -17,11 +17,13 @@ You can use the "**Edit this page on GitHub**" link to edit pages without creati
|
|||
|
||||
For larger changes, we suggest that you clone the website repository. This way, you can review your changes locally. The process for working on the website is no different from working on Home Assistant itself. You work on your change and propose it via a pull request.
|
||||
|
||||
To test your changes locally, you need to install the **Ruby** dependencies (gems):
|
||||
To test your changes locally, you need to install **Ruby** and its dependencies (gems):
|
||||
|
||||
- [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) if you don't have it already.
|
||||
- Install `bundler`, a dependency manager for Ruby: `gem install bundler`
|
||||
- In your home-assistant.github.io root directory, run `bundle` to install the gems you need.
|
||||
- Install `bundler`, a dependency manager for Ruby: `$ gem install bundler`
|
||||
- In your home-assistant.github.io root directory, run `$ bundle` to install the gems you need.
|
||||
|
||||
Short cut for Fedora: `$ sudo dnf -y install gcc-c++ ruby ruby-devel rubygem-bundler && bundle`
|
||||
|
||||
Then you can work on the documentation:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue