Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Needed: KC868-A4 Relay Module Integration with Home Assistant
#1
Hi everyone,

I am currently working on a home automation project and just got my hands on the KC868-A4 relay module. First off.., big thanks to KinCony for creating such an affordable and compact board—really impressive stuff !!

I have gone through the official documentation.., but I am still a bit stuck integrating it fully with Home Assistant via MQTT. I have configured my broker and can see some communication.., but the relay toggling seems inconsistent. Sometimes it works, sometimes not. I’m wondering if it’s a timing or topic sap fico training in bangalore formatting issue ??

Can anyone here share their YAML config or best practices for setting up the KC868-A4 with Home Assistant: ?? Also, should I be using Tasmota or stick with the original firmware for more stability: ??

Really appreciate any guidance or even a simple example setup. I am not super advanced but have decent experience with ESP modules and MQTT.

Thanks in advance for any help !!

Mitchel
Reply
#2
why not use by ESPHome yaml, it's easy.
here is ymal file: https://www.kincony.com/forum/showthread.php?tid=2036
Reply
#3
Subject: Help Needed - PCF8574 Not Functioning as Expected on KC868-A4S (ESP32)
Hello KingCony team,
I'm working on a project using the KC868-A4S board (ESP32) and I'm trying to control a PCF8574 module (I2C address 0x24) using the following code. The code compiles correctly and seems to run, but unfortunately, none of the outputs on the PCF8574 respond — the connected relays do not activate at all.
Here is the code I’m using:#include "Arduino.h"
#include "PCF8574.h"

#define A4S_SDA 4
#define A4S_SCL 16
TwoWire I2Cone = TwoWire(0);
TwoWire I2Ctwo = TwoWire(1);

PCF8574 pcf8574_RE1(&I2Cone, 0x24, A4S_SDA, A4S_SCL); // DO

void setup() {
    Serial.begin(115200);
    pcf8574_RE1.pinMode(P0, OUTPUT);
    pcf8574_RE1.pinMode(P1, OUTPUT);
    pcf8574_RE1.pinMode(P2, OUTPUT);
    pcf8574_RE1.pinMode(P3, OUTPUT);
}

void loop() {
    pcf8574_RE1.digitalWrite(P0, LOW); delay(1000);
    pcf8574_RE1.digitalWrite(P1, HIGH); delay(1000);
    pcf8574_RE1.digitalWrite(P2, HIGH); delay(1000);
    pcf8574_RE1.digitalWrite(P3, HIGH); delay(1000);
}
I have double-checked the wiring, the I2C address, and the power supply. I also tried using the Wire.begin() directly and doing an I2C scan, and the device is detected correctly at address 0x24.
However, despite everything looking fine, the relays or outputs connected to the PCF8574 are not switching at all.
Has anyone experienced a similar issue with the KC868-A4S and PCF8574? Am I missing a step to initialize or activate the bus correctly?
Any advice or sample code that is known to work with KC868-A4S and PCF8574 would be greatly appreciated.
Thank you in advance for your support!
Reply
#4
i suggest you download KCS v2 firmware by usb-c cable firstly. if work well, so that means hardware PCB is well. you need to check software code.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)