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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,270
» Latest member: chicagoandy
» Forum threads: 3,617
» Forum posts: 18,652

Full Statistics

Online Users
There are currently 36 online users.
» 0 Member(s) | 26 Guest(s)
AhrefsBot, Amazonbot, PetalBot, bot

Latest Threads
MB Current & Power too lo...
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
6 hours ago
» Replies: 1
» Views: 8
KC868-A32 : PSU 24VDC
Forum: KC868-A32/A32 Pro
Last Post: admin
6 hours ago
» Replies: 1
» Views: 6
Submit your suggestions a...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
6 hours ago
» Replies: 34
» Views: 8,494
MODBUS TCP ETHERNET - SLA...
Forum: KC868-A16
Last Post: admin
Yesterday, 06:47 AM
» Replies: 8
» Views: 1,020
N20 ESPHome YAML Updated ...
Forum: N20
Last Post: admin
Yesterday, 06:45 AM
» Replies: 1
» Views: 18
Where to start
Forum: KC868-A6
Last Post: admin
Yesterday, 01:05 AM
» Replies: 11
» Views: 8,438
N20 ESPHome & HA - Line t...
Forum: N20
Last Post: admin
Yesterday, 01:04 AM
» Replies: 4
» Views: 43
flash kc868-a4
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 01:03 AM
» Replies: 11
» Views: 284
KC868-H16B Mqtt stops wor...
Forum: KC868-HxB series Smart Controller
Last Post: admin
Yesterday, 01:02 AM
» Replies: 1
» Views: 5
Some bugs in Home Assista...
Forum: N60
Last Post: VeikkoPeikko
12-16-2025, 06:37 AM
» Replies: 2
» Views: 43

Bug KC868-HAv2 issue
Posted by: innovation - 10-13-2025, 10:44 AM - Forum: KC868-A16v3 - Replies (1)

when KC868-A16V3 connected to KC868-HAV2 through ESPHOME it shows below error attached


Code:
esphome:
  name: kincony-a16-new-board
  friendly_name: KINCONY A16 NEW BOARD

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

# Enable Home Assistant API with encryption
api:
  encryption:
    key: "71EREQeZmQA2vN1bu/ghatHKmh/3t5Ikq5HELUWX7Lc="
  reboot_timeout: 10s  # Adds a timeout for reboots, ensuring it doesn't hang for long if there's an issue.

ota:
  - platform: esphome
    password: "f93558fce51f7a51c03bd2be87fb08fc"


ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO15
  interrupt_pin: GPIO2
  reset_pin: GPIO1


logger:
  baud_rate: 9600       # Use standard baud rate for more reliable logging
  level: DEBUG            # Enable debug level for better diagnostics

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

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

   
kc868_ha:


binary_sensor:

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 1
    name: "binary_sensor 1"
    on_press:
      - switch.toggle: switch_1

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 2
    name: "binary_sensor 2"
    on_press:
      - switch.toggle: switch_2

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 3
    name: "binary_sensor 3"
    on_press:
      - switch.toggle: switch_3

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 4
    name: "binary_sensor 4"
    on_press:
      - switch.toggle: switch_4

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 5
    name: "binary_sensor 5"
    on_press:
      - switch.toggle: switch_5

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 6
    name: "binary_sensor 6"
    on_press:
      - switch.toggle: switch_6

switch:
  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 1
    name: "switch 1"
    id: switch_1

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 2
    name: "switch 2"
    id: switch_2

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 3
    name: "switch 3"
    id: switch_3

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 4
    name: "switch 4"
    id: switch_4

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 5
    name: "switch 5"
    id: switch_5

  - platform: kc868_ha
    target_relay_controller_addr: 1
    switch_adapter_addr: 10
    bind_output: 6
    name: "switch 6"
    id: switch_6



Attached Files Thumbnail(s)
   
Print this item

  N30 configure yaml for ESPhome
Posted by: admin - 10-13-2025, 10:24 AM - Forum: N30 - No Replies

Code:
esphome:
  name: n30
  friendly_name: n30

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:
  # baud_rate: 0

# Enable Home Assistant API
api:

ota:
  platform: esphome

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

uart:
  rx_pin: 9
  tx_pin: 10
  baud_rate: 115200
  stop_bits: 1
  data_bits: 8
  parity: NONE

web_server:
  port: 80

text_sensor:
  - platform: ethernet_info
    ip_address:
      name: ESP IP Address
      id: eth_ip
      address_0:
        name: ESP IP Address 0
      address_1:
        name: ESP IP Address 1
      address_2:
        name: ESP IP Address 2
      address_3:
        name: ESP IP Address 3
      address_4:
        name: ESP IP Address 4
    dns_address:
      name: ESP DNS Address
    mac_address:
      name: ESP MAC Address

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 15

i2c:
  sda: 18
  scl: 17

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 15, id(roboto), "IP: %s", id(eth_ip).state.c_str());

modbus:

modbus_controller:
  - address: 1
    update_interval: 5s

sensor:
  - platform: modbus_controller
    address: 100
    register_type: holding
    name: bl0910_1_current_1
    id: n30_1_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 102
    register_type: holding
    name: bl0910_1_current_2
    id: n30_1_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 104
    register_type: holding
    name: bl0910_1_current_3
    id: n30_1_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 106
    register_type: holding
    name: bl0910_1_current_4
    id: n30_1_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 108
    register_type: holding
    name: bl0910_1_current_5
    id: n30_1_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 110
    register_type: holding
    name: bl0910_1_current_6
    id: n30_1_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 112
    register_type: holding
    name: bl0910_1_current_7
    id: n30_1_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 114
    register_type: holding
    name: bl0910_1_current_8
    id: n30_1_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 116
    register_type: holding
    name: bl0910_1_current_9
    id: n30_1_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 118
    register_type: holding
    name: bl0910_1_current_10
    id: n30_1_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 120
    register_type: holding
    name: bl0910_1_power_1
    id: n30_1_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 122
    register_type: holding
    name: bl0910_1_power_2
    id: n30_1_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 124
    register_type: holding
    name: bl0910_1_power_3
    id: n30_1_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 126
    register_type: holding
    name: bl0910_1_power_4
    id: n30_1_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 128
    register_type: holding
    name: bl0910_1_power_5
    id: n30_1_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 130
    register_type: holding
    name: bl0910_1_power_6
    id: n30_1_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 132
    register_type: holding
    name: bl0910_1_power_7
    id: n30_1_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 134
    register_type: holding
    name: bl0910_1_power_8
    id: n30_1_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 136
    register_type: holding
    name: bl0910_1_power_9
    id: n30_1_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 138
    register_type: holding
    name: bl0910_1_power_10
    id: n30_1_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 140
    register_type: holding
    name: bl0910_1_energy_1
    id: n30_1_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 142
    register_type: holding
    name: bl0910_1_energy_2
    id: n30_1_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 144
    register_type: holding
    name: bl0910_1_energy_3
    id: n30_1_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 146
    register_type: holding
    name: bl0910_1_energy_4
    id: n30_1_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 148
    register_type: holding
    name: bl0910_1_energy_5
    id: n30_1_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 150
    register_type: holding
    name: bl0910_1_energy_6
    id: n30_1_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 152
    register_type: holding
    name: bl0910_1_energy_7
    id: n30_1_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 154
    register_type: holding
    name: bl0910_1_energy_8
    id: n30_1_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 156
    register_type: holding
    name: bl0910_1_energy_9
    id: n30_1_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 158
    register_type: holding
    name: bl0910_1_energy_10
    id: n30_1_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 160
    register_type: holding
    name: bl0910_1_energy_sum
    id: n30_1_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    address: 162
    register_type: holding
    name: bl0910_1_voltage
    id: n30_1_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 163
    register_type: holding
    name: bl0910_1_frequency
    id: n30_1_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 164
    register_type: holding
    name: bl0910_1_tps1
    id: n30_1_tps_1
    unit_of_measurement: °C
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R

  - platform: modbus_controller
    address: 200
    register_type: holding
    name: bl0910_2_current_1
    id: n30_2_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 202
    register_type: holding
    name: bl0910_2_current_2
    id: n30_2_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 204
    register_type: holding
    name: bl0910_2_current_3
    id: n30_2_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 206
    register_type: holding
    name: bl0910_2_current_4
    id: n30_2_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 208
    register_type: holding
    name: bl0910_2_current_5
    id: n30_2_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 210
    register_type: holding
    name: bl0910_2_current_6
    id: n30_2_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 212
    register_type: holding
    name: bl0910_2_current_7
    id: n30_2_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 214
    register_type: holding
    name: bl0910_2_current_8
    id: n30_2_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 216
    register_type: holding
    name: bl0910_2_current_9
    id: n30_2_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 218
    register_type: holding
    name: bl0910_2_current_10
    id: n30_2_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 220
    register_type: holding
    name: bl0910_2_power_1
    id: n30_2_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 222
    register_type: holding
    name: bl0910_2_power_2
    id: n30_2_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 224
    register_type: holding
    name: bl0910_2_power_3
    id: n30_2_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 226
    register_type: holding
    name: bl0910_2_power_4
    id: n30_2_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 228
    register_type: holding
    name: bl0910_2_power_5
    id: n30_2_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 230
    register_type: holding
    name: bl0910_2_power_6
    id: n30_2_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 232
    register_type: holding
    name: bl0910_2_power_7
    id: n30_2_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 234
    register_type: holding
    name: bl0910_2_power_8
    id: n30_2_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 236
    register_type: holding
    name: bl0910_2_power_9
    id: n30_2_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 238
    register_type: holding
    name: bl0910_2_power_10
    id: n30_2_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 240
    register_type: holding
    name: bl0910_2_energy_1
    id: n30_2_energy_1
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 242
    register_type: holding
    name: bl0910_2_energy_2
    id: n30_2_energy_2
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 244
    register_type: holding
    name: bl0910_2_energy_3
    id: n30_2_energy_3
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 246
    register_type: holding
    name: bl0910_2_energy_4
    id: n30_2_energy_4
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 248
    register_type: holding
    name: bl0910_2_energy_5
    id: n30_2_energy_5
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 250
    register_type: holding
    name: bl0910_2_energy_6
    id: n30_2_energy_6
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 252
    register_type: holding
    name: bl0910_2_energy_7
    id: n30_2_energy_7
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 254
    register_type: holding
    name: bl0910_2_energy_8
    id: n30_2_energy_8
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 256
    register_type: holding
    name: bl0910_2_energy_9
    id: n30_2_energy_9
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 258
    register_type: holding
    name: bl0910_2_energy_10
    id: n30_2_energy_10
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 260
    register_type: holding
    name: bl0910_2_energy_sum
    id: n30_2_energy_sum
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 262
    register_type: holding
    name: bl0910_2_voltage
    id: n30_2_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 263
    register_type: holding
    name: bl0910_2_frequency
    id: n30_2_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 264
    register_type: holding
    name: bl0910_2_tps1
    id: n30_2_tps_1
    unit_of_measurement: "°C"
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R
  - platform: modbus_controller
    address: 300
    register_type: holding
    name: bl0910_3_current_1
    id: n30_3_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 302
    register_type: holding
    name: bl0910_3_current_2
    id: n30_3_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 304
    register_type: holding
    name: bl0910_3_current_3
    id: n30_3_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 306
    register_type: holding
    name: bl0910_3_current_4
    id: n30_3_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 308
    register_type: holding
    name: bl0910_3_current_5
    id: n30_3_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 310
    register_type: holding
    name: bl0910_3_current_6
    id: n30_3_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 312
    register_type: holding
    name: bl0910_3_current_7
    id: n30_3_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 314
    register_type: holding
    name: bl0910_3_current_8
    id: n30_3_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 316
    register_type: holding
    name: bl0910_3_current_9
    id: n30_3_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 318
    register_type: holding
    name: bl0910_3_current_10
    id: n30_3_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 320
    register_type: holding
    name: bl0910_3_power_1
    id: n30_3_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 322
    register_type: holding
    name: bl0910_3_power_2
    id: n30_3_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 324
    register_type: holding
    name: bl0910_3_power_3
    id: n30_3_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 326
    register_type: holding
    name: bl0910_3_power_4
    id: n30_3_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 328
    register_type: holding
    name: bl0910_3_power_5
    id: n30_3_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 330
    register_type: holding
    name: bl0910_3_power_6
    id: n30_3_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 332
    register_type: holding
    name: bl0910_3_power_7
    id: n30_3_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 334
    register_type: holding
    name: bl0910_3_power_8
    id: n30_3_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 336
    register_type: holding
    name: bl0910_3_power_9
    id: n30_3_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 338
    register_type: holding
    name: bl0910_3_power_10
    id: n30_3_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 340
    register_type: holding
    name: bl0910_3_energy_1
    id: n30_3_energy_1
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 342
    register_type: holding
    name: bl0910_3_energy_2
    id: n30_3_energy_2
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 344
    register_type: holding
    name: bl0910_3_energy_3
    id: n30_3_energy_3
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 346
    register_type: holding
    name: bl0910_3_energy_4
    id: n30_3_energy_4
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 348
    register_type: holding
    name: bl0910_3_energy_5
    id: n30_3_energy_5
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 350
    register_type: holding
    name: bl0910_3_energy_6
    id: n30_3_energy_6
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 352
    register_type: holding
    name: bl0910_3_energy_7
    id: n30_3_energy_7
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 354
    register_type: holding
    name: bl0910_3_energy_8
    id: n30_3_energy_8
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 356
    register_type: holding
    name: bl0910_3_energy_9
    id: n30_3_energy_9
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 358
    register_type: holding
    name: bl0910_3_energy_10
    id: n30_3_energy_10
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 360
    register_type: holding
    name: bl0910_3_energy_sum
    id: n30_3_energy_sum
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 362
    register_type: holding
    name: bl0910_3_voltage
    id: n30_3_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 363
    register_type: holding
    name: bl0910_3_frequency
    id: n30_3_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 364
    register_type: holding
    name: bl0910_3_tps1
    id: n30_3_tps_1
    unit_of_measurement: "°C"
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R
yaml download: 

