From a8897a4b1f8dac6995539747e44cdc7f96858cc6 Mon Sep 17 00:00:00 2001 From: Heiko Rothe Date: Sun, 21 Aug 2016 21:03:50 +0200 Subject: [PATCH] Added room tracker docs (#810) * Added page for the new room tracker component * Added info about using it together with Owntracks * Updated room presence documentation to new sensor implementation * Changed name to mqtt_room * Changed category to Presence Detection --- source/_components/sensor.mqtt_room.markdown | 54 ++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 source/_components/sensor.mqtt_room.markdown diff --git a/source/_components/sensor.mqtt_room.markdown b/source/_components/sensor.mqtt_room.markdown new file mode 100644 index 00000000000..ce024b50ec1 --- /dev/null +++ b/source/_components/sensor.mqtt_room.markdown @@ -0,0 +1,54 @@ +--- +layout: page +title: "MQTT Room Presence" +description: "Instructions on how to track room presence within Home Assistant." +date: 2016-08-21 03:58 +sidebar: true +comments: false +sharing: true +footer: true +logo: mqtt.png +ha_category: Presence Detection +ha_release: 0.27 +ha_iot_class: depends +--- + + +The `mqtt_room` sensor platform allows you to detect the indoor location of devices using MQTT clients. + +To use this device tracker in your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + platform: mqtt_room + device_id: 123testid + name: 'Cool device' + state_topic: 'room_presence' + timeout: 5 +``` + +Configuration variables: + +- **device_id** (*Required*): The device id to track for this sensor. +- **name** (*Optional*): The name of the sensor. +- **state_topic** (*Optional*): The topic that contains all subtopics for the rooms. +- **timeout** (*Optional*): The time in seconds after which a room presence state is considered old. An example: device1 is reported at scanner1 with a distance of 1. No further updates are sent from scanner1. After 5 secoonds scanner2 reports device with a distance of 2. The old location info is discarded in favor of the new scanner2 information as the timeout has passed. + +Example JSON that should be published to the room topics: + +```json +{ + "id": "123testid", + "name": "Test Device", + "distance": 5.678 +} +``` + +### {% linkable_title Setting up clients %} + +This component works with any software that is sending data in the given format. +Each client should post the discovered devices in its own subtopic of the configured topic. +Instead of developing your own application, you can also use any of these already existing clients: + +- [**room-assistant**](https://github.com/mKeRix/room-assistant): looks for Bluetooth LE beacons, based on Node.js