From 8c539e8b1392db4331a07a28b19a69cf9ef30aaa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 3 Sep 2018 12:49:31 +0200 Subject: [PATCH] Minor updates --- source/_components/sensor.gpsd.markdown | 27 +++++++++-- source/_components/sensor.luftdaten.markdown | 4 ++ .../sensor.modem_callerid.markdown | 47 ++++++++++++++++--- 3 files changed, 66 insertions(+), 12 deletions(-) diff --git a/source/_components/sensor.gpsd.markdown b/source/_components/sensor.gpsd.markdown index 82448cd970b..d66cc20110f 100644 --- a/source/_components/sensor.gpsd.markdown +++ b/source/_components/sensor.gpsd.markdown @@ -8,13 +8,15 @@ comments: false sharing: true footer: true logo: gpsd.png -ha_category: Sensor +ha_category: Utility ha_release: 0.26 ha_iot_class: "Local Polling" --- The `gpsd` component is using the GPS information collected by [gpsd](http://catb.org/gpsd/) and a GPS receiver. +## {% linkable_title Setup %} + A requirement is that `gpsd` is installed (`$ sudo apt-get install gpsd` or `$ sudo dnf -y install gpsd`). `gpsd` uses the socket activation feature of systemd on recent Linux distributions for USB receivers. This means that if you plug your GPS receiver in, `gpsd` is started. Other GPS device may work too, but this was not tested. ```bash @@ -40,6 +42,8 @@ Escape character is '^]'. {"class":"VERSION","release":"3.15","rev":"3.15-2.fc23","proto_major":3,"proto_minor":11} ``` +## {% linkable_title Configuration %} + To setup a GPSD sensor in your installation, add the following to your `configuration.yaml` file: ```yaml @@ -48,8 +52,21 @@ sensor: - platform: gpsd ``` -Configuration variables: +{% configuration %} +host: + description: The host where GPSD is running. + required: false + type: string + default: localhost +port: + description: The port which GPSD is using. + required: false + type: int + default: 2947 +name: + description: Friendly name to use for the frontend. + required: false + type: string + default: GPS +{% endconfiguration %} -- **host** (*Optional*): The host where GPSD is running. Defaults to `localhost`. -- **port** (*Optional*): The port which GPSD is using. Defaults to `2947`. -- **name** (*Optional*): Friendly name to use for the frontend. Default to GPS. diff --git a/source/_components/sensor.luftdaten.markdown b/source/_components/sensor.luftdaten.markdown index 8e4a41cdefc..b368a6d8e9b 100644 --- a/source/_components/sensor.luftdaten.markdown +++ b/source/_components/sensor.luftdaten.markdown @@ -15,9 +15,13 @@ ha_iot_class: "Cloud Polling" The `luftdaten` sensor platform will query the open data API of [luftdaten.info](http://luftdaten.info) to monitor air quality and other weather data from a specific (self build) sensor station. +## {% linkable_title Setup %} + - To get the ID of a particle sensor you need to select it on the [Feinstaub map](http://deutschland.maps.luftdaten.info/) and find it in the sidebar (Column "Sensor ID"). - To get the ID of a temperature/humidity sensor you need to find it on the map hosted on [Madavi](https://www.madavi.de/sensor/feinstaub-map-dht/). +## {% linkable_title Configuration %} + To enable this sensor, add the following lines to your `configuration.yaml` file: ```yaml diff --git a/source/_components/sensor.modem_callerid.markdown b/source/_components/sensor.modem_callerid.markdown index 6fa1ed1919d..4747aea5cf9 100644 --- a/source/_components/sensor.modem_callerid.markdown +++ b/source/_components/sensor.modem_callerid.markdown @@ -14,6 +14,26 @@ ha_iot_class: "Local Polling" 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). +When the sensor detects a new call, its state changes to 'ring' for each ring and 'callerid' when caller id information is received. It returns to 'idle' once ringing stops. The state event includes an attribute payload that includes the time of the call, name and number. + +## {% linkable_title Setup %} + +To find the path of your USB modem, run: + +```bash +$ ls /dev/ttyACM* +``` + +If Home Assistant (`hass`) runs with another user (e.g., `homeassistant` on Hassbian) give access to the stick with: + +```bash +$ sudo usermod -a -G dialout homeassistant +``` + +Depending on what's plugged into your USB ports, the name found above may change. You can lock in a name, such as `/dev/modem`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/). + +## {% linkable_title Configuration %} + To enable the sensor, add the following lines to your `configuration.yaml`: ```yaml @@ -22,10 +42,19 @@ sensor: - platform: modem_callerid ``` -Configuration variables: +{% configuration %} +name: + description: Name of the sensor to use in the frontend. + required: false + type: string + default: "`modem_callerid`" +device: + description: The port to use. + required: false + type: string + default: "`/dev/ttyACM0`" +{% endconfiguration %} -- **name** (*Optional*): Name of the sensor to use in the frontend. Defaults to `modem_callerid`. -- **device** (*Optional*): Device port name. Defaults to `/dev/ttyACM0`. To find the path of your USB modem, run: @@ -37,11 +66,15 @@ If Home Assistant (`hass`) runs with another user (e.g., `homeassistant` on Hass Depending on what's plugged into your USB ports, the name found above may change. You can lock in a name, such as `/dev/modem`, by following [these instructions](http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/). -When the sensor detects a new call, its state changes to 'ring' for each ring and 'callerid' when caller id information is received. It returns to 'idle' once ringing stops. The state event includes an attribute payload that includes the time of the call, name and number. + + +## {% linkable_title Examples %} Some example automations: + +{% raw %} ```yaml -{% raw %}automation: +automation: - alias: Notify CallerID trigger: platform: state @@ -69,6 +102,6 @@ Some example automations: action: service: tts.google_say data_template: - message: 'Call from {{ states.sensor.modem_callerid.attributes.cid_name }} '{% endraw %} + message: 'Call from {{ states.sensor.modem_callerid.attributes.cid_name }}' ``` - +{% endraw %}