Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect RS485 KC868-HAv2 to Server Mini
#1
Help: Connect RS485 I/O modules to the Raspberry Pi 4 Relay Board (Server Mini) + Home Assistant OS


Hardware

Goal
  1. Daisy-chain several KinCony RS485 I/O modules to the Server Mini’s onboard RS485.
  2. Control/monitor them from Home Assistant OS (HA Modbus if possible).
  3. Best-practice for addressing many modules (bulk provisioning) without connecting a laptop each time.





What I’ve found / tried so far
  • The board exposes RS485 via the Pi’s UART (I see pins marked GPIO14 = TX, GPIO15 = RX on documentation/pins).
  • On Home Assistant OS, I cannot just edit /boot/config.txt like on Raspberry Pi OS, so I’m not sure about the correct way to enable the UART for the onboard RS485 under HA OS.
  • I tried using generic HA Modbus config but I’m not 100% sure about the device path (e.g. /dev/ttyAMA0, /dev/ttyS0, or /dev/serial/by-id/...) and serial parameters (baud, parity, stop bits) for KinCony’s RS485 port on this board.





Questions

  1. Wiring
    • Do I need a 120 Ω termination resistor at the last device? Are there built-in bias resistors on the Server Mini’s RS485 transceiver, or should I add my own?
    • Any max bus length / topology recommendations? (I’ll use daisy chain, not star.)

  2. Protocol & parameters
    • Do those RS485 I/O modules speak Modbus RTU out of the box? If yes, what are the default serial parameters (baud, parity, stopbits) and the register map (coils/inputs/holding)?
    • If it’s not Modbus RTU by default, is there a Modbus firmware or config mode I should use?

  3. Addressing multiple modules
    • How do I set unique addresses for each module? DIP switches? Command?
    • For bulk installs, is there a recommended workflow to assign addresses without hooking up each module to a PC? (Auto-addressing, scan/assign tool, etc.)

  4. Home Assistant OS specifics
    • On this KinCony board with HA OS, what is the correct serial device path for the onboard RS485 (e.g., /dev/ttyAMA0)?
    • What is the recommended way to enable UART on HA OS for this board (since /boot/config.txt is read-only under HA OS)? Any KinCony-specific steps or an add-on?
    • A minimal, known-good Home Assistant modbus: YAML example for one RS485 I/O module would be super helpful.

  5. Examples
    • Could you share example register addresses (coils/inputs) for:
      • Reading digital inputs from a KinCony RS485 I/O module
      • Controlling a relay output (if the chosen module has relays)
    • Any sample configs for more than one module on the same bus?

Reply
#2
i suggest you see these two video tour firstly:
https://youtu.be/s5Htc43HqAc
https://youtu.be/S679QX6Hc6I

Server-Mini Serial port pin define see here:
https://www.kincony.com/forum/showthread.php?tid=3001

1. if you use multi HAv2, the last one module you can enable 120 Ω termination resistor, just enable the jumper on PCB. other HAv2 all remove the jumper.

2. HAv2 use private protocol, not modbus. no modbus firmware to use.

3. use PC software to config every HAv2 rs485 address and baud rate, default is 9600bps.
here is online guide: https://www.kincony.com/how-to-use-rs485...apter.html

4.
a. it will show similar name as /dev/ttyAMA0
b. how to enable serial port for CM4, see here: https://www.kincony.com/forum/showthread.php?tid=4086
c. esphome yaml file download: https://www.kincony.com/forum/showthread.php?tid=3875

5. all have showed in video tour.
Reply
#3
Confirmation
Since KC868-HAv2 uses a private protocol (not Modbus), am I right that Home Assistant on Server-Mini cannot read HAv2 directly over '/dev/ttyAMA0' unless I write my own driver?

Questions:
  1. Do you provide a Linux daemon / HA add-on / Docker container that speaks the HAv2 private protocol over serial and exposes entities to HA (e.g., via MQTT discovery)?
  2. Is there a protocol document or SDK (even under NDA) so I can implement a small bridge service on the CM4 myself?
  3. If direct CM4 ↔ HAv2 is not supported, please confirm the recommended architecture is ESP32 + RS485 transceiver on the same bus running your ESPHome component—and that this is the only officially supported way with HA.
  4. For bulk deployments: is there any batch address/baud provisioning method (tool or workflow) that avoids connecting each HAv2 to a PC one by one?


If ESP32 bridge is required
  • Which minimum ESP32 board do you recommend as a simple RS485 bridge (e.g., E16T, KC868-A8, or any ESP32 + MAX485)?
  • Is the E16T_esphome_HAv2 example in thread #3875 still the best reference for multiple HAv2 on one bus?


RS485 details to confirm
  • 9600 bps
  • Unique addresses set via the PC tool
  • 120 Ω termination enabled only on the last HAv2


If you do have a minimal example (service, script, or add-on) for direct CM4 use, please share a link. Otherwise, a clear “not supported—use ESP32 bridge” confirmation will help me plan hardware. Thanks!
Reply
#4
1. HAv2 add-on for home assistant: https://github.com/hzkincony/esphome-kc868-ha
3. HAv2 can work with CM4's serial port directly.
4. if you want, we can send you change baud rate protocol.

If ESP32 bridge is required. --> No

RS485 details to confirm --> Yes

Do you have seen our video tour? it already showed that work with CM4 RS485 port by server-mini.
Reply
#5
Hi, thanks for the quick answer and the video tours.

I noticed in the videos you’re using a board that has ESP32 + RS-485 together, alongside the Server-Mini (CM4). I only have the Server-Mini (no ESP32 board).

Questions/clarifications:
1. Is an ESP32 board (e.g., KC868-A8S) required?
The repo you shared (https://github.com/hzkincony/esphome-kc868-ha) is not a Home Assistant add-on repository. It’s an ESPHome external component, which runs on an ESP32 and speaks the HAv2 private RS-485 protocol.
→ If I only have the Server-Mini (CM4) with its RS-485 pins on GPIO14/15, can I still integrate HAv2 directly without an ESP32?
2. If direct CM4 ↔ HAv2 over RS-485 is supported (no ESP32):
• Please share the actual Home Assistant integration/add-on (HACS repo or Docker image) that talks the HAv2 private protocol over serial.
• Minimal config example would help (serial device path /dev/ttyS0 or /dev/ttyAMA0, baud/parity, how to list multiple HAv2 boards by address, and how entities are exposed—MQTT discovery vs native HA integration).
• Any docs/SDK/protocol description for the CM4 path are appreciated (even under NDA).
3. If direct CM4 is not supported:
• Please confirm the official path is to use an ESP32 + RS-485 transceiver running ESPHome with your kc868_ha component, and that the Server-Mini only hosts Home Assistant.
• In that case I’ll add an ESP32 bridge.
4. Alternative firmware option:
• You mentioned you can “send change baud rate protocol.” Do you also provide a Modbus RTU firmware for HAv2? If yes, I can use HA’s built-in Modbus integration over the Server-Mini’s RS-485 port. A register map (coils/inputs/holding regs) would be great.

My setup constraints:
• Hardware: Server-Mini (CM4) with RS-485 on GPIO14 (TX) / GPIO15 (RX).
• Goal: Control multiple HAv2 boards on the same bus.
• Preference: Direct CM4 ↔ RS-485 if supported; otherwise I’ll add an ESP32.

It would be great if you can send me change bout rate protocol for bulk provisioning.

Thanks for clarifying which of the two paths is officially supported on a Server-Mini-only setup, and for the correct repo/instructions if the CM4 direct serial path exists.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)