.txt   N30-HA.txt (Size: 27.53 KB / Downloads: 105)

Print this item

  N20 configure yaml for ESPhome
Posted by: admin - 10-13-2025, 10:23 AM - Forum: N20 - No Replies

Code:
esphome:
  name: n20
  friendly_name: n20

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:
  # baud_rate: 0

# Enable Home Assistant API
api:

ota:
  platform: esphome

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

uart:
  rx_pin: 9
  tx_pin: 10
  baud_rate: 115200
  stop_bits: 1
  data_bits: 8
  parity: NONE

web_server:
  port: 80

text_sensor:
  - platform: ethernet_info
    ip_address:
      name: ESP IP Address
      id: eth_ip
      address_0:
        name: ESP IP Address 0
      address_1:
        name: ESP IP Address 1
      address_2:
        name: ESP IP Address 2
      address_3:
        name: ESP IP Address 3
      address_4:
        name: ESP IP Address 4
    dns_address:
      name: ESP DNS Address
    mac_address:
      name: ESP MAC Address

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 15

i2c:
  sda: 18
  scl: 17

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 15, id(roboto), "IP: %s", id(eth_ip).state.c_str());

modbus:

modbus_controller:
  - address: 1
    update_interval: 5s

sensor:
  - platform: modbus_controller
    address: 100
    register_type: holding
    name: bl0910_1_current_1
    id: n20_1_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 102
    register_type: holding
    name: bl0910_1_current_2
    id: n20_1_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 104
    register_type: holding
    name: bl0910_1_current_3
    id: n20_1_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 106
    register_type: holding
    name: bl0910_1_current_4
    id: n20_1_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 108
    register_type: holding
    name: bl0910_1_current_5
    id: n20_1_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 110
    register_type: holding
    name: bl0910_1_current_6
    id: n20_1_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 112
    register_type: holding
    name: bl0910_1_current_7
    id: n20_1_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 114
    register_type: holding
    name: bl0910_1_current_8
    id: n20_1_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 116
    register_type: holding
    name: bl0910_1_current_9
    id: n20_1_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 118
    register_type: holding
    name: bl0910_1_current_10
    id: n20_1_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 120
    register_type: holding
    name: bl0910_1_power_1
    id: n20_1_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 122
    register_type: holding
    name: bl0910_1_power_2
    id: n20_1_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 124
    register_type: holding
    name: bl0910_1_power_3
    id: n20_1_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 126
    register_type: holding
    name: bl0910_1_power_4
    id: n20_1_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 128
    register_type: holding
    name: bl0910_1_power_5
    id: n20_1_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 130
    register_type: holding
    name: bl0910_1_power_6
    id: n20_1_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 132
    register_type: holding
    name: bl0910_1_power_7
    id: n20_1_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 134
    register_type: holding
    name: bl0910_1_power_8
    id: n20_1_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 136
    register_type: holding
    name: bl0910_1_power_9
    id: n20_1_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 138
    register_type: holding
    name: bl0910_1_power_10
    id: n20_1_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 140
    register_type: holding
    name: bl0910_1_energy_1
    id: n20_1_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 142
    register_type: holding
    name: bl0910_1_energy_2
    id: n20_1_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 144
    register_type: holding
    name: bl0910_1_energy_3
    id: n20_1_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 146
    register_type: holding
    name: bl0910_1_energy_4
    id: n20_1_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 148
    register_type: holding
    name: bl0910_1_energy_5
    id: n20_1_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 150
    register_type: holding
    name: bl0910_1_energy_6
    id: n20_1_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 152
    register_type: holding
    name: bl0910_1_energy_7
    id: n20_1_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 154
    register_type: holding
    name: bl0910_1_energy_8
    id: n20_1_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 156
    register_type: holding
    name: bl0910_1_energy_9
    id: n20_1_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 158
    register_type: holding
    name: bl0910_1_energy_10
    id: n20_1_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 160
    register_type: holding
    name: bl0910_1_energy_sum
    id: n20_1_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    address: 162
    register_type: holding
    name: bl0910_1_voltage
    id: n20_1_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 163
    register_type: holding
    name: bl0910_1_frequency
    id: n20_1_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 164
    register_type: holding
    name: bl0910_1_tps1
    id: n20_1_tps_1
    unit_of_measurement: °C
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R

  - platform: modbus_controller
    address: 200
    register_type: holding
    name: bl0910_2_current_1
    id: n20_2_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 202
    register_type: holding
    name: bl0910_2_current_2
    id: n20_2_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 204
    register_type: holding
    name: bl0910_2_current_3
    id: n20_2_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 206
    register_type: holding
    name: bl0910_2_current_4
    id: n20_2_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 208
    register_type: holding
    name: bl0910_2_current_5
    id: n20_2_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 210
    register_type: holding
    name: bl0910_2_current_6
    id: n20_2_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 212
    register_type: holding
    name: bl0910_2_current_7
    id: n20_2_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 214
    register_type: holding
    name: bl0910_2_current_8
    id: n20_2_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 216
    register_type: holding
    name: bl0910_2_current_9
    id: n20_2_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 218
    register_type: holding
    name: bl0910_2_current_10
    id: n20_2_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
    - multiply: 0.001
  - platform: modbus_controller
    address: 220
    register_type: holding
    name: bl0910_2_power_1
    id: n20_2_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 222
    register_type: holding
    name: bl0910_2_power_2
    id: n20_2_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 224
    register_type: holding
    name: bl0910_2_power_3
    id: n20_2_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 226
    register_type: holding
    name: bl0910_2_power_4
    id: n20_2_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 228
    register_type: holding
    name: bl0910_2_power_5
    id: n20_2_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 230
    register_type: holding
    name: bl0910_2_power_6
    id: n20_2_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 232
    register_type: holding
    name: bl0910_2_power_7
    id: n20_2_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 234
    register_type: holding
    name: bl0910_2_power_8
    id: n20_2_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 236
    register_type: holding
    name: bl0910_2_power_9
    id: n20_2_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 238
    register_type: holding
    name: bl0910_2_power_10
    id: n20_2_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
    - multiply: 0.1
  - platform: modbus_controller
    address: 240
    register_type: holding
    name: bl0910_2_energy_1
    id: n20_2_energy_1
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 242
    register_type: holding
    name: bl0910_2_energy_2
    id: n20_2_energy_2
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 244
    register_type: holding
    name: bl0910_2_energy_3
    id: n20_2_energy_3
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 246
    register_type: holding
    name: bl0910_2_energy_4
    id: n20_2_energy_4
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 248
    register_type: holding
    name: bl0910_2_energy_5
    id: n20_2_energy_5
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 250
    register_type: holding
    name: bl0910_2_energy_6
    id: n20_2_energy_6
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 252
    register_type: holding
    name: bl0910_2_energy_7
    id: n20_2_energy_7
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 254
    register_type: holding
    name: bl0910_2_energy_8
    id: n20_2_energy_8
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 256
    register_type: holding
    name: bl0910_2_energy_9
    id: n20_2_energy_9
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 258
    register_type: holding
    name: bl0910_2_energy_10
    id: n20_2_energy_10
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 260
    register_type: holding
    name: bl0910_2_energy_sum
    id: n20_2_energy_sum
    unit_of_measurement: kWh
    device_class: energy
    accuracy_decimals: 1
    value_type: U_DWORD_R
    state_class: total_increasing
  - platform: modbus_controller
    address: 262
    register_type: holding
    name: bl0910_2_voltage
    id: n20_2_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 263
    register_type: holding
    name: bl0910_2_frequency
    id: n20_2_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
    - multiply: 0.01
  - platform: modbus_controller
    address: 264
    register_type: holding
    name: bl0910_2_tps1
    id: n20_2_tps_1
    unit_of_measurement: "°C"
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R
yaml download: 

