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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 3,083
» Latest member: hadijaameria
» Forum threads: 1,828
» Forum posts: 9,608

Full Statistics

Online Users
There are currently 53 online users.
» 1 Member(s) | 34 Guest(s)
Bing, Bytespider, DataForSeoBot, Google, Semrush, Yandex, bot, engmohades

Latest Threads
kc868-a8 V1.5 flashing
Forum: "KCS" firmware system
Last Post: admin
7 hours ago
» Replies: 10
» Views: 8
Kc868-server-modbus
Forum: KC868-Server Raspberry Pi4 local server
Last Post: admin
7 hours ago
» Replies: 4
» Views: 4
KC868-HAv2 esphome issue
Forum: Development
Last Post: admin
7 hours ago
» Replies: 24
» Views: 844
H32L issue
Forum: KC868-HxB series Smart Controller
Last Post: Saif Kitany
Yesterday, 07:12 AM
» Replies: 10
» Views: 8
KC868-A16 esp32 board (A1...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
04-23-2024, 11:47 PM
» Replies: 23
» Views: 2,873
KC868-ATC V1 dont work on...
Forum: KC868-ATC / Tuya adapter V2
Last Post: admin
04-23-2024, 02:03 AM
» Replies: 12
» Views: 7
ESPHome: RF433 functions?
Forum: KC868-AG/AG Pro
Last Post: admin
04-22-2024, 12:54 PM
» Replies: 15
» Views: 12,546
Smart lighting project - ...
Forum: DIY Project
Last Post: admin
04-22-2024, 10:13 AM
» Replies: 6
» Views: 5
KCS DI/DO not working
Forum: "KCS" firmware system
Last Post: admin
04-21-2024, 10:02 PM
» Replies: 12
» Views: 185
Issue with KC868-AIO-EXTA...
Forum: KC868-AIO
Last Post: mahafree
04-21-2024, 12:50 PM
» Replies: 2
» Views: 2

  A32 Pro ESP32 io pins define
Posted by: admin - 04-12-2024, 06:17 AM - Forum: KC868-A32/A32 Pro - No Replies

#define ANALOG_A1  GPIO7
#define ANALOG_A2  GPIO6
#define ANALOG_A3  GPIO5
#define ANALOG_A4  GPIO4

IIC Bus:

SDA:GPIO11
SCL:GPIO10

XL9535:U57 (relay1-16): address:0x21
XL9535:U60 (relay17-32): address:0x22

XL9535:U58 (input1-16): address:0x24
XL9535:U61 (input17-32): address:0x25

PCF8574:U72(input33-40): address:0x23

GP8403 DAC i2c address: 0x58
SSD1306 display: address:0x3c
-----------------

1-wire:
GPIO1
GPIO2

-----------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO44
miso_pin: GPIO40
cs_pin: GPIO39
interrupt_pin: GPIO41
reset_pin: GPIO43

--------------------
RS485:
RXD:GPIO8
TXD:GPIO9

4G module:
RXD:GPIO17
TXD:GPIO18

Tuya module:
RXD:GPIO16
TXD:GPIO15
--------------------
RF 433M receiver: GPIO38

Print this item

  KinCony ATF (ESP32 SD card module) print information arduino demo code
Posted by: admin - 04-12-2024, 05:32 AM - Forum: Extender module - No Replies

Code:
#include <Arduino.h>
//SD library
#include <SD.h>
#include <FS.h>
#include <SPI.h>
//HSPI or VSPI define
//#define  hspi
#define  vspi
#ifdef vspi
SPIClass sdSPI(VSPI);
#define SD_MISO     19
#define SD_MOSI     23
#define SD_SCLK     18
#define SD_CS       5

#else
SPIClass sdSPI(HSPI);
#define SD_MISO     12
#define SD_MOSI     13
#define SD_SCLK     14
#define SD_CS       15

#endif
void SD_init();

void setup()
{
  Serial.begin(115200);
  delay(500);
#ifdef  hspi
  Serial.println("please insert SD card");
  delay(12000);
#endif
  SD_init();

}

void loop() {
  //print SD card information
  Serial.printf("SD card total size: %lluMB \n", SD.cardSize() / (1024 * 1024));
  Serial.printf("File system whole size: %lluB \n", SD.totalBytes());
  Serial.printf("File system used: %lluB \n", SD.usedBytes());
  delay(5000);
}


void SD_init() {
  //load file system
   sdSPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS);
  if (!SD.begin(SD_CS, sdSPI))
  {
    // if(!SD.begin()){
    Serial.println("load SD card error");
    return;
  }
  uint8_t cardType = SD.cardType();

  if (cardType == CARD_NONE)
  {
    Serial.println("not connected SD card");
    return;
  }
  else if (cardType == CARD_MMC)
  {
    Serial.println("MMC card");
  }
  else if (cardType == CARD_SD)
  {
    Serial.println("SDSC card");
  }
  else if (cardType == CARD_SDHC)
  {
    Serial.println("SDHC card");
  }
  else
  {
    Serial.println("unknow card");
  }
}
download:

.zip   ATF-SD-Size.zip (Size: 725 bytes / Downloads: 7)

Print this item

  KinCony ATF (ESP32 SD card module) Read/Write arduino demo code
Posted by: admin - 04-12-2024, 05:26 AM - Forum: Extender module - No Replies

Code:
/*
-----------------------------------------------
|  NodeMCU32s            |   SD Card          |
|  --------------------------------------------
|  -                     |   D02              |
|  -                     |   D01              |
|  GPIO23                |   CMD(MOSI)        |
|  GPIO19                |   D00(MISO)        |
|  GPIO18                |   CLK(SCK)         |
|  GPIO5                 |   D03(SS)          |
|  GND                   |   GND              |
|  VCC(3.3v)             |   VCC              |
-----------------------------------------------
*/
#include "FS.h"
#include "SD.h"
#include "SD_MMC.h"

void WriteFile(fs::FS &fs, const char *path, uint8_t *buf, int len)
{
  //unsigned long start_time = millis();
  Serial.printf("write [%s]...\n", path);

  File file = fs.open(path, FILE_WRITE);
  if (!file) {
    Serial.println("Failed to open file for writing");
    return;
  }
 
  if (!file.write(buf, len)) {
      Serial.println("Write failed");
      return;
    }

  file.flush();
  file.close();

  Serial.printf("Write [%s] Complete", path);
}

void ReadFile(fs::FS &fs, const char *path, uint8_t *buf, int len)
{
  Serial.printf("read [%s]...\n", path);

  File file = fs.open(path);
  if (!file) {
    Serial.println("Failed to open file for reading");
    return;
  }

  if (!file.read(buf, len)) {
      Serial.println("Read failed");
      return;
  }
 
  file.close();

  Serial.printf("Read [%s] Complete: %s", path, buf);
}

void testIO(fs::FS &fs)
{
  char buf[] = "hello world";

  WriteFile(fs, "/test.txt", (uint8_t *)buf, strlen(buf));
  ReadFile(fs, "/test.txt", (uint8_t *)buf, strlen(buf));
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);

  Serial.println("please insert SD card");
  delay(8000);

  /* SD SPI Mode at VSPI */
  SPIClass spi = SPIClass(HSPI);
  spi.begin(18 /* SCK */, 19 /* MISO */, 23 /* MOSI */, 5 /* SS */);
  if (!SD.begin(5 /* SS */, spi, 80000000)) {
    Serial.println("Card Mount Failed");
    return;
  }
  testIO(SD);
  SD_MMC.end(); // cancel load SD card
}
void loop() {
}
source code download:

.zip   ATF-READ-WRITE.zip (Size: 909 bytes / Downloads: 10)

Print this item

  KinCony ATF (ESP32 SD card module) ESPHome yaml for home assistant
Posted by: admin - 04-12-2024, 05:23 AM - Forum: Extender module - No Replies

   
download yaml:

.txt   ATF-HA.txt (Size: 2.08 KB / Downloads: 10)

Code:
esphome:
  name: atf
  friendly_name: atf

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "w7SHSfiO/jo57FMsWHzLoexB93cf1YmRH7YUVvJuVQ4="

ota:
  password: "122b54ecaa3db2cc9455e008d112a4b6"

wifi:
  ssid: "KinCony"
  password: "a12345678"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Atf Fallback Hotspot"
    password: "dPQX1XykXHPe"

captive_portal:

binary_sensor:
  - platform: gpio
    name: "21"
    pin:
      number: 21
      inverted: true
  - platform: gpio
    name: "22"
    pin:
      number: 22
      inverted: true
  - platform: gpio
    name: "14"
    pin:
      number: 14
      inverted: true
  - platform: gpio
    name: "27"
    pin:
      number: 27
      inverted: true
  - platform: gpio
    name: "13"
    pin:
      number: 13
      inverted: true
  - platform: gpio
    name: "15"
    pin:
      number: 15
      inverted: true
  - platform: gpio
    name: "16"
    pin:
      number: 16
      inverted: true
  - platform: gpio
    name: "4"
    pin:
      number: 4
      inverted: true
  - platform: gpio
    name: "36"
    pin:
      number: 36
      inverted: true
  - platform: gpio
    name: "37"
    pin:
      number: 37
      inverted: true
  - platform: gpio
    name: "38"
    pin:
      number: 38
      inverted: true
  - platform: gpio
    name: "39"
    pin:
      number: 39
      inverted: true
  - platform: gpio
    name: "34"
    pin:
      number: 34
      inverted: true
  - platform: gpio
    name: "35"
    pin:
      number: 35
      inverted: true
  - platform: gpio
    name: "TMP1"
    pin:
      number: 26
      inverted: true
  - platform: gpio
    name: "TMP2"
    pin:
      number: 25
      inverted: true
  - platform: gpio
    name: "32"
    pin:
      number: 32
      inverted: true
  - platform: gpio
    name: "33"
    pin:
      number: 33
      inverted: true
