Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,504
» Latest member: qrqr4435
» Forum threads: 2,287
» Forum posts: 11,895

Full Statistics

Online Users
There are currently 44 online users.
» 0 Member(s) | 27 Guest(s)
Bing, Bytespider, Google, PetalBot, Semrush, Yandex, bot

Latest Threads
PWM support?
Forum: KC868-A16
Last Post: luis15pt
1 hour ago
» Replies: 6
» Views: 33
KC868 A32 Firmware 2.2.4 ...
Forum: KC868-A32/A32 Pro
Last Post: iozzi_giorgio
8 hours ago
» Replies: 2
» Views: 27
[arduino code examples fo...
Forum: KC868-A32/A32 Pro
Last Post: admin
Today, 05:12 AM
» Replies: 0
» Views: 3
USB ports
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: BaconRanch
Today, 02:47 AM
» Replies: 2
» Views: 7
Lesson23- How to connect ...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 10:11 AM
» Replies: 10
» Views: 7,157
KC868-AG RF - sending rep...
Forum: KC868-A series and Uair Smart Controller
Last Post: PhilW
Yesterday, 07:46 AM
» Replies: 3
» Views: 10
Usar entradas y oled i2c ...
Forum: KC868-A6
Last Post: sistemasyusa
Yesterday, 03:16 AM
» Replies: 4
» Views: 17
a16 as basis for a securi...
Forum: KC868-A16
Last Post: admin
09-18-2024, 11:58 PM
» Replies: 8
» Views: 55
GSM CALL RELAY
Forum: KC868-A2
Last Post: admin
09-18-2024, 11:53 PM
» Replies: 9
» Views: 4,109
KC868-A16S or KC868-A8S
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
09-18-2024, 11:51 PM
» Replies: 3
» Views: 39

  command does not work
Posted by: soccer - 01-17-2023, 12:15 PM - Forum: KC868-A16 - Replies (5)

command does not work, it was supposed to give a command that if button 1 was LOW, it would activate output P0, what did i do wrong to make it not work?

#include "Arduino.h"
#include "PCF8574.h"

// Define o endereço de entrada do i2c
PCF8574 pcf8574_1(0x22,4,5); // canal 1-8 endereço: 100010
PCF8574 pcf8574_2(0x21,4,5); // endereço do canal 9-16: 100001
PCF8574 pcf8574_3(0x25,4,5);


unsigned long timeElapsed;
void setup()
{
    Serial.begin(115200);
    atraso(1000);


pcf8574_3.pinMode(P5, OUTPUT);

pcf8574_1.pinMode(P0, ENTRADA);
pcf8574_1.pinMode(P1, ENTRADA);
pcf8574_1.pinMode(P2, ENTRADA);
pcf8574_1.pinMode(P3, ENTRADA);
pcf8574_1.pinMode(P4, INPUT);
pcf8574_1.pinMode(P5, ENTRADA);
pcf8574_1.pinMode(P6, INPUT);
pcf8574_1.pinMode(P7, ENTRADA);

pcf8574_2.pinMode(P0, ENTRADA);
pcf8574_2.pinMode(P1, ENTRADA);
pcf8574_2.pinMode(P2, ENTRADA);
pcf8574_2.pinMode(P3, ENTRADA);
pcf8574_2.pinMode(P4, INPUT);
pcf8574_2.pinMode(P5, ENTRADA);
pcf8574_2.pinMode(P6, INPUT);
pcf8574_2.pinMode(P7, ENTRADA);

    Serial.print("Iniciar pcf8574...");
    if (pcf8574_1.begin()){
        Serial.println("pcf8574_1_OK");
    }outro{
        Serial.println("pcf8574_1_KO");
    }

  Serial.print("Iniciar pcf8574...");
  if (pcf8574_2.begin()){
    Serial.println("pcf8574_2_OK");
  }outro{
    Serial.println("pcf8574_2_KO");
  }
Serial.print("Iniciar pcf8574...");
    if (pcf8574_3.begin()){
        Serial.println("pcf8574_3_OK");
    }outro{
        Serial.println("pcf8574_3_KO");
    }

}

laço vazio()
{
uint8_t val1 = pcf8574_1.digitalRead(P0);
uint8_t val2 = pcf8574_1.digitalRead(P1);
uint8_t val3 = pcf8574_1.digitalRead(P2);
uint8_t val4 = pcf8574_1.digitalRead(P3);
uint8_t val5 = pcf8574_1.digitalRead(P4);
uint8_t val6 = pcf8574_1.digitalRead(P5);
uint8_t val7 = pcf8574_1.digitalRead(P6);
uint8_t val8 = pcf8574_1.digitalRead(P7);

uint8_t val9 = pcf8574_2.digitalRead(P0);
uint8_t val10 = pcf8574_2.digitalRead(P1);
uint8_t val11 = pcf8574_2.digitalRead(P2);
uint8_t val12 = pcf8574_2.digitalRead(P3);
uint8_t val13 = pcf8574_2.digitalRead(P4);
uint8_t val14 = pcf8574_2.digitalRead(P5);
uint8_t val15 = pcf8574_2.digitalRead(P6);
uint8_t val16 = pcf8574_2.digitalRead(P7);

if (val1==BAIXO) {pcf8574_3.digitalWrite(P0, ALTO);}


if (val1==BAIXO) Serial.println("TECLA 1 PRESSIONADA");
if (val2==BAIXO) Serial.println("TECLA 2 PRESSIONADA");
if (val3==BAIXO) Serial.println("TECLA 3 PRESSIONADA");
if (val4==BAIXO) Serial.println("TECLA 4 PRESSIONADA");
if (val5==BAIXO) Serial.println("TECLA 5 PRESSIONADA");
if (val6==BAIXO) Serial.println("TECLA 6 PRESSIONADA");
if (val7==BAIXO) Serial.println("TECLA 7 PRESSIONADA");
if (val8==BAIXO) Serial.println("TECLA8 PRESSIONADA");

if (val9==BAIXO) Serial.println("TECLA 1 PRESSIONADA");
if (val10==BAIXO) Serial.println("TECLA 2 PRESSIONADA");
if (val11==BAIXO) Serial.println("TECLA 3 PRESSIONADA");
if (val12==BAIXO) Serial.println("TECLA 4 PRESSIONADA");
if (val13==BAIXO) Serial.println("TECLA 5 PRESSIONADA");
if (val14==BAIXO) Serial.println("TECLA 6 PRESSIONADA");
if (val15==BAIXO) Serial.println("TECLA 7 PRESSIONADA");
if (val16==BAIXO) Serial.println("TECLA8 PRESSIONADA");
atraso(300);
}

Print this item

  KC868-A16 ESPHome led output not working
Posted by: stanchiam - 01-17-2023, 10:53 AM - Forum: KC868-A16 - Replies (1)

Hi,

I tried turning on and off without any problem, esphome is working.
But when i check the board, the output led does not light up when i turn it on.
Below are the yaml i used, is there anything missing or wrong that causes the led not to light up when i switch it on using esphome?
Btw i have not connect or use any DC12/24v input yet.

# Example configuration entry for output input channel 1-16
pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-8
    address: 0x24
  - id: 'pcf8574_hub_out_2'  # for output channel 9-16
    address: 0x25
   
  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x21
  - id: 'pcf8574_hub_in_2'  # for input channel 9-16
    address: 0x22


switch:
 - platform: gpio
    name: "switch01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true
  - platform: gpio
    name: "switch02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: gpio
    name: "switch03"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: gpio
    name: "switch04"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true


binary_sensor:
  - platform: gpio
    name: "input01"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input02"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input03"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: "input04"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true


Ops, connecting 12v DC Input by looping from the power, the led light up



Attached Files Thumbnail(s)
   
Print this item

  tasmota FW and config file
Posted by: hbs - 01-16-2023, 08:51 PM - Forum: KC868-AI - Replies (7)

Hello,

I looking for the tasmota FW and config file for the KC868-AI

any advise?

Print this item

  Problem using KC868-A8S
Posted by: birdwilliamb - 01-16-2023, 05:48 PM - Forum: KC868-A8S - Replies (7)

I just received a KC868-A8S board and am not able to get it to work. I started with the relay sample program. I copied pin_arduino.h to the project and changed SDA and SCL to 4 and 5 respectively as indicated. I also added static_assert statements to make sure that the correct values were picked up. The program compiled and loaded successfully. The pcf.begin() statement returns false indicating an error occurred. I then tried the sample I2CScanner project, mad the same changes and ran it. It indicated that there were no I2C devices detected. I also have a KC868-A4 which works correctly. The code is different but all the wiring is the same so I don't thing I have any cable problems.

// Visual Micro is in vMicro>General>Tutorial Mode
//
/*
    Name:      KC868_01.ino
    Created: 1/4/2023 4:15:15 PM
    Author:   
*/

// Define User Types below here or use a .h file
//
// Import required libraries
#include <Arduino.h>
#include <PCF8574.h>

#define I2C_RELAYS_ADDR  0x24

/**/

static_assert ((SDA!=4),"SDA not defined correctly for KC878-A8S");
static_assert ((SCL!=5),"SCL not defined correctly for KC878-A8S");

PCF8574 pcf(I2C_RELAYS_ADDR,SDA,SCL);

// The setup() function runs once each time the micro-controller starts
void setup()
{
  Serial.begin(115200);
  delay(1000);

  Serial.println(F("Start Kincony KC868 - A8S Relays example..."));

  pcf.pinMode(P0, OUTPUT);
  pcf.pinMode(P1, OUTPUT);
  pcf.pinMode(P2, OUTPUT);
  pcf.pinMode(P3, OUTPUT);
  pcf.pinMode(P4, OUTPUT);
  pcf.pinMode(P5, OUTPUT);
  pcf.pinMode(P6, OUTPUT);
  pcf.pinMode(P7, OUTPUT);
  Serial.print("Initialize PCF8574 ");
  if (pcf.begin())
    Serial.println(F("OK"));
  else
    Serial.println(F("Error"));
  delay(20);
}

// Add the main program code into the continuous loop() function
void loop()
{
  pcf.digitalWrite(P4,HIGH);
  Serial.print(F("Relay #"));
  Serial.print(P4);
  Serial.println(F("ON"))  ;
  delay(10000);
  pcf.digitalWrite(P4,LOW);
  Serial.print(F("Relay #"));
  Serial.print(P4);
  Serial.println(F("OFF"))  ;
}



Sketch uses 214946 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 14688 bytes (4%) of dynamic memory, leaving 312992 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM3
Connecting........_
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:de:e2:ce:cc:74
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 6553.6 kbit/s)...
Hash of data verified.
Compressed 17120 bytes to 11164...
Writing at 0x00001000... (100 %)
Wrote 17120 bytes (11164 compressed) at 0x00001000 in 0.1 seconds (effective 951.1 kbit/s)...
Hash of data verified.
Compressed 215056 bytes to 113168...
Writing at 0x00010000... (14 %)
Writing at 0x00014000... (28 %)
Writing at 0x00018000... (42 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (71 %)
Writing at 0x00024000... (85 %)
Writing at 0x00028000... (100 %)
Wrote 215056 bytes (113168 compressed) at 0x00010000 in 1.9 seconds (effective 927.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 3072.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Start Kincony KC868 - A8S Relays example...
Initialize PCF8574 Error
Relay #4ON
Relay #4OFF
Relay #4ON
Relay #4OFF
Relay #4ON
Relay #4OFF
Relay #4ON
Relay #4OFF
Relay #4ON
Relay #4OFF
Relay #4ON




// --------------------------------------
// i2c_scanner
//
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//    Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    https://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// Version 6, November 27, 2015.
//    Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//

#include <Wire.h>

static_assert ((SDA!=4),"SDA not defined correctly for KC878-A8S");
static_assert ((SCL!=5),"SCL not defined correctly for KC878-A8S");


void setup()
{
  Serial.begin(115200);
  delay(1000);
  while (!Serial);            // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");

if (Wire.begin(SDA,SCL))
  Serial.println("I2C Initialized");
else
  Serial.println("I2C Init Failed");

}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknown error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }   
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);          // wait 5 seconds for next scan
}