.txt   N20-HA.txt (Size: 18.78 KB / Downloads: 108)

Print this item

  N10 configure yaml for ESPhome
Posted by: admin - 10-13-2025, 10:22 AM - Forum: N10 - No Replies

Code:
esphome:
  name: n10
  friendly_name: n10

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:
  # baud_rate: 0

# Enable Home Assistant API
api:

ota:
  platform: esphome

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

uart:
  rx_pin: 9
  tx_pin: 10
  baud_rate: 115200
  stop_bits: 1
  data_bits: 8
  parity: NONE

web_server:
  port: 80

text_sensor:
  - platform: ethernet_info
    ip_address:
      name: ESP IP Address
      id: eth_ip
      address_0:
        name: ESP IP Address 0
      address_1:
        name: ESP IP Address 1
      address_2:
        name: ESP IP Address 2
      address_3:
        name: ESP IP Address 3
      address_4:
        name: ESP IP Address 4
    dns_address:
      name: ESP DNS Address
    mac_address:
      name: ESP MAC Address

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 15

i2c:
  sda: 18
  scl: 17

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 15, id(roboto), "IP: %s", id(eth_ip).state.c_str());

modbus:

modbus_controller:
  - address: 1
    update_interval: 5s

sensor:
  - platform: modbus_controller
    address: 100
    register_type: holding
    name: bl0910_1_current_1
    id: n10_1_current_1
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 102
    register_type: holding
    name: bl0910_1_current_2
    id: n10_1_current_2
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 104
    register_type: holding
    name: bl0910_1_current_3
    id: n10_1_current_3
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 106
    register_type: holding
    name: bl0910_1_current_4
    id: n10_1_current_4
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 108
    register_type: holding
    name: bl0910_1_current_5
    id: n10_1_current_5
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 110
    register_type: holding
    name: bl0910_1_current_6
    id: n10_1_current_6
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 112
    register_type: holding
    name: bl0910_1_current_7
    id: n10_1_current_7
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 114
    register_type: holding
    name: bl0910_1_current_8
    id: n10_1_current_8
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 116
    register_type: holding
    name: bl0910_1_current_9
    id: n10_1_current_9
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 118
    register_type: holding
    name: bl0910_1_current_10
    id: n10_1_current_10
    unit_of_measurement: A
    device_class: current
    accuracy_decimals: 3
    value_type: U_DWORD_R
    filters:
      - multiply: 0.001

  - platform: modbus_controller
    address: 120
    register_type: holding
    name: bl0910_1_power_1
    id: n10_1_watt_1
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 122
    register_type: holding
    name: bl0910_1_power_2
    id: n10_1_watt_2
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 124
    register_type: holding
    name: bl0910_1_power_3
    id: n10_1_watt_3
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 126
    register_type: holding
    name: bl0910_1_power_4
    id: n10_1_watt_4
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 128
    register_type: holding
    name: bl0910_1_power_5
    id: n10_1_watt_5
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 130
    register_type: holding
    name: bl0910_1_power_6
    id: n10_1_watt_6
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 132
    register_type: holding
    name: bl0910_1_power_7
    id: n10_1_watt_7
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 134
    register_type: holding
    name: bl0910_1_power_8
    id: n10_1_watt_8
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 136
    register_type: holding
    name: bl0910_1_power_9
    id: n10_1_watt_9
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    address: 138
    register_type: holding
    name: bl0910_1_power_10
    id: n10_1_watt_10
    unit_of_measurement: W
    device_class: power
    accuracy_decimals: 1
    value_type: U_DWORD_R
    filters:
      - multiply: 0.1

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 140
    register_type: holding
    name: bl0910_1_energy_1
    id: n10_1_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 142
    register_type: holding
    name: bl0910_1_energy_2
    id: n10_1_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 144
    register_type: holding
    name: bl0910_1_energy_3
    id: n10_1_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 146
    register_type: holding
    name: bl0910_1_energy_4
    id: n10_1_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 148
    register_type: holding
    name: bl0910_1_energy_5
    id: n10_1_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 150
    register_type: holding
    name: bl0910_1_energy_6
    id: n10_1_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 152
    register_type: holding
    name: bl0910_1_energy_7
    id: n10_1_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 154
    register_type: holding
    name: bl0910_1_energy_8
    id: n10_1_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 156
    register_type: holding
    name: bl0910_1_energy_9
    id: n10_1_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 158
    register_type: holding
    name: bl0910_1_energy_10
    id: n10_1_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    state_class: total_increasing
    device_class: energy
    address: 160
    register_type: holding
    name: bl0910_1_energy_sum
    id: n10_1_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_DWORD_R

  - platform: modbus_controller
    address: 162
    register_type: holding
    name: bl0910_1_voltage
    id: n10_1_voltage
    unit_of_measurement: V
    device_class: voltage
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 163
    register_type: holding
    name: bl0910_1_frequency
    id: n10_1_period
    unit_of_measurement: Hz
    device_class: frequency
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    address: 164
    register_type: holding
    name: bl0910_1_tps1
    id: n10_1_tps_1
    unit_of_measurement: °C
    device_class: temperature
    accuracy_decimals: 1
    value_type: FP32_R
yaml download: 

.txt   N10-HA.txt (Size: 10.03 KB / Downloads: 123)

Print this item

  N30 Energy RS485 Modbus Protocol
Posted by: admin - 10-13-2025, 02:06 AM - Forum: N30 - No Replies

Code:
N30 Energy Module Modbus Protocol Specification
==============================================

1. Overview
-----------

This document specifies the Modbus communication protocol for the N30 Energy Module.
The device communicates using the Modbus RTU protocol and provides access to electrical
measurement parameters including current, power, energy consumption, voltage, frequency,
temperature, and power factor from 3 independent energy monitoring chips.

2. Module Characteristics
-------------------------

- Energy Monitoring Chips: 3
- Communication Protocol: Modbus RTU
- Wireless Technology: Not applicable (wired connection)
- Maximum Sensors Supported: 32
- Board Features: Display, Ethernet (W5500), 4G, SD Card support
- GPIO Availability: 2 free GPIOs (pins 15, 16)

3. Communication Parameters
---------------------------

- Protocol: Modbus RTU
- Baud Rate: 38400
- Function Codes:
  * 0x03: Read Holding Registers (for reading data)
  * 0x05: Write Single Coil (for control operations)
  * 0x10: Write Multiple Registers (for configuration)

4. Chip Addressing
------------------

The N30 Energy Module contains 3 measurement chips, each with a base address:

+-------------+--------------+--------------------+
| Chip Number | Base Address | Physical Location  |
+-------------+--------------+--------------------+
| Chip 1      | 100          | Main board P1      |
| Chip 2      | 200          | Main board P2      |
| Chip 3      | 300          | Main board P3      |
+-------------+--------------+--------------------+

Aggregate data from all 3 chips is available starting at address 1000.

5. Data Structure
-----------------

