Good Evening All,
I am new to using home assistant and EspHome. I’ve been doing alot of reading but have not been able to figure out how to achieve that I need to do.
Some background. I have a RGBW led that can be controlled over uart by sending the following commands as text:
“AT” returns: Comms ok and the current PWM values in seperate lines.
“AT-U#RRRR#GGGG#BBBB#WWWW” Sets pwm values of each colour with a input range between 0 and 1023 for Red, Green, Blue and White. It also returns Comms ok and return the received and updated pwm values
“AT-S” starts a routine and returns Comms ok and Sunrise commenced on seperate lines
The light also has buttons on the light that manually changes brightness up and down and change to a couple of preset modes.
The UART overides any modes that was running until a button is pressed again and the led sends the last received string, individual pwm values from the string and current PWM values every 500ms
example commands and feedback can be seen below:
I believe that I need to use a mix of the Light RGBW component and the UART components to achive the control from home assistant.
My ESPhome yaml file as follows:
esphome:
name: led
friendly_name: Led
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "encryption key removed"
ota:
- platform: esphome
password: "password removed"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Optional manual IP
manual_ip:
static_ip: 192.168.1.20
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Led Fallback Hotspot"
password: "password removed"
uart:
tx_pin: GPIO01
rx_pin: GPIO03
baud_rate: 115200
output:
- platform: rgbw
id: output_component1
min_power: 0
max_power: 1023
- platform: rgbw
id: output_component2
min_power: 0
max_power: 1023
- platform: rgbw
id: output_component3
min_power: 0
max_power: 1023
- platform: rgbw
id: output_component4
min_power: 0
max_power: 1023
light:
- platform: rgbw
name: "Led"
red: output_component1
green: output_component2
blue: output_component3
white: output_component4
captive_portal:
This is giving the following error
INFO ESPHome 2024.11.3
INFO Reading configuration /config/esphome/led.yaml...
INFO Unable to import component rgbw.output: No module named 'esphome.components.rgbw.output'
INFO Unable to import component rgbw.output: No module named 'esphome.components.rgbw.output'
INFO Unable to import component rgbw.output: No module named 'esphome.components.rgbw.output'
INFO Unable to import component rgbw.output: No module named 'esphome.components.rgbw.output'
Failed config
output.rgbw: [source /config/esphome/led.yaml:39]
Platform not found: 'output.rgbw'.
platform: rgbw
id: output_component1
min_power: 0
max_power: 1023
output.rgbw: [source /config/esphome/led.yaml:43]
Platform not found: 'output.rgbw'.
platform: rgbw
id: output_component2
min_power: 0
max_power: 1023
output.rgbw: [source /config/esphome/led.yaml:47]
Platform not found: 'output.rgbw'.
platform: rgbw
id: output_component3
min_power: 0
max_power: 1023
output.rgbw: [source /config/esphome/led.yaml:51]
Platform not found: 'output.rgbw'.
platform: rgbw
id: output_component4
min_power: 0
max_power: 1023
I am at a bit of a loss in how to get from the RGBW led component to outputing the string to the led lamp over uart.
I believe the max and min set in the output should limit the values to between 0 and 1023 but it seems to cause issues.
Any help will be much appreaciated to get the Led lamp controlled and integrated into home assistant.
Thanks
AB