-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmcu-can-node-2.yaml
More file actions
138 lines (117 loc) · 2.25 KB
/
Copy pathmcu-can-node-2.yaml
File metadata and controls
138 lines (117 loc) · 2.25 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
---
substitutions:
device: can-node-2
name: CAN Node 2
area: DEV
comment: CANopen
esphome:
name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment}
esp32:
variant: esp32
toolchain: esp-idf
framework:
type: esp-idf
external_components:
- source: github://mrk-its/esphome-canopen@dev
refresh: 1h
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
refresh: 1h
packages:
common: !include common/common.yaml
canbus:
- platform: esp32_can
id: can_bus
rx_pin: 22
tx_pin: 23
can_id: 2
bit_rate: 500kbps
canopen:
id: can_open
canbus_id: can_bus
node_id: 2
entities:
- index: 1
id: light1
tpdo: 0
- index: 2
id: light2
tpdo: 0
- index: 3
id: light3
tpdo: 0
output:
- platform: template
id: cw_output1
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
- platform: template
id: ww_output1
type: float
write_action:
- logger.log:
format: "output2: %f"
args: ['state']
- platform: template
id: output2
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
- platform: template
id: output3
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
light:
- platform: cwww
id: light1
name: Light 1
cold_white: cw_output1
warm_white: ww_output1
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
constant_brightness: false
default_transition_length: 0s
- platform: monochromatic
id: light2
name: Light 2
output: output2
default_transition_length: 0s
- platform: binary
id: light3
name: Light 3
output: output3
## LIGHTENING
i2c:
sda: 17
scl: 18
scan: true
# frequency: 100kHz
as3935_i2c:
irq_pin: 19
spike_rejection: 4
binary_sensor:
- platform: as3935
name: Storm Alert
sensor:
- platform: as3935
lightning_energy:
name: Energy
distance:
name: Storm Distance
# logger:
# level: VERY_VERBOSE
# logs:
# canbus: DEBUG
# canopen: DEBUG
# can_driver: DEBUG
# timer_driver: DEBUG