Hello everyone,
I’m encountering some challenges trying to control my custom-built ESP RGB light through MQTT in Home Assistant.
Setup:
- Light: Custom-built ESP-based RGB light
- MQTT-Broker: Mosquitto
- Zigbee2MQTT (fyi, maybe not relevant here)
Description:
-
Manual Control:
I can manually control the light using the following command:mosquitto_pub -h $IP -u $USER -P $PASSWORD -t "esp/tvbacklight/led/col" -m "white"
-
MQTT-Addon Error:
When I try to configure the MQTT-Addon through the WebUI, I get the following error:"Already configured. Only one configuration allowed."
-
Configuration Issue:
I’ve placed my MQTT configuration inconfig/configuration.yaml
, but it doesn’t seem to be the right file for device configuration (e.g. no effect). I recently transitioned from OpenHAB to Home Assistant, so I’m still getting accustomed to the file structure. Can someone point me to the correct file for device configurations? For now, the specific topic and payload details aren’t crucial as I’m monitoring the MQTT messages usingmosquitto_sub
with the topicesp/#
.My current configuration looks like this:
mqtt: - switch: command_topic: "esp/tvbacklight/led/col"
-
Light Control Script:
I have created a script that controls the light, and it works as expected:alias: TV backlight on description: "" trigger: - platform: state entity_id: - input_boolean.mqtt_test_switch from: "off" to: "on" condition: [] action: - service: mqtt.publish data: qos: 0 retain: false payload: white topic: esp/tvbacklight/led/col mode: single
-
Additional Information:
Additionally, I’d like to mention that zigbee2mqtt works flawlessly for me. It can automatically detect and add new devices without any issues.
Has anyone experienced similar challenges or can provide guidance on how to correct the MQTT configuration in Home Assistant? Any help would be greatly appreciated!
Thank you in advance!
Best regards,
Archer