Each chip provides the following data (accessible via Function Code 0x03):

5.1 Current Measurements (RMS) per Chip
---------------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 0              | RMS_1      | A     | uint32 | 0.001A/LSB    |
| 2              | RMS_2      | A     | uint32 | 0.001A/LSB    |
| 4              | RMS_3      | A     | uint32 | 0.001A/LSB    |
| 6              | RMS_4      | A     | uint32 | 0.001A/LSB    |
| 8              | RMS_5      | A     | uint32 | 0.001A/LSB    |
| 10             | RMS_6      | A     | uint32 | 0.001A/LSB    |
| 12             | RMS_7      | A     | uint32 | 0.001A/LSB    |
| 14             | RMS_8      | A     | uint32 | 0.001A/LSB    |
| 16             | RMS_9      | A     | uint32 | 0.001A/LSB    |
| 18             | RMS_10     | A     | uint32 | 0.001A/LSB    |
+----------------+------------+-------+--------+---------------+

Example: To read RMS_1 from Chip 1, read registers 100 and 101 (2 registers for uint32).
Example: To read RMS_1 from Chip 2, read registers 200 and 201 (2 registers for uint32).
Example: To read RMS_1 from Chip 3, read registers 300 and 301 (2 registers for uint32).
Display: Reading of 5432 represents 5.432A (5432 × 0.001A)

5.2 Power Measurements (WATT) per Chip
--------------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 20             | WATT_1     | W     | uint32 | 0.1W/LSB      |
| 22             | WATT_2     | W     | uint32 | 0.1W/LSB      |
| 24             | WATT_3     | W     | uint32 | 0.1W/LSB      |
| 26             | WATT_4     | W     | uint32 | 0.1W/LSB      |
| 28             | WATT_5     | W     | uint32 | 0.1W/LSB      |
| 30             | WATT_6     | W     | uint32 | 0.1W/LSB      |
| 32             | WATT_7     | W     | uint32 | 0.1W/LSB      |
| 34             | WATT_8     | W     | uint32 | 0.1W/LSB      |
| 36             | WATT_9     | W     | uint32 | 0.1W/LSB      |
| 38             | WATT_10    | W     | uint32 | 0.1W/LSB      |
+----------------+------------+-------+--------+---------------+

Example: To read WATT_1 from Chip 1, read registers 120 and 121 (2 registers for uint32).
Example: To read WATT_1 from Chip 2, read registers 220 and 221 (2 registers for uint32).
Example: To read WATT_1 from Chip 3, read registers 320 and 321 (2 registers for uint32).
Display: Reading of 12345 represents 1234.5W (12345 × 0.1W)

5.3 Energy Consumption Measurements per Chip
--------------------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 40             | Energy_1    | kWh   | uint32 | 1kWh/LSB            |
| 42             | Energy_2    | kWh   | uint32 | 1kWh/LSB            |
| 44             | Energy_3    | kWh   | uint32 | 1kWh/LSB            |
| 46             | Energy_4    | kWh   | uint32 | 1kWh/LSB            |
| 48             | Energy_5    | kWh   | uint32 | 1kWh/LSB            |
| 50             | Energy_6    | kWh   | uint32 | 1kWh/LSB            |
| 52             | Energy_7    | kWh   | uint32 | 1kWh/LSB            |
| 54             | Energy_8    | kWh   | uint32 | 1kWh/LSB            |
| 56             | Energy_9    | kWh   | uint32 | 1kWh/LSB            |
| 58             | Energy_10   | kWh   | uint32 | 1kWh/LSB            |
| 60             | Energy_Sum  | kWh   | uint32 | 1kWh/LSB            |
+----------------+-------------+-------+--------+---------------------+

Note: The maximum measurable energy per channel is 65535 kWh.

5.4 Other Measurements per Chip
-------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 62             | RMS_V       | V     | uint16 | 0.01V/LSB           |
| 63             | Period      | Hz    | uint16 | 0.01Hz/LSB          |
| 64             | TPS1        | °C    | float  | 0.1°C/LSB           |
| 66             | PF          | -     | float  | Power Factor (0-1)  |
+----------------+-------------+-------+--------+---------------------+

6. Channel Mapping
------------------

Total of 30 energy monitoring channels:
- Channels 1-10: Managed by Chip 1 (base address 100)
- Channels 11-20: Managed by Chip 2 (base address 200)
- Channels 21-30: Managed by Chip 3 (base address 300)

Each chip reports its 10 channels as local channels 1-10 in the register mapping.

7. Control Functions (Function Code 0x05)
------------------------------------------

The following control registers can be written to using the Modbus function code 0x05:

+----------+------------------------------+--------------------------------------------+
| Register | Function                     | Description                                |
+----------+------------------------------+--------------------------------------------+
| 500      | Warm Reset                   | Resets the device                          |
| 501      | Save Parameters to Flash     | Save communication parameters to flash     |
| 503      | Save Coefficients to Flash   | Save calibration coefficients to flash     |
| 504      | Clear Coefficients           | Reset all coefficients to 1.0 (use caution)|
| 510      | Restore Factory Settings     | Restore factory communication parameters   |
+----------+------------------------------+--------------------------------------------+

8. Energy Clearing Functions (Function Code 0x05)
--------------------------------------------------

The following registers clear energy consumption data when written with function code 0x05:

8.1 Clear All Channels on a Chip
---------------------------------

+----------+--------------------------------+
| Register | Function                       |
+----------+--------------------------------+
| 520      | Clear all energy on Chip 1     |
| 521      | Clear all energy on Chip 2     |
| 522      | Clear all energy on Chip 3     |
+----------+--------------------------------+

8.2 Clear Individual Channels
------------------------------

+----------------+------------------------------------------------+
| Register Range | Function                                       |
+----------------+------------------------------------------------+
| 526-535        | Clear energy on Chip 1, channels 1-10          |
| 536-545        | Clear energy on Chip 2, channels 1-10          |
| 546-555        | Clear energy on Chip 3, channels 1-10          |
| 586            | Clear sum energy on Chip 1                     |
| 587            | Clear sum energy on Chip 2                     |
| 588            | Clear sum energy on Chip 3                     |
+----------------+------------------------------------------------+

9. Calibration Coefficients (Function Code 0x03 to read, 0x10 to write)
------------------------------------------------------------------------

All coefficients are stored as floating-point values in CDBA format.

9.1 Current (RMS) Coefficients for Chip 1
------------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3000     | FACTOR OF RMS1      | 1.0     |
| 3002     | FACTOR OF RMS2      | 1.0     |
| 3004     | FACTOR OF RMS3      | 1.0     |
| 3006     | FACTOR OF RMS4      | 1.0     |
| 3008     | FACTOR OF RMS5      | 1.0     |
| 3010     | FACTOR OF RMS6      | 1.0     |
| 3012     | FACTOR OF RMS7      | 1.0     |
| 3014     | FACTOR OF RMS8      | 1.0     |
| 3016     | FACTOR OF RMS9      | 1.0     |
| 3018     | FACTOR OF RMS10     | 1.0     |
+----------+---------------------+---------+

9.2 Power (WATT) Coefficients for Chip 1
-----------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3020     | FACTOR OF WATT1     | 1.0     |
| 3022     | FACTOR OF WATT2     | 1.0     |
| 3024     | FACTOR OF WATT3     | 1.0     |
| 3026     | FACTOR OF WATT4     | 1.0     |
| 3028     | FACTOR OF WATT5     | 1.0     |
| 3030     | FACTOR OF WATT6     | 1.0     |
| 3032     | FACTOR OF WATT7     | 1.0     |
| 3034     | FACTOR OF WATT8     | 1.0     |
| 3036     | FACTOR OF WATT9     | 1.0     |
| 3038     | FACTOR OF WATT10    | 1.0     |
+----------+---------------------+---------+

9.3 Energy Coefficients for Chip 1
-----------------------------------

+----------+-----------------------+---------+
| Register | Parameter             | Default |
+----------+-----------------------+---------+
| 3040     | FACTOR OF ENERGY1     | 1.0     |
| 3042     | FACTOR OF ENERGY2     | 1.0     |
| 3044     | FACTOR OF ENERGY3     | 1.0     |
| 3046     | FACTOR OF ENERGY4     | 1.0     |
| 3048     | FACTOR OF ENERGY5     | 1.0     |
| 3050     | FACTOR OF ENERGY6     | 1.0     |
| 3052     | FACTOR OF ENERGY7     | 1.0     |
| 3054     | FACTOR OF ENERGY8     | 1.0     |
| 3056     | FACTOR OF ENERGY9     | 1.0     |
| 3058     | FACTOR OF ENERGY10    | 1.0     |
| 3060     | FACTOR OF ENERGY SUM  | 1.0     |
+----------+-----------------------+---------+

9.4 Other Chip Calibration Coefficient Base Addresses
------------------------------------------------------

The calibration coefficients for other chips follow the same structure but start at
different base addresses:

+-------------+---------------+
| Chip Number | Base Register |
+-------------+---------------+
| Chip 2      | 3064          |
| Chip 3      | 3128          |
+-------------+---------------+

10. Data Aggregation
--------------------

Gateway systems can aggregate data from all three chips:
- Total System Current = Sum of all RMS values from all chips
- Total System Power = Sum of all WATT values from all chips
- Total System Energy = Sum of all Energy values from all chips
- Average System Voltage = Average of RMS_V from all chips
- Average System Frequency = Average of Period from all chips
- Maximum System Temperature = Maximum of TPS1 from all chips

11. Advanced Features
---------------------

11.1 Load Balancing
-------------------

