- 2015-09-11T09:24:25-07:00
+ 2015-09-12T18:24:29-07:00https://home-assistant.io/
@@ -39,7 +39,6 @@ The MQTT support was added to H
567
-8
mqtt:broker:127.0.0.1
@@ -47,7 +46,6 @@ The MQTT support was added to H
-platform:mqttname:"Fabian'sMood"state_topic:"home-assistant/fabian/mood"
-unit_of_measurement:""
@@ -68,13 +66,15 @@ The MQTT support was added to H
+
This is a really bad example. Don’t do this in the real world because you won’t be able to create diagrams of historical data. Better use a numerical value.
+
Python MQTT bindings
The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).
This example is using the Paho MQTT Python binding because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (pip3 install paho-mqtt).
-
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery”.
+
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.
12
@@ -83,7 +83,7 @@ The MQTT support was added to H
diff --git a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html
index f6d17b033d..b890a68f45 100644
--- a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html
+++ b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html
@@ -166,7 +166,6 @@ The MQTT support was added to H
567
-8
mqtt:broker:127.0.0.1
@@ -174,7 +173,6 @@ The MQTT support was added to H
-platform:mqttname:"Fabian'sMood"state_topic:"home-assistant/fabian/mood"
-unit_of_measurement:""
@@ -195,13 +193,15 @@ The MQTT support was added to H
+
This is a really bad example. Don’t do this in the real world because you won’t be able to create diagrams of historical data. Better use a numerical value.
+
Python MQTT bindings
The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).
This example is using the Paho MQTT Python binding because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (pip3 install paho-mqtt).
-
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery”.
+
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.
12
@@ -210,7 +210,7 @@ The MQTT support was added to H
After a restart of Home Assistant the “Mood” sensor will show up in the frontend. For more details about the configuration of MQTT itself and the sensor, please refer to the MQTT component or the MQTT sensor documentation.
@@ -55,18 +54,20 @@ sensor:
+
This is a really bad example. Don’t do this in the real world because you won’t be able to create diagrams of historical data. Better use a numerical value.
+
Python MQTT bindings
The last section was pretty boring, I know. Nobody wants to send MQTT messages by hand if there is a computer on the desk. If you are playing the lottery this section is for you. If not, read it anyway because the lottery is just an example :-).
This example is using the Paho MQTT Python binding because those binding should be available on the host where Home Assistant is running. If you want to use this example on another machine, please make sure that the bindings are installed (pip3 install paho-mqtt).
-
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery”.
+
The first step is to add an additional MQTT sensor to the configuration.yaml file. The sensor will be called “Lottery” and the unit of measurement will be “No.”.
+ The iTunes platform allows you to control iTunes via
+ itunes-api from Home Assistant. Play,
+ pause, or skip songs remotely on iTunes running on your Mac.
+
+
+iTunes itself can not be remotely controlled. In order to control your iTunes,
+you’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’s very easy to set up
+and run. You can find more about it on it’s [GitHub repo](https://github.com/maddox/itunes-api).
+
+
+
+
To add iTunes to your installation, add the following to your configuration.yaml file:
+The sonos platform allows you to control your Sonos HiFi wireless speakers and audio components from Home Assistant.
+
+
To add your Sonos components to your installation, add the following to your configuration.yaml file. It will perform auto-discovery of your connected speakers.
+
+
1
+2
+3
+
# Example configuration.yaml entry
+media_player:
+platform:sonos
+
+The arest switch platform allows you to toggle pins of your devices (like Arduino boards with a ethernet/wifi connection, the ESP8266, and the Raspberry Pi) running the aREST RESTful framework.
+
+
To use your aREST enabled device in your installation, add the following to your configuration.yaml file:
resource (Required): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
+
pins (Required): An array with all used pins of your board.
+
+
+
name (Required): The name of the pin you wish to toggle.
+
+
+
+
+
+
Accessing one of the endpoints (eg. http://192.168.1.10/analog/2/) will give you a JSON response. The interesting part is return_value which represents the sensor’s data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/switch.command_switch.html b/components/switch.command_switch.html
index 65064faa22..20206e9cb4 100644
--- a/components/switch.command_switch.html
+++ b/components/switch.command_switch.html
@@ -109,29 +109,30 @@ A switch platform that issues specific commands when it is turned on and off. Th
To enable it, add the following lines to your configuration.yaml:
-
1
+
1234567
-
# Example configuration.yaml entry
-switch:
- platform: command_switch
- switches:
- kitchen_light:
- oncmd: switch_command on kitchen
- offcmd: switch_command off kitchen
+
# Example configuration.yaml entry
+switch:
+platform:command_switch
+switches:
+kitchen_light:
+oncmd:switch_command on kitchen
+offcmd:switch_command off kitchen
+
Configuration variables:
-
switches array (Required): Contains all command switches.
+
switches (Required): The array that contains all command switches.
-
‘entry’ (Required): Name of the command switch. Multiple entries are possible.
+
entry (Required): Name of the command switch. Multiple entries are possible.
oncmd (Required): The action to take for on.
@@ -143,6 +144,27 @@ A switch platform that issues specific commands when it is turned on and off. Th
+
The example below is doing the same as the aREST switch. The commandline tool [curl](http://curl.haxx.se/) is used to toogle a pin which is controllable through REST.
+
+
+
+
diff --git a/developers/frontend.html b/developers/frontend.html
index 37fb890d96..6f99eb0df9 100644
--- a/developers/frontend.html
+++ b/developers/frontend.html
@@ -129,13 +129,26 @@ Do not use development mode in production. Home Assistant uses aggressive cachin
development: 1
-
After turning on development mode, you will have to install the web components that the frontend depends on. Firing off a build of the frontend by running scripts/build_frontend will ensure all dependencies are installed.
+
Next step is to get the frontend code. When you clone the Home Assistant repository, the frontend
+repository is not cloned by default. You will have to trigger this manually by running from the
+command line:
-
Once this is done, you can start editting the webcomponents in the folder homeassistant/components/frontend/www_static/home-assistant-polymer/src. To see the changes you’ve made, simply refresh your browser.
+
1
+
git submodule update --init
+
+
+
+
After checking out the frontend code, you will have to install the frontend dependencies. Firing off
+a build of the frontend by running scripts/build_frontend will ensure they get installed.
+
+
Once this is done, you can start editting the webcomponents in the folder
+homeassistant/components/frontend/www_static/home-assistant-polymer/src. To see the changes you’ve
+made, simply refresh your browser.
Enabling JavaScript backend development
-
Polymer is only providing a UI toolkit for Home Assistant. All data management and interaction with the server is done by home-assistant-js leveraging NuclearJS. To enable JavaScript development:
+
Polymer is only providing a UI toolkit for Home Assistant. All data management and interaction with
+the server is done by home-assistant-js leveraging NuclearJS. To enable JavaScript development:
12
@@ -146,9 +159,13 @@ Do not use development mode in production. Home Assistant uses aggressive cachin
-
npm run js_dev will start the process that will ensure that your latest changes to the JavaScript files will be loaded when you refresh the page. This command has to be always running while working on home-assistant-js.
+
npm run js_dev will start the process that will ensure that your latest changes to the JavaScript
+files will be loaded when you refresh the page. This command has to be always running while working
+on home-assistant-js.
-
After your changes have been accepted into the home-assistant-js repository, we’ll have to update Home Assistant Polymer to use the latest version. This can be done by updating package.json. Look for the line that contains home-assistant-js and update the SHA to the SHA of your commit.
+
After your changes have been accepted into the home-assistant-js repository, we’ll have to update
+Home Assistant Polymer to use the latest version. This can be done by updating package.json. Look
+for the line that contains home-assistant-js and update the SHA to the SHA of your commit.
Building the Polymer frontend
@@ -184,16 +201,17 @@ Do not use development mode in production. Home Assistant uses aggressive cachin
Some domains will be filtered out of the main view and are available through separate menu options. Examples are group, script, scene.
Adding a custom card type can be done with a few simple steps. For this example we will add a new state card for the domain camera:
+
Adding a custom card type can be done with a few simple steps. For this example we will add a new
+state card for the domain camera:
(All files in this example link to their source-code)