-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmcu-can-node-1.yaml
91 lines (81 loc) · 1.49 KB
/
mcu-can-node-1.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
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
substitutions:
device: can-node-1
name: CAN Node 1
comment: "DEV"
esphome:
name: mcu-${device}
comment: ${comment}
esp32:
board: esp32dev
framework:
# type: arduino
type: esp-idf
# version: 5.1.2
# platform_version: 6.5.0
external_components:
- source: github://mrk-its/esphome-canopen@dev
refresh: 1h
packages:
common: !include common/common.yaml
canbus:
- platform: esp32_can
id: can_bus
rx_pin: 22
tx_pin: 23
can_id: 0
bit_rate: 125kbps
canopen:
id: can_gate
canbus_id: can_bus
node_id: 1
entities:
- id: boot
index: 1
tpdo: 0
- id: blue_led
index: 2
tpdo: 0
- id: uptime_sensor
index: 3
tpdo: 0
- id: cover1
index: 4
tpdo: 1
# - id: cover2
# index: 5
# tpdo: 1
sensor:
- platform: uptime
id: uptime_sensor
name: "${name} Uptime"
update_interval: 5sec
internal: true
binary_sensor:
- platform: gpio
name: "${name} Boot"
id: boot
internal: true
pin:
number: 0
inverted: true
switch:
- platform: gpio
name: "${name} Led"
id: blue_led
internal: true
pin: 2
cover:
- platform: time_based
name: "${name} Cover"
id: cover1
internal: true
device_class: shutter
has_built_in_endstop: true
open_action:
- logger.log: open_action
open_duration: 10s
close_action:
- logger.log: close_action
close_duration: 10s
stop_action:
- logger.log: stop_action