diff --git a/_config.yml b/_config.yml
index 129ff970094..0c9b301a4ce 100644
--- a/_config.yml
+++ b/_config.yml
@@ -127,10 +127,10 @@ social:
# Home Assistant release details
current_major_version: 0
-current_minor_version: 39
-current_patch_version: 3
-date_released: 2017-03-04
+current_minor_version: 40
+current_patch_version: 0
+date_released: 2017-03-11
# Either # or the anchor link to latest release notes in the blog post.
# Must be prefixed with a # and have double quotes around it.
-patch_version_notes: "#release-0393---march-4"
+patch_version_notes: "#"
diff --git a/source/_components/android_ip_webcam.markdown b/source/_components/android_ip_webcam.markdown
index 856ade63235..ec5e62f70d3 100644
--- a/source/_components/android_ip_webcam.markdown
+++ b/source/_components/android_ip_webcam.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: android_ip_webcam.png
ha_category: Hub
-ha_release: 0.40
+ha_release: "0.40"
---
The [Android IP webcam](https://play.google.com/store/apps/details?id=com.pas.webcam) turns your andorid phone into a network camera with multiple viewing options.
diff --git a/source/_components/binary_sensor.android_ip_webcam.markdown b/source/_components/binary_sensor.android_ip_webcam.markdown
index 2ba0feb69df..cc4b9bc58da 100644
--- a/source/_components/binary_sensor.android_ip_webcam.markdown
+++ b/source/_components/binary_sensor.android_ip_webcam.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: android_ip_webcam.png
ha_category: Binary Sensor
-ha_release: 0.40
+ha_release: "0.40"
---
diff --git a/source/_components/maxcube.markdown b/source/_components/maxcube.markdown
index e126f57c3ff..3ec5eab2d0b 100644
--- a/source/_components/maxcube.markdown
+++ b/source/_components/maxcube.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: maxcube.png
ha_category: DIY
-ha_release: 0.40
+ha_release: "0.40"
ha_iot_class: "Local Polling"
---
diff --git a/source/_components/media_player.frontier_silicon.markdown b/source/_components/media_player.frontier_silicon.markdown
index a39a47310db..642f72416af 100644
--- a/source/_components/media_player.frontier_silicon.markdown
+++ b/source/_components/media_player.frontier_silicon.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
ha_category: Media Player
ha_iot_class: "Local Push"
-ha_release: 0.40
+ha_release: "0.40"
---
This component provides support for Internet Radios based on the [Frontier Silicon chipset]. Some of the manufacturers which offer products based on these chips include: Hama, Medion, Slivercrest, Auna, Technisat, Revo, Pinnel, etc. These devices will be usually controlled by the [UNDOK] app.
diff --git a/source/_components/notify.ciscospark.markdown b/source/_components/notify.ciscospark.markdown
index 4f4b804ba6c..f9b915b2cec 100644
--- a/source/_components/notify.ciscospark.markdown
+++ b/source/_components/notify.ciscospark.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: ciscospark.png
ha_category: Notifications
-ha_release: 0.40
+ha_release: "0.40"
---
The `Cisco Spark` platform allows you to deliver notifications from Home Assistant to [Cisco Spark](https://ciscospark.com/).
diff --git a/source/_components/sensor.android_ip_webcam.markdown b/source/_components/sensor.android_ip_webcam.markdown
index 59736f9fe71..5a184dda3ae 100644
--- a/source/_components/sensor.android_ip_webcam.markdown
+++ b/source/_components/sensor.android_ip_webcam.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: android_ip_webcam.png
ha_category: Sensor
-ha_release: 0.40
+ha_release: "0.40"
---
diff --git a/source/_components/sensor.comed_hourly_pricing.markdown b/source/_components/sensor.comed_hourly_pricing.markdown
index 2f5e3074809..31480bc0635 100644
--- a/source/_components/sensor.comed_hourly_pricing.markdown
+++ b/source/_components/sensor.comed_hourly_pricing.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: comed.jpg
ha_category: Energy
-ha_release: 0.40
+ha_release: "0.40"
ha_iot_class: "Cloud Polling"
---
diff --git a/source/_components/sensor.modem_callerid.markdown b/source/_components/sensor.modem_callerid.markdown
index a13f1fa59e9..e1232c8e950 100644
--- a/source/_components/sensor.modem_callerid.markdown
+++ b/source/_components/sensor.modem_callerid.markdown
@@ -7,12 +7,10 @@ sidebar: true
comments: false
sharing: true
footer: true
-logo: home-assistant.png
ha_category: Sensor
-ha_release: 0.40
+ha_release: "0.40"
---
-
The `modem_callerid` sensor platform uses an available modem for collecting caller ID information. It requires a Hayes AT compatible modem that supports caller ID detection (via AT+VCID=1).
To enable the sensor, add the following lines to your `configuration.yaml`:
@@ -43,7 +41,7 @@ When the sensor detects a new call, it's state changes to 'ring' for each ring a
Some example automations:
```yaml
-automation:
+{% raw %}automation:
- alias: Notify CallerID
trigger:
platform: state
@@ -71,6 +69,6 @@ automation:
action:
service: tts.google_say
data_template:
- message: 'Call from {{ states.sensor.modem_callerid.attributes.cid_name }} '
+ message: 'Call from {{ states.sensor.modem_callerid.attributes.cid_name }} '{% endraw %}
```
diff --git a/source/_components/sensor.ring.markdown b/source/_components/sensor.ring.markdown
index 72fb85e57e8..9ee8ca5b124 100644
--- a/source/_components/sensor.ring.markdown
+++ b/source/_components/sensor.ring.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: ring.png
ha_category: Sensor
-ha_release: 0.40
+ha_release: "0.40"
---
The `ring` sensor allows you to integrate your [Ring.com](https://ring.com/) devices in Home Assistant.
diff --git a/source/_components/switch.android_ip_webcam.markdown b/source/_components/switch.android_ip_webcam.markdown
index ca8de604d60..251b8db5577 100644
--- a/source/_components/switch.android_ip_webcam.markdown
+++ b/source/_components/switch.android_ip_webcam.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: android_ip_webcam.png
ha_category: Switch
-ha_release: 0.40
+ha_release: "0.40"
---
diff --git a/source/_posts/2017-03-11-repurpose-any-android-phone-as-ip-camera.markdown b/source/_posts/2017-03-11-repurpose-any-android-phone-as-ip-camera.markdown
new file mode 100644
index 00000000000..18d73f64432
--- /dev/null
+++ b/source/_posts/2017-03-11-repurpose-any-android-phone-as-ip-camera.markdown
@@ -0,0 +1,295 @@
+---
+layout: post
+title: "Home Assistant 0.40: Turn any Android phone into an IP Webcam"
+description: "Tons of bug fixes for MQTT, Z-Wave and "
+date: 2017-03-11 08:04:05 +0000
+date_formatted: "March 11, 2017"
+author: Paulus Schoutsen
+author_twitter: balloob
+comments: true
+categories: Release-Notes
+og_image: /images/blog/2017-03-0.40/social.png
+---
+
+
+
+It's time for version 0.40 already! For this version, the main focus was on performance and bug fixes. Big thanks to [@pvizeli] for driving this effort. Startup is now super fast. We have also continued with adding warnings for components and platforms that are slowing down Home Assistant.
+
+Some people have interpreted our recent added warnings as if 0.39 introduced the issues that caused the warning. This is not the case, the platforms and components have been misbehaving for a while but now we are adding warnings so we are able to track down the culprits.
+
+Before we continue talking about all the improvements in this release I want to take a moment to thank a few people from the Home Assistant community that are fundamental to the success of Home Assistant. Big thanks to [@dale3h], [@CCOSTAN], [@skalavala] [@rrubin0] [@brahmafear] [@bassclarinetl2] and [@torn8o]! These are all people that hang out in our [main chat channel] and help new users get started and help existing users when running into trouble. Home Assistant would not be there without all the effort you put in! 🙇
+
+Oh, and did I already mention that we're passing the 600 integrations with this release! It's crazy.
+
+## Z-Wave is now threadsafe
+
+[@andrey-git] has spend a lot of time to make Z-Wave perform better. It should no longer cause Home Assistant to run slower or raise warnings about the timer getting out of sync.
+
+## Update on the MQTT Out of Memory errors in 0.39
+
+MQTT started causing "Out of Memory" errors for some people on a Raspberry Pi. We have been able to track this down to Raspberry Pis that are using an older firmware. If you are experiencing this issue, please [upgrade your firmware using `rpi-update`](https://github.com/Hexxeh/rpi-update#installing).
+
+## Turn any Android phone into an IP Camera
+
+With the new support for [IP Webcam](/components/android_ip_webcam/) added by [@robbiet480] and [@pvizeli] you are now able to re-purpose any Android phone to become a multifunctional IP webcam. Some of the cool things that you can do:
+
+ - Integrate the Android device camera
+ - Binary sensor when motion is detected
+ - Sensors to expose the device sensors, including pressure, sound, battery, light
+ - Control device features like the GPS, night vision and camera flash
+
+
+
+Screenshot of all the different functionality the IP webcam integration offers.
+
+
+## Other Highlights
+
+ - Support added for Austrian weather using Zamg weather data ([@Zac-HD])
+ - Ring.com video doorbell integration added ([@tchellomello])
+ - Blink Home Security Camera support added ([@fronzbot])
+ - AppleTV has been converted to push data to Home Assistant instead of us having to poll ([@postlund])
+
+## Breaking changes
+
+- Vera entity ids have changed. This is a one time change to migrate to a model that will prevent future conflicts.
+- The Twilio notify platforms now have to be configured via the twilio component.
+
+```yaml
+twilio:
+ account_sid: "abc"
+ auth_token: "xyz"
+```
+
+- If you are using async custom components, the passed in `async_add_devices` method is now a callback instead of a coroutine function.
+
+### If you need help...
+...don't hesitate to use our very active [forums][forum] or join us for a little [chat][gitter]. The release notes have comments enabled but it's preferred if you use the former communication channels. Thanks.
+
+### Reporting Issues
+Experiencing issues introduced by this release? Please report them in our [issue tracker][issue]. Make sure to fill in all fields of the issue template.
+
+
+
+## All changes
+
+- Cleanup run_callback_threadsafe ([@pvizeli])
+- Use H2 headers to split up the different sections ([@colinodell])
+- Refactory of envisalink ([@pvizeli])
+- Create zwave devices on OZW thread and only add them during discovery ([@andrey-git])
+- Bugfix restore startup state ([@kellerza])
+- Random test fixes ([@balloob])
+- Remove automatically reloading group config ([@balloob])
+- Default config to setup group editor ([@balloob])
+- minor broadlink fix ([@danielhiversen])
+- Update Yeelight Sunflower light platform to 0.0.6 ([@lindsaymarkwawrd])
+- Some zwave cleanup ([@andrey-git])
+- sensor.speedtest: provide a default icon ([@molobrakos])
+- Test the temperature returned by RM2 ([@aronsky])
+- Zamg weather ([@Zac-HD])
+- Fix reporting on bad login ([@balloob])
+- Move mqtt from eventbus to dispatcher / add unsub for dispatcher ([@pvizeli])
+- Update flake8 and pylint to latest ([@andrey-git])
+- Fix link ([@fabaff])
+- Make glob preserve order ([@andrey-git])
+- Update regex ([@fabaff])
+- Fix recorder async ([@balloob])
+- Fix livebox-play interactions for Python < 3.6 ([@pschmitt])
+- Ensure we properly close HASS instances. ([@balloob])
+- Add service to change log levels ([@postlund])
+- Move ffmpeg to dispatcher from hass.data entity store. ([@pvizeli])
+- Feature/reorg recorder ([@balloob])
+- Bugfix mqtt socket error ([@pvizeli])
+- Notify ciscospark ([@shenning00])
+- Config fix ([@balloob])
+- Bugfix mqtt paho client to speend time ([@pvizeli])
+- Properly report features for each hue bulb type ([@jawilson])
+- Local file camera now supports yet inexisting files. ([@jjmontestl])
+- light.transition now supports float instead of int in order to be able to perform faster transitions ([@BillyNate])
+- Fix for OSRAM lights connected to hue bridge ([@groth-its])
+- Add support for MAX!Cube thermostats and window shutter sensors ([@BastianPoe])
+- Analog modem callerid support ([@vroomfonde1])
+- [sensor.dnsip] New Sensor: DNS IP ([@danielperna84])
+- Update library version for Yeelight Sunflower lights platform (fix for packaging problem with 0.0.7) ([@lindsaymarkwawrd])
+- Prevent duplicate names on Vera devices by appending the device id ([@arjenfvellinga])
+- Add temperature support for MH-Z19 CO2 sensor. ([@andrey-git])
+- improve history_stats accuracy ([@bokub])
+- Updated pyitachip2ir ([@alanfischer])
+- Influx fix ([@open-homeautomation])
+- Fix toggle and media_play_pause post async ([@armills])
+- Migrate calendar setup to async. ([@pvizeli])
+- Frontier silicon ([@zhelev])
+- Bootstrap / Component setup async ([@pvizeli])
+- Convert kpH and mpH to kph and mph ([@ericgingras])
+- Rollback netdisco to 0.8.2 to resolve #6165 ([@jumpkick])
+- Log errors when loading yaml ([@kellerza])
+- Bootstrap tweaks tests ([@balloob])
+- Telegram webhooks new text event ([@scipioni])
+- Cleanup component track_point_in_utc_time usage ([@pvizeli])
+- Discovery fix ([@balloob])
+- Test against 3.6-dev ([@balloob])
+- Bugfix ZigBee / Move from eventbus to dispatcher ([@pvizeli])
+- Bump netdisco to 0.9.1 ([@balloob])
+- sensor.dovado: compute state in update ([@molobrakos])
+- Fix mysensors callback race ([@MartinHjelmare])
+- Upgrade TwitterAPI to 2.4.5 ([@fabaff])
+- Upgrade py-cpuinfo to 0.2.6 ([@fabaff])
+- Template sensor change flow / add restore ([@pvizeli])
+- Zwave optimize value_added ([@andrey-git])
+- Update Vagrant provision.sh ([@shaftoe])
+- Update Adafruit_Python_DHT to support new raspberry kernel ([@masarliev])
+- Add fallback for name if userdevicename isn't set using old serialnumber logic ([@reedriley])
+- Improve Honeywell US climate component ([@titilambert])
+- Template binary_sensor change flow / add restore ([@pvizeli])
+- Additional support for ecobee hold mode ([@Duoxilian])
+- Update Formulas in Convert XY to RGB ([@dramamoose])
+- Use dynamic ports for test instances ([@armills])
+- Added support for multiple codes executed in a row ([@martinfrancois])
+- Use push updates in Apple TV ([@postlund])
+- Fix command sudo not found error in dev Dockerfile ([@jawilson])
+- Fix calendar authentication text, and handle calendar events without summaries. ([@alanfischer])
+- Move dispatcher out of init. ([@pvizeli])
+- Zwave: Add remove/replace failed node services. ([@andrey-git])
+- Template switch change flow / add restore ([@pvizeli])
+- Bump limitlessled dependency to 1.0.5. ([@janLo])
+- snmp: upgrade pysnmp to 4.3.4 ([@milaq])
+- Bugfix new async_add_devices function ([@pvizeli])
+- Restore for input_slider ([@pvizeli])
+- Added IPv4 data collector ([@open-homeautomation])
+- Return None instead of raising ValueException from as_timestamp template function. ([@jjmontestl])
+- [recorder] Catch more startup errors #6179 ([@kellerza])
+- twilio component ([@happyleavesaoc])
+- Add Z-Wave battery level as a sensor. ([@andrey-git])
+- OwnTrack Async ([@pvizeli])
+- Fix possibility that have multible topic subscribe mqtt ([@pvizeli])
+- Migrate mqtt tracker and arwn sensor to async / cleanup owntrack ([@pvizeli])
+- Z-Wave prevent I/O event loop ([@balloob])
+- Update pwaqi to 3.0 to use public API ([@valentinalexeev])
+- Update Hikvision Binary Sensors to latest library, remove pyDispatcher ([@mezz64])
+- Don't initialize components which have already been discovered ([@colinodell])
+- Comed Hourly Pricing sensor ([@joe248])
+- Add multi contracts support for Hydroquebec ([@titilambert])
+- Add Zwave refresh services ([@andrey-git])
+- Add keep-alive feature to the generic thermostat ([@aronsky])
+- Fix wake_on_lan for german version of Windows 10 (#6397) ([@siebert])
+- flux led lib ([@danielhiversen])
+- Cleanup async handling ([@pvizeli])
+- Restore for automation entities ([@kellerza])
+- Fix tests no internet ([@balloob])
+- Prevent more I/O in apns ([@balloob])
+- Restore flow on device_tracker platform ([@pvizeli])
+- switch.tplink: catch exceptions coming from pyHS100 to avoid flooding the logs when the plug is not available ([@rytilahti])
+- Added sensors to support Ring.com devices ([@tchellomello])
+- Split bootstrap into bs + setup ([@balloob])
+- Tweak recorder/restore_state ([@balloob])
+- Fix unnecessary warning for ip bans.yaml ([@balloob])
+- Better restore_state warnings ([@balloob])
+- Set new color before turning LIFX bulbs on ([@amelchio])
+- Don't log username and password in camera url ([@ishults])
+- Ignore deleted mails in IMAP unread count (#6394) ([@amelchio])
+- Delay zwave updates for 100ms to group them. ([@andrey-git])
+- Rename _scheduled_update to _update_scheduled ([@andrey-git])
+- Revert "Use dynamic port allocation for tests" ([@armills])
+- Tado device_tracker exception when mobile device has geofencing enabled but location is currently unknown. ([@jmvermeulen])
+- Add a Z-wave workaround to do full refresh on update ([@andrey-git])
+- Use bundled certificates if port matches mqtts ([@dennisdegreef])
+- Bugfix samsungtv discovery ([@pvizeli])
+- Added unittest for Ring sensor ([@tchellomello])
+- Shorten recorder connection init ([@balloob])
+- KWB Easyfire support ([@bimbar])
+- Bumped version number for supporting lib ([@bazwilliams])
+- Send a logo with webostv notifications ([@andersonshatch])
+- Upgrade netdisco to 0.9.2 ([@balloob])
+- Allow testing against uvloop ([@balloob])
+- fix issue ([@appzer])
+- Remove connection status state. ([@aequitas])
+- Support for Blink Camera System ([@fronzbot])
+- Add warning for slow platforms/components ([@balloob])
+- Fix wake_on_lan ping for Linux. ([@siebert])
+- Add support for remove services / Reload script support ([@pvizeli])
+- Expand MQTT lights ([@robbiet480])
+- Allow configurable conditions for Pi-Hole sensor ([@colinodell])
+- Improved iCloud 2FA support. ([@reedriley])
+- Update pymyq requirement ([@arraylabs])
+- Not always asume manufacturername is present ([@balloob])
+- Add first pass at Z-Wave light tests ([@balloob])
+- Bugfix mqtt socket memory error ([@pvizeli])
+- Increase upper limit on light transitions ([@amelchio])
+- Bugfix android camera autodiscovery settings ([@pvizeli])
+- Update to Pyunifi2.0 ([@finish06])
+- Insteon lib ([@wardcraigj])
+- Bugfix rpi_rf cleanup ([@pvizeli])
+- Android webcam better error handling / pump library 0.4 ([@pvizeli])
+
+[@BastianPoe]: https://github.com/BastianPoe
+[@BillyNate]: https://github.com/BillyNate
+[@Duoxilian]: https://github.com/Duoxilian
+[@MartinHjelmare]: https://github.com/MartinHjelmare
+[@Zac-HD]: https://github.com/Zac-HD
+[@aequitas]: https://github.com/aequitas
+[@alanfischer]: https://github.com/alanfischer
+[@amelchio]: https://github.com/amelchio
+[@andersonshatch]: https://github.com/andersonshatch
+[@andrey-git]: https://github.com/andrey-git
+[@appzer]: https://github.com/appzer
+[@arjenfvellinga]: https://github.com/arjenfvellinga
+[@armills]: https://github.com/armills
+[@aronsky]: https://github.com/aronsky
+[@arraylabs]: https://github.com/arraylabs
+[@balloob]: https://github.com/balloob
+[@bazwilliams]: https://github.com/bazwilliams
+[@bimbar]: https://github.com/bimbar
+[@bokub]: https://github.com/bokub
+[@colinodell]: https://github.com/colinodell
+[@danielhiversen]: https://github.com/danielhiversen
+[@danielperna84]: https://github.com/danielperna84
+[@dennisdegreef]: https://github.com/dennisdegreef
+[@dramamoose]: https://github.com/dramamoose
+[@ericgingras]: https://github.com/ericgingras
+[@fabaff]: https://github.com/fabaff
+[@finish06]: https://github.com/finish06
+[@fronzbot]: https://github.com/fronzbot
+[@groth-its]: https://github.com/groth-its
+[@happyleavesaoc]: https://github.com/happyleavesaoc
+[@ishults]: https://github.com/ishults
+[@janLo]: https://github.com/janLo
+[@jawilson]: https://github.com/jawilson
+[@jjmontestl]: https://github.com/jjmontestl
+[@jmvermeulen]: https://github.com/jmvermeulen
+[@joe248]: https://github.com/joe248
+[@jumpkick]: https://github.com/jumpkick
+[@kellerza]: https://github.com/kellerza
+[@lindsaymarkwawrd]: https://github.com/lindsaymarkwawrd
+[@martinfrancois]: https://github.com/martinfrancois
+[@masarliev]: https://github.com/masarliev
+[@mezz64]: https://github.com/mezz64
+[@milaq]: https://github.com/milaq
+[@molobrakos]: https://github.com/molobrakos
+[@open-homeautomation]: https://github.com/open-homeautomation
+[@postlund]: https://github.com/postlund
+[@pschmitt]: https://github.com/pschmitt
+[@pvizeli]: https://github.com/pvizeli
+[@reedriley]: https://github.com/reedriley
+[@robbiet480]: https://github.com/robbiet480
+[@rytilahti]: https://github.com/rytilahti
+[@scipioni]: https://github.com/scipioni
+[@shaftoe]: https://github.com/shaftoe
+[@shenning00]: https://github.com/shenning00
+[@siebert]: https://github.com/siebert
+[@tchellomello]: https://github.com/tchellomello
+[@titilambert]: https://github.com/titilambert
+[@valentinalexeev]: https://github.com/valentinalexeev
+[@vroomfonde1]: https://github.com/vroomfonde1
+[@wardcraigj]: https://github.com/wardcraigj
+[@zhelev]: https://github.com/zhelev
+[main chat channel]: https://gitter.im/home-assistant/home-assistant
+[@dale3h]: https://github.com/dale3h
+[@CCOSTAN]: https://github.com/CCOSTAN
+[@skalavala]: https://github.com/skalavala
+[@rrubin0]: https://github.com/rrubin0
+[@brahmafear]: https://github.com/brahmafear
+[@bassclarinetl2]: https://github.com/bassclarinetl2
+[@torn8o]: https://github.com/torn8o
+[forum]: https://community.home-assistant.io/
+[gitter]: https://gitter.im/home-assistant/home-assistant
+[issue]: https://github.com/home-assistant/home-assistant/issues
diff --git a/source/images/blog/2017-03-0.40/ipwebcam.png b/source/images/blog/2017-03-0.40/ipwebcam.png
new file mode 100644
index 00000000000..4deac669c59
Binary files /dev/null and b/source/images/blog/2017-03-0.40/ipwebcam.png differ
diff --git a/source/images/blog/2017-03-0.40/social.png b/source/images/blog/2017-03-0.40/social.png
new file mode 100644
index 00000000000..b5392fef00b
Binary files /dev/null and b/source/images/blog/2017-03-0.40/social.png differ