diff --git a/source/_components/camera.generic.markdown b/source/_components/camera.generic.markdown index 8fa5522c654..9b9984c3ffa 100644 --- a/source/_components/camera.generic.markdown +++ b/source/_components/camera.generic.markdown @@ -8,21 +8,16 @@ comments: false sharing: true footer: true ha_category: Camera +logo: camcorder.png ha_release: pre 0.7 --- -This component allows you to integrate any IP camera into Home Assistant. It supports fetching images from a url with optional HTTP authentication. +The `generic` camera platform allows you to integrate any IP camera into Home Assistant. It supports fetching images from a url with optional HTTP authentication. -Home Assistant will serve the images via its server, making it possible to view your IP camera's while outside of your network. +Home Assistant will serve the images via its server, making it possible to view your IP camera's while outside of your network. The endpoint is `/api/camera_proxy/camera.[name]?time=[timestamp]`. -As part of the basic support the following features will be provided: - -- MJPEG video streaming -- Saving a snapshot -- Recording(JPEG frame capture) - -To enable this sensor in your installation, add the following to your `configuration.yaml` file: +To enable this camery in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry diff --git a/source/_components/camera.mjpeg.markdown b/source/_components/camera.mjpeg.markdown index 5cc0c6f3bff..9f84a34851b 100644 --- a/source/_components/camera.mjpeg.markdown +++ b/source/_components/camera.mjpeg.markdown @@ -7,13 +7,17 @@ sidebar: true comments: false sharing: true footer: true +logo: camcorder.png ha_category: Camera +ha_release: pre 0.7 --- -The `mjpeg` component allows you to integrate IP cameras which are capable to stream their video with MJPEG into Home Assistant. +The `mjpeg` camera platform allows you to integrate IP cameras which are capable to stream their video with MJPEG into Home Assistant. -To enable this sensor in your installation, add the following to your `configuration.yaml` file: +Home Assistant will serve the images via its server, making it possible to view your IP camera's while outside of your network. The endpoint is `/api/camera_proxy/camera.[name]?time=[timestamp]`. + +To enable this camera in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry diff --git a/source/_components/device_tracker.bluetooth_tracker.markdown b/source/_components/device_tracker.bluetooth_tracker.markdown index f164bdaa3b9..c2b972c6812 100644 --- a/source/_components/device_tracker.bluetooth_tracker.markdown +++ b/source/_components/device_tracker.bluetooth_tracker.markdown @@ -16,7 +16,7 @@ ha_release: 0.18 This tracker discovers new devices on boot and tracks bluetooth devices periodically based on interval_seconds value. Devices discovered are stored with 'bt_' as the prefix for device mac in `known_devices.yaml`.
-Requires PyBluez +Requires PyBluez. If you are on raspbian, make sure you first install `bluetooth` and `libbluetooth-dev` by running `sudo apt install bluetooth libbluetooth-dev`
To use the Bluetooth tracker in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/device_tracker.icloud.markdown b/source/_components/device_tracker.icloud.markdown index bc617e0de73..7853b182716 100644 --- a/source/_components/device_tracker.icloud.markdown +++ b/source/_components/device_tracker.icloud.markdown @@ -40,3 +40,7 @@ This may cause battery drainage as it wakes up your device to get the current lo You may receive an email from Apple stating that someone has logged into your account. ++If you have two-factor authentication enabled on your iCloud account you will not be able to use this presence detection in HA, even with an app-specific password. +
+ diff --git a/source/_components/http.markdown b/source/_components/http.markdown index 3490451a05d..973ac048044 100644 --- a/source/_components/http.markdown +++ b/source/_components/http.markdown @@ -21,6 +21,9 @@ http: development: 1 ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem + cors_allowed_origins: + - google.com + - home-assistant.io ``` Configuration variables: @@ -30,6 +33,8 @@ Configuration variables: - **development** (*Optional*): Disable caching and load unvulcanized assets. Useful for Frontend development. - **ssl_certificate** (*Optional*): Path to your TLS/SSL certificate to serve Home Assistant over a secure connection. - **ssl_key** (*Optional*): Path to your TLS/SSL key to serve Home Assistant over a secure connection. +- **cors_allowed_origins** (*Optional*): A list of origin domain names to allow [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) requests from. Enabling this will set the `Access-Control-Allow-Origin` header to the Origin header if it is found in the list, and the `Access-Control-Allow-Headers` to `Origin, Accept, X-Requested-With, Content-type, X-HA-access`. + The [Set up encryption using Let's Encrypt](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) blog post gives you details about the encryption of your traffic using free certificates from [Let's Encrypt](https://letsencrypt.org/). diff --git a/source/_components/hvac.markdown b/source/_components/hvac.markdown index 48bda1c43f1..c4a0d96f44e 100644 --- a/source/_components/hvac.markdown +++ b/source/_components/hvac.markdown @@ -12,10 +12,11 @@ ha_release: 0.19 The `hvac` component is built for the controlling and monitoring of HVAC (heating, ventilating, and air conditioning) devices. -To enable this component, add the following lines to your `configuration.yaml`: +To enable this component, pick one of the platforms and add it to your `configuration.yaml`: ```yaml # Example configuration.yaml entry hvac: + platform: demo ``` diff --git a/source/_components/keyboard.markdown b/source/_components/keyboard.markdown index 3c020b0d3b4..07b3e2db260 100644 --- a/source/_components/keyboard.markdown +++ b/source/_components/keyboard.markdown @@ -7,7 +7,9 @@ sidebar: true comments: false sharing: true footer: true +logo: keyboard.png ha_category: Automation +ha_release: pre 0.7 --- diff --git a/source/_components/notify.file.markdown b/source/_components/notify.file.markdown index 20311364022..4084f2bbed2 100644 --- a/source/_components/notify.file.markdown +++ b/source/_components/notify.file.markdown @@ -7,7 +7,9 @@ sidebar: true comments: false sharing: true footer: true +logo: file.png ha_category: Notifications +ha_release: pre 0.7 --- diff --git a/source/_components/sensor.deutsche_bahn.markdown b/source/_components/sensor.deutsche_bahn.markdown index 3dd20003274..fcb2afbe6c5 100644 --- a/source/_components/sensor.deutsche_bahn.markdown +++ b/source/_components/sensor.deutsche_bahn.markdown @@ -8,6 +8,7 @@ comments: false sharing: true footer: true ha_category: Sensor +logo: db.png ha_iot_class: "Local Polling" --- diff --git a/source/_components/sensor.dht.markdown b/source/_components/sensor.dht.markdown index d559e85fddc..0b4844c3b07 100644 --- a/source/_components/sensor.dht.markdown +++ b/source/_components/sensor.dht.markdown @@ -9,6 +9,7 @@ sharing: true footer: true ha_category: DIY ha_release: 0.7 +logo: dht.png --- diff --git a/source/_components/sensor.fitbit.markdown b/source/_components/sensor.fitbit.markdown index 30fdba8603b..e96194c80f8 100644 --- a/source/_components/sensor.fitbit.markdown +++ b/source/_components/sensor.fitbit.markdown @@ -2,18 +2,68 @@ layout: page title: "Fitbit" description: "Instructions how to integrate Fitbit devices within Home Assistant." -date: 2015-07-11 0:15 +date: 2016-05-09 15:01 sidebar: true comments: false sharing: true footer: true -logo: +logo: fitbit.png ha_category: Sensor ha_iot_class: "Cloud Polling" ha_release: 0.19 --- +The Fitbit sensor allows you to expose data from [Fitbit](http://fitbit.com) to Home Assistant. + +Enable the sensor by adding the following to your configuration: + ```yaml sensor: platform: fitbit + monitored_resources: + - "body/weight" +``` + +Restart Home Assistant once this is complete. Go to the frontend. You will see a new entry for configuring Fitbit. Follow the instructions there to complete the setup process. + +Please be aware that Fitbit has very low rate limits, 150 per user per hour. The clock resets at the _top_ of the hour (meaning it is not a rolling 60 minutes). There is no way around the limits. Due to the rate limits, the sensor only updates every 30 minutes. You can manually trigger an update by restarting Home Assistant. Keep in mind that 1 request is used for every entry in `monitored_resources`. + +The unit system that the sensor will use is based on the country you set in your Fitbit profile. + +Below is the list of resources that you can add to `monitored_resources`. One sensor is exposed for every resource. + +```text +activities/activityCalories +activities/calories +activities/caloriesBMR +activities/distance +activities/elevation +activities/floors +activities/heart +activities/minutesFairlyActive +activities/minutesLightlyActive +activities/minutesSedentary +activities/minutesVeryActive +activities/steps +activities/tracker/activityCalories +activities/tracker/calories +activities/tracker/distance +activities/tracker/elevation +activities/tracker/floors +activities/tracker/minutesFairlyActive +activities/tracker/minutesLightlyActive +activities/tracker/minutesSedentary +activities/tracker/minutesVeryActive +activities/tracker/steps +body/bmi +body/fat +body/weight +sleep/awakeningsCount +sleep/efficiency +sleep/minutesAfterWakeup +sleep/minutesAsleep +sleep/minutesAwake +sleep/minutesToFallAsleep +sleep/startTime +sleep/timeInBed ``` diff --git a/source/_components/sensor.gtfs.markdown b/source/_components/sensor.gtfs.markdown index 306d9dfdf8c..6683670cb3e 100644 --- a/source/_components/sensor.gtfs.markdown +++ b/source/_components/sensor.gtfs.markdown @@ -7,7 +7,7 @@ sidebar: true comments: false sharing: true footer: true -logo: 'gtfs.png' +logo: train.png ha_category: Sensor ha_iot_class: "Local Polling" ha_release: 0.17 diff --git a/source/_components/sensor.nzbget.markdown b/source/_components/sensor.nzbget.markdown index b5b2ab5d068..89179741e25 100644 --- a/source/_components/sensor.nzbget.markdown +++ b/source/_components/sensor.nzbget.markdown @@ -12,22 +12,29 @@ ha_iot_class: "Local Polling" ha_release: 0.17 --- -The `NZBGet` platform will allow you to monitor your downloads with [NZBGet](http://NZBGet.net) from within Home Assistant and setup automation based on the information. +The `nzbget` platform will allow you to monitor your downloads with [NZBGet](http://NZBGet.net) from within Home Assistant and setup automation based on the information. To use NZBGet with your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry sensor: - - platform: nzbget - base_url: http://192.168.1.18:6789 - username: apiuser - password: apipass - monitored_variables: - - ArticleCacheMB - - DownloadRate - - DownloadPaused - - FreeDiskSpaceMB - - PostPaused - - RemainingSizeMB + platform: nzbget + base_url: http://192.168.1.18:6789 + username: apiuser + password: apipass + monitored_variables: + - ArticleCacheMB + - DownloadRate + - DownloadPaused + - FreeDiskSpaceMB + - PostPaused + - RemainingSizeMB ``` + +Configuration variables: + +- **base_url** (*Required*): The URL to your NZBGet installation. +- **username** (*Optional*): The username to access your NZBGet installation. +- **password** (*Optional*): The password to access your NZBGet installation. +- **monitored_variables** (*Required*): Array of monitored details. diff --git a/source/_components/sensor.swiss_public_transport.markdown b/source/_components/sensor.swiss_public_transport.markdown index d923a8ff4c0..3349f272eb4 100644 --- a/source/_components/sensor.swiss_public_transport.markdown +++ b/source/_components/sensor.swiss_public_transport.markdown @@ -7,6 +7,7 @@ sidebar: true comments: false sharing: true footer: true +logo: train.png ha_category: Sensor ha_iot_class: "Local Polling" ha_release: pre 0.7 diff --git a/source/_components/switch.dlink.markdown b/source/_components/switch.dlink.markdown index 405c6a6624c..8f2379408b9 100644 --- a/source/_components/switch.dlink.markdown +++ b/source/_components/switch.dlink.markdown @@ -19,6 +19,7 @@ The `dlink` switch platform allows you to control the state of your [D-Link Wi-F Supported devices (tested): - DSP-W215 +- DSP-W110 To use your D-Link smart plugs in your installation, add the following to your `configuration.yaml` file: @@ -37,5 +38,5 @@ Configuration variables: - **host** (*Required*): The IP address of your D-Link plug, eg. http://192.168.1.32 - **name** (*Optional*): The name to use when displaying this switch. - **username** (*Required*): The username for your plug. Defaults to `admin`. -- **password** (*Required*): The password for your plug. +- **password** (*Required*): The password for your plug. Default password is the `PIN` inlcuded on the configuration card. diff --git a/source/_components/switch.rpi_rf.markdown b/source/_components/switch.rpi_rf.markdown index 0338a091cbc..683c919e84f 100644 --- a/source/_components/switch.rpi_rf.markdown +++ b/source/_components/switch.rpi_rf.markdown @@ -1,8 +1,8 @@ --- layout: page -title: "Raspberry PI GPIO Switch" -description: "Instructions how to integrate the GPIO of a Raspberry PI into Home Assistant as a switch." -date: 2016-05-07 09:00 +title: "Raspberry Pi RF Switch" +description: "Instructions how to integrate devices controlled via codes sent with low-cost GPIO RF modules on a Raspberry Pi into Home Assistant as a switch." +date: 2016-05-10 09:00 sidebar: true comments: false sharing: true @@ -15,7 +15,10 @@ ha_release: 0.19 The `rpi_rf` switch platform allows you to control devices over 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a [Raspberry Pi](https://www.raspberrypi.org/). -To use your Raspberry Pi with a 433MHz adaptor in your installation, add the following to your `configuration.yaml` file: +Interoperable with codes sniffed via [the rpi-rf module](https://pypi.python.org/pypi/rpi-rf) or [rc-switch](https://github.com/sui77/rc-switch). +For more info see the PyPi module description: [rpi-rf](https://pypi.python.org/pypi/rpi-rf). + +To enable, add the following to your `configuration.yaml`: ```yaml # Example configuration.yaml entry @@ -30,14 +33,19 @@ switch: pulselength: 200 code_on: 987654 code_off: 133742 + living_room_light: + protocol: 5 + code_on: 654321 + code_off: 654320 ``` Configuration variables: -- **gpio** array (*Required*): Array of used ports. -- **switches:** (*Required*): Array of switches. - - **[name]** (*Requireld*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH). - - **code_on** (*Requireld*): Code to switch the device on, eg. `987654`. - - **code_off** (*Requireld*): Code to switch the device off, eg. `133742`. - - **pulselength** (*Optional*): Length of the pulse +- **gpio** (*Required*): GPIO to which the data line of the TX module is connected. +- **switches:** (*Required*): The array that contains all switches. + - **[entry]** (*Required*): Name of the switch. Multiple entries are possible. + - **code_on** (*Required*): Decimal code to switch the device on. + - **code_off** (*Required*): Decimal code to switch the device off. + - **protocol** (*Optional*): RF Protocol (Default is `1`). + - **pulselength** (*Optional*): Pulselength (Default is the protocol default). diff --git a/source/_posts/2016-05-06-open-iot-summit-talk.markdown b/source/_posts/2016-05-06-open-iot-summit-talk.markdown index a310d6624c7..a6071b8c2f7 100644 --- a/source/_posts/2016-05-06-open-iot-summit-talk.markdown +++ b/source/_posts/2016-05-06-open-iot-summit-talk.markdown @@ -7,7 +7,7 @@ date_formatted: "May 6, 2016" author: Paulus Schoutsen author_twitter: balloob comments: true -categories: Talks +categories: Talks Video og_image: /images/blog/2016-05-openiot/preview-video.png --- diff --git a/source/_posts/2016-05-07-empowering-scripts-and-alexa.markdown b/source/_posts/2016-05-07-empowering-scripts-and-alexa.markdown index 0b8fd2e2b16..b4a1d8896f0 100644 --- a/source/_posts/2016-05-07-empowering-scripts-and-alexa.markdown +++ b/source/_posts/2016-05-07-empowering-scripts-and-alexa.markdown @@ -7,8 +7,7 @@ date_formatted: "May 7, 2016" author: Paulus Schoutsen author_twitter: balloob comments: true -categories: Talks -og_image: /images/blog/2016-05-openiot/preview-video.png +categories: Release-Notes --- This release is big. Until now, our automations and scripts have been very static. Starting today it should all be a bit more dynamic. @@ -43,8 +42,6 @@ light: entity_namespace: holiday_home ``` -+In the past, this was achieved by adding your component to the `DISCOVERY_PLATFORMS` in the target sub-component. Generic discovery through `load_platform()` allows you to load any sub-component, including custom components, without changing the sub-component. +
diff --git a/source/developers/platform_example_light.markdown b/source/developers/platform_example_light.markdown index b80e966907b..7d022c024da 100644 --- a/source/developers/platform_example_light.markdown +++ b/source/developers/platform_example_light.markdown @@ -15,7 +15,7 @@ This example is for adding support for the imaginary Awesome Lights. It shows th import logging # Import the device class from the component that you want to support -from homeassistant.components.light import Light +from homeassistant.components.light import ATTR_BRIGHTNESS, Light from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD # Home Assistant depends on 3rd party packages for API specific code. @@ -24,7 +24,7 @@ REQUIREMENTS = ['awesome_lights==1.2.3'] _LOGGER = logging.getLogger(__name__) -setup_platform(hass, config, add_devices, discovery_info=None): +def setup_platform(hass, config, add_devices, discovery_info=None): """Initialize Awesome Light platform.""" import awesomelights @@ -56,22 +56,42 @@ class AwesomeLight(Light): """Initialize an AwesomeLight.""" self._light = light - def update(self): - """Fetch new state data for this light. - - This is the only method that should fetch new data for Home Assitant. - """ - self._light.update() + @property + def name(self): + """Return the display name of this light""" + return self._light.name + @property def brightness(self): - """Brightness of the light. + """Brightness of the light (an integer in the range 1-255). This method is optional. Removing it indicates to Home Assistant that brightness is not supported for this light. """ return self._light.brightness + @property def is_on(self): """If light is on.""" return self._light.is_on() + + def turn_on(self, **kwargs): + """Instruct the light to turn on. + + You can skip the brightness part if your light does not support + brightness control. + """ + self._light.brightness = kwargs.get(ATTR_BRIGHTNESS, 255) + self._light.turn_on() + + def turn_off(self, **kwargs): + """Instruct the light to turn off.""" + self._light.turn_off() + + def update(self): + """Fetch new state data for this light. + + This is the only method that should fetch new data for Home Assitant. + """ + self._light.update() ``` diff --git a/source/developers/platform_example_sensor.markdown b/source/developers/platform_example_sensor.markdown index 873e63856de..6320d3870c5 100644 --- a/source/developers/platform_example_sensor.markdown +++ b/source/developers/platform_example_sensor.markdown @@ -13,7 +13,7 @@ This is a minimum implementation of a platform for the sensor component. ### {% linkable_title Installation %} -Copy the code below and create it as a file in `