N30 devices can implement intelligent load balancing:
- Distribute circuits across three chips for balanced loading
- Monitor per-chip temperature and adjust loads
- Implement chip-level alarming and fault detection

11.2 Fault Tolerance
--------------------

With three chips, the N30 provides enhanced fault tolerance:
- Continued operation even if one chip fails
- Redundant monitoring of critical circuits
- Automatic failover capabilities

12. Programming Notes
---------------------

1. After modifying communication parameters, write to register 501 to save them to flash.
2. After modifying calibration coefficients, write to register 503 to save them to flash.
3. Read the entire data structure for a chip by reading 68 registers starting at the
   chip's base address.
4. For 32-bit values (uint32, float), read/write two consecutive registers.
5. When writing float values, use the CDBA format.
6. All energy measurements have a maximum value of 65535 kWh per channel.
7. Monitor all three chips to detect individual chip failures.
8. Implement timeout detection for missing chip data.

13. Installation and Deployment
-------------------------------

13.1 Circuit Assignment
-----------------------

Recommended circuit assignment strategy:
- Distribute high-priority circuits across all three chips
- Balance total current load per chip
- Consider thermal management (spread high-power circuits)
- Maintain critical circuit monitoring even if one chip fails

13.2 Monitoring Strategy
------------------------

For N30 deployment:
- Implement comprehensive monitoring of all three chips
- Set up alarm conditions for chip failures
- Monitor temperature across all chips
- Implement load balancing algorithms

14. Comparison Table
--------------------

+------------------+------------------+------------------+------------------+------------------+
| Feature          | N10             | N20              | N30              | N60              |
+------------------+------------------+------------------+------------------+------------------+
| Communication    | Modbus RTU      | Modbus RTU       | Modbus RTU       | Modbus RTU       |
| Energy Chips     | 1               | 2                | 3                | 6                |
| Channels         | 10              | 20               | 30               | 60               |
| Base Addresses   | 100             | 100, 200         | 100, 200, 300    | 100-600          |
| Data Structure   | Standard        | Dual-chip        | Triple-chip      | Six-chip         |
| Installation     | Wired           | Wired            | Wired            | Wired            |
| Fault Tolerance  | Basic           | Enhanced         | High             | Maximum          |
+------------------+------------------+------------------+------------------+------------------+

15. Conclusion
--------------

The N30 Energy Module provides triple-chip energy monitoring with Modbus RTU
communication, offering the highest monitoring capacity in the N-series while
maintaining protocol compatibility. The device is ideal for large-scale installations
requiring comprehensive electrical measurement and monitoring across many circuits,
with enhanced reliability through triple redundancy.

The N30 represents the pinnacle of the N-series energy monitoring family, providing
30-channel monitoring capability with advanced features like load balancing, fault
tolerance, and intelligent circuit distribution.

==============================================================================
Document generated for N30 Energy Module Modbus Protocol
For technical support, please contact Kincony support team.
protocol document download:

.txt   N30_Energy_Modbus_Protocol.txt (Size: 15.55 KB / Downloads: 75)

Print this item

  N20 Energy RS485 Modbus Protocol
Posted by: admin - 10-13-2025, 02:05 AM - Forum: N20 - No Replies

Code:
N20 Energy Module Modbus Protocol Specification
==============================================

1. Overview
-----------

This document specifies the Modbus communication protocol for the N20 Energy Module.
The device communicates using the Modbus RTU protocol and provides access to electrical
measurement parameters including current, power, energy consumption, voltage, frequency,
temperature, and power factor from 2 independent energy monitoring chips.

2. Module Characteristics
-------------------------

- Energy Monitoring Chips: 2
- Communication Protocol: Modbus RTU
- Wireless Technology: Not applicable (wired connection)
- Maximum Sensors Supported: 32
- Board Features: Display, Ethernet (W5500), 4G, SD Card support
- GPIO Availability: 2 free GPIOs (pins 15, 16)

3. Communication Parameters
---------------------------

- Protocol: Modbus RTU
- Baud Rate: 38400
- Function Codes:
  * 0x03: Read Holding Registers (for reading data)
  * 0x05: Write Single Coil (for control operations)
  * 0x10: Write Multiple Registers (for configuration)

4. Chip Addressing
------------------

The N20 Energy Module contains 2 measurement chips, each with a base address:

+-------------+--------------+--------------------+
| Chip Number | Base Address | Physical Location  |
+-------------+--------------+--------------------+
| Chip 1      | 100          | Main board P1      |
| Chip 2      | 200          | Main board P2      |
+-------------+--------------+--------------------+

Aggregate data from both chips is available starting at address 1000.

5. Data Structure
-----------------

Each chip provides the following data (accessible via Function Code 0x03):

5.1 Current Measurements (RMS) per Chip
---------------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 0              | RMS_1      | A     | uint32 | 0.001A/LSB    |
| 2              | RMS_2      | A     | uint32 | 0.001A/LSB    |
| 4              | RMS_3      | A     | uint32 | 0.001A/LSB    |
| 6              | RMS_4      | A     | uint32 | 0.001A/LSB    |
| 8              | RMS_5      | A     | uint32 | 0.001A/LSB    |
| 10             | RMS_6      | A     | uint32 | 0.001A/LSB    |
| 12             | RMS_7      | A     | uint32 | 0.001A/LSB    |
| 14             | RMS_8      | A     | uint32 | 0.001A/LSB    |
| 16             | RMS_9      | A     | uint32 | 0.001A/LSB    |
| 18             | RMS_10     | A     | uint32 | 0.001A/LSB    |
+----------------+------------+-------+--------+---------------+

Example: To read RMS_1 from Chip 1, read registers 100 and 101 (2 registers for uint32).
Example: To read RMS_1 from Chip 2, read registers 200 and 201 (2 registers for uint32).
Display: Reading of 5432 represents 5.432A (5432 × 0.001A)

5.2 Power Measurements (WATT) per Chip
--------------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 20             | WATT_1     | W     | uint32 | 0.1W/LSB      |
| 22             | WATT_2     | W     | uint32 | 0.1W/LSB      |
| 24             | WATT_3     | W     | uint32 | 0.1W/LSB      |
| 26             | WATT_4     | W     | uint32 | 0.1W/LSB      |
| 28             | WATT_5     | W     | uint32 | 0.1W/LSB      |
| 30             | WATT_6     | W     | uint32 | 0.1W/LSB      |
| 32             | WATT_7     | W     | uint32 | 0.1W/LSB      |
| 34             | WATT_8     | W     | uint32 | 0.1W/LSB      |
| 36             | WATT_9     | W     | uint32 | 0.1W/LSB      |
| 38             | WATT_10    | W     | uint32 | 0.1W/LSB      |
+----------------+------------+-------+--------+---------------+

Example: To read WATT_1 from Chip 1, read registers 120 and 121 (2 registers for uint32).
Example: To read WATT_1 from Chip 2, read registers 220 and 221 (2 registers for uint32).
Display: Reading of 12345 represents 1234.5W (12345 × 0.1W)

5.3 Energy Consumption Measurements per Chip
--------------------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 40             | Energy_1    | kWh   | uint32 | 1kWh/LSB            |
| 42             | Energy_2    | kWh   | uint32 | 1kWh/LSB            |
| 44             | Energy_3    | kWh   | uint32 | 1kWh/LSB            |
| 46             | Energy_4    | kWh   | uint32 | 1kWh/LSB            |
| 48             | Energy_5    | kWh   | uint32 | 1kWh/LSB            |
| 50             | Energy_6    | kWh   | uint32 | 1kWh/LSB            |
| 52             | Energy_7    | kWh   | uint32 | 1kWh/LSB            |
| 54             | Energy_8    | kWh   | uint32 | 1kWh/LSB            |
| 56             | Energy_9    | kWh   | uint32 | 1kWh/LSB            |
| 58             | Energy_10   | kWh   | uint32 | 1kWh/LSB            |
| 60             | Energy_Sum  | kWh   | uint32 | 1kWh/LSB            |
+----------------+-------------+-------+--------+---------------------+

Note: The maximum measurable energy per channel is 65535 kWh.

5.4 Other Measurements per Chip
-------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 62             | RMS_V       | V     | uint16 | 0.01V/LSB           |
| 63             | Period      | Hz    | uint16 | 0.01Hz/LSB          |
| 64             | TPS1        | °C    | float  | 0.1°C/LSB           |
| 66             | PF          | -     | float  | Power Factor (0-1)  |
+----------------+-------------+-------+--------+---------------------+

6. Channel Mapping
------------------

Total of 20 energy monitoring channels:
- Channels 1-10: Managed by Chip 1 (base address 100)
- Channels 11-20: Managed by Chip 2 (base address 200)

Each chip reports its 10 channels as local channels 1-10 in the register mapping.

7. Control Functions (Function Code 0x05)
------------------------------------------

The following control registers can be written to using the Modbus function code 0x05:

+----------+------------------------------+--------------------------------------------+
| Register | Function                     | Description                                |
+----------+------------------------------+--------------------------------------------+
| 500      | Warm Reset                   | Resets the device                          |
| 501      | Save Parameters to Flash     | Save communication parameters to flash     |
| 503      | Save Coefficients to Flash   | Save calibration coefficients to flash     |
| 504      | Clear Coefficients           | Reset all coefficients to 1.0 (use caution)|
| 510      | Restore Factory Settings     | Restore factory communication parameters   |
+----------+------------------------------+--------------------------------------------+

8. Energy Clearing Functions (Function Code 0x05)
--------------------------------------------------

The following registers clear energy consumption data when written with function code 0x05:

