-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwt32-eth01-cc2565p-sterniczuk.yaml
More file actions
152 lines (129 loc) · 3.17 KB
/
Copy pathwt32-eth01-cc2565p-sterniczuk.yaml
File metadata and controls
152 lines (129 loc) · 3.17 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# modified YAML file to support Adoption by DIY device "cc2652p LAN" originally developed by sternicz.uk
substitutions:
device_name: cc2652p2lan
friendly_name: LeMo cc2652p LAN
esphome:
name: ${device_name}
name_add_mac_suffix: true
friendly_name: ${friendly_name}
esp32:
board: wt32-eth01
# framework:
# type: arduino
framework:
type: esp-idf
# Ethernet cannot be used together with wifi
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16
# manual_ip:
# static_ip: 192.168.1.111
# gateway: 192.168.1.1
# subnet: 255.255.255.0
#wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
# ap:
# ssid: "CC2652P01 Fallback Hotspot"
# password: "123678"
# Enable logging
logger:
level: VERBOSE
# Enable Home Assistant API
api:
reboot_timeout: 0s
ota:
platform: esphome
## WEB SERVER available only in arduino framework and shold be disabled even with arduino framework if BLE proxy is enabled
#web_server:
# port: 80
dashboard_import:
package_import_url: github://nepozs/esphome-projects/wt32-eth01-cc2565p-sterniczuk.yaml@master
time:
- platform: homeassistant
id: homeassistant_time
# External component Stream Server
external_components:
- source: github://oxan/esphome-stream-server
# - source: components
# - source: github://thegroove/esphome-zeroconf
sensor:
- platform: uptime
name: "${device_name} Uptime"
filters:
- lambda: return x / 3600;
unit_of_measurement: "h"
switch:
- platform: restart
name: "${friendly_name} Restart"
- platform: gpio
pin: 33
id: zRST_gpio
inverted: yes
restore_mode: ALWAYS_OFF
- platform: template
name: "cc2652p RST"
icon: mdi:toggle-switch
id: zRST
turn_on_action:
- switch.turn_on: zRST_gpio
- delay: 15ms
- switch.turn_off: zRST_gpio
- platform: gpio
pin: 32
name: "cc2652p BSL"
icon: mdi:toggle-switch
id: zBSL
inverted: yes
restore_mode: ALWAYS_OFF
internal: true
- platform: template
name: "cc2652p firmware update"
icon: mdi:cellphone-arrow-down
turn_on_action:
- script.execute: fw_update_mode
turn_off_action:
- switch.toggle: zRST
script:
- id: fw_update_mode
then:
- switch.turn_on: zBSL
- delay: 1s
- switch.turn_on: zRST_gpio
- delay: 1s
- switch.turn_off: zRST_gpio
- logger.log: "Delaying ~10 seconds for TI chip to be ready"
- delay: 10s
- switch.turn_off: zBSL
- logger.log: "Update with cc2538-bsl tool now!"
- logger.log: "Usage: cc2538-bsl.py -p socket://ip_or_hostname:6638 -evw firmware.hex"
# UART Settings
uart:
id: uart_bus
rx_pin: GPIO5
tx_pin: GPIO17
baud_rate: 115200
# Serial Bridge Settings,uncomment #port to change default 6638 TCP port
stream_server:
uart_id: uart_bus
# port: 1234
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
#zeroconf:
# - service: LeMo_cc2652p2lan
# protocol: tcp
# port: 6638
# txt:
# version: 1.0
# radio_type: znp
# baud_rate: 115200
# data_flow_control: software