- 2015-01-05T21:03:42-08:00
+ 2015-01-10T08:54:35-08:00https://home-assistant.io/
diff --git a/blog/categories/architecture/atom.xml b/blog/categories/architecture/atom.xml
index 2e9fd8211b..d06a4072b5 100644
--- a/blog/categories/architecture/atom.xml
+++ b/blog/categories/architecture/atom.xml
@@ -4,7 +4,7 @@
- 2015-01-05T21:03:42-08:00
+ 2015-01-10T08:54:35-08:00https://home-assistant.io/
diff --git a/blog/categories/component/atom.xml b/blog/categories/component/atom.xml
index b505efb2ca..8b3026eea4 100644
--- a/blog/categories/component/atom.xml
+++ b/blog/categories/component/atom.xml
@@ -4,7 +4,7 @@
- 2015-01-05T21:03:42-08:00
+ 2015-01-10T08:54:35-08:00https://home-assistant.io/
diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml
index 432a6da41e..5d69e9f2f8 100644
--- a/blog/categories/website/atom.xml
+++ b/blog/categories/website/atom.xml
@@ -4,7 +4,7 @@
- 2015-01-05T21:03:42-08:00
+ 2015-01-10T08:54:35-08:00https://home-assistant.io/
diff --git a/developers/add_new_platform.html b/developers/add_new_platform.html
index e2a34e3fbd..c5af081584 100644
--- a/developers/add_new_platform.html
+++ b/developers/add_new_platform.html
@@ -130,6 +130,54 @@ Platform logic should not interface directly with the devices but use a third-pa
+
Allowing your platform to be discovered
+
+
Home Assistant has a discovery service running in the background to discover new devices. Whenever a new device is discovered, an SERVICE_DISCOVERED event will be fired with the found service and the information. The discovery component has some knowledge about which components handle which type of services and will ensure those are loaded and listening before firing the SERVICE_DISCOVERED event.
+
+
Add discovery instructions
+
+
Device discovery for Home Assistant has been extracted into an external library called NetDisco. This library is integrated using the discovery component and scans the network in intervals for uPnP and zeroconf/mDNS services.
From your component, you will have to set up the listening for specific services. Below an example how one would listen for discovered Chromecasts:
+
+
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+
fromhomeassistant.loaderimportget_component
+
+defsetup(hass,config):
+discovery=get_component('discovery')
+
+defchromecast_discovered(service,info):
+""" Called when a Chromecast has been discovered. """
+print("Discovered a new Chromecast: {}".format(info))
+
+discovery.listen(
+hass,discovery.services.GOOGLE_CAST,chromecast_discovered)
+
+
+
+
Auto-loading your component upon discovery
+
+
The Discovery component is capable of setting up your components before firing the SERVICE_DISCOVERD event. To do this you will have to update the SERVICE_HANDLERS constant in the discovery component.
+
+
+This option is currently limited to built-in components.
+