Smart Home Automation Forum
Input Flickering Issue with KC868-A16 - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A16 (https://www.kincony.com/forum/forumdisplay.php?fid=25)
+--- Thread: Input Flickering Issue with KC868-A16 (/showthread.php?tid=6659)



Input Flickering Issue with KC868-A16 - amir - 09-10-2024

I'm using a KC868-A16 controller with ESPHome and I've encountered an issue with two inputs that occasionally "jump" - turning on and off by themselves.
to input 03 nothing is connected

 I'd appreciate any help in resolving this problem.


RE: Input Flickering Issue with KC868-A16 - admin - 09-10-2024

let these digital input port connect to GND or 12V. Do not hang pins in the air. test for one day have a look.


RE: Input Flickering Issue with KC868-A16 - amir - 09-10-2024

hi and thanks for the Quick response
this is happening on port 16 with GND connected

name: "KC868-A16-X16"
pin:
pcf8574: inputs_9_16
number: 7
mode: INPUT
inverted: false


RE: Input Flickering Issue with KC868-A16 - admin - 09-10-2024

The debounce filter ensures that the input signal is stable and ignores short, unintended changes (debounce is used to filter out the bouncing effect of mechanical buttons).
Code:
# Configuring a binary sensor (button or switch input)
binary_sensor:
  - platform: gpio  # Use the GPIO platform to read the input
    name: "PCF8574 Input 7"  # The name of the sensor, visible in platforms like Home Assistant
    pin:
      pcf8574: pcf8574_hub  # Reference the PCF8574 hub ID defined earlier
      number: 7  # The input will be read from pin number 7 on the PCF8574 chip
      mode: INPUT  # The pin mode is set as input
      inverted: false  # Whether the signal is inverted, false means it's not inverted
    filters:
      - debounce: 50ms  # The debounce filter to delay by 50 milliseconds to handle button bounce
    on_press:
      - logger.log: "Button Pressed"  # Logs "Button Pressed" when the button is pressed
    on_release:
      - logger.log: "Button Released"  # Logs "Button Released" when the button is released