web_server:
  port: 80

Print this item

  KinCony ATF (ESP32 SD card module) pin defines
Posted by: admin - 04-12-2024, 05:21 AM - Forum: Extender module - No Replies

SD Card:

MISO:io19
MOSI:io23
SCLK:io18
CS:io5

--------------
extend serial port:
TXD:io33
RXD:io32

--------------

free GPIOs:
io4
io16
io15
io13
io27
io14
io22
io21
-----------------
only for ADC:
io35
io34
io39
io38
io37
io36
-----------------
1-wire:
TMP1:io26
TMP2:io25

Print this item

  KC868-H32B and Smart Power distribution panel
Posted by: fdcemb5 - 04-11-2024, 07:45 PM - Forum: KC868-HxB series Smart Controller - Replies (1)

We have noticed that KC868-H32B and Smart Power Distribution Panel do not show the IP addresses when scanned with  Kincony Scanner. We have tried several routers, and the results are the same. When you connect only one to the router, the IP address will appear.

The question is, since both cannot be connected at the same time to the same router, how do can we integrate them together.

Print this item

  M30 Pulse Input
Posted by: brononius - 04-11-2024, 03:10 PM - Forum: KC868-A16S - Replies (1)

I'm migrating from Flukso  towards Kincony M30. I'm new to ESP Home, so for the moment learning how it all works.

For the moment, already 26 CT clamps running nicely. So far, so good. Wink

On my Flukso, I had a water probe (0,5L per pulse) and a gas probe (10L / pulse). To simplify things, I want to use these probes as well to the M30.

  1. Can I just connect these probes to a port on the M30? Similar to the CT clamps?

  2. And if yes, does anybody have an example for the config? 

Print this item

  Lights are not turned on if the dimmer is off button is pressed shortly
Posted by: iwzr - 04-10-2024, 01:19 PM - Forum: Development - Replies (1)

Hi,
It seems I am too stupid to use the dimmer KC868-D8 with the firmware version 4.37

Flashing and so one was successful and now I started to test the dimmer keys.

I made the settings:
- Switcher Workmode: 1 Key
- Remember Last State: No (based on your last reply)

Connected K1+ with KCOM as a test:
[Image: dimmer-connect.png]

Behavior:
1. Long Press on the button => Normal behaviour the dimmer goes up and down as described ✅
2. If the light is on, then "short press" on the button => Normal behavior the dimmer value goes down to 0 ✅
3. If the light is off, then "short press" on the button => Faulty behavior the dimmer value does not change at all! ❌

My expectation is the same as in the video https://youtu.be/MdCBQl_y4f8?si=68JOT1UzzXkuaNfm&t=605
which means: "short press" when the lights are off should result in setting the dimmer to 99.

Anyone else with this problem?

Print this item

  H32L issue
Posted by: Saif Kitany - 04-10-2024, 12:14 PM - Forum: KC868-HxB series Smart Controller - Replies (10)

I have a kc868-H32L controller.
I programmed it to be in a motor mood.

When i turn on relay(1 or 2 or 3…..or 32) by button switch module, relay (1 or 2 or 3…..or 32)will be on for 1 minute, and after that will turn off automatically.

If (for example) i turn on relay1, then i turn on relay2, so relay1 will be OFF (because control is in motor mood)

Now, if i do all the above by kincony smart home app, I don’t get same results. Which means: 

➡️ if i turn on relay1, then relay1 will be on forever, and don’t turn off after 1 minute automatically.
And if i turn on relay1, and then turn on relay2, the relay1 will not turn off and it stays turned on.

Why is that❓
Is there any solution ❓

Print this item

  KC868 AI
Posted by: fdcemb5 - 04-10-2024, 06:11 AM - Forum: KC868-A series and Uair Smart Controller - Replies (9)

I need step by step how to use KC868 AI with home Assistant. Especially when connected to 12V direct supply, can we still connect to the computer? I need more information in order not top damage the board

Print this item