-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
ping.yaml
61 lines (47 loc) · 1.31 KB
/
ping.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
substitutions:
my_name: ping-sensor
esphome:
name: ${my_name}
platform: ESP8266
board: nodemcuv2
libraries:
- ESP8266WiFi
- https://github.com/akaJes/AsyncPing#95ac7e4
logger:
web_server:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: Ping
password: !secret wifi_ap_password
captive_portal:
external_components:
- source:
type: local
path: ../components
sensor:
- platform: ping
# IP address of the target
ip_address: 8.8.8.8
# number of packets to send
num_attempts: 17
# the timeout. however, this is not what you usually expect from `ping`
# implementation: the timeout is also the interval to send packets. if you
# set this value to 10 sec, and the network is fine (no packet loss), then
# the component sends a packet at 10 sec interval, and the total time to
# finish would be 10 sec * num_attempts = 10 * 17 = 170 sec.
timeout: 1sec
loss:
# the name to be shown.
name: Packet loss
latency:
# the name to be shown.
name: Latency
# this should be 3 as the value is float, unit is sec, and the raw
# values are in ms.
accuracy_decimals: 3
# the interval for checking the sensors. defaults to 60s.
update_interval: 30s