Scanning...
No I2C devices found

Scanning...
No I2C devices found

Scanning...
No I2C devices found

Scanning...
No I2C devices found

Print this item

  KC868-H32BS questions
Posted by: hentes - 01-16-2023, 09:28 AM - Forum: KC868-HxB series Smart Controller - Replies (5)

Hello

I have 2 questions if you could help me please.
1. After restarting the H32BS modul all my lights turn on (all channels 1-32). I have tried to make changes to Relay Recovery: Yes / No but no effect.
    How can be fixed?
2. I have observed with MQTT explorer that on state topic I'm receiving 2 different format of topic:
   a. when pressing wall switch button wired to relay input

Code:
{
  "relay1": {
    "on": 0
  },
  "relay2": {
    "on": 0
  },
  "relay3": {
    "on": 0
  },....}
   b. when pressing wall switch button wired to digital input
Code:
{
  "DI1": {
    "on": 1
  "relay1": {
    "on": 0
  },
  "DI2": {
    "on": 1
  "relay2": {
    "on": 0
  },
  "DI3": {
    "on": 1
  "relay3": {
    "on": 0
  },......}

Basically the "relay1, relay2,..." is disappearing from the state value and becomes D1, D2, D3... This generates tons of errors 3000 errors in 2 hours.
How can I correct this or is it necessary a new firmware?

Thank you very much.

Print this item

  KinCony "KCS" 2023 new firmware under developing
Posted by: admin - 01-15-2023, 02:06 PM - Forum: News - Replies (15)

"KCS" means “KinCony Super” , this is a new firmware developed by KinCony for KC868-A series products in 2023. It has powerful functions and supports multiple communication protocols. It can manage various functions of the device through web pages, such as: input configuration, output configuration, monitoring management page, Timing schedule task mode, network configuration, communication protocol configuration, system configuration and other related functions
[Image: index.png]
Input configuration:
[Image: input.png]
Binding of digital input port and output port, setting of effective value of high and low level, support multiple trigger modes through digital input port, such as: single click, double click, hold on mode

Output configuration:
[Image: output.png]
Output level invert, support delay auto off, support jog mode control, support interlock setting

monitoring management page:
[Image: monitor.png]
Monitor the status of the input in real time through the web page, and manually control the output

Timing schedule task mode:
[Image: schedule.png]
Support custom scheduled tasks by year, month, day, hour, minute

Network Configuration:
[Image: network.png]
configuration of ethernet and wifi

Communication protocol configuration:
[Image: protocol.png]
Support MQTT, HTTP, TCP Server, TCP Client, UDP Server, UDP Client, Modbus multiple communication protocols

Tuya App configuration:
[Image: tuya.png]
Configure Tuya app license to remote control board by internet

System Configuration:
[Image: system.png]
default parameter settings

Print this item

  Serial command ??
Posted by: vincen - 01-15-2023, 09:24 AM - Forum: KC868-A4 - Replies (3)

Hi

First time trying to use serial control with HA (have done it for years with antic automation system like AMX, Crestron ones) but I struggle to get it working with HA and ESPHome.
I'm using the Kincony K868-A4 box https://www.kincony.com/arduino-esp32-4-...odule.html to get a serial port.
I have tried wiring serial port between kincony and device controlled straight or crossed but not better ! (product was controlled previously without problems by a Crestron system).
Here is code used in ESPHome:

Code:
substitutions:
  friendly_name: esp-tr-02

esphome:
  name: $friendly_name
  platform: ESP32
  board: esp32dev

logger:

web_server:

ota:

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_passwd
  manual_ip:
    static_ip: 172.16.2.81
    gateway: 172.16.1.1
    subnet: 255.255.252.0
  ap:
    ssid: $friendly_name

captive_portal:

api:
  reboot_timeout: 10min
#  services:
#    - service: volume
#      variables:
#        volume: Int
#      then:
#        - uart.write: !lambda
#            return {0x00, 0x20, 0x42};

sensor:
  - platform: uptime
    name: $friendly_name Uptime
    filters:
      - lambda: return x / 60.0 /60.0;
    unit_of_measurement: hours
  - platform: wifi_signal
    name: $friendly_name WiFi Signal
    update_interval: 60s

button:
  - platform: template
    name: CD Input
    on_press:
      - uart.write: "CD\r"
  - platform: template
    name: DVD Input
    on_press:
      - uart.write: "DV\r"

uart:
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 9600
  debug:
Protocol of the device I try to control: https://cloud.domedia.net/index.php/s/g6ANGP9CLbaG7iK

Any ideas what's wrong here ?

Thanks

Vincèn

Print this item

  suggestions
Posted by: engmohades - 01-14-2023, 11:49 AM - Forum: Suggestions and feedback on KinCony's products - Replies (1)

1- Reducing the wires used to connect switches and adopting the bus system, especially switches and sensors
2- Manufacturing a small relay module for use in places far from the smart board, and it is connected to the bus system
3- Manufacture of TFT touch panels, for example

Print this item

  KC868-COLB/BS/Mini V1.14 new firmware
Posted by: admin - 01-14-2023, 04:25 AM - Forum: News - Replies (2)

improvement:
1. fixed bug that MQTT message "analog input" value 10 times larger sometimes.

.zip   AD_COLB_V1_1_14_230113.zip (Size: 41.9 KB / Downloads: 187)

Print this item

  Submit your suggestions and ideas for the product
Posted by: admin - 01-12-2023, 05:02 AM - Forum: Suggestions and feedback on KinCony's products - Replies (6)

We will record any valuable suggestions, whether for hardware products or software. We will consider your suggestions in future updates or new products. KinCony's products are not completely designed by KinCony, but are inspired by KinCony's users.

Print this item