Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setup K868-a32 and k868-a16s
#1
I have 2 boards installed using KS2 firmware: K868-a32 and k868-a16s

What's the best way to set them up, i would like to use home assistant and MQTT but still want light to work in case home assistant breaks.

Should i setup boards using IFTTT, and only integrate MQTT for some scene automations, remote control and reading relay states?
Reply
#2
1. use by esphome config yaml file for home assistant.
2. integrate to home assistant by mqtt.
you can use any way for home assistant integration.
Reply
#3
can i use rs485 to communicate between boards? a16s -> a32, and a32 -> a16s

a16s.yaml


PHP Code:
# RS485 Modbus Setup
uart:
  iduart_a16s
  tx_pin
GPIO33
  rx_pin
GPIO32
  baud_rate
19200
  debug
:
    directionBOTH
    dummy_receiver
false
    after
:
      timeout1s
    sequence
:
      lambdaUARTDebug::log_hex(directionbytes,' ');

modbus:
  uart_iduart_a16s
    id
modbus_a16s_client
    send_wait_time
200ms
  
uart_iduart_a16s
    id
modbus_a16s_server
    role
server

modbus_controller
:
  # Client role - to initiate communication with a32
  ida16s_client_controller
    modbus_id
modbus_a16s_client
    address
0x4 # Address of a32's server
    update_interval1s
    setup_priority
100 # Higher priority = earlier execution

  # Server role - to respond to a32's requests
  modbus_idmodbus_a16s_server
    address
0x2 # a16s's server address

switch:
  platformmodbus_controller
    modbus_controller_id
a16s_client_controller # References the controller ID defined in hardware.yaml
    name"a32_output1"
    id"a32_output1"
    address# 0:relay1 1:relay2 ... 31:relay32
    register_typecoil
    bitmask



a32.yaml

PHP Code:
uart:
  iduart_a32
    tx_pin
GPIO14
    rx_pin
GPIO16
    baud_rate
19200
    debug
:
      directionBOTH
      dummy_receiver
false
      after
:
        timeout1s
      sequence
:
        lambdaUARTDebug::log_hex(directionbytes,' ');

modbus:
  uart_iduart_a32
    id
modbus_a32_client
    send_wait_time
200ms
  
uart_iduart_a32
    id
modbus_a32_server
    role
server

modbus_controller
:
  # Client role - to initiate communication with a16s
  ida32_client_controller
    modbus_id
modbus_a32_client
    address
0x2 # Address of a16s's server
    update_interval2s
    setup_priority
50 # Lower priority = later execution

  # Server role - to respond to a16s's requests
  modbus_idmodbus_a32_server
    address
0x4 # a32's server address
switch:
  platformmodbus_controller
    modbus_controller_id
a32_client_controller # References the controller ID defined in hardware.yaml
    name"a16s_output1"
    id"a16s_output1"
    address# 0:relay1 1:relay2 ... 5:relay16
    register_typecoil
    bitmask


modbus errors

PHP Code:
[size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ff00ff][C][modbus_controller:350]:  Address: 0x04[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ff00ff][C][modbus_controller:351]:  Max Command Retries: 4[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ff00ff][C][modbus_controller:352]:  Offline Skip Updates: 0[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#00ffff][D][uart_debug:114]: >>> 04 01 00 00 00 20 3D 87[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#00ffff][D][modbus_controller:040]: Modbus command to device=4 register=0x00 no response received - removed from send queue[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#00ffff][D][uart_debug:114]: <<< 02 01 00 00 00 10 3D F5 02 01 00 00 00 10 3D F5 02 01 00 00 00 10 3D F5[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#00ffff][D][uart_debug:114]: >>> 04 01 00 00 00 20 3D 87[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:45:59][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 4E91!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:00][color=#00ffff][D][uart_debug:114]: <<< 63 3D 00 00 00 10 3D F5[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:00][color=#ffff00][W][modbus_controller:186]: Duplicate modbus command found: type=0x1 address=0 count=32[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:00][color=#00ffff][D][uart_debug:114]: >>> 04 01 00 00 00 20 3D 87 04 01 00 00 00 20 3D 87 04 01 00 00 00 20 3D 87 04 01 00 00 00 20 3D 87[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:00][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:00][color=#00ffff][D][modbus_controller:040]: Modbus command to device=4 register=0x00 no response received - removed from send queue[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:01][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:01][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color]
[/font][/size][size=1][font=SFMono-RegularConsolas'Liberation Mono'MenloCouriermonospace][12:46:01][color=#ffff00][W][modbus:125]: Modbus CRC Check failed! 90D1!=00[/color][/font][/size] 
Reply
#4
what functions you want? can you explain in details.
Reply
#5
(03-10-2025, 11:11 AM)admin Wrote: what functions you want? can you explain in details.

basically this.. input from one board to trigger output on another board, and vice versa, bidirectional communication.

a16s_input1 -> a32_output1
a32_input1 -> a16s_output1

modbus seems to only work as client-server, so no bidirectional communication
Reply
#6
i suggest you download KCS v2 firmware, use IFTTT with customize protocol will be easy.
just IF controller-A DI1 pressed THEN send customize command to controller-B by RS485 or network.
Reply
#7
(03-10-2025, 10:52 PM)admin Wrote: i suggest you download KCS v2 firmware, use IFTTT with customize protocol will be easy.
just IF controller-A DI1 pressed THEN send customize command to controller-B by RS485 or network.

will try, thank you
i did manage to use esp-now to communicate between boards, but i don't know how stable esp-now is.
Reply
#8
use wired way is more stable.
Reply
#9
(03-06-2025, 08:07 AM)mitzuuu89 Wrote: I have 2 boards installed using KS2 firmware: K868-a32 and k868-a16s

What's the best way to set them up, i would like to use home assistant and MQTT but still want light to work in case home assistant breaks.

Should i setup boards using IFTTT, and only integrate MQTT for some scene automations, remote control and reading relay states?

That's how I'm doing it, HA if available but with the Kincony boards doing as much as possible natively via IFTTT rules.  This way even if HA goes down or disconnects, basic functionality will still be present.

Note that if you want to do anything more complex than very basic stuff you either need to use an external relay to feed a digital output to another digital input to chain IFTTT rules, or wait for updated firmware that implements this change request.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)