diff --git a/atom.xml b/atom.xml index f20e7494b1..40f559cc6b 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index 8b765e7d6d..2eb5fc82ec 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index 3d9558c4a8..fa22b4e83e 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 78bcaa68e0..e4b5f2b9d0 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 920d57fb4c..eeccf5bf3c 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 55fdbab55d..de972fb6a2 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 3ee80806da..a3e83d0481 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index f49711aa95..bc60738444 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 946b5ad15c..fb0bb728b9 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/media/atom.xml b/blog/categories/media/atom.xml index ec1f7717d8..60b53d5df9 100644 --- a/blog/categories/media/atom.xml +++ b/blog/categories/media/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Media | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index e7bd9db566..c701745f20 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index d634e6b411..aaf91f51cf 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 5b45e5d44e..f0adf3204a 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/organization/atom.xml b/blog/categories/organization/atom.xml index 3683cf1d23..603acfc51e 100644 --- a/blog/categories/organization/atom.xml +++ b/blog/categories/organization/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organization | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index f31e5b3f8d..4ebca2ef53 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 8c3685a24c..d6ede10ab6 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 47d80e3156..14f18dda54 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 5b0fcda6d4..78d259f6df 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index f2e8bcb34b..031976a306 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index cb1dcf4ea2..ca2e08860f 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index bc77911371..eb4c72bf54 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index b9615d53a5..8718b2c660 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index eeac005ad9..d000f92478 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 2c5634e1fe..f93d7ca330 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2018-01-27T17:19:32+00:00 + 2018-01-27T19:30:30+00:00 https://home-assistant.io/ diff --git a/components/binary_sensor.mqtt/index.html b/components/binary_sensor.mqtt/index.html index 83ccccc863..b741deb681 100644 --- a/components/binary_sensor.mqtt/index.html +++ b/components/binary_sensor.mqtt/index.html @@ -76,7 +76,7 @@

The mqtt binary sensor platform uses an MQTT message payload to set the binary sensor to one of two states: on or off.

The binary sensor state will be updated only after a new message is published on state_topic matching payload_on or payload_off. If these messages are published with the retain flag set, the binary sensor will receive an instant state update after subscription and Home Assistant will display the correct state on startup. Otherwise, the initial state displayed in Home Assistant will be unknown.

-

The mqtt binary sensor platform optionally supports an availability_topic to receive online and offline messages (birth and LWT messages) from the MQTT device. During normal operation, if the MQTT cover device goes offline (i.e. publishes payload_not_available to availability_topic), Home Assistant will display the binary sensor as unavailable. If these messages are published with the retain flag set, the binary sensor will receive an instant update after subscription and Home Assistant will display the correct availability state of the binary sensor when Home Assistant starts up. If the retain flag is not set, Home Assistant will display the binary sensor as unavailable when Home Assistant starts up. If no availability_topic is defined, Home Assistant will consider the MQTT device to be available.

+

The mqtt binary sensor platform optionally supports an availability_topic to receive online and offline messages (birth and LWT messages) from the MQTT device. During normal operation, if the MQTT cover device goes offline (i.e., publishes payload_not_available to availability_topic), Home Assistant will display the binary sensor as unavailable. If these messages are published with the retain flag set, the binary sensor will receive an instant update after subscription and Home Assistant will display the correct availability state of the binary sensor when Home Assistant starts up. If the retain flag is not set, Home Assistant will display the binary sensor as unavailable when Home Assistant starts up. If no availability_topic is defined, Home Assistant will consider the MQTT device to be available.

To use an MQTT binary sensor in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
 binary_sensor:
@@ -135,6 +135,9 @@
     
   
 
+

Examples

+

In this section, you will find some real-life examples of how to use this sensor.

+

Full configuration

To test, you can use the command line tool mosquitto_pub shipped with mosquitto or the mosquitto-clients package to send MQTT messages. To set the state of the binary sensor manually:

$  mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m "OFF"
 
@@ -155,6 +158,24 @@ value_template: '{{ value.x }}'
+

Get the state of a device with ESPEasy

+

Assuming that you have flashed your ESP8266 unit with ESPEasy. Under “Config” is a name (“Unit Name:”) set for your device (here it’s “bathroom”). A configuration for a “Controller” for MQTT with the protocol “OpenHAB MQTT” is present and the entries (“Controller Subscribe:” and “Controller Publish:”) are adjusted to match your needs. In this example, the topics are prefixed with “home”. Also, add a “Switch Input” in the “Devices” tap with the name “switch” and “button” as value.

+

As soon as the unit is online, you will get the state of the attached button.

+
home/bathroom/status Connected
+...
+home/bathroom/switch/button 1
+
+
+

The configuration will look like the example below:

+
# Example configuration.yml entry
+binary_sensor:
+  - platform: mqtt
+    name: Bathroom
+    state_topic: "home/bathroom/switch/button"
+    payload_on: "1"
+    payload_off: "0"
+
+