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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,982
» Latest member: kamermcw
» Forum threads: 2,428
» Forum posts: 12,557

Full Statistics

Online Users
There are currently 43 online users.
» 1 Member(s) | 27 Guest(s)
Amazonbot, Bytespider, Crawl, Google, PetalBot, Yandex, bot, owler, xxpeta

Latest Threads
Help whit update Cold CPU...
Forum: KC868-HxB series Smart Controller
Last Post: itzek
4 hours ago
» Replies: 0
» Views: 2
DI8
Forum: Development
Last Post: Vaughan2024
Yesterday, 10:24 PM
» Replies: 0
» Views: 11
Clarification on CT Clamp...
Forum: KC868-M16 / M1 / MB / M30
Last Post: ironbill
Yesterday, 09:27 PM
» Replies: 0
» Views: 10
AS ESPHome yaml for home ...
Forum: KinCony AS
Last Post: admin
Yesterday, 12:29 PM
» Replies: 4
» Views: 271
KCS firmware - MQTT LWT?
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 12:02 PM
» Replies: 34
» Views: 3,308
H32W Firmware
Forum: KC868-HxB series Smart Controller
Last Post: admin
Yesterday, 10:32 AM
» Replies: 5
» Views: 1,607
"KCS" v3.0.2 firmware for...
Forum: "KCS" firmware system
Last Post: admin
Yesterday, 12:00 AM
» Replies: 0
» Views: 35
What makes the ESP32 chip...
Forum: KC868-A series and Uair Smart Controller
Last Post: alice_amira
11-08-2024, 04:38 PM
» Replies: 0
» Views: 4
Sms relays control
Forum: KC868-A8S
Last Post: Michele
11-08-2024, 11:41 AM
» Replies: 6
» Views: 25
new home automation
Forum: DIY Project
Last Post: admin
11-08-2024, 10:33 AM
» Replies: 1
» Views: 15

  RS232 FEMALE cable +KC868-AK
Posted by: KinCony Support - 07-20-2023, 01:43 AM - Forum: Schematic and diagram - No Replies

   

Print this item

  KC868-A8-E
Posted by: avihay - 07-19-2023, 12:55 PM - Forum: "KCS" firmware system - Replies (19)

I was able to create a recording of the remote for the generator, it records the ignition frequency and that when I send a test it does not turn on the generator, is there a possibility that I end an on or off that will send the code several times in a row? And in the background of the recording?



Attached Files
.txt   karavan.txt (Size: 11.43 KB / Downloads: 211)
Print this item

  Custom Control Box
Posted by: LTDU - 07-19-2023, 09:52 AM - Forum: DIY Project - Replies (3)

Dear team,

do you also do custom control boxes? In my case I‘d need a KC868-a64, about 8 holes for lamps/switches and a LCD display.

Let me know if you do custom configurations, so I can support more details. This is for a prototype that might become series.

Print this item

  [Arduino source code for KC868-M16v2]-05 simple usage detect AC voltage
Posted by: admin - 07-18-2023, 01:39 PM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Code:
/**
* This program shows you how to use the basics of this library.
*/

#include <ZMPT101B.h>

//#define SENSITIVITY 500.0f
#define SENSITIVITY 507.25f

// ZMPT101B sensor output connected to analog pin A0
// and the voltage source frequency is 50 Hz.
ZMPT101B voltageSensor(34, 50.0);

void setup() {
  Serial.begin(115200);
  // Change the sensitivity value based on value you got from the calibrate
  // example.
  voltageSensor.setSensitivity(SENSITIVITY);
}

void loop() {
  // read the voltage and then print via Serial.
  float voltage = voltageSensor.getRmsVoltage();
  Serial.println(voltage);

  delay(1000);
}
before use code, install zmpt101b arduino library firstly.
[Image: attachment.php?aid=2665]

Print this item

  [Arduino source code for KC868-M16v2]-04 calibrate AC voltage
Posted by: admin - 07-18-2023, 01:37 PM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Code:
/**
* This program shows how we can get (estimate) the right sensitivity value for
* the sensor.
*
* This program will swipe from the lowest sensitivity estimate value to the
* highest. The program will stop if the voltage reading result from the sensor
* is within the specified tolerance limit or the sensitivity value has exceeded
* the highest predetermined value (which in this case is considered failed to
* be determined).
*/

#include <ZMPT101B.h>

