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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,062
» Latest member: markpaul9020
» Forum threads: 4,253
» Forum posts: 21,069

Full Statistics

Online Users
There are currently 157 online users.
» 0 Member(s) | 136 Guest(s)
Amazonbot, Baidu, Bing, Bytespider, Crawl, Google, PetalBot, Semrush, Yandex, bot

Latest Threads
N60/N30/N20/N10 PC softwa...
Forum: N10
Last Post: admin
7 hours ago
» Replies: 11
» Views: 1,571
Best way to read from N30
Forum: N30
Last Post: admin
Today, 12:20 AM
» Replies: 3
» Views: 25
getting the A8A inputs to...
Forum: Development
Last Post: admin
09-24-2026, 11:07 PM
» Replies: 3
» Views: 120
extend KC868-A16v3
Forum: KC868-A series and Uair Smart Controller
Last Post: bitet96717
09-24-2026, 06:41 AM
» Replies: 2
» Views: 189
Las Firmware ?
Forum: KC868-A16
Last Post: admin
09-22-2026, 11:15 PM
» Replies: 8
» Views: 904
kc868-a6 analog input
Forum: KC868-A6
Last Post: admin
09-21-2026, 11:38 PM
» Replies: 1
» Views: 95
A32 pro tuya
Forum: "KCS" v3 firmware
Last Post: admin
09-21-2026, 11:38 PM
» Replies: 1
» Views: 45
Disconnect loop with Home...
Forum: F16
Last Post: admin
09-21-2026, 01:16 AM
» Replies: 3
» Views: 86
KC-868-A1 linked Home Ass...
Forum: News
Last Post: admin
09-21-2026, 01:16 AM
» Replies: 5
» Views: 1,415
config modbus sensor in K...
Forum: "KCS" v3 firmware
Last Post: admin
09-19-2026, 11:52 AM
» Replies: 0
» Views: 76

  automations yaml for read analog value print on SSD1306 OLED
Posted by: admin - 05-25-2026, 11:22 PM - Forum: Pi5M32 - No Replies

here is automations.yaml file show analog data on SSD1306 OLED every 5 seconds.

Code:
- id: ads1115_ssd1306_display
  alias: "ADS1115 to SSD1306 (A1-A4)"
  trigger:
    - platform: time_pattern
      seconds: "/5"
  action:
    - service: ssd1306_i2c.print_text
      data:
        x: 0
        y: 0
        clear: true
        font_size: 12
        text: "A1: {{ states('sensor.a1') | float(0) | round(3) }} V\nA2: {{ states('sensor.a2') | float(0) | round(3) }} V\nA3: {{ states('sensor.a3') | float(0) | round(3) }} mA\nA4: {{ states('sensor.a4') | float(0) | round(3) }} mA"

Print this item

  home assistant configuration yaml file for Pi5R16
Posted by: admin - 05-25-2026, 11:19 PM - Forum: Pi5R16 - No Replies

Code:
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

ssd1306_i2c:
  - model: "128x64"
    address: 0x3C
    i2c_bus: 1
    rotate: 0


ads1115:
  - address: 0x48
    i2c_bus: 1
   
sensor:
  - platform: ads1115
    multiplexer: A0_GND
    gain: 4.096
    name: "A1"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A1_GND
    gain: 4.096         
    name: "A2"
    multiplier: 1.51
  - platform: ads1115
    multiplexer: A2_GND
    gain: 4.096
    name: "A3"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
  - platform: ads1115
    multiplexer: A3_GND
    gain: 4.096
    name: "A4"
    multiplier: 6.67
    device_class: current
    unit_of_measurement: mA
   
binary_sensor:
  - platform: mcp23017
    i2c_address: 0x20
    invert_logic: true
    pins:
      0 : Button_1
      1 : Button_2
      2 : Button_3
      3 : Button_4
      4 : Button_5
      5 : Button_6
      6 : Button_7
      7 : Button_8
      8 : Button_9     
      9 : Button_10     
      10 : Button_11     
      11 : Button_12     
      12 : Button_13     
      13 : Button_14     
      14 : Button_15
      15 : Button_16

     
switch:
  - platform: mcp23017
    i2c_address: 0x22
    hw_sync: false
    invert_logic: true
    pins:
      0 : Output_1
      1 : Output_2
      2 : Output_3
      3 : Output_4
      4 : Output_5
      5 : Output_6
      6 : Output_7
      7 : Output_8
      8 : Output_9
      9 : Output_10
      10 : Output_11
      11 : Output_12
      12 : Output_13
      13 : Output_14
      14 : Output_15
      15 : Output_16
configuration yaml file download:

.zip   configuration.zip (Size: 720 bytes / Downloads: 323)

Print this item

  MODBUS
Posted by: frasanc - 05-25-2026, 08:39 AM - Forum: KC868-A2v3 - Replies (5)

We have a question about reading Modbus RTU:

With A2:
RS485:
RXD:35
TXD:32

With A2V3: 
RS485:
RXD:GPIO15
TXD:GPIO7

With A2  can read, but not with A2V3. Any idea?

// A2v3:
HardwareSerial MBus(1);
MBus.begin(9600, SERIAL_8N1, 15, 7);
pinMode(4, INPUT);  // modo auto

// A2:
HardwareSerial MBus(2);
MBus.begin(9600, SERIAL_8N1, 35, 32);

ModbusMaster node;
node.begin(1, MBus);
uint8_t r = node.readInputRegisters(6, 2);  // FC04 @ PDU 6

Someone could help us?

Print this item

  RS485 TS sensor with A16v3 esphome yaml
Posted by: admin - 05-25-2026, 07:24 AM - Forum: Extender module - 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: 231)
firmware download: 
.zip   TS_V10Build241223SP0518.zip (Size: 10.25 KB / Downloads: 297)

Print this item

  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: 164)
firmware download: 
.zip   TS_V10Build241223SP0518.zip (Size: 10.25 KB / Downloads: 249)

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