Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-HA RS485 INPUT & OUTPUT plugin for ESPHome
#21
(12-18-2023, 12:23 AM)admin Wrote: use mulit meter test HAv2 OUTPUT1-6 when voltage will change if your turn ON/OFF on home assistant.

Measuring from the outputs to GND, it shows +3.8v and this does not change if i turn the switch on of off in Home Assistant.
Reply
#22
when you setup complete in PC config tool.
Do you have click the "ApplyTo" button and "SaveFlash" button? Must need press these two buttons.
Reply
#23
(12-18-2023, 10:45 PM)admin Wrote: when you setup complete in PC config tool.
Do you have click the "ApplyTo" button and "SaveFlash" button? Must need press these two buttons.

Yes, I pressed "ApplyTo" and then "SaveFlash". See the screenshot of the config i just saved again.
   
Reply
#24
can you post the newest yaml with latest KC868-HA component (v3.0.0).
Reply
#25
(12-18-2023, 11:09 PM)admin Wrote: can you post the newest yaml with latest KC868-HA component (v3.0.0).

esphome:
  name: dingtian-4ch
  friendly_name: dingtian-4ch

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: "XXX"

ota:
  password: "XXX"

status_led:
  pin:
    number: GPIO15
    inverted: true

uart:
  id: myuart1
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 9600

ethernet:
  type: JL1101
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  phy_addr: 0
  clk_mode: GPIO17_OUT
  # The PHY chip has a pin labeled TX_EN that goes to GPIO 21 on ESP
  # and the RSTn pin on the phy goes to GPIO0
  ##
  # Datasheet indicates the RSTn should be LOW to disable the phy and default is high
  power_pin: GPIO0

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-kc868-ha
      ref: main

kc868_ha:

binary_sensor:
  - platform: kc868_ha
    target_relay_controller_addr: 1 # Default value is 1, corresponds to the Target Relay Controller Addr parameter in HA485_Ctrl software
    switch_adapter_addr: 10 # Default value is 10, corresponds to the Switch Adapter Addr parameter in HA485_Ctrl software
    bind_output: 1 # Corresponds to the BindOutput parameter in HA485_Ctrl software
    name: "binary_sensor 1"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 2
    name: "binary_sensor 2"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 3
    name: "binary_sensor 3"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 4
    name: "binary_sensor 4"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 5
    name: "binary_sensor 5"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 6
    name: "binary_sensor 6"

switch:
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 1
    name: "switch 1"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 2
    name: "switch 2"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 3
    name: "switch 3"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 4
    name: "switch 4"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 5
    name: "switch 5"
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 6
    name: "switch 6"
Reply
#26
external_components:
- source:
type: git
url: https://github.com/hzkincony/esphome-kc868-ha
ref: v3.0.0

use "v3.0.0" , you have use "main". change it.
i don't know which esp32 board model you are using? i can't see in your photo.
maybe you can exchange RXD and TXD pin define.
Now do you INPUT port for binary sensor work well? only OUTPUT can't work?
Reply
#27
(12-18-2023, 11:31 PM)admin Wrote: external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-kc868-ha
      ref: v3.0.0

use "v3.0.0"  , you have use "main". change it.
i don't know which esp32 board model you are using? i can't see in your photo.
maybe you can exchange RXD and TXD pin define.
Now do you INPUT port for binary sensor work well? only OUTPUT can't work?

I started with “ref: v3.0.0” and changed it to “ref: main” so I would always have the latest version. But it doesn’t work with either option anyway.

The INPUT binary sensors work perfectly. If i press a button, it registers correctly in Home Assistant.

It’s only the OUTPUT that doesn’t work.
Reply
#28
ok, later we check.
Reply
#29
Big Grin 
(12-19-2023, 02:41 AM)admin Wrote: ok, later we check.

Thank you very much, I hope to hear back soon Smile
Reply
#30
after we tested, when have news, will feedback at here.
Reply


Forum Jump:


Users browsing this thread: