ESPHome Brightness H801

Hi,

I’m having a reasonable amount of success with ESPHome, and enjoying the power and functionality of it, but having an issue with H801.

I’m using them in a number of spots for RGB, CWWW and other LED strip control, but the PWM/Dimming doesn’t seem to work.

It is reported in the logs as receiving a brightness change from HA but the strips don’t dim. Not sure if I am missing something obvious here.

    #RGB
    output:
      - platform: esp8266_pwm
        pin: GPIO12
        frequency: 1000 Hz
        id: pwm_b
      - platform: esp8266_pwm
        pin: GPIO13
        frequency: 1000 Hz
        id: pwm_g
      - platform: esp8266_pwm
        pin: GPIO15
        frequency: 1000 Hz
        id: pwm_r
      - platform: esp8266_pwm
        pin: GPIO14
        frequency: 1000 Hz
        id: pwm_w1
      - platform: esp8266_pwm
        pin: GPIO04
        frequency: 1000 Hz
        id: pwm_w2
    light:
      - platform: rgb
        name: "Kitchen_RGB_Lounge"
        red: pwm_r
        green: pwm_g
        blue: pwm_b

Same with me. If I change brightness to 100% it turns on, if I changed it to 0% it turns off. Nothing in between. Any help?

Anyone else have issues?
I assume others are running H801 with ESPHome without issue?

This works fine with Tasmota or Espurna, so assume hardware is not an issue.

Any help would be appreciated.

mines are on the mail

4 posts, no logs, not even a complete yaml file. sigh.

Ok. I thought I had probably posted the key parts but I may have missed something; here is complete YAML.

This is driving WWCW Led Strips in 2 sets. One for each side of wardrobe, and these are linked to reed switches to determine if the door is open. It appears to work apart from PWM, and thus any dimming or tuning of colours.

    esphome:
      name: master_bedroom_ward_lights
      platform: ESP8266
      board: esp01_1m

    wifi:
      ssid: "***"
      password: "***"

    # Enable logging
    logger:

    # Enable Home Assistant API
    api:
      password: '***'

    ota:
      password: '***'

    web_server:
      port: 80

    binary_sensor:
       # Door Sensors
      - platform: gpio
        pin:
          number: GPIO3
          mode: INPUT_PULLUP
          inverted: True
        id: ward_left_sensor
        name: "Wardrobe Left Sensor"
        filters:
          - delayed_on: 10ms
          - delayed_off: 10ms
        on_press:
          - light.turn_on: ward_left_light
        on_release:
          - light.turn_off: ward_left_light
      - platform: gpio
        pin:
          number: GPIO2
          mode: INPUT_PULLUP
          inverted: True
        id: ward_right_sensor
        name: "Wardrobe Right Sensor"
        filters:
          - delayed_on: 10ms
          - delayed_off: 10ms
        on_press:
          - light.turn_on: ward_right_light
        on_release:
          - light.turn_off: ward_right_light


    #WW Lights GPIOs
    output:
      - platform: esp8266_pwm
        pin: GPIO12
        frequency: 1000 Hz
        id: pwm_b
      - platform: esp8266_pwm
        pin: GPIO13
        frequency: 1000 Hz
        id: pwm_g
      - platform: esp8266_pwm
        pin: GPIO15
        frequency: 1000 Hz
        id: pwm_r
      - platform: esp8266_pwm
        pin: GPIO14
        frequency: 1000 Hz
        id: pwm_w1
      - platform: esp8266_pwm
        pin: GPIO04
        frequency: 1000 Hz
        id: pwm_w2
    light:
      - platform: cwww
        id: ward_left_light
        name: "Master Wardrobe Left Light"
        cold_white: pwm_w2
        warm_white: pwm_w1
        cold_white_color_temperature: 4200 K
        warm_white_color_temperature: 2200 K
        default_transition_length: 0s
      - platform: cwww
        id: ward_right_light
        name: "Master Wardrobe Right Light"
        cold_white: pwm_g
        warm_white: pwm_b
        cold_white_color_temperature: 4200 K
        warm_white_color_temperature: 2200 K
        default_transition_length: 0s

