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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,712
» Latest member: Edulift
» Forum threads: 4,360
» Forum posts: 21,417

Full Statistics

Online Users
There are currently 586 online users.
» 0 Member(s) | 562 Guest(s)
AhrefsBot, Amazonbot, Applebot, Bing, Bytespider, Crawl, Google, PetalBot, Semrush, WordPress/, bot

Latest Threads
KC868-A16v3 MQTT TLS/SSL ...
Forum: "KCS" v3 firmware
Last Post: admin
2 hours ago
» Replies: 1
» Views: 37
HMI touch panel for Home ...
Forum: Suggestions and feedback on KinCony's products
Last Post: rosnoteh
Yesterday, 11:31 PM
» Replies: 2
» Views: 114
Reset energy counter on N...
Forum: N30
Last Post: admin
Yesterday, 11:03 PM
» Replies: 3
» Views: 69
VisionCamPro-Turn an ESP3...
Forum: DIY Project
Last Post: nikhuge
Yesterday, 09:21 AM
» Replies: 0
» Views: 47
Reading Eastron SDM630 vi...
Forum: N60
Last Post: buttom3
12-01-2026, 12:58 PM
» Replies: 2
» Views: 100
Lumen – Open-Source Smart...
Forum: DIY Project
Last Post: nikhuge
12-01-2026, 09:04 AM
» Replies: 0
» Views: 104
Get Register data by conn...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
11-30-2026, 11:34 PM
» Replies: 1
» Views: 121
Domticz - native communic...
Forum: KC868-A16
Last Post: admin
11-30-2026, 11:17 PM
» Replies: 3
» Views: 1,384
B4 water tank controller
Forum: B4
Last Post: Fenndy
11-30-2026, 09:05 AM
» Replies: 1
» Views: 153
Calender events instad of...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
11-28-2026, 11:45 PM
» Replies: 1
» Views: 118

  RS485 TS sensor with A16v3 esphome yaml
Posted by: admin - 05-25-2026, 07:24 AM - Forum: KC868-A16v3 - No Replies

here is sample ESPHome yaml code for 3 TS together with one RS485 bus using KC868-A16v3 board.
   
   
   
set every TS with different RS485 address by PC software, make sure PC software can read the data:
   
   
   
here is ESPHome yaml
   

Code:
esphome:
  name: a16v3-ts
  friendly_name: a16v3_ts

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

uart:
  - id: uart_RS485
    baud_rate: 9600
    tx_pin: 16
    rx_pin: 17

modbus:
  - id: modbus_ts
    uart_id: uart_RS485
    send_wait_time: 50ms

# Sensor 1 - Address 1
modbus_controller:
  - id: ts_sensor_1
    modbus_id: modbus_ts
    address: 0x01
    command_throttle: 200ms
    setup_priority: -10
    update_interval: 10s

  - id: ts_sensor_2
    modbus_id: modbus_ts
    address: 0x02
    command_throttle: 200ms
    setup_priority: -10
    update_interval: 10s

  - id: ts_sensor_3
    modbus_id: modbus_ts
    address: 0x03
    command_throttle: 200ms
    setup_priority: -10
    update_interval: 10s

sensor:
  # Sensor 1 Temperature (Address 1)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_1
    name: "TS Sensor 1 Temperature"
    id: ts1_temperature
    register_type: holding
    address: 0x0000
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: |-
          if (x >= 10000) {
            return -1 * (x - 10000) * 0.1;
          } else {
            return x * 0.1;
          }

  # Sensor 1 Humidity (Address 1)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_1
    name: "TS Sensor 1 Humidity"
    id: ts1_humidity
    register_type: holding
    address: 0x0001
    unit_of_measurement: "%RH"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: return x * 0.1;

# Sensor 2 - Address 2

  # Sensor 2 Temperature (Address 2)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_2
    name: "TS Sensor 2 Temperature"
    id: ts2_temperature
    register_type: holding
    address: 0x0000
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: |-
          if (x >= 10000) {
            return -1 * (x - 10000) * 0.1;
          } else {
            return x * 0.1;
          }

  # Sensor 2 Humidity (Address 2)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_2
    name: "TS Sensor 2 Humidity"
    id: ts2_humidity
    register_type: holding
    address: 0x0001
    unit_of_measurement: "%RH"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: return x * 0.1;




# Sensor 3 - Address 3
  # Sensor 3 Temperature (Address 3)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_3
    name: "TS Sensor 3 Temperature"
    id: ts3_temperature
    register_type: holding
    address: 0x0000
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: |-
          if (x >= 10000) {
            return -1 * (x - 10000) * 0.1;
          } else {
            return x * 0.1;
          }

  # Sensor 3 Humidity (Address 3)
  - platform: modbus_controller
    modbus_controller_id: ts_sensor_3
    name: "TS Sensor 3 Humidity"
    id: ts3_humidity
    register_type: holding
    address: 0x0001
    unit_of_measurement: "%RH"
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - lambda: return x * 0.1;




web_server:
  port: 80

download yaml: 
.txt   TS-HA.txt (Size: 3.45 KB / Downloads: 260)
firmware download: 
.zip   TS_V10Build241223SP0518.zip (Size: 10.25 KB / Downloads: 365)

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5R16 - No Replies

   

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5R8 - No Replies

   

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5M8 - No Replies

   

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5M16 - No Replies

   

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5R32 - No Replies

   

Print this item

  SSD1306 for Node Red
Posted by: admin - 05-24-2026, 01:59 AM - Forum: Pi5M32 - No Replies

   

Print this item

  MCP23017 for Node Red
Posted by: admin - 05-24-2026, 01:58 AM - Forum: Pi5R16 - No Replies

   

Print this item

  MCP23017 for Node Red
Posted by: admin - 05-24-2026, 01:58 AM - Forum: Pi5R8 - No Replies

   

Print this item

  MCP23017 for Node Red
Posted by: admin - 05-24-2026, 01:58 AM - Forum: Pi5M8 - No Replies

   

Print this item