#define ACTUAL_VOLTAGE 220.0f // Change this based on actual voltage

#define START_VALUE 0.0f
#define STOP_VALUE 1000.0f
#define STEP_VALUE 0.25f
#define TOLLERANCE 1.0f

#define MAX_TOLLERANCE_VOLTAGE (ACTUAL_VOLTAGE + TOLLERANCE)
#define MIN_TOLLERANCE_VOLTAGE (ACTUAL_VOLTAGE - TOLLERANCE)

// ZMPT101B sensor output connected to analog pin A0
// and the voltage source frequency is 50 Hz.
ZMPT101B voltageSensor(34, 50.0);

void setup() {
  Serial.begin(115200);
  Serial.print("The Actual Voltage: ");
  Serial.println(ACTUAL_VOLTAGE);

  float senstivityValue = START_VALUE;
  voltageSensor.setSensitivity(senstivityValue);
  float voltageNow = voltageSensor.getRmsVoltage();

  Serial.println("Start calculate");

  while (voltageNow > MAX_TOLLERANCE_VOLTAGE || voltageNow < MIN_TOLLERANCE_VOLTAGE) {
    if (senstivityValue < STOP_VALUE) {
      senstivityValue += STEP_VALUE;
      voltageSensor.setSensitivity(senstivityValue);
      voltageNow = voltageSensor.getRmsVoltage();
      Serial.print(senstivityValue);
      Serial.print(" => ");
      Serial.println(voltageNow);
    } else {
      Serial.println("Unfortunately the sensitivity value cannot be determined");
      return;
    }
  }

  Serial.print("Closest voltage within tolerance: ");
  Serial.println(voltageNow);
  Serial.print("Sensitivity Value: ");
  Serial.println(senstivityValue, 10);
}

void loop() {}
before use code, install zmpt101b arduino library firstly.
   

Print this item

  KC868-M16v2 configure yaml for ESPhome
Posted by: admin - 07-18-2023, 01:33 PM - Forum: KC868-M16 / M1 / MB / M30 - Replies (24)

   
   
before you config ymal file, please upload zmpt101b folder to home assistant disk:
   
unzip files, 3 files upload to disk folder as image.

.zip   zmpt101b.zip (Size: 1.83 KB / Downloads: 587)



.txt   KC868-M16v2-ESPHome.txt (Size: 9.55 KB / Downloads: 512)
esphome:
  name: m16
  includes:
    - zmpt101b/ZMPT101B.h
    - zmpt101b/ZMPT101B.cpp
    - zmpt101b/zmpt101b_custom_sensor.h

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "D69bY/GXlmjYkovak6WIhgmbOH8vwyqvMxIHBriYoaY="


# Example configuration entry
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0

i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a

cd74hc4067:
  - id: cd74hc4067_1
    pin_s0: 32
    pin_s1: 33
    pin_s2: 13
    pin_s3: 16

web_server:
  port: 80

font:

  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "T: %.1f°C", id(temperature).state);
      it.printf(0, 20, id(roboto), "H: %.1f%%", id(humidity).state);
      it.printf(0, 40, id(roboto), "AC:%.1fV", id(voltage_2).state);

