Skip to content

Commit c1b28dc

Browse files
lboueCopilotswoboda1337
authored
Add OpenThread text sensors configuration example (#5524)
* Add OpenThread text sensors configuration example Added configuration example for OpenThread text sensors. * Update content/components/openthread.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Create a new openthread_info file * Fix image * Update index * Update content/components/openthread.md * Fix * Fix --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
1 parent f1bd7a1 commit c1b28dc

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

content/components/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,7 @@ at the {{< docref "light/fastled" "FastLED Light" >}}.
987987
"Modbus Text Sensor","components/text_sensor/modbus_controller","modbus.png",""
988988
"MQTT Subscribe Text","components/text_sensor/mqtt_subscribe","mqtt.png",""
989989
"Nextion Text Sensor","components/text_sensor/nextion","nextion.jpg",""
990+
"OpenThread Info","components/text_sensor/openthread_info","openthread.png",""
990991
"Tuya Text Sensor","components/text_sensor/tuya","tuya.png",""
991992
"Version","components/text_sensor/version","new-box.svg","dark-invert"
992993
"WiFi Info","components/text_sensor/wifi_info","network-wifi.svg","dark-invert"

content/components/openthread.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,10 @@ See <https://openthread.io/guides/thread-primer/node-roles-and-types>
9494

9595
The Poll Period makes the device behave as a SED. Follow on work is needed utilizing Power Management and/or Light Sleep capability in esp-idf.
9696
If the device is always awake, the API timeout is 60 seconds, so a ping request will force interaction with the parent when the poll period is greater than 60 seconds.
97+
98+
## See Also
99+
100+
- {{< docref "/components/text_sensor/openthread_info" >}}
101+
- {{< docref "/components/network" >}}
102+
- {{< apiref "openthread/openthread.h" "openthread/openthread.h" >}}
103+
- <https://openthread.io/>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
description: "Instructions for setting up OpenThread info text sensors."
3+
title: "OpenThread Info Text Sensor"
4+
params:
5+
seo:
6+
description: Instructions for setting up OpenThread info text sensors.
7+
image: openthread.png
8+
---
9+
10+
The `openthread_info` text sensor platform exposes different OpenThread network information
11+
via text sensors.
12+
13+
```yaml
14+
# Example configuration entry
15+
text_sensor:
16+
- platform: openthread_info
17+
ip_address:
18+
name: "Thread IP Address"
19+
channel:
20+
name: "Thread Channel"
21+
role:
22+
name: "Thread Device Role"
23+
rloc16:
24+
name: "Thread RLOC16"
25+
ext_addr:
26+
name: "Thread Extended Address"
27+
eui64:
28+
name: "Thread EUI64"
29+
network_name:
30+
name: "Thread Network Name"
31+
network_key:
32+
name: "Thread Network Key"
33+
pan_id:
34+
name: "Thread PAN ID"
35+
ext_pan_id:
36+
name: "Thread Extended PAN ID"
37+
```
38+
39+
## Configuration variables
40+
41+
- **ip_address** (*Optional*): Expose the off-mesh routable IPv6 address of the Thread device as a text sensor.
42+
This is the address used for communication outside the Thread mesh network.
43+
All options from [Text Sensor](#config-text_sensor).
44+
45+
- **channel** (*Optional*): Expose the Thread network channel (11-26) as a text sensor.
46+
All options from [Text Sensor](#config-text_sensor).
47+
48+
- **role** (*Optional*): Expose the current device role in the Thread network (Leader, Router, Child, Detached,
49+
etc.) as a text sensor. All options from [Text Sensor](#config-text_sensor).
50+
51+
- **rloc16** (*Optional*): Expose the Router Locator (RLOC16) address as a text sensor. This is a 16-bit address
52+
used for routing within the Thread network. All options from [Text Sensor](#config-text_sensor).
53+
54+
- **ext_addr** (*Optional*): Expose the IEEE 802.15.4 Extended MAC address as a text sensor.
55+
All options from [Text Sensor](#config-text_sensor).
56+
57+
- **eui64** (*Optional*): Expose the EUI-64 address as a text sensor. This is the unique 64-bit identifier for
58+
the device. All options from [Text Sensor](#config-text_sensor).
59+
60+
- **network_name** (*Optional*): Expose the Thread network name as a text sensor.
61+
All options from [Text Sensor](#config-text_sensor).
62+
63+
- **network_key** (*Optional*): Expose the Thread network key as a text sensor.
64+
All options from [Text Sensor](#config-text_sensor).
65+
66+
> [!WARNING]
67+
> The `network_key` sensor exposes sensitive security credentials that could allow unauthorized access to your
68+
> Thread network. Only enable this sensor if you need it for debugging purposes and understand the security
69+
> implications.
70+
71+
- **pan_id** (*Optional*): Expose the Personal Area Network ID (PAN ID) as a text sensor. This is a 16-bit
72+
identifier for the Thread network. All options from [Text Sensor](#config-text_sensor).
73+
74+
- **ext_pan_id** (*Optional*): Expose the Extended PAN ID as a text sensor. This is a 64-bit extended identifier
75+
for the Thread network. All options from [Text Sensor](#config-text_sensor).
76+
77+
## See Also
78+
79+
- {{< docref "/components/openthread" >}}
80+
- {{< docref "/components/text_sensor/index" >}}
81+
- {{< apiref "openthread_info/openthread_info_text_sensor.h" "openthread_info/openthread_info_text_sensor.h" >}}

0 commit comments

Comments
 (0)