8.1 Clear All Channels on a Chip
---------------------------------

+----------+--------------------------------+
| Register | Function                       |
+----------+--------------------------------+
| 520      | Clear all energy on Chip 1     |
| 521      | Clear all energy on Chip 2     |
+----------+--------------------------------+

8.2 Clear Individual Channels
------------------------------

+----------------+------------------------------------------------+
| Register Range | Function                                       |
+----------------+------------------------------------------------+
| 526-535        | Clear energy on Chip 1, channels 1-10          |
| 536-545        | Clear energy on Chip 2, channels 1-10          |
| 586            | Clear sum energy on Chip 1                     |
| 587            | Clear sum energy on Chip 2                     |
+----------------+------------------------------------------------+

9. Calibration Coefficients (Function Code 0x03 to read, 0x10 to write)
------------------------------------------------------------------------

All coefficients are stored as floating-point values in CDBA format.

9.1 Current (RMS) Coefficients for Chip 1
------------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3000     | FACTOR OF RMS1      | 1.0     |
| 3002     | FACTOR OF RMS2      | 1.0     |
| 3004     | FACTOR OF RMS3      | 1.0     |
| 3006     | FACTOR OF RMS4      | 1.0     |
| 3008     | FACTOR OF RMS5      | 1.0     |
| 3010     | FACTOR OF RMS6      | 1.0     |
| 3012     | FACTOR OF RMS7      | 1.0     |
| 3014     | FACTOR OF RMS8      | 1.0     |
| 3016     | FACTOR OF RMS9      | 1.0     |
| 3018     | FACTOR OF RMS10     | 1.0     |
+----------+---------------------+---------+

9.2 Power (WATT) Coefficients for Chip 1
-----------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3020     | FACTOR OF WATT1     | 1.0     |
| 3022     | FACTOR OF WATT2     | 1.0     |
| 3024     | FACTOR OF WATT3     | 1.0     |
| 3026     | FACTOR OF WATT4     | 1.0     |
| 3028     | FACTOR OF WATT5     | 1.0     |
| 3030     | FACTOR OF WATT6     | 1.0     |
| 3032     | FACTOR OF WATT7     | 1.0     |
| 3034     | FACTOR OF WATT8     | 1.0     |
| 3036     | FACTOR OF WATT9     | 1.0     |
| 3038     | FACTOR OF WATT10    | 1.0     |
+----------+---------------------+---------+

9.3 Energy Coefficients for Chip 1
-----------------------------------

+----------+-----------------------+---------+
| Register | Parameter             | Default |
+----------+-----------------------+---------+
| 3040     | FACTOR OF ENERGY1     | 1.0     |
| 3042     | FACTOR OF ENERGY2     | 1.0     |
| 3044     | FACTOR OF ENERGY3     | 1.0     |
| 3046     | FACTOR OF ENERGY4     | 1.0     |
| 3048     | FACTOR OF ENERGY5     | 1.0     |
| 3050     | FACTOR OF ENERGY6     | 1.0     |
| 3052     | FACTOR OF ENERGY7     | 1.0     |
| 3054     | FACTOR OF ENERGY8     | 1.0     |
| 3056     | FACTOR OF ENERGY9     | 1.0     |
| 3058     | FACTOR OF ENERGY10    | 1.0     |
| 3060     | FACTOR OF ENERGY SUM  | 1.0     |
+----------+-----------------------+---------+

9.4 Chip 2 Calibration Coefficient Base Address
-----------------------------------------------

The calibration coefficients for Chip 2 follow the same structure but start at
base address 3064:

+-------------+---------------+
| Chip Number | Base Register |
+-------------+---------------+
| Chip 2      | 3064          |
+-------------+---------------+

10. Data Aggregation
--------------------

Gateway systems can aggregate data from both chips:
- Total System Current = Sum of all RMS values from both chips
- Total System Power = Sum of all WATT values from both chips
- Total System Energy = Sum of all Energy values from both chips
- Average System Voltage = Average of RMS_V from both chips
- Average System Frequency = Average of Period from both chips

11. Programming Notes
---------------------

1. After modifying communication parameters, write to register 501 to save them to flash.
2. After modifying calibration coefficients, write to register 503 to save them to flash.
3. Read the entire data structure for a chip by reading 68 registers starting at the
   chip's base address.
4. For 32-bit values (uint32, float), read/write two consecutive registers.
5. When writing float values, use the CDBA format.
6. All energy measurements have a maximum value of 65535 kWh per channel.
7. Monitor both chips to detect individual chip failures.

12. Comparison Table
--------------------

+------------------+------------------+------------------+------------------+
| Feature          | N10             | N20              | N30              |
+------------------+------------------+------------------+------------------+
| Communication    | Modbus RTU      | Modbus RTU       | Modbus RTU       |
| Energy Chips     | 1               | 2                | 3                |
| Channels         | 10              | 20               | 30               |
| Base Addresses   | 100             | 100, 200         | 100, 200, 300    |
| Data Structure   | Standard        | Dual-chip        | Triple-chip      |
| Installation     | Wired           | Wired            | Wired            |
+------------------+------------------+------------------+------------------+

13. Conclusion
--------------

The N20 Energy Module provides dual-chip energy monitoring with Modbus RTU
communication, offering twice the monitoring capacity of the N10 while maintaining
the same communication protocol structure. The device is ideal for medium-scale
installations requiring electrical measurement and monitoring across multiple circuits.

==============================================================================
Document generated for N20 Energy Module Modbus Protocol
For technical support, please contact Kincony support team.
protocol document download:

.txt   N20_Energy_Modbus_Protocol.txt (Size: 13.25 KB / Downloads: 75)

Print this item

  N10 Energy RS485 Modbus Protocol
Posted by: admin - 10-13-2025, 02:04 AM - Forum: N10 - No Replies

Code:
N10 Energy Module Modbus Protocol Specification
==============================================

1. Overview
-----------

This document specifies the Modbus communication protocol for the N10 Energy Module.
The device communicates using the Modbus RTU protocol and provides access to electrical
measurement parameters including current, power, energy consumption, voltage, frequency,
temperature, and power factor.

2. Module Characteristics
-------------------------

- Energy Monitoring Chips: 1
- Communication Protocol: Modbus RTU
- Wireless Technology: Not applicable (wired connection)
- Maximum Sensors Supported: 32
- Board Features: Display, Ethernet (W5500), 4G, SD Card support
- GPIO Availability: 2 free GPIOs (pins 15, 16)

3. Communication Parameters
---------------------------

- Protocol: Modbus RTU
- Baud Rate: 38400
- Function Codes:
  * 0x03: Read Holding Registers (for reading data)
  * 0x05: Write Single Coil (for control operations)
  * 0x10: Write Multiple Registers (for configuration)

4. Chip Addressing
------------------

The N10 Energy Module contains 1 measurement chip with base address:

+-------------+--------------+--------------------+
| Chip Number | Base Address | Physical Location  |
+-------------+--------------+--------------------+
| Chip 1      | 100          | Main board         |
+-------------+--------------+--------------------+

5. Data Structure
-----------------

The chip provides the following data (accessible via Function Code 0x03):

5.1 Current Measurements (RMS)
------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 0              | RMS_1      | A     | uint32 | 0.001A/LSB    |
| 2              | RMS_2      | A     | uint32 | 0.001A/LSB    |
| 4              | RMS_3      | A     | uint32 | 0.001A/LSB    |
| 6              | RMS_4      | A     | uint32 | 0.001A/LSB    |
| 8              | RMS_5      | A     | uint32 | 0.001A/LSB    |
| 10             | RMS_6      | A     | uint32 | 0.001A/LSB    |
| 12             | RMS_7      | A     | uint32 | 0.001A/LSB    |
| 14             | RMS_8      | A     | uint32 | 0.001A/LSB    |
| 16             | RMS_9      | A     | uint32 | 0.001A/LSB    |
| 18             | RMS_10     | A     | uint32 | 0.001A/LSB    |
+----------------+------------+-------+--------+---------------+

Example: To read RMS_1 from Chip 1, read registers 100 and 101 (2 registers for uint32).
Display: Reading of 5432 represents 5.432A (5432 × 0.001A)

5.2 Power Measurements (WATT)
-----------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 20             | WATT_1     | W     | uint32 | 0.1W/LSB      |
| 22             | WATT_2     | W     | uint32 | 0.1W/LSB      |
| 24             | WATT_3     | W     | uint32 | 0.1W/LSB      |
| 26             | WATT_4     | W     | uint32 | 0.1W/LSB      |
| 28             | WATT_5     | W     | uint32 | 0.1W/LSB      |
| 30             | WATT_6     | W     | uint32 | 0.1W/LSB      |
| 32             | WATT_7     | W     | uint32 | 0.1W/LSB      |
| 34             | WATT_8     | W     | uint32 | 0.1W/LSB      |
| 36             | WATT_9     | W     | uint32 | 0.1W/LSB      |
| 38             | WATT_10    | W     | uint32 | 0.1W/LSB      |
+----------------+------------+-------+--------+---------------+

Example: To read WATT_1 from Chip 1, read registers 120 and 121 (2 registers for uint32).
Display: Reading of 12345 represents 1234.5W (12345 × 0.1W)

