diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3f2fd110a1d..f646766a231 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -18,7 +18,7 @@ For help on building your component, please see the [developer documentation](ht
After you finish adding support for your device:
- Update the supported devices in the `README.md` file.
- - Add any new dependencies to `requirements.txt`.
+ - Add any new dependencies to `requirements_all.txt`. There is no ordering right now, so just add it to the end.
- Update the `.coveragerc` file.
- Provide some documentation for [home-assistant.io](https://home-assistant.io/). The documentation is handled in a separate [git repository](https://github.com/balloob/home-assistant.io).
- Make sure all your code passes Pylint and flake8 (PEP8 and some more) validation. To generate reports, run `pylint homeassistant > pylint.txt` and `flake8 homeassistant --exclude bower_components,external > flake8.txt`.
diff --git a/homeassistant/components/device_tracker/demo.py b/homeassistant/components/device_tracker/demo.py
new file mode 100644
index 00000000000..e8cf906be9e
--- /dev/null
+++ b/homeassistant/components/device_tracker/demo.py
@@ -0,0 +1,50 @@
+"""
+homeassistant.components.device_tracker.demo
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Demo platform for the device tracker.
+
+device_tracker:
+ platform: demo
+"""
+import random
+
+from homeassistant.components.device_tracker import DOMAIN
+
+
+def setup_scanner(hass, config, see):
+ """ Set up a demo tracker. """
+
+ def offset():
+ """ Return random offset. """
+ return (random.randrange(500, 2000)) / 2e5 * random.choice((-1, 1))
+
+ def random_see(dev_id, name):
+ """ Randomize a sighting. """
+ see(
+ dev_id=dev_id,
+ host_name=name,
+ gps=(hass.config.latitude + offset(),
+ hass.config.longitude + offset()),
+ gps_accuracy=random.randrange(50, 150),
+ battery=random.randrange(10, 90)
+ )
+
+ def observe(call=None):
+ """ Observe three entities. """
+ random_see('demo_paulus', 'Paulus')
+ random_see('demo_anne_therese', 'Anne Therese')
+
+ observe()
+
+ see(
+ dev_id='demo_home_boy',
+ host_name='Home Boy',
+ gps=[hass.config.latitude - 0.00002, hass.config.longitude + 0.00002],
+ gps_accuracy=20,
+ battery=53
+ )
+
+ hass.services.register(DOMAIN, 'demo', observe)
+
+ return True
diff --git a/homeassistant/components/device_tracker/owntracks.py b/homeassistant/components/device_tracker/owntracks.py
index e2591ffcc26..9ef227909e1 100644
--- a/homeassistant/components/device_tracker/owntracks.py
+++ b/homeassistant/components/device_tracker/owntracks.py
@@ -8,6 +8,7 @@ device_tracker:
platform: owntracks
"""
import json
+import logging
import homeassistant.components.mqtt as mqtt
@@ -24,18 +25,29 @@ def setup_scanner(hass, config, see):
# Docs on available data:
# http://owntracks.org/booklet/tech/json/#_typelocation
-
- parts = topic.split('/')
try:
data = json.loads(payload)
except ValueError:
# If invalid JSON
+ logging.getLogger(__name__).error(
+ 'Unable to parse payload as JSON: %s', payload)
return
+
if data.get('_type') != 'location':
return
- dev_id = '{}_{}'.format(parts[1], parts[2])
- see(dev_id=dev_id, host_name=parts[1], gps=(data['lat'], data['lon']),
- gps_accuracy=data['acc'], battery=data['batt'])
+
+ parts = topic.split('/')
+ kwargs = {
+ 'dev_id': '{}_{}'.format(parts[1], parts[2]),
+ 'host_name': parts[1],
+ 'gps': (data['lat'], data['lon']),
+ }
+ if 'acc' in data:
+ kwargs['gps_accuracy'] = data['acc']
+ if 'batt' in data:
+ kwargs['battery'] = data['batt']
+
+ see(**kwargs)
mqtt.subscribe(hass, LOCATION_TOPIC, owntracks_location_update, 1)
diff --git a/homeassistant/components/discovery.py b/homeassistant/components/discovery.py
index 6a780693f25..450019022e1 100644
--- a/homeassistant/components/discovery.py
+++ b/homeassistant/components/discovery.py
@@ -19,7 +19,7 @@ from homeassistant.const import (
DOMAIN = "discovery"
DEPENDENCIES = []
-REQUIREMENTS = ['netdisco==0.4']
+REQUIREMENTS = ['netdisco==0.4.1']
SCAN_INTERVAL = 300 # seconds
diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py
index 902b14e38b3..419e48d55b5 100644
--- a/homeassistant/components/frontend/__init__.py
+++ b/homeassistant/components/frontend/__init__.py
@@ -21,7 +21,8 @@ _LOGGER = logging.getLogger(__name__)
FRONTEND_URLS = [
- URL_ROOT, '/logbook', '/history', '/devService', '/devState', '/devEvent']
+ URL_ROOT, '/logbook', '/history', '/map', '/devService', '/devState',
+ '/devEvent']
STATES_URL = re.compile(r'/states(/([a-zA-Z\._\-0-9/]+)|)')
diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py
index 5d1b9696feb..5f913eae674 100644
--- a/homeassistant/components/frontend/version.py
+++ b/homeassistant/components/frontend/version.py
@@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """
-VERSION = "5f35285bc502e3f69f564240fee04baa"
+VERSION = "3a3ed81f9d66bf24e17f1d02b8403335"
diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html
index 8933710b823..9277184b8a2 100644
--- a/homeassistant/components/frontend/www_static/frontend.html
+++ b/homeassistant/components/frontend/www_static/frontend.html
@@ -2277,7 +2277,490 @@ http://nicolasgallagher.com/micro-clearfix-hack/
.pika-table abbr {
border-bottom: none;
cursor: help;
-}HistoryHistory-
Home Assistant
Home Assistant