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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,361
» Latest member: jesus
» Forum threads: 3,647
» Forum posts: 18,837

Full Statistics

Online Users
There are currently 15 online users.
» 0 Member(s) | 7 Guest(s)
AhrefsBot, Amazonbot, bot

Latest Threads
T16M not responding on US...
Forum: T16M
Last Post: robarends
4 hours ago
» Replies: 0
» Views: 1
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: cmeyer5
4 hours ago
» Replies: 134
» Views: 25,666
Wiegand and GPIO on T16M
Forum: T16M
Last Post: robarends
4 hours ago
» Replies: 2
» Views: 7
N30 Energy entry not work...
Forum: N30
Last Post: admin
7 hours ago
» Replies: 18
» Views: 214
KC868-COLB Network Connec...
Forum: Development
Last Post: admin
8 hours ago
» Replies: 5
» Views: 41
Board output not respondi...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
8 hours ago
» Replies: 3
» Views: 14
T16M ESPHome and EPROM
Forum: T16M
Last Post: admin
Today, 12:24 AM
» Replies: 1
» Views: 7
"SmartLife" wifi transmit
Forum: TA
Last Post: admin
Yesterday, 11:19 AM
» Replies: 3
» Views: 15
sample code to receive ht...
Forum: F16
Last Post: admin
01-02-2026, 09:57 AM
» Replies: 12
» Views: 88
Goes Offline
Forum: KC868-E16S/E16P
Last Post: admin
01-02-2026, 01:19 AM
» Replies: 5
» Views: 47

  KC868-A16v3 ESPHome yaml for home assistant
Posted by: admin - 02-15-2025, 03:01 AM - Forum: KC868-A16v3 - Replies (10)

Code:
esphome:
  name: a16v3
  friendly_name: a16v3
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG

api:

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO15
  interrupt_pin: GPIO2
  reset_pin: GPIO1

i2c:
   - id: bus_a
     sda: 9
     scl: 10
     scan: true
     frequency: 400kHz

# Example configuration entry
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

uart:
  - id: uart_1
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 16
    rx_pin: 17



switch:

  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "a16v3_output1"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output2"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output3"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output4"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output5"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output6"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output7"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output8"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output9"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output10"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output11"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output12"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 3
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output13"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output14"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output15"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16v3_output16"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true


binary_sensor:

  - platform: gpio
    name: "a16v3_input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input7"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input8"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input9"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input10"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input11"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input12"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input13"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input14"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input15"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16v3_input16"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "A16v3 IO47"
    pin:
      number: 47
      inverted: true

  - platform: gpio
    name: "A16v3 IO48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "A16v3 IO38"
    pin:
      number: 38
      inverted: true

  - platform: gpio
    name: "A16v3 IO39"
    pin:
      number: 39
      inverted: true

  - platform: gpio
    name: "A16v3 IO40"
    pin:
      number: 40
      inverted: true

  - platform: gpio
    name: "A16v3 IO41"
    pin:
      number: 41
      inverted: true

  - platform: gpio
    name: "A16v3 DW"
    pin:
      number: 0
      inverted: true

sensor:
  - platform: adc
    pin: 4
    name: "A16v3 A1 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 6
    name: "A16v3 A2 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      # - multiply: 1.51515
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 7
    name: "A16v3 A3 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666
  - platform: adc
    pin: 5
    name: "A16v3 A4 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666

web_server:
  port: 80

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

# display:
#   - platform: ssd1306_i2c
#     i2c_id: bus_a
#     model: "SSD1306 128x64"
#     address: 0x3C
#     lambda: |-
#       it.printf(0, 0, id(roboto), "A16v3");
download yaml file: 
.txt   A16v3-ESPHome.txt (Size: 7.81 KB / Downloads: 874)

Print this item

  KC868-A16v3 ESP32-S3 IO pins define
Posted by: admin - 02-15-2025, 03:00 AM - Forum: KC868-A16v3 - Replies (14)

ANALOG_A1  4
ANALOG_A2  6
ANALOG_A3  7
ANALOG_A4  5

