Skip to content

Commit 2fae62a

Browse files
authored
Add serial sensor docs (home-assistant#3619)
1 parent 8c69841 commit 2fae62a

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: page
3+
title: "Serial Sensor"
4+
description: "Instructions how to integrate data from serial connected sensors into Home Assistant."
5+
date: 2017-10-13 07:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: home-assistant.png
11+
ha_category: Sensor
12+
ha_release: 0.56
13+
ha_iot_class: "Local Polling"
14+
---
15+
16+
The `serial` sensor platform is using the data provided by a device connected to the serial port of the system where Home Assistant is running. With [`ser2net`](http://ser2net.sourceforge.net/) and [`socat`](http://www.dest-unreach.org/socat/) would it also work for sensors connected to a remote system.
17+
18+
To check what kind of data is arriving at your serial port, use a command-line tool like `minicom` or `picocom` on Linux, on a macOS you can use `screen` or on Windows `putty`.
19+
20+
```bash
21+
$ sudo minicom -D /dev/ttyACM0
22+
```
23+
24+
To setup a serial sensor to your installation, add the following to your `configuration.yaml` file:
25+
26+
```yaml
27+
# Example configuration.yaml entry
28+
sensor:
29+
- platform: serial
30+
port: /dev/ttyACM0
31+
```
32+
33+
{% configuration %}
34+
port:
35+
description: Local serial port where the sensor is connected and access is granted.
36+
required: true
37+
type: string
38+
name:
39+
description: Friendly name to use for the frontend. Default to "Serial sensor".
40+
required: false
41+
type: string
42+
{% endconfiguration %}
43+
44+
45+
## {% linkable_title `value_template` for Template sensor %}
46+
47+
### {% linkable_title TMP36 %}
48+
49+
{% raw %}
50+
```yaml
51+
"{{ (((states('sensor.serial_sensor') | float * 5 / 1024 ) - 0.5) * 100) | round(1) }}"
52+
```
53+
{% endraw %}
54+
55+

0 commit comments

Comments
 (0)