# ESPHome Light Not Turning on Through Hue App

**URL:** <https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175>\
**Category:** Support\
**Created:** [August 25, 2020, 1:30pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175 "2020-08-25T13:30:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/jay/32/110_2.png) [@Jay](https://diyhue.discourse.group/u/Jay)\
**Post date:** [August 25, 2020, 1:30pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/1 "2020-08-25T13:30:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alex](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/alex/32/14_2.png) [@alex](https://diyhue.discourse.group/u/alex)\
**Post date:** [August 26, 2020, 2:15pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/2 "2020-08-26T14:15:21Z")

</div>

Did you replace all the x values with the actual values? Ex the Mac address for the container?

---

<div class="post-metadata">

**Author:** ![Jay](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/jay/32/110_2.png) [@Jay](https://diyhue.discourse.group/u/Jay)\
**Post date:** [August 26, 2020, 6:01pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/3 "2020-08-26T18:01:51Z")

</div>

Yes, sorry, the X’s were just for this post.

---

<div class="post-metadata">

**Author:** ![alex](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/alex/32/14_2.png) [@alex](https://diyhue.discourse.group/u/alex)\
**Post date:** [August 30, 2020, 10:27pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/4 "2020-08-30T22:27:13Z")

</div>

When you say there are no logs, do you mean you ran docker logs and see no output?

---

<div class="post-metadata">

**Author:** ![Jay](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/jay/32/110_2.png) [@Jay](https://diyhue.discourse.group/u/Jay)\
**Post date:** [August 30, 2020, 10:52pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/5 "2020-08-30T22:52:36Z")

</div>

Yeah, I run the docker command from above and then the container starts but no logs appear in the command line.

---

<div class="post-metadata">

**Author:** ![alex](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/alex/32/14_2.png) [@alex](https://diyhue.discourse.group/u/alex)\
**Post date:** [October 14, 2020, 4:56am UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/6 "2020-10-14T04:56:44Z")

</div>

This is a very late reply, but to answer your question, nothing will show up in the command line as that is expected. You need to utilize docker logs as mentioned earlier. Perhaps a simple docker tutorial will be able to teach that.

---

<div class="post-metadata">

**Author:** ![quoije](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/quoije/32/132_2.png) [@quoije](https://diyhue.discourse.group/u/quoije)\
**Post date:** [November 27, 2020, 1:59am UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/7 "2020-11-27T01:59:14Z")

</div>

Hi @Jay, sorry for bumping an old topic but I was wondering if you ever fix your problem. As you can see in this thread:([Light is detected but the Hue app can't control anything](https://diyhue.discourse.group/t/light-is-detected-but-the-hue-app-cant-control-anything/218))  
i’m having the same problem as you.

Cheers.

---

<div class="post-metadata">

**Author:** ![Jay](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/jay/32/110_2.png) [@Jay](https://diyhue.discourse.group/u/Jay)\
**Post date:** [November 27, 2020, 8:16am UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/8 "2020-11-27T08:16:28Z")

</div>

Hi quoije,

I can confirm that switching from the master to the master-refactor branch fixed this issue for me. I believe that the master-refactor branch is now the default so make sure you’re running that branch and check again.

---

<div class="post-metadata">

**Author:** ![quoije](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/quoije/32/132_2.png) [@quoije](https://diyhue.discourse.group/u/quoije)\
**Post date:** [November 27, 2020, 2:29pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/9 "2020-11-27T14:29:01Z")

</div>

That actually works. Thank you very much 🙂  
Have a great day!

---

<div class="post-metadata">

**Author:** ![Jay](https://yyz2.discourse-cdn.com/free1/user_avatar/diyhue.discourse.group/jay/32/110_2.png) [@Jay](https://diyhue.discourse.group/u/Jay)\
**Post date:** [November 27, 2020, 3:25pm UTC](https://diyhue.discourse.group/t/esphome-light-not-turning-on-through-hue-app/175/10 "2020-11-27T15:25:41Z")

</div>

No worries, glad you got it working! You too!