5.3 Energy Consumption Measurements
-----------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 40             | Energy_1    | kWh   | uint32 | 1kWh/LSB            |
| 42             | Energy_2    | kWh   | uint32 | 1kWh/LSB            |
| 44             | Energy_3    | kWh   | uint32 | 1kWh/LSB            |
| 46             | Energy_4    | kWh   | uint32 | 1kWh/LSB            |
| 48             | Energy_5    | kWh   | uint32 | 1kWh/LSB            |
| 50             | Energy_6    | kWh   | uint32 | 1kWh/LSB            |
| 52             | Energy_7    | kWh   | uint32 | 1kWh/LSB            |
| 54             | Energy_8    | kWh   | uint32 | 1kWh/LSB            |
| 56             | Energy_9    | kWh   | uint32 | 1kWh/LSB            |
| 58             | Energy_10   | kWh   | uint32 | 1kWh/LSB            |
| 60             | Energy_Sum  | kWh   | uint32 | 1kWh/LSB            |
+----------------+-------------+-------+--------+---------------------+

Note: The maximum measurable energy per channel is 65535 kWh.

5.4 Other Measurements
----------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 62             | RMS_V       | V     | uint16 | 0.01V/LSB           |
| 63             | Period      | Hz    | uint16 | 0.01Hz/LSB          |
| 64             | TPS1        | °C    | float  | 0.1°C/LSB           |
| 66             | PF          | -     | float  | Power Factor (0-1)  |
+----------------+-------------+-------+--------+---------------------+

6. Control Functions (Function Code 0x05)
------------------------------------------

The following control registers can be written to using the Modbus function code 0x05:

+----------+------------------------------+--------------------------------------------+
| Register | Function                     | Description                                |
+----------+------------------------------+--------------------------------------------+
| 500      | Warm Reset                   | Resets the device                          |
| 501      | Save Parameters to Flash     | Save communication parameters to flash     |
| 503      | Save Coefficients to Flash   | Save calibration coefficients to flash     |
| 504      | Clear Coefficients           | Reset all coefficients to 1.0 (use caution)|
| 510      | Restore Factory Settings     | Restore factory communication parameters   |
+----------+------------------------------+--------------------------------------------+

7. Energy Clearing Functions (Function Code 0x05)
--------------------------------------------------

The following registers clear energy consumption data when written with function code 0x05:

7.1 Clear All Channels on the Chip
-----------------------------------

+----------+--------------------------------+
| Register | Function                       |
+----------+--------------------------------+
| 520      | Clear all energy on Chip 1     |
+----------+--------------------------------+

7.2 Clear Individual Channels
------------------------------

+----------------+------------------------------------------------+
| Register Range | Function                                       |
+----------------+------------------------------------------------+
| 526-535        | Clear energy on Chip 1, channels 1-10          |
| 586            | Clear sum energy on Chip 1                     |
+----------------+------------------------------------------------+

8. Calibration Coefficients (Function Code 0x03 to read, 0x10 to write)
------------------------------------------------------------------------

All coefficients are stored as floating-point values in CDBA format.

8.1 Current (RMS) Coefficients for Chip 1
------------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3000     | FACTOR OF RMS1      | 1.0     |
| 3002     | FACTOR OF RMS2      | 1.0     |
| 3004     | FACTOR OF RMS3      | 1.0     |
| 3006     | FACTOR OF RMS4      | 1.0     |
| 3008     | FACTOR OF RMS5      | 1.0     |
| 3010     | FACTOR OF RMS6      | 1.0     |
| 3012     | FACTOR OF RMS7      | 1.0     |
| 3014     | FACTOR OF RMS8      | 1.0     |
| 3016     | FACTOR OF RMS9      | 1.0     |
| 3018     | FACTOR OF RMS10     | 1.0     |
+----------+---------------------+---------+

8.2 Power (WATT) Coefficients for Chip 1
-----------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3020     | FACTOR OF WATT1     | 1.0     |
| 3022     | FACTOR OF WATT2     | 1.0     |
| 3024     | FACTOR OF WATT3     | 1.0     |
| 3026     | FACTOR OF WATT4     | 1.0     |
| 3028     | FACTOR OF WATT5     | 1.0     |
| 3030     | FACTOR OF WATT6     | 1.0     |
| 3032     | FACTOR OF WATT7     | 1.0     |
| 3034     | FACTOR OF WATT8     | 1.0     |
| 3036     | FACTOR OF WATT9     | 1.0     |
| 3038     | FACTOR OF WATT10    | 1.0     |
+----------+---------------------+---------+

8.3 Energy Coefficients for Chip 1
-----------------------------------

+----------+-----------------------+---------+
| Register | Parameter             | Default |
+----------+-----------------------+---------+
| 3040     | FACTOR OF ENERGY1     | 1.0     |
| 3042     | FACTOR OF ENERGY2     | 1.0     |
| 3044     | FACTOR OF ENERGY3     | 1.0     |
| 3046     | FACTOR OF ENERGY4     | 1.0     |
| 3048     | FACTOR OF ENERGY5     | 1.0     |
| 3050     | FACTOR OF ENERGY6     | 1.0     |
| 3052     | FACTOR OF ENERGY7     | 1.0     |
| 3054     | FACTOR OF ENERGY8     | 1.0     |
| 3056     | FACTOR OF ENERGY9     | 1.0     |
| 3058     | FACTOR OF ENERGY10    | 1.0     |
| 3060     | FACTOR OF ENERGY SUM  | 1.0     |
+----------+-----------------------+---------+

9. Programming Notes
--------------------

1. After modifying communication parameters, write to register 501 to save them to flash.
2. After modifying calibration coefficients, write to register 503 to save them to flash.
3. Read the entire data structure for the chip by reading 68 registers starting at base
   address 100.
4. For 32-bit values (uint32, float), read/write two consecutive registers.
5. When writing float values, use the CDBA format.
6. All energy measurements have a maximum value of 65535 kWh per channel.

10. Comparison with Other N-Series Modules
------------------------------------------

+------------------+------------------+------------------+------------------+
| Feature          | N10             | N20              | N30              |
+------------------+------------------+------------------+------------------+
| Communication    | Modbus RTU      | Modbus RTU       | Modbus RTU       |
| Energy Chips     | 1               | 2                | 3                |
| Channels         | 10              | 20               | 30               |
| Base Addresses   | 100             | 100, 200         | 100, 200, 300    |
| Data Structure   | Standard        | Dual-chip        | Triple-chip      |
| Installation     | Wired           | Wired            | Wired            |
+------------------+------------------+------------------+------------------+

11. Conclusion
--------------

The N10 Energy Module provides single-chip energy monitoring with Modbus RTU
communication, making it ideal for small-scale installations requiring precise
electrical measurement and monitoring. The device offers 10 channels of current,
power, and energy monitoring with comprehensive calibration and control capabilities.

==============================================================================
Document generated for N10 Energy Module Modbus Protocol
For technical support, please contact Kincony support team.
protocol document download:

.txt   N10_Energy_Modbus_Protocol.txt (Size: 11.62 KB / Downloads: 82)

Print this item

  N60 Energy RS485 Modbus Protocol
Posted by: admin - 10-13-2025, 02:03 AM - Forum: N60 - No Replies

Code:
N60 Energy Module Modbus Protocol Specification
==============================================

1. Overview
-----------

This document specifies the Modbus communication protocol for the N60 Energy Module.
The device communicates using the Modbus RTU protocol and provides access to electrical
measurement parameters including current, power, energy consumption, voltage, frequency,
temperature, and power factor.

2. Communication Parameters
---------------------------

- Protocol: Modbus RTU
- Baud Rate: 38400
- Function Codes:
  * 0x03: Read Holding Registers (for reading data)
  * 0x05: Write Single Coil (for control operations)
  * 0x10: Write Multiple Registers (for configuration)

3. Chip Addressing
------------------

The N60 Energy Module contains 6 measurement chips, each with a base address:

+-------------+--------------+--------------------+
| Chip Number | Base Address | Physical Location  |
+-------------+--------------+--------------------+
| Chip 1      | 100          | Bottom board P9    |
| Chip 2      | 200          | Bottom board P10   |
| Chip 3      | 300          | Bottom board P11   |
| Chip 4      | 400          | Bottom board P12   |
| Chip 5      | 500          | Bottom board P13   |
| Chip 6      | 600          | Bottom board P14   |
+-------------+--------------+--------------------+

Aggregate data from all 6 chips is available starting at address 1000.

4. Data Structure
-----------------

Each chip provides the following data (accessible via Function Code 0x03):

4.1 Current Measurements (RMS)
------------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 0              | RMS_1      | A     | uint32 | 0.001A/LSB    |
| 2              | RMS_2      | A     | uint32 | 0.001A/LSB    |
| 4              | RMS_3      | A     | uint32 | 0.001A/LSB    |
| 6              | RMS_4      | A     | uint32 | 0.001A/LSB    |
| 8              | RMS_5      | A     | uint32 | 0.001A/LSB    |
| 10             | RMS_6      | A     | uint32 | 0.001A/LSB    |
| 12             | RMS_7      | A     | uint32 | 0.001A/LSB    |
| 14             | RMS_8      | A     | uint32 | 0.001A/LSB    |
| 16             | RMS_9      | A     | uint32 | 0.001A/LSB    |
| 18             | RMS_10     | A     | uint32 | 0.001A/LSB    |
+----------------+------------+-------+--------+---------------+

Example: To read RMS_1 from Chip 1, read registers 100 and 101 (2 registers for uint32).
Display: Reading of 5432 represents 5.432A (5432 × 0.001A)

4.2 Power Measurements (WATT)
-----------------------------

