-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrgb_hive.yaml
167 lines (141 loc) · 2.82 KB
/
rgb_hive.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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
esphome:
name: rgb-hive
platform: ESP32
board: nodemcu-32s
#platformio_options:
#upload_speed: 115200
on_boot:
priority: -120
then:
- light.turn_on:
id: strip
brightness: 100%
red: 100%
green: 0%
blue: 100%
effect: "WLED"
- fan.turn_on: fan_pwm1
- fan.turn_on: fan_pwm2
- fan.turn_on: fan_pwm3
- fan.turn_on: fan_pwm4
wifi:
ssid: !secret wifi-east
password: !secret wifi-pwd
use_address: rgb-hive.ak-online.be
mdns:
disabled: true
captive_portal:
# Enable logging
logger:
logs:
sensor: info
# Enable Home Assistant API
#api:
mqtt:
broker: mqtt.ak-online.be
discovery: true
topic_prefix: esphome/rgb-hive
ota:
web_server:
port: 80
include_internal: true
wled:
time:
- platform: sntp
id: sntp_time
button:
- platform: restart
name: "Restart"
sensor:
- platform: wifi_signal
name: "WiFi Signal RGB Hive"
update_interval: 60s
- platform: duty_cycle
pin: GPIO04
name: "Hive MB-PWM"
update_interval: 5s
- platform: ntc
sensor: resistance_sensor
calibration:
- 30307.0Ohm -> 5.8°C
- 23157.9Ohm -> 12.0°C
- 10000.0Ohm -> 25.0°C
name: Hive Loop Temperature
filters:
- filter_out: NaN
# remove outliers that measure less than 0°C
- lambda: !lambda |-
if (x < 0) return {};
return x;
- platform: resistance
id: resistance_sensor
sensor: source_sensor
configuration: UPSTREAM
resistor: 10kOhm
- platform: adc
id: source_sensor
pin: GPIO34
attenuation: 11db
switch:
- platform: gpio
pin: GPIO05
id: ntc_vcc
interval:
- interval: 10s
then:
- switch.turn_on: ntc_vcc
- component.update: source_sensor
- switch.turn_off: ntc_vcc
output:
- platform: gpio
pin: GPIO02
id: out_led
- platform: ledc
id: fan1
pin: GPIO18
frequency: 25000 Hz
- platform: ledc
id: fan2
pin: GPIO19
frequency: 25000 Hz
- platform: ledc
id: fan3
pin: GPIO23
frequency: 25000 Hz
- platform: ledc
id: fan4
pin: GPIO26
frequency: 25000 Hz
light:
- platform: binary
id: status
output: out_led
- platform: fastled_clockless
id: strip
name: "Hive Light"
chipset: WS2812B
pin: GPIO17
# this should be increased once fan is in the chain
#num_leds: 30
num_leds: 32
rgb_order: GRB
effects:
- wled:
# - !include effects/ColorShimmerEffect.yaml
fan:
- platform: speed
name: "Hive HDD1/2"
id: "fan_pwm1"
output: fan1
- platform: speed
name: "Hive HDD3-5"
id: "fan_pwm2"
output: fan4
- platform: speed
name: "Hive Radiator Fan"
id: "fan_pwm3"
output: fan2
- platform: speed
name: "Hive PWM4"
id: "fan_pwm4"
output: fan3