I have this circuit. It controls three 12V LED strips via NodeMCU. The controller itself is powered via a step-down board 12V->5V. The logic itself works correctly, it is controlled from the assistant. But if you send a reboot signal remotely or simply de-energize, the device simply freezes.
Pressing the physical reset button simply turns on one of the LED strips.
The only thing that will help is to completely disconnect lr7843 from EPS, also disconnect its power supply, then reconnect it, wait for it to load and connect to WiFi, and only then reconnect lr7843. It is very strange to do such manipulations every time.
Optocouplers are installed on the power keys, in theory there can’t be a direct connection there. I think that this is a general minus of the power supply that goes through the Mini360. I don’t see any other reasons for this behavior.
esphome:
name: "light-control"
friendly_name: RelayESP
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "QHvaOCvXhjQkQvQjrSaT10OGmC6HGFC2z0lK5PeyAa4="
ota:
- platform: esphome
password: "a8a79f4452d1268e60cafb33e75423c8"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Light Control"
password: "pass"
captive_portal:
udp:
web_server:
port: 80
version: 2
# PWM освещение
output:
- platform: esp8266_pwm
pin: D1
frequency: 1000 Hz
id: pwm_light1
min_power: 0.0
max_power: 1.0
zero_means_zero: true
- platform: esp8266_pwm
pin: D2
frequency: 1000 Hz
id: pwm_light2
min_power: 0.0
max_power: 1.0
zero_means_zero: true
- platform: esp8266_pwm
pin: D3
frequency: 1000 Hz
id: pwm_light3
min_power: 0.0
max_power: 1.0
zero_means_zero: true
# RGB output
- platform: esp8266_pwm
pin: D7
frequency: 100 Hz
id: pwm_rgb_green
min_power: 0.0
max_power: 1.0
zero_means_zero: true
inverted: true
- platform: esp8266_pwm
pin: D6
frequency: 100 Hz
id: pwm_rgb_red
min_power: 0.0
max_power: 1.0
zero_means_zero: true
inverted: true
- platform: esp8266_pwm
pin: D5
frequency: 100 Hz
id: pwm_rgb_blue
min_power: 0.0
max_power: 1.0
zero_means_zero: true
inverted: true
# PW освещение (контроллеры)
light:
- platform: monochromatic
output: pwm_light1
name: "Свет над столом"
gamma_correct: 1.4
id: tablelight
- platform: monochromatic
output: pwm_light2
name: "Основной свет 1"
gamma_correct: 1.4
id: mainlight1
- platform: monochromatic
output: pwm_light3
name: "Основной свет 2"
gamma_correct: 1.4
id: mainlight2
# RGB strip
- platform: rgb
name: "RGB strip"
red: pwm_rgb_red
green: pwm_rgb_green
blue: pwm_rgb_blue
effects:
- random:
name: "Slow Random Colours"
transition_length: 30s
update_interval: 30s
- random:
name: "Fast Random Colours"
transition_length: 4s
update_interval: 5s
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0%
max_brightness: 100%
- pulse:
name: "Slow Pulse"
update_interval: 2s
- pulse:
name: "Asymmetrical Pulse"
transition_length:
on_length: 1s
off_length: 500ms
update_interval: 1.5s
- flicker:
name: Flicker Effect With Custom Values
alpha: 95%
intensity: 1.5%
binary_sensor:
- platform: gpio
pin:
number: D0
name: table_light_button
id: table_light_button
on_click:
then:
- light.toggle: tablelight
on_press:
then:
- if:
condition:
light.is_off: tablelight
then:
- delay: 0.5s
- while:
condition:
binary_sensor.is_on: table_light_button
then:
- light.dim_relative:
id: tablelight
relative_brightness: 5%
transition_length: 0.1s
- delay: 0.1s
else:
- delay: 0.5s
- while:
condition:
and:
- binary_sensor.is_on: table_light_button
- light.is_on: tablelight
then:
- light.dim_relative:
id: tablelight
relative_brightness: -5%
transition_length: 0.1s
- delay: 0.1s
globals:
- id: totalClick
type: int
restore_value: no
initial_value: "1.4"
number:
- platform: template
name: "sliderLight"
id: "SliderOne"
step: 1
min_value: 0
max_value: 100
mode: slider
optimistic: true
on_value:
then:
- light.turn_on:
id: tablelight
brightness: !lambda "return x/100;"