Boot Logs

    INFO Connecting to master_bedroom_ward_lights.local:6053 (192.168.0.91)
    INFO Successfully connected to master_bedroom_ward_lights.local
    [20:00:44][I][application:097]: esphome-core version 1.12.2 compiled on Apr 27 2019, 19:58:00
    [20:00:44][C][wifi:371]: WiFi:
    [20:00:44][C][wifi:253]:   SSID: [redacted]
    [20:00:44][C][wifi:254]:   IP Address: 192.168.0.91
    [20:00:44][C][wifi:256]:   BSSID: [redacted]
    [20:00:44][C][wifi:257]:   Hostname: 'master_bedroom_ward_lights'
    [20:00:44][C][wifi:261]:   Signal strength: -76 dB ▂▄▆█
    [20:00:44][C][wifi:262]:   Channel: 11
    [20:00:44][C][wifi:263]:   Subnet: 255.255.255.0
    [20:00:44][C][wifi:264]:   Gateway: 192.168.0.1
    [20:00:44][C][wifi:265]:   DNS1: 194.168.4.100
    [20:00:44][C][wifi:266]:   DNS2: 194.168.8.100
    [20:00:44][C][binary_sensor.gpio:022]: GPIO Binary Sensor 'Wardrobe Left Sensor'
    [20:00:44][C][binary_sensor.gpio:023]:   Pin: GPIO3 (Mode: INPUT_PULLUP, INVERTED)
    [20:00:44][C][binary_sensor.gpio:022]: GPIO Binary Sensor 'Wardrobe Right Sensor'
    [20:00:44][C][binary_sensor.gpio:023]:   Pin: GPIO2 (Mode: INPUT_PULLUP, INVERTED)
    [20:00:44][C][output.esp8266_pwm:029]: ESP8266 PWM:
    [20:00:44][C][output.esp8266_pwm:030]:   Pin: GPIO12 (Mode: OUTPUT)
    [20:00:44][C][output.esp8266_pwm:031]:   Frequency: 1000.0 Hz
    [20:00:44][C][output.esp8266_pwm:029]: ESP8266 PWM:
    [20:00:44][C][output.esp8266_pwm:030]:   Pin: GPIO13 (Mode: OUTPUT)
    [20:00:44][C][output.esp8266_pwm:031]:   Frequency: 1000.0 Hz
    [20:00:44][C][output.esp8266_pwm:029]: ESP8266 PWM:
    [20:00:44][C][output.esp8266_pwm:030]:   Pin: GPIO15 (Mode: OUTPUT)
    [20:00:44][C][output.esp8266_pwm:031]:   Frequency: 1000.0 Hz
    [20:00:44][C][output.esp8266_pwm:029]: ESP8266 PWM:
    [20:00:44][C][output.esp8266_pwm:030]:   Pin: GPIO14 (Mode: OUTPUT)
    [20:00:44][C][output.esp8266_pwm:031]:   Frequency: 1000.0 Hz
    [20:00:44][C][output.esp8266_pwm:029]: ESP8266 PWM:
    [20:00:44][C][output.esp8266_pwm:030]:   Pin: GPIO4 (Mode: OUTPUT)
    [20:00:44][C][output.esp8266_pwm:031]:   Frequency: 1000.0 Hz
    [20:00:44][C][logger:142]: Logger:
    [20:00:44][C][logger:143]:   Level: DEBUG
    [20:00:44][C][logger:144]:   Log Baud Rate: 115200
    [20:00:44][C][logger:145]:   Hardware UART: UART0
    [20:00:44][C][light.state:225]: Light 'Master Wardrobe Left Light'
    [20:00:44][C][light.state:227]:   Default Transition Length: 0 ms
    [20:00:44][C][light.state:228]:   Gamma Correct: 2.80
    [20:00:44][C][light.state:231]:   Min Mireds: 238.1
    [20:00:44][C][light.state:232]:   Max Mireds: 454.5
    [20:00:44][C][light.state:225]: Light 'Master Wardrobe Right Light'
    [20:00:44][C][light.state:227]:   Default Transition Length: 0 ms
    [20:00:44][C][light.state:228]:   Gamma Correct: 2.80
    [20:00:44][C][light.state:231]:   Min Mireds: 238.1
    [20:00:44][C][light.state:232]:   Max Mireds: 454.5
    [20:00:44][C][web_server:126]: Web Server:
    [20:00:44][C][web_server:127]:   Address: master_bedroom_ward_lights.local:80
    [20:00:44][C][api:101]: API Server:
    [20:00:44][C][api:102]:   Address: master_bedroom_ward_lights.local:6053
    [20:00:44][C][ota:127]: Over-The-Air Updates:
    [20:00:44][C][ota:128]:   Address: master_bedroom_ward_lights.local:8266
    [20:00:44][C][ota:130]:   Using Password.
    [20:00:55][D][api:546]: Client 'Home Assistant 0.92.0 (192.168.0.89)' connected successfully!

Switched lights on with door open. Seems to work fine.

    [20:02:00][D][binary_sensor:037]: 'Wardrobe Right Sensor': Sending state ON
    [20:02:00][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:02:07][D][binary_sensor:037]: 'Wardrobe Right Sensor': Sending state OFF
    [20:02:07][D][light.state:418]: 'Master Wardrobe Right Light' Turning OFF

