32 channel ethernet relay module – KinCony KC868-H32

Have you already posted the code to connect to the HA on GitHub?

no, there are other source code for LAN local control.


This is Amazon link.

https://www.ebay.com/sch/wayd1585/m.html?_nkw=&_armrs=1&_ipg=&_from=

This is Ebay link

Hello! Did you have time to look at the documentation Home Assistant?

Sorry, because the virus, we all stop work these days.

I hope that you will be fine. And you will survive this situation with minimal inconvenience.

Trying to write one, passes simple tests for now

  - platform: command_line
    switches:
      ls_1:
        command_on: python3 /home/pi/apps/kincony/h.py -i 1 -t on
        command_off: python3 /home/pi/apps/kincony/h.py -i 1 -t off
        command_state: python3 /home/pi/apps/kincony/h.py -i 1 -t get
        value_template: '{{ value != "0" }}'
        friendly_name: LS 1      

h.py file here:

2 Likes

Hello! Did you manage to make full integration of KC868?

Everything works for now, but I’m still testing it

1 Like

it work
switch:

  • platform: command_line
    switches:
    light_1:
    command_on: (echo -n RELAY-SET-1,1,1; sleep .1) | nc IP PORT
    command_off: (echo -n RELAY-SET-1,1,0; sleep .1) | nc IP PORT
    command_state: (echo -n RELAY-READ-1,1; sleep .1) | nc IP PORT
    value_template: β€˜{{ β€œ1,OK” in value }}’
    friendly_name: liht_1

The main problem when you are using echo | nc solution is when I have tried to turn on 8 relays at once - only one worked. So new command cannot be called until the previous finished. If you got the same problem try my script (posted above), if you know other solution - plz tell.
Another problem I have seen: after some chain of commands I stopped working at all until I’ve called RELAY-TEST-NOW, so was thinking of calling it before every command. May be 255 will help, thank for the tip by the way.
Also RELAY-SET_ALL-... stopped working for me at all.

Video how it works. Turn all off would be much quicker with RELAY-SET_ALL- command, but it doesn’t work for me. All the rest works great for now. Soon I will give it to my electrition guy to put all the lights and stuff cables into it.

Super! and what do you have on the relay block? white round.

Can I learn more about the modes that you turn on on your smartphone? When pressed, all relay groups are triggered.

Is your KC868 connected via wifi?

  1. Xiaomi Mijia Wireless Switch
- id: '1581218522675'
  alias: test3
  description: ''
  trigger:
  - event_data:
      click_type: single
      entity_id: binary_sensor.switch_158d00023d0844
    event_type: xiaomi_aqara.click
    platform: event
  condition: []
  action:
  - entity_id: switch.ls_1
    service: switch.turn_on
- id: '1581218589606'
  alias: test4
  description: ''
  trigger:
  - event_data:
      click_type: double
      entity_id: binary_sensor.switch_158d00023d0844
    event_type: xiaomi_aqara.click
    platform: event
  condition: []
  action:
  - entity_id: switch.ls_1
    service: switch.turn_off
  1. I’ve just grouped 2-32 relays in Apple Home to test batch commands if my script handles it correctly. This is important when I ask Alexa to turn all light off
  2. I have wifi-version (KC868-H32LW)

hi,

@alanua were you able to get it to work i saw this product browsing and came up to this post i am also thinking into buying 1 as it offers buttons also out of the box

Hello! I am now resolving the issue of moving the server HA to another platform. After that, I can repeat the example of shamruk. I look forward to it.

1 Like

great :raised_hands: i am following this then please update when you have it working

TIA