Skip to content

Commit

Permalink
Added blog post, updated styles
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Dec 26, 2014
1 parent f3cc5e3 commit 3579458
Show file tree
Hide file tree
Showing 24 changed files with 206 additions and 107 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ group :development do
gem 'rubypants', '~> 0.2.0'
gem 'rb-fsevent', '~> 0.9'
gem 'stringex', '~> 1.4.0'
gem 'jekyll-time-to-read'
end

gem 'sinatra', '~> 1.4.2'
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ rdiscount:
- smart
highlighter: pygments # default python pygments have been replaced by pygments.rb

gems:
- jekyll-time-to-read

paginate: 10 # Posts per page on the blog index
paginate_path: "blog/posts/:num" # Directory base for pagination URLs eg. /posts/2/
recent_posts: 5 # Posts in the sidebar Recent Posts section
Expand Down
71 changes: 45 additions & 26 deletions sass/custom/_paulus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
}

article.post, article.page {
article.post, article.page, article.listing {
img, table {
border-radius: 3px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
Expand All @@ -39,46 +39,65 @@ article.post, article.page {
& > table {
background-color: #F3FCF5;
}

p.img {
background-color: #FFF;
border-radius: 5px;
text-align: center;
padding-bottom: 3px;
font-size: .9rem;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;

img {
display: block;
box-shadow: none;
margin: 0 auto;
}
}

li {
margin-bottom: 10px;

&:last-child {
margin-bottom: 0;
}
}
}

.note {
p.note {
position: relative;

background: #e7f2fa;
padding: 12px;
margin-bottom: 24px;

padding: 40px 12px 6px 12px;
box-shadow: rgba(0,0,0,0.06) 0 0 10px;

.title::before {
&::before {
font-family: "FontAwesome";
content: "\f05a";
margin-right: 5px;
}
content: "\f05a" " Note " attr(data-title);
background-color: #6ab0de;
color: white;
font-weight: bold;

.title {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
font-weight: bold;
display: block;
color: #fff;
background: #6ab0de;
margin: -12px;
padding: 6px 12px;
margin-bottom: 12px;
box-sizing: border-box;
}
padding: 6px 14px;

.content {
margin-bottom: 0;
line-height: 1.5em;

position: absolute;
top: 0;
left: 0;
right: 0;
}

&.warning {
background-color: #F7F9E1;

.title {
&::before {
background-color: rgb(187, 185, 13);;
}

.title::before {
content: "\f071";
content: "\f071" " Warning " attr(data-title);
}
}
}

}
3 changes: 2 additions & 1 deletion sass/oscailte/base/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ a {
}

article.post,
article.page {
article.page,
article.listing {
img {
border: 5px solid #fff;
border-radius: 3px;
Expand Down
3 changes: 2 additions & 1 deletion sass/oscailte/base/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ article {
font-size: 12px;
padding: 0 0 5px;
> * {
margin-right: 20px;
margin-right: 15px;
white-space: nowrap;

&:last-child {
margin-right: 0;
Expand Down
9 changes: 5 additions & 4 deletions source/_includes/blog/post/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ <h1 class="title indent">{{ page.title }}</h1>
<div class="meta clearfix">
{% include blog/post/date.html %}{{ time }}
{% include post/author.html %}
{% include post/time_to_read.html %}
{% include blog/post/tags.html %}
{% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %}
<a class="pull-right" href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">
Comments <i class="icon-comment"></i>
<a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">
<i class="icon-comment"></i> Comments
</a>
{% endif %}
</div>
Expand All @@ -26,8 +27,8 @@ <h1 class="title indent">{{ page.title }}</h1>
{% if excerpted == 'true' and index %}
<div class="entry-content clearfix">
{{ content | excerpt }}
<a class="btn pull-right" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
<a class="btn pull-right" href="{{ root_url }}{{ post.url }}#read-more">{{ site.excerpt_link }}</a>
</div>
{% else %}
{{ content }}
{{ content | replace: site.excerpt_separator, '<a name="read-more"></a>' }}
{% endif %}
1 change: 1 addition & 0 deletions source/_includes/post/time_to_read.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span><i class='icon-time'></i> {{ content | reading_time_as_s }} reading time</span>
2 changes: 1 addition & 1 deletion source/_layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{% if site.disqus_short_name and page.comments == true %}
<section id="disqus">
<h1 class="indent title">Comments</h1>
<h3 class="indent title">Comments</h3>
<div id="disqus_thread" aria-live="polite">{% include blog/post/disqus_thread.html %}</div>
</section>
{% endif %}
1 change: 0 additions & 1 deletion source/_posts/2014-12-18-website-launched.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ date: 2014-12-18 23:24:45 -0800
date_formatted: "December 18, 2014"
comments: true
categories: website
author: "Paulus Schoutsen"
---

I finally took the time to setup a simple website to help people getting started with Home Assistant. The process was super smooth thanks to the great tools [Jekyll](http://jekyllrb.com) and [Octopress](http://octopress.org) and the great services [GitHub Pages](https://pages.github.com) and [CloudFlare](https://cloudflare.com).
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
layout: post
title: "Home Control, Automation &amp; the Smart Home"
date: 2014-12-25 10:23:13 -0800
date_formatted: December 25, 2014
comments: true
categories:
---

The internet has been buzzing over the last year about home automation. A lot of different terms fly around like the internet of things, home automation and the smart home.
This article will try to explain how they all relate.

The first thing to introduce is the **Internet of Things** (IoT). This refers to a new generation of devices that cannot only be controlled by humans via buttons or remotes but also provide an interface to communicate with other devices and applications. For example, an IoT-capable coffee machine could receive commands to create different types of coffee and be able to broadcast the amount of water left in its resevoir.

There is no widely adopted open standard for smart device communication. This prevents a lot of devices to communicate with one another. And even if they could, most devices are not designed to manage other devices. To solve this we need a device to be able to communicate with and manage all these connected devices. This device is called a **hub**.

As a bare minimum a hub has to keep track of the state of each device and should be able to control them if possible. For example, it has to know which lights are on or off and offer a way to control the lights. For a sensor it only has to know the value. A hub with these capabilities offers **home control**.

<p class='img'>
<a href='{{site_root}}/images/screenshots/nexus_7_dashboard.png'>
<img alt='Hub dashboard example'
src='{{site_root}}/images/screenshots/nexus_7_dashboard.png' />
</a>
Example of a hub's dashboard. Showing the state of 2 persons, 4 lights and the sun.
</p>
<!--more-->
A step up from home control is to have the user setup triggers to send commands based on information in the home control layer. For example, to turn on the lights when a person arrives home. A hub with these capabilities is capable of **home automation**.

Most hubs on the market today offer this in various degrees of functionality and usability. Some IoT-capable devices offer this too, but only control themselves and are usually limited to location and time-based events.

The last category, and this is still very much in the future, is the **smart home**. A self-learning and adopting system that will decide which events should impact other devices.

An example of a smart home in action is that it observes that when person A comes home, the lights in the living room and the kitchen switch on. While if person B comes home, the lights in the living room and the study room are switched on. The next time person A or B comes home, the smart home will turn on its preferred lights without any configuration being set by the user.

A glimpse today at how the future can look is the [Nest thermostat](https://nest.com/). A thermostat smart enough to learn your schedule and adjust its own temperature accordingly.

All this results in the following overview of Home Automation.

<p class='img'>
<a href='{{site_root}}/images/architecture/home_automation_landscape.png'>
<img alt='Home Automation landscape'
src='{{site_root}}/images/architecture/home_automation_landscape.png' />
</a>
Overview of the home automation landscape.
</p>

### Challenges

You are probably wondering, this all seems relatively simple, why don't I have my very own smart home yet? There are a couple of challenges today that keep us from stepping into the future.

#### More Internet of Things-capable devices

The majority of the IoT products out there are either lights, switches or presence detection. That's not enough for your home to be very smart about. We need televisions, fridges, ovens and more to join the party to increase the number of devices that we can control.

#### More data

Most first generation IoT devices are only exposing information that is needed for controlling it. We need to be able to track all interactions with each device for our smart home to learn how interaction with devices influence other things. For example, we need to be able to track how many cups of coffee were made or how often the fridge was open. This will increase the information flow and open up a whole bunch of new possibilities. For example, the smart home can order new coffee when you're running low.

#### Easy to use, open software that we can trust

To increase adoption we will need people to trust their smart home system. It will be very tought to convince people to upgrade all their devices and upload all interactions with each of them to the cloud. This data could reveal their whole life including all bad habits. That's why such a system should be simple and open-source so people can validate that their data generated at home stay home.

Anoter important booster for adoption is that the software should be easy to set up and use by the average user. A lot of people are not burning their hands yet on Home Automation because they are scared of having to configure it all.

Home Assistant is trying to be this software. It is not there yet but trying hard. Device discovery and a user interface for configuring home automation are problems we hope to tackle in 2015 while not sacrificing modularity or usability.

Happy new year!
1 change: 1 addition & 0 deletions source/blog/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: default
sidebar: false
---
{% assign index = true %}
{% for post in paginator.posts %}
Expand Down
2 changes: 1 addition & 1 deletion source/components/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: page
title: "Components"
date: 2014-12-21 13:35
sidebar: false
comments: true
comments: false
sharing: true
footer: true
---
Expand Down
6 changes: 3 additions & 3 deletions source/developers/add_new_platform.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: page
title: "Adding support for a new platform"
date: 2014-12-21 13:27
sidebar: false
comments: true
comments: false
sharing: true
footer: true
---
Expand All @@ -20,6 +20,6 @@ For example, the built-in `switch` component consists of the following files in

If you are planning to add support for a new type of device to an existing component, you can get away with only writing platform logic. Have a look at how the component works with other platforms and create a similar file for the platform that you would like to add.

<div class='note'><p class='title'>Note</p><p class='content'>
<p class='note'>
Platform logic should not interface directly with the devices but use a third-party Python 3 library that speaks the actual API.
</p></div>
</p>
14 changes: 7 additions & 7 deletions source/developers/api.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: page
title: "Rest API"
date: 2014-12-21 13:27
sidebar: false
comments: true
comments: false
sharing: true
footer: true
---
Expand All @@ -17,9 +17,9 @@ In the package [`homeassistant.remote`](https://github.com/balloob/home-assistan

The API accepts and returns only JSON encoded objects. All API calls have to be accompanied by the header `X-HA-Access: YOUR_PASSWORD` (as specified in your `home-assistant.conf`).

<div class='note'><p class='title'>Note</p><p class='content'>
<p class='note'>
You can append <code>?api_password=YOUR_PASSWORD</code> to any url to log in automatically.
</p></div>
</p>

Successful calls will return status code 200 or 201. Other status codes that can return are:

Expand Down Expand Up @@ -193,9 +193,9 @@ Returns a list of states that have changed while the service was being executed.
]
```

<div class='note'><p class='title'>Note</p><p class='content'>
<p class='note'>
The result will include any changed states that changed while the service was being executed, even if their change was the result of something else happening in the system.
</p></div>
</p>

#### POST /api/event_forwarding
Setup event forwarding to another Home Assistant instance.
Expand Down Expand Up @@ -239,6 +239,6 @@ It will return a message if event forwarding was cancelled successful.
}
```

<div class='note'><p class='title'>Note</p><p class='content'>
<p class='note'>
If your client does not support <code>DELETE</code> HTTP requests you can add an optional attribute <code>_METHOD</code> and set its value to <code>DELETE</code>.
</p></div>
</p>
Loading

0 comments on commit 3579458

Please sign in to comment.