esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

ac_dimmer: zero_cross_pin cannot be used in multiple places since ESPHome 2024.x #5557

Closed JKF1 closed 6 months ago

JKF1 commented 6 months ago

The problem

I am using the Olimex ESP32 PoE Board with four ac_dimmer outputs - all share the same zero_cross_pin. It worked fine last year with ESPHome 2023.X

I wanted to update the firmware within ESPHome 2024.X - compile error

Which version of ESPHome has the issue?

ESPHome 2024.X

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.2.5

What platform are you using?

ESP32

Board

Olimex ESP32 PoE

Component causing the issue

ac_dimmer

Example YAML snippet

output:
  - platform: ac_dimmer
    id: dimmer1
    gate_pin: GPIO13
    init_with_half_cycle: true
    min_power: 0.22
    zero_cross_pin:
      number: GPIO16
      mode:
        input: true
      inverted: yes
  - platform: ac_dimmer
    id: dimmer2
    gate_pin: GPIO14
    init_with_half_cycle: true
    min_power: 0.22
    zero_cross_pin:
      number: GPIO16
      mode:
        input: true
      inverted: yes

  - platform: ac_dimmer
    id: dimmer3
    gate_pin: GPIO15
    init_with_half_cycle: true
    min_power: 0.22
    zero_cross_pin:
      number: GPIO16
      mode:
        input: true
      inverted: yes

  - platform: ac_dimmer
    id: dimmer4
    gate_pin: GPIO32
    init_with_half_cycle: true
    min_power: 0.22
    zero_cross_pin:
      number: GPIO16
      mode:
        input: true
      inverted: yes

light:
  - platform: monochromatic
    output: dimmer1
    name: "Balkon West"
    default_transition_length: 2s
  - platform: monochromatic
    output: dimmer2
    name: "Balkon West Mitte"
    default_transition_length: 2s
  - platform: monochromatic
    output: dimmer3
    name: "Balkon Ost Mitte"
    default_transition_length: 2s
  - platform: monochromatic
    output: dimmer4
    name: "Balkon Ost"
    default_transition_length: 2s

Anything in the logs that might be useful for us?

INFO ESPHome 2024.2.1
INFO Reading configuration /config/esphome/balkon.yaml...
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
Failed config

output.ac_dimmer: [source /config/esphome/balkon.yaml:26]

  Pin 16 is used in multiple places.
  platform: ac_dimmer
  id: dimmer1
  gate_pin: 
    number: 13
    mode: 
      output: True
      input: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: False
    ignore_strapping_warning: False
    drive_strength: 20.0
  init_with_half_cycle: True
  min_power: 0.22
  zero_cross_pin: 
    number: 16
    mode: 
      input: True
      output: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: True
    ignore_strapping_warning: False
    drive_strength: 20.0
  zero_means_zero: False
  method: LEADING_PULSE
output.ac_dimmer: [source /config/esphome/balkon.yaml:36]

  Pin 16 is used in multiple places.
  platform: ac_dimmer
  id: dimmer2
  gate_pin: 
    number: 14
    mode: 
      output: True
      input: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: False
    ignore_strapping_warning: False
    drive_strength: 20.0
  init_with_half_cycle: True
  min_power: 0.22
  zero_cross_pin: 
    number: 16
    mode: 
      input: True
      output: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: True
    ignore_strapping_warning: False
    drive_strength: 20.0
  zero_means_zero: False
  method: LEADING_PULSE
output.ac_dimmer: [source /config/esphome/balkon.yaml:47]

  Pin 16 is used in multiple places.
  platform: ac_dimmer
  id: dimmer3
  gate_pin: 
    number: 15
    mode: 
      output: True
      input: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: False
    ignore_strapping_warning: False
    drive_strength: 20.0
  init_with_half_cycle: True
  min_power: 0.22
  zero_cross_pin: 
    number: 16
    mode: 
      input: True
      output: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: True
    ignore_strapping_warning: False
    drive_strength: 20.0
  zero_means_zero: False
  method: LEADING_PULSE
output.ac_dimmer: [source /config/esphome/balkon.yaml:58]

  Pin 16 is used in multiple places.
  platform: ac_dimmer
  id: dimmer4
  gate_pin: 
    number: 32
    mode: 
      output: True
      input: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: False
    ignore_strapping_warning: False
    drive_strength: 20.0
  init_with_half_cycle: True
  min_power: 0.22
  zero_cross_pin: 
    number: 16
    mode: 
      input: True
      output: False
      open_drain: False
      pullup: False
      pulldown: False
    inverted: True
    ignore_strapping_warning: False
    drive_strength: 20.0
  zero_means_zero: False
  method: LEADING_PULSE

Additional information

No response

randybb commented 6 months ago

https://esphome.io/changelog/2023.12.0#pin-reuse-validation