Hi there, I have flashed a Lohas 9W smart bulb with ESPHome using tuya-convert and have successfully got it to work using Home Assistant. I have also managed to get the light to appear in the Hue app and it is added to the app. However, when i turn the light on in the app, the bulb fails to turn on. It seems like the app isn’t communicating with ESPHome despite having the correct YAML configurations. Here is my YAML configuration:
esphome:
name: lohas_cct
platform: ESP8266
board: esp01_1m
includes:
- diyhueasyncudp.h
libraries:
- ESPAsyncUDP
custom_component:
- lambda: |-
auto diyhue = new diyhueudp();
return {diyhue};
wifi:
ssid: XXXXXXXX
password: XXXXXXXXX
ap:
ssid: Lohas1
ap_timeout: 3min
captive_portal:
logger:
ota:
web_server:
api:
switch:
- platform: template
name: alert
id: alert
optimistic: true
turn_on_action:
- light.turn_off: color_led
- light.turn_on:
id: white_led
brightness: 100%
color_temperature: 4000 K
- delay: 1s
- light.turn_on:
id: white_led
brightness: 10%
color_temperature: 4000 K
- delay: 1s
- light.turn_on:
id: white_led
brightness: 100%
color_temperature: 4000 K
- delay: 1s
- light.turn_on:
id: white_led
brightness: 10%
color_temperature: 4000 K
- delay: 1s
- light.turn_on:
id: white_led
brightness: 100%
color_temperature: 4000 K
- switch.turn_off: alert
- platform: template
name: entertainment_switch
id: entertainment_switch
optimistic: true
output:
- platform: esp8266_pwm
id: output_red
pin: GPIO5
- platform: esp8266_pwm
id: output_green
pin: GPIO4
- platform: esp8266_pwm
id: output_blue
pin: GPIO13
- platform: esp8266_pwm
id: output_cold_white
pin: GPIO14
- platform: esp8266_pwm
id: output_warm_white
pin: GPIO12
light:
- platform: rgb
id: color_led
name: "color_led"
red: output_red
green: output_green
blue: output_blue
default_transition_length: 0.4s
effects:
- random:
name: Random Effect With Custom Values
transition_length: 5s
update_interval: 3s
- platform: cwww
id: white_led
name: "white_led"
warm_white: output_warm_white
cold_white: output_cold_white
cold_white_color_temperature: 6000 K
warm_white_color_temperature: 2700 K
default_transition_length: 0.4s
text_sensor:
- platform: template
name: "light_id"
id: light_id
lambda: |-
return {"esphome_diyhue_light;XX:XX:XX:XX:XX:XX;lohas_cct;0;0"};
update_interval: 24h
I am running on a rpi3+ and have diyhue installed via docker. I have tried to debug the docker using this command:
sudo docker run -e "DEBUG=true" -d --name diyHue --restart=always --network=host -e MAC=XX:XX:XX:XX:XX:XX -v /mnt/hue-emulator/export:/opt/hue-emulator/export diyhue/core:latest
however this only starts the container and doesn’t output any logs. Is this the correct command?
Any help would be much appreciated, thank you.