IIC Bus:

SDA:GPIO9
SCL:GPIO10

Relay_IIC_address 0x24
Relay_IIC_address 0x25

Input_IIC_address 0x21
Input_IIC_address 0x22

24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c

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

1-wire (pull-up resistance on PCB):
1-wire1:GPIO47
1-wire2:GPIO48
1-wire3:GPIO38

free GPIOs (without pull-up resistance on PCB):
free gpio-1:GPIO39
free gpio-2:GPIO40
free gpio-3:GPIO41
-----------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO43
miso_pin: GPIO44
cs_pin: GPIO15

interrupt_pin: GPIO2
reset_pin: GPIO1

--------------------
RS485:
RXD:GPIO17
TXD:GPIO16

--------------------
SD Card:
SPI-MOSI:GPIO12
SPI-SCK:GPIO13
SPI-MISO:GPIO14
SPI-CS:GPIO11
SD-CD:GPIO21

--------------------
RF433MHz wireless receiver: GPIO8
RF433MHz wireless sender: GPIO18

free gpio on PCB (beside ESP32-S3 module)
GPIO39
GPIO40
GPIO41

Print this item

  Page kincony problem
Posted by: balcerseb - 02-14-2025, 03:34 PM - Forum: KC868-A16 - Replies (1)

Gentlemen in the manual for the KC868 A16 after logging into the software the input web page in the manual looks like this (see first picture) and I am missing the ON, OFF TOGLLE table how to fix this anyone has an idea because you can't set the control

   
   

Print this item

  KCS v3 for AG8 IR protocol
Posted by: admin - 02-14-2025, 05:27 AM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (17)

UDP Server / TCP Server / Loxone / RS232:

Learn IR (MAX support 192 IR signals):

send:  RELAY-IR-LEARN-255,1,2    // begin learn IR signal ID=1, send by IR tube-2
receive: RELAY-IR-LEARN-255,1,OK  // success
receive: RELAY-IR-LEARN-255,1,TIMEOUT  // timeout

send: RELAY-IR-LEARN-255,200  // if send IR exceeding the maximum IR ID(MAX=192)
receive: RELAY-IR-LEARN-255,200,ERROR  // error

Send IR:

send: RELAY-IR-RUN-255,1  // send IR signal ID=1
receive: RELAY-IR-RUN-255,1,OK

Delete IR:

send: RELAY-IR-DEL-255,1  // delete learned IR signal ID=1
receive: RELAY-IR-DEL-255,1,OK
---------------------------------------------------------------
UDP Client / TCP Client / Loxone / RS232:

IR triggered and auto feedback: (ONLY use for NEC and RC5 IR code)

RELAY-GET_IR-255,1,1,OK  // trigger
RELAY-GET_IR-255,1,0,OK  // not trigger

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

MQTT:

Learn IR:  // begin learn IR signal ID=1, send by IR tube-2
payload:
{
  "learn_ir": {
    "value": 1,
    "tx_channel": 2
  }
}

Delete IR:  // delete learned IR signal ID=1

payload:
{
  "run_ir": {
    "value": 1
  }
}

IR triggered and auto feedback:  // trigger when value=1  (ONLY use for NEC and RC5 IR code)

payload:

// trigger begin
{
  "ir1": {
    "value": 1
  }
}

// trigger end
{
  "ir1": {
    "value": 0
  }
}
   
   
   
---------------------------------------------------------------
RS485 Modbus

// 01: Address 
// 08: Function code - Learn IR
// 00 05: Register address, 05 means ID=6 because ID begin with 0
// 00 04: Send IR tube, values range from 1-8. 04 means the 4th channel 
// F1 C9: CRC 
[Tx] 01 08 00 05 00 04 F1 C9 

// 01: Address 
// 08: Function code - Learn IR
// 02: Data length 
// 00 05: Data value, corresponding to the register address when transmitting 
// 7A 63: CRC 
[Rx] 01 08 02 00 05 7A 63 

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