+----------------+------------+-------+--------+---------------+
| Register Offset| Parameter  | Units | Format | Resolution    |
+----------------+------------+-------+--------+---------------+
| 20             | WATT_1     | W     | uint32 | 0.1W/LSB      |
| 22             | WATT_2     | W     | uint32 | 0.1W/LSB      |
| 24             | WATT_3     | W     | uint32 | 0.1W/LSB      |
| 26             | WATT_4     | W     | uint32 | 0.1W/LSB      |
| 28             | WATT_5     | W     | uint32 | 0.1W/LSB      |
| 30             | WATT_6     | W     | uint32 | 0.1W/LSB      |
| 32             | WATT_7     | W     | uint32 | 0.1W/LSB      |
| 34             | WATT_8     | W     | uint32 | 0.1W/LSB      |
| 36             | WATT_9     | W     | uint32 | 0.1W/LSB      |
| 38             | WATT_10    | W     | uint32 | 0.1W/LSB      |
+----------------+------------+-------+--------+---------------+

Example: To read WATT_1 from Chip 2, read registers 220 and 221 (2 registers for uint32).
Display: Reading of 12345 represents 1234.5W (12345 × 0.1W)

4.3 Energy Consumption Measurements
-----------------------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 40             | Energy_1    | kWh   | uint32 | 1kWh/LSB            |
| 42             | Energy_2    | kWh   | uint32 | 1kWh/LSB            |
| 44             | Energy_3    | kWh   | uint32 | 1kWh/LSB            |
| 46             | Energy_4    | kWh   | uint32 | 1kWh/LSB            |
| 48             | Energy_5    | kWh   | uint32 | 1kWh/LSB            |
| 50             | Energy_6    | kWh   | uint32 | 1kWh/LSB            |
| 52             | Energy_7    | kWh   | uint32 | 1kWh/LSB            |
| 54             | Energy_8    | kWh   | uint32 | 1kWh/LSB            |
| 56             | Energy_9    | kWh   | uint32 | 1kWh/LSB            |
| 58             | Energy_10   | kWh   | uint32 | 1kWh/LSB            |
| 60             | Energy_Sum  | kWh   | uint32 | 1kWh/LSB            |
+----------------+-------------+-------+--------+---------------------+

Note: The maximum measurable energy per channel is 65535 kWh.

4.4 Other Measurements
----------------------

+----------------+-------------+-------+--------+---------------------+
| Register Offset| Parameter   | Units | Format | Resolution          |
+----------------+-------------+-------+--------+---------------------+
| 62             | RMS_V       | V     | uint16 | 0.01V/LSB           |
| 63             | Period      | Hz    | uint16 | 0.01Hz/LSB          |
| 64             | TPS1        | °C    | float  | 0.1°C/LSB           |
| 66             | PF          | -     | float  | Power Factor (0-1)  |
+----------------+-------------+-------+--------+---------------------+

5. Control Functions (Function Code 0x05)
------------------------------------------

The following control registers can be written to using the Modbus function code 0x05:

+----------+------------------------------+--------------------------------------------+
| Register | Function                     | Description                                |
+----------+------------------------------+--------------------------------------------+
| 500      | Warm Reset                   | Resets the device                          |
| 501      | Save Parameters to Flash     | Save communication parameters to flash     |
| 503      | Save Coefficients to Flash   | Save calibration coefficients to flash     |
| 504      | Clear Coefficients           | Reset all coefficients to 1.0 (use caution)|
| 510      | Restore Factory Settings     | Restore factory communication parameters   |
+----------+------------------------------+--------------------------------------------+

6. Energy Clearing Functions (Function Code 0x05)
--------------------------------------------------

The following registers clear energy consumption data when written with function code 0x05:

6.1 Clear All Channels on a Chip
---------------------------------

+----------+--------------------------------+
| Register | Function                       |
+----------+--------------------------------+
| 520      | Clear all energy on Chip 1     |
| 521      | Clear all energy on Chip 2     |
| 522      | Clear all energy on Chip 3     |
| 523      | Clear all energy on Chip 4     |
| 524      | Clear all energy on Chip 5     |
| 525      | Clear all energy on Chip 6     |
+----------+--------------------------------+

6.2 Clear Individual Channels
------------------------------

+----------------+------------------------------------------------+
| Register Range | Function                                       |
+----------------+------------------------------------------------+
| 526-535        | Clear energy on Chip 1, channels 1-10          |
| 536-545        | Clear energy on Chip 2, channels 1-10          |
| 546-555        | Clear energy on Chip 3, channels 1-10          |
| 556-565        | Clear energy on Chip 4, channels 1-10          |
| 566-575        | Clear energy on Chip 5, channels 1-10          |
| 576-585        | Clear energy on Chip 6, channels 1-10          |
| 586            | Clear sum energy on Chip 1                     |
| 587            | Clear sum energy on Chip 2                     |
| 588            | Clear sum energy on Chip 3                     |
| 589            | Clear sum energy on Chip 4                     |
| 590            | Clear sum energy on Chip 5                     |
| 591            | Clear sum energy on Chip 6                     |
+----------------+------------------------------------------------+

7. Calibration Coefficients (Function Code 0x03 to read, 0x10 to write)
------------------------------------------------------------------------

All coefficients are stored as floating-point values in CDBA format.

7.1 Current (RMS) Coefficients for Chip 1
------------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3000     | FACTOR OF RMS1      | 1.0     |
| 3002     | FACTOR OF RMS2      | 1.0     |
| 3004     | FACTOR OF RMS3      | 1.0     |
| 3006     | FACTOR OF RMS4      | 1.0     |
| 3008     | FACTOR OF RMS5      | 1.0     |
| 3010     | FACTOR OF RMS6      | 1.0     |
| 3012     | FACTOR OF RMS7      | 1.0     |
| 3014     | FACTOR OF RMS8      | 1.0     |
| 3016     | FACTOR OF RMS9      | 1.0     |
| 3018     | FACTOR OF RMS10     | 1.0     |
+----------+---------------------+---------+

7.2 Power (WATT) Coefficients for Chip 1
-----------------------------------------

+----------+---------------------+---------+
| Register | Parameter           | Default |
+----------+---------------------+---------+
| 3020     | FACTOR OF WATT1     | 1.0     |
| 3022     | FACTOR OF WATT2     | 1.0     |
| 3024     | FACTOR OF WATT3     | 1.0     |
| 3026     | FACTOR OF WATT4     | 1.0     |
| 3028     | FACTOR OF WATT5     | 1.0     |
| 3030     | FACTOR OF WATT6     | 1.0     |
| 3032     | FACTOR OF WATT7     | 1.0     |
| 3034     | FACTOR OF WATT8     | 1.0     |
| 3036     | FACTOR OF WATT9     | 1.0     |
| 3038     | FACTOR OF WATT10    | 1.0     |
+----------+---------------------+---------+

7.3 Energy Coefficients for Chip 1
-----------------------------------

+----------+-----------------------+---------+
| Register | Parameter             | Default |
+----------+-----------------------+---------+
| 3040     | FACTOR OF ENERGY1     | 1.0     |
| 3042     | FACTOR OF ENERGY2     | 1.0     |
| 3044     | FACTOR OF ENERGY3     | 1.0     |
| 3046     | FACTOR OF ENERGY4     | 1.0     |
| 3048     | FACTOR OF ENERGY5     | 1.0     |
| 3050     | FACTOR OF ENERGY6     | 1.0     |
| 3052     | FACTOR OF ENERGY7     | 1.0     |
| 3054     | FACTOR OF ENERGY8     | 1.0     |
| 3056     | FACTOR OF ENERGY9     | 1.0     |
| 3058     | FACTOR OF ENERGY10    | 1.0     |
| 3060     | FACTOR OF ENERGY SUM  | 1.0     |
+----------+-----------------------+---------+

7.4 Other Chip Calibration Coefficient Base Addresses
------------------------------------------------------

The calibration coefficients for other chips follow the same structure but start at
different base addresses:

+-------------+---------------+
| Chip Number | Base Register |
+-------------+---------------+
| Chip 2      | 3064          |
| Chip 3      | 3128          |
| Chip 4      | 3192          |
| Chip 5      | 3256          |
| Chip 6      | 3320          |
+-------------+---------------+

8. Programming Notes
--------------------

1. After modifying communication parameters, write to register 501 to save them to flash.
2. After modifying calibration coefficients, write to register 503 to save them to flash.
3. Read the entire data structure for a chip by reading 68 registers starting at the
   chip's base address.
4. For 32-bit values (uint32, float), read/write two consecutive registers.
5. When writing float values, use the CDBA format.
6. All energy measurements have a maximum value of 65535 kWh per channel.

==============================================================================
Document generated from n60_energy_modbus_protocol.org
For technical support, please contact Kincony support team.

protocol document download:

.txt   N60_Energy_Modbus_Protocol.txt (Size: 11.84 KB / Downloads: 75)

Print this item

  dht22 on T64M
Posted by: Bejakke - 10-12-2025, 04:28 PM - Forum: "KCS" v3 firmware - Replies (6)

I have two T64M modules with KCS v3.12.0.
However, dht22 doesn't work for me. It doesn't work on either of the T64Ms.
Tested on gpio 9 and 16.
When I test this via another ESP with ESP-Home, the sensor does work.
No problem with the DS18B20.
How do I fix this? 


Another questions.
  1. is it possible to send a pwm on the free gpio? 
  2. Is there an option to control an output as long as an input is high? 
  3. Will there also be an option for BM280?



Attached Files Thumbnail(s)
           
Image(s)
   
Print this item

Photo Free sample for testing diy
Posted by: Bejakke - 10-12-2025, 03:09 PM - Forum: Apply for free sample product - No Replies

Dear,

I currently have two T64M modules.
I want to further automate my home.
I'd like to experiment with the KC868-A4.
This is for automating my HVAC system.



Attached Files Thumbnail(s)
   
Print this item