# Example configuration entry
sensor:
  - platform: custom
    lambda: |-
      auto my_sensor34 = new ZMPT101BSensor(34);
      auto my_sensor36 = new ZMPT101BSensor(36);
      auto my_sensor39 = new ZMPT101BSensor(39);
      App.register_component(my_sensor34);
      App.register_component(my_sensor36);
      App.register_component(my_sensor39);
      return {my_sensor34, my_sensor36, my_sensor39};
    sensors:
      - name: "m16--AI zmpt 34"
        id: voltage_1
        unit_of_measurement: V
        accuracy_decimals: 1
        state_class: "measurement"
      - name: "m16--AI zmpt 36"
        id: voltage_2
        unit_of_measurement: V
        accuracy_decimals: 1
        state_class: "measurement"
      - name: "m16--AI zmpt 39"
        id: voltage_3
        unit_of_measurement: V
        accuracy_decimals: 1
        state_class: "measurement"

  - platform: sht3xd
    temperature:
      name: "sht Temperature"
      id: temperature
    humidity:
      name: "sht Humidity"
      id: humidity
    address: 0x44
    update_interval: 5s

  - platform: adc
    pin: 35
    id: adc35
    update_interval: never
    attenuation: 11db

  # - platform: adc
  #  name: "m16--AI-1"
  #  pin: 36
  #  id: adc36
  #  update_interval: 60s
  #  attenuation: 11db

  # - platform: adc
  #  pin: 34
  #  name: "m16--AI-2"
  #  id: adc34
  #  update_interval: 60s
  #  attenuation: 11db

  # - platform: adc
  #  pin: 39
  #  name: "m16--AI-3"
  #  id: adc39
  #  update_interval: 60s
  #  attenuation: 11db




  - platform: cd74hc4067
    id: ai1
    number: 0
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai2
    number: 1
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai3
    number: 2
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai4
    number: 3
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai5
    number: 4
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai6
    number: 5
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai7
    number: 6
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai8
    number: 7
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai9
    number: 8
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai10
    number: 9
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai11
    number: 10
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai12
    number: 11
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai13
    number: 12
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai14
    number: 13
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai15
    number: 14
    sensor: adc35
    update_interval: 60s

  - platform: cd74hc4067
    id: ai16
    number: 15
    sensor: adc35
    update_interval: 60s


  - platform: ct_clamp
    sensor: ai1
    id: Measured_Current_1
    name: "Measured Current-1"
    update_interval: 5s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0.0034 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: template
    id: power1
    name: "power1"
    lambda: return id(Measured_Current_1).state * id(voltage_1).state;
    device_class: power
    unit_of_measurement: 'W'
    update_interval: 60s

  - platform: total_daily_energy
    name: "Total Daily Energy1"
    power_id: power1
    filters:
        - multiply: 0.001
    unit_of_measurement: kWh
    accuracy_decimals: 3
    icon: mdi:clock-alert
    device_class: energy


  - platform: ct_clamp
    sensor: ai2
    name: "Measured Current-2"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai3
    name: "Measured Current-3"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai4
    name: "Measured Current-4"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai5
    name: "Measured Current-5"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai6
    name: "Measured Current-6"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai7
    name: "Measured Current-7"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai8
    name: "Measured Current-8"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai9
    name: "Measured Current-9"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai10
    name: "Measured Current-10"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai11
    name: "Measured Current-11"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai12
    name: "Measured Current-12"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai13
    name: "Measured Current-13"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai14
    name: "Measured Current-14"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai15
    name: "Measured Current-15"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

  - platform: ct_clamp
    sensor: ai16
    name: "Measured Current-16"
    update_interval: 60s
    filters:
      - calibrate_linear:
          # Measured value of 0 maps to 0A
          - 0 -> 0
          # Known load: 4.0A
          # Value shown in logs: 0.1333A
          - 0.31749 -> 8.95608

time:
  - platform: sntp
    id: my_time

Print this item

  KC868-M16v2 ESP32 I/O pin define
Posted by: admin - 07-18-2023, 01:28 PM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

IIC BUS:
SDA:4
SCL:5

SD card:
MISO: 2
MOSI: 15
SCK: 14

AC voltage-detect-1: 34
AC voltage-detect-2: 39
AC voltage-detect-3: 36

analog input1 (for 74HC4067) 35
GPIO35 use for 74HC4067 extend 16 channel analog input

74HC4067:
S0:32
S1:33
S2:13
S3:16

SHT30 temperature sensor i2c address: 0x44

SSD1306 i2c address: 0x3C

Print this item

  KC868-A16 LCD issue
Posted by: dany_l2003 - 07-17-2023, 06:30 PM - Forum: KC868-A16 - Replies (8)

Hi, i just bought KS868-A16 Rev1.6 and i have problems connecting a serial LCD.

Port connected P19
LCD-serial controller PC8574T
LCD model 20x4

Testet whith 3,3V also whith 5V
Scan whith Arduino i2c scanner no results.

LCD tested on Arduino Uno is ok.
KC868-A16 tested whith a simplet test IO ok.
Try whith simple Arduino examples i2c LCD
Try wired the LCD examples SCL/SDA to IO 4/5
Any help please?

Print this item

  KC868-A6 Hardware function diagram
Posted by: KinCony Support - 07-17-2023, 04:56 AM - Forum: KC868-A6 - No Replies

   

Print this item

  868-A4 pins for SPI
Posted by: bria_s - 07-16-2023, 07:56 AM - Forum: KC868-A4 - Replies (1)

Hello

is it possible to configure the 433mhz pins for SPI?

Print this item