// 01: Address 
// 07: Function code - Send IR
// 00 02: Register address, send IR at index 2, which ID=3 
// 00 01: Register count, fixed value 1, only one infrared can be controlled at a time 
// D4 0A: CRC 
[Tx] 01 07 00 02 00 01 D4 0A 

// 01: Address 
// 07: Function code - Send IR
// 02: Data length 
// 00 02: Data value, corresponding to the register address when transmitting 
// 38 B5: CRC 
[Rx] 01 07 02 00 02 38 B5 

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

// 01: Address 
// 09: Function code - Delete IR
// 00 07: Register address, 07 means ID=8 
// 00 01: Register count, fixed value 1, only one infrared can be deleted at a time 
// AD CA: CRC 
[Tx][11:32:00.669] 01 09 00 07 00 01 AD CA 

// 01: Address 
// 09: Function code - Delete IR
// 02: Data length 
// 00 07: Data value, corresponding to the register address when transmitting 
// FA 5E: CRC 
[Rx][11:32:01.959] 01 09 02 00 07 FA 5E 

   
   
   

Print this item

  KC 868 Server
Posted by: ezra@riverviewwoodproducts.com - 02-13-2025, 06:02 PM - Forum: News - Replies (1)

Hello,

 KC 868 Server running Home Assistant. 
 
 
>Can Anyone help me figure out what I need to do so that my Analog sensors update by themselves on my home assistant dashboard Gauge Card.
 
 
 
>It updates only when I turn on an off a output signal. But I want it to just update the sensor by itself every 5 seconds or so. I have a 4-20 ma water level sensor connected to it.

can this be done by a way of pining the server somehow? i haven't had luck with that either.

Print this item

  RS485 on ESPhome
Posted by: HA_user - 02-12-2025, 05:14 PM - Forum: KC868-A16 - Replies (2)

Hello, 
I have been trying to start modbus communication between KinCony A16 and Eastron SDM630 via rs485 using espHome for some time, according to the documentation the registers are identical to KinCony Energy Meter RS485 Modbus RTU Monitor
Log shows me: [17:53:08][D][modbus_controller:040]: Modbus command to device=1 register=0x64 no response received - removed from send queue
I would like to ask if I have something wrong in the .yaml file?

esphome:
  name: md01-kc868-a16-gar
  friendly_name: md01-kc868-a16-GAR
esp32:
  board: esp32dev
  framework:
    type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
  encryption:
    key: "************************************"
###################################
ota:
  - platform: esphome
    password: "*********************************"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
# Optional manual IP
  manual_ip:
    static_ip: 192.168.88.21
    gateway: 192.168.88.1
    subnet: 255.255.255.0 
     
####################################
uart:
  id: mod_bus
  tx_pin: 13
  rx_pin: 16
  baud_rate: 9600
  stop_bits: 1
  parity: EVEN
modbus:
  id: modbus1
  uart_id: mod_bus
modbus_controller:
  - id: a24
    address: 0x01
    modbus_id: modbus1
    setup_priority: -10
    update_interval: 5s 
####################################
sensor:
  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Voltage"
    id: modbus_voltage
    register_type: holding
    address: 0x64
    unit_of_measurement: "V"
    value_type: FP32
    accuracy_decimals: 2

Print this item

  Recording of energy usage data on M30 to MicroSD
Posted by: sc00bs - 02-12-2025, 06:15 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (5)

Hi Everyone

Thank you to Kincony for the great product, I have a few questions, if anyone can help me please? :-) 

Any suggestions as to what is the best way to set up the M30 for recording usage data to the microsd as a standalone unit? 
There will be no internet access for the unit while it is monitoring the energy usage and I would like to be able to record the usage with time stamps and be able to review it once the installation is complete. 
I have various sizes of CT Clamps (30,60 & 100A) so need to be able to specify the size of the clamp installed per port and would also like a WebUi to check that everything is working and set times etc if necessary. 

I have been investigating using ESPHome but assume that I could use Arduino IDE as well to do this, what would you recommend and do you have any sample code I could use?