Turning on with brightness at 34%, nothing happens.
Adjusting Colour temperature, nothing happens
Pure Warm White or Pure Cold White, works
100% Brightness, works

It seems to me that the PWM isn’t working, looks to be receiving the commands from HA but then nothing.

    [20:03:17][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:17][D][light.state:425]:   Brightness: 34%
    [20:03:36][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:36][D][light.state:438]:   Color Temperature: 343.0 mireds
    [20:03:38][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:38][D][light.state:425]:   Brightness: 63%
    [20:03:41][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:41][D][light.state:425]:   Brightness: 100%
    [20:03:45][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:45][D][light.state:438]:   Color Temperature: 454.0 mireds
    [20:03:48][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:03:48][D][light.state:438]:   Color Temperature: 238.0 mireds
    [20:04:12][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:04:12][D][light.state:438]:   Color Temperature: 454.0 mireds
    [20:04:22][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:04:22][D][light.state:425]:   Brightness: 40%
    [20:04:33][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
    [20:04:33][D][light.state:425]:   Brightness: 0%
    [20:04:43][D][light.state:418]: 'Master Wardrobe Right Light' Turning OFF

More than happy to help try and solve this.

I have an H801 using similar code working with an RGB strip so possibly it is in the implementation of CWWW Light that there is an error.

I will try and have a look for obvious errors, but out of my area of expertise now.

What lights are the troublesome ones?

I can’t get either CWWW strip connected to dim or colour tune.

One Strip is connected to W1 & W2, the other G & B.

The RGB connected strips elsewhere in the house works perfectly. I have tried swapping the CWWW light to an RGB one but still dimming doesn’t work. I would say it was a hardware fault if it didn’t work perfectly when ESPurna is flashed to it.

Can you point to the actual devices that you are using?

The H801 controller:

LED Strip:
https://www.maxiluxled.com/products/specs/ps120-cct-dbx

Sounds like a rounding issue somewhere or a config value missing
Looking at the code with the phone I can see it uses the color temperature and gamma settings to calculate the pwm output. A detailed log might need to be activated. Try changing log level to VERY_VERBOSE and try to be lucky. Otherwise we would have to add more logging with your configuración.
I am committed to get this running for you.
Also check the output of esphome config

Thanks for the support.
I will hopefully have time tomorrow evening to try the Very_Verbose logging. Anything I should be looking for?

What do you mean by output of ESPHome config? The log on addon-details page doesn’t look to show very much, certainly no errors.

I’m not so familiar with the hass.io add on.
But the idea is that esphome code generator will output the configuration it reads from your yaml file
This output looks very much like your yaml file but it is generated from what esphome readed from it.

Pardon my ignorance, but those appear (from the photo) to be warm white/cold white strips, but you are setting them up as RGB.

I may be wrong, as that website is particularly useless on technical details, and the so called “datasheet” is just a copy of the web page.

My first post was about RGB strip I have in kitchen which now seem to work.

The detailed full yaml and logs I posted cover cwww I have used in wardrobe which still don’t work.

Also I would assume that setting them as rgb or cwww lights would only affect the front end as still using pwm to dim led. Might be a little odd but dimming should still work and colour wheel would replace temp but should still allow adjustment.

Semi Working now.

After setting logging to VERY_VERBOSE I somehow screwed up and the board was in a boot loop. Took it apart and reflashed using UART.

Currently running with VERBOSE, haven’t risked setting VERY_VERBOSE. I suspect I was just unlucky.

The dimming works fine, the colour temperature tuning less so; I seem to get Cold White LEDs on till I hit mid point, both at mid point and WW on other side. I was hoping for a smoother transition but maybe this is just a limitation?

I may resort to just using two lights per strip and dim each to desire pwm setting to get required temperatures for now.

Generally been rather odd, perhaps issues with my build environment? I’m running it via hassio and docker so would assume it is ok.

Not sure if this will work for you, but I flashed my tasmota (rgbw) to esphome and had same issue,
The colors was always 100% or off, the transitions did not work.
I tested different configs and settings but nothing made it work.
But when I pulled the power to the whole module and then reconnected it, it started to work as expected, transitions (default 1s) started to work, and I could dim the lights down to 1 % if I wanted.
It is probably something in the hardware module that gets “cached” or something.

So try to pull the power completely off (No software restart) then reconnect it.

2 Likes

I second that.
Migrating from Tasmota to ESPHome H801 needed full power cycle and after that it works flawlessly.

Thanks all.
Indeed a full power cycle does sometimes seem needed.
Working now.