I have been struggling to work out the pinouts for the Microsd card, can you tell me if these are the correct pinouts? 

sd_card:
  cs_pin: GPIO5  # Adjust CS pin based on your hardware
  spi_id: sd_spi
  spi:
    clk_pin: GPIO18
    mosi_pin: GPIO23
    miso_pin: GPIO19

I have attached a copy of the ESPZHome YAML code I have been working on. 
All suggestions welcome.



Attached Files
.zip   M30 ESPHome Firmware with saving to MicroSD.zip (Size: 3.19 KB / Downloads: 355)
Print this item

  Smart Home Setup KC868-E16V2 + KC868-A64 + KC868-AP
Posted by: korvin - 02-11-2025, 10:34 PM - Forum: KC868-A64 - Replies (5)

Hi all.

I'm designing my Smart Home setup and want your suggestion if my idea is the most optimal one.

Few words about what I want to achieve. I have 3-phases 15kWt power supply in my home. I want to build everything around Home Assistant, use Ethernet and Zigbee for connection. I don't mind using ESPHome, Tamosha with Home Assistant. 

I need to automate 23 light switches (please note I use retro-style mechanical switches like this one https://vi.aliexpress.com/item/1005005429652367.html, not the impulse-one!), a few curtains, a fan, 9 LED strips 22 meters in total length, floor heating system (8 zones), a few water valves (up to 5). It would be great to have power monitoring for the entire home and for individual power-hungry devices.

So I chose the following smart devices:
1. One 64-channel controller module https://www.aliexpress.com/item/1005004281348902.html
2. Three 15-channel relay modules (https://www.aliexpress.com/item/1005005068332790.html) - one for floor heating and two for light switches and everything else
3. One 150W 12V power supply module to power all these smart devices https://www.aliexpress.com/item/1005002955358360.html
4. Dimmer https://www.aliexpress.com/item/1005005107986808.html to which I want to connect LED directly without drivers - all my LEDs are single-color, so 16 channels should be enough
5. Power meters like this one: https://www.aliexpress.com/item/1005005798935600.html. One 3phase for the entire home and a couple of 1phase for individual devices.

I chose a separate relay and controller modules because they allow changing individual relays if needed.

So are these devices the best for my task?
In the dimmer powerful enough to handle all those LEDs?
Do you have some combined relay+controller modules that allow changing individual relays, NO+NC connections and power monitoring?
Any other suggestions? 

Thank you in advance

Print this item

  I2C connector type/part number
Posted by: cibula - 02-11-2025, 08:55 PM - Forum: KC868-A16 - Replies (2)

Hello,

Can someone please provide part number of the connector that is assembled for I2C extensions on A16 boards, the white 4 pin one in the middle?
It looks like it might be 2.54mm pitch.
Need it for a cable but was not able to find one online that looks like it would fit.

Thank you!

Print this item

  How to measure current using Analog Inputs on KC868-A16?
Posted by: Brouk - 02-11-2025, 06:34 PM - Forum: KC868-A16 - Replies (3)

dear admin,
I need to measure current on one phase (230V AC). I would like to use Analog Inputs on the A16 module for this (there are 4 inputs in total). I bought a CT clamp "SCT-013 5A=1V". I tested it and at 5A on the measured phase it has 1V AC at the output.
   
Can you advise me how to connect it correctly and how to configure it in ESPHome (in Home Assistant)? Now I have the inputs configured like this...

Code:
sensor:
  - platform: adc
    pin: 36
    name: "analogInput1"
    update_interval: 10s
    attenuation: 12db

  - platform: adc
    pin: 34
    name: "analogInput2"
    update_interval: 10s
    attenuation: 12db

  - platform: adc
    pin: 35
    name: "analogInput3"
    update_interval: 10s
    attenuation: 12db

  - platform: adc
    pin: 39
    name: "analogInput4"
    update_interval: 10s
    attenuation: 12db

...but the values are 0.14V, which is nonsense:

   

Thanks in advance

Print this item