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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,375
» Latest member: daleldalel
» Forum threads: 2,577
» Forum posts: 13,330

Full Statistics

Online Users
There are currently 38 online users.
» 0 Member(s) | 29 Guest(s)
Amazonbot, Bing, Crawl, Google, Yandex, bot

Latest Threads
KC868-AG RF - sending rep...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
1 hour ago
» Replies: 5
» Views: 155
Kc868 a8 in workshop
Forum: KC868-A8
Last Post: admin
3 hours ago
» Replies: 1
» Views: 3
KC868-A2 configure yaml f...
Forum: KC868-A2
Last Post: admin
3 hours ago
» Replies: 16
» Views: 7,691
One input switch - turn o...
Forum: KinCony AS
Last Post: admin
3 hours ago
» Replies: 1
» Views: 2
change wake up name
Forum: KinCony AS
Last Post: admin
3 hours ago
» Replies: 15
» Views: 111
KC868-A8 Switch
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
4 hours ago
» Replies: 3
» Views: 36
H32L - home assistant
Forum: KC868-HxB series Smart Controller
Last Post: admin
4 hours ago
» Replies: 1
» Views: 5
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: Poczwara13
6 hours ago
» Replies: 7
» Views: 69
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: biofects
7 hours ago
» Replies: 14
» Views: 481
How can I power multiple ...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 09:03 AM
» Replies: 12
» Views: 140

  KC868-A8 mqtt connection
Posted by: yamaray - 01-06-2024, 10:43 PM - Forum: KC868-A8 - Replies (5)

Hi,
I just reived today the KC868-A8 device, I flashed it with KCS_KC868_A8_V2.2.2.bin. I connect it with ethernet cable to my LAN, everything seems to work but the mqtt connection shows disconnected in the monitor page. The broker is locally installed (in the same LAN).
I verified with MQTT Explorer that the device is not connected to the broker (mosquitto). I tried other brokers also in the local LAN and in the WAN, but same result. The monitor always shows MQTT disconnected. 
I turned off the WiFi of the device just to get only one connection to the LAN, but it is the same.
I also tried the firmware version KCS_KC868_A8_V2.0.5.bin but I got the same result.

Any suggestion will be appreciated.

THX 
Yamaray

Print this item

  KC868-AIO source code
Posted by: Mosfet3 - 01-06-2024, 12:43 PM - Forum: KC868-AIO - Replies (3)

Hi,
Is it possible to get KC868-AIO source code? 
Is it possible to preprogam intputs to outputs permanently and make it latching?

Print this item

  Errno 113
Posted by: shuhrat - 01-06-2024, 09:35 AM - Forum: KC868-A16S - Replies (5)

Can't connect to ESPHome API for kc868-a16s @ 192.168.30.85: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.30.85', port=6053))]: [Errno 113] Connect call failed ('192.168.30.85', 6053) (SocketAPIError)

12:04:08 – (ПРЕДУПРЕЖДЕНИЕ) runner.py
kc868-a16s @ 192.168.30.85: Connection error occurred: Ping response not received after 90.0 seconds
12:04:07 – (ПРЕДУПРЕЖДЕНИЕ) runner.py

Almost every day I get this error. After it the device stops responding and I reboot it and then everything works
esphome:
name: kc868-a16s
platform: ESP32
board: esp32dev


# Enable logging
logger:

# Enable Home Assistant API
api:
encryption:
key: "iJcfgpwJwZg9ObKzoD9XIa1KAQx8yAy7BZwuo3ye5cg="

ota:
password: "f705fcd4ef788f830ac190213002873b"

# Example configuration entry for ESP32
i2c:
sda: 4
scl: 5
scan: true
id: bus_a


# Example configuration entry
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
use_address: 192.168.30.85

# Optional manual IP
manual_ip:
static_ip: 192.168.30.85
gateway: 192.168.30.1
subnet: 255.255.255.0


# Example configuration entry
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
address: 0x24

- id: 'pcf8574_hub_out_2' # for output channel 9-16
address: 0x25

- id: 'pcf8574_hub_in_1' # for input channel 1-8
address: 0x22

- id: 'pcf8574_hub_in_2' # for input channel 9-16
address: 0x23

# Individual outputs
switch:
- platform: gpio
name: "a16s-output1"
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true

- platform: gpio
name: "a16s-output2"
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true

- platform: gpio
name: "a16s-output3"
pin:
pcf8574: pcf8574_hub_out_1
number: 2
mode: OUTPUT
inverted: true

Print this item

  I tried to install KC868-A128 but I got an error!
Posted by: soethu - 01-06-2024, 04:28 AM - Forum: KC868-A128 - Replies (7)

INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/a128.yaml...
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-a...pping-pins
WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-a...pping-pins
Failed config

switch.gpio: [source <unicode string>:516]
 
  Pin 0 is used in multiple places.
  platform: gpio
  name: a128-light49
  pin:
    pcf8574: pcf8574_hub_out_4
    number: 0
    mode:
      output: True
      input: False
    inverted: True
  disabled_by_default: False
  restore_mode: ALWAYS_OFF
  interlock_wait_time: 0ms
switch.gpio: [source <unicode string>:644]
 
  Pin 0 is used in multiple places.
  platform: gpio
  name: a128-light65
  pin:
    pcf8574: pcf8574_hub_out_4
    number: 0
    mode:
      output: True
      input: False
    inverted: True
  disabled_by_default: False
  restore_mode: ALWAYS_OFF
  interlock_wait_time: 0ms

Print this item

  30 Channel ESP32 energy monitor – KinCony M30 released
Posted by: admin - 01-05-2024, 11:31 AM - Forum: News - Replies (5)

We have designed 30 Channel ESP32 energy monitor open source board - M30 (ESP32 30 Channel CT Clamp Energy Monitor) for home automation DIYer. The hardware have 30CH CT Clamp sensor INPUT ports + 3CH ZMPT101B voltage sensor + SD card + 30CH RGB colorful LED for current value. Ethernet+RS485+4G modbus 30CH high-accuracy energy meter ic-BL0910 with CT clamp. it can easy integrate to home assistant by ESPHome.
[Image: M30-1_01.jpg]
[Image: M30-1_02.jpg]
[Image: M30-1_03.jpg]
[Image: M30-1_04.jpg]
[Image: M30-1_05.jpg]

Print this item

  [Arduino source code for M30]-02 read all energy meter data
Posted by: admin - 01-05-2024, 11:25 AM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Code:
#include <ModbusMaster.h>
#include <arduino.h>
#include "HardwareSerial.h"
ModbusMaster node;
HardwareSerial my485Serial(2);

#define CHANNEL     0

String temp="";
void read_485(){
  while(my485Serial.available()>0)
  {
    temp = my485Serial.readString();   //read one data then delete it from buffer
     Serial.println(temp);
     //delay(100);
  }
  temp="";
}

void setup() {
  // put your setup code here, to run once:

  Serial.begin(115200);
  my485Serial.begin(115200,SERIAL_8N1,32,33);///rx:32  tx:33
  while(my485Serial.read()>0){}
  node.begin(1,my485Serial);
 
}

void loop() {
  // put your main code here, to run repeatedly:
  //first chip BL0910 address:100  second chip BL0910 address:200  third chip BL0910 address:300  every address have 35 bytes data
  if(0 == node.readHoldingRegisters(100,35))
  {
      Serial.print("register value: ");
      for(int i=0;i<35;i++)
      {
        Serial.print(node.getResponseBuffer(i));
        Serial.print(" ");
      }
  }
  Serial.println(" ");
  Serial.println("next circle!");
  delay(500);
}

Print this item

  [Arduino source code for M30]-01 debug 4G module AT command
Posted by: admin - 01-05-2024, 11:23 AM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

   

Code:
void setup() {
  Serial.begin(115200);
  Serial2.begin(115200);
}

void loop() {
  while (Serial.available()) {
    //  delay(1);
      Serial2.write(Serial.read());
  }
  while (Serial2.available()) {
       Serial.write(Serial2.read());
  }
}

[Image: attachment.php?aid=1056]

Print this item

  M30 RS485 and Serial port development guide
Posted by: admin - 01-05-2024, 11:20 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (12)

M30 have one ARM cpu on board. the ARM CPU have one RS485 modbus interface for user. another ARM CPU's serial port connect to ESP32's GPIO.

RS485 communication settings: 38400bps,8,N,1
ESP32 serial port communication settings: 115200bps,8,N,1

they have some modbus protocol, just use by different baud rate.

first  BL0910 chip read CT 1-10 channel current.  modbus address is 100.
second BL0910 chip read CT 11-20 channel current. modbus address is 200.
third  BL0910 chip read CT 21-30 channel current. modbus address is 300.

every BL0910 have 35 bytes data, here are data structure:
   
this use by modbus pull tool:
   

Print this item

  M30 configure yaml for ESPhome
Posted by: admin - 01-05-2024, 11:11 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (14)

   
   
yaml download: 
.txt   M30_HA_LEDs.txt (Size: 49.87 KB / Downloads: 317)
modbus pull screen setting:    

substitutions:
  max_current_range1: "10"
  max_current_range2: "10"
  max_current_range3: "10"
  max_current_range4: "10"
  max_current_range5: "10"
  max_current_range6: "10"
  max_current_range7: "10"
  max_current_range8: "10"
  max_current_range9: "10"
  max_current_range10: "10"
  max_current_range11: "10"
  max_current_range12: "10"
  max_current_range13: "10"
  max_current_range14: "10"
  max_current_range15: "10"
  max_current_range16: "10"
  max_current_range17: "10"
  max_current_range18: "10"
  max_current_range19: "10"
  max_current_range20: "10"
  max_current_range21: "10"
  max_current_range22: "10"
  max_current_range23: "10"
  max_current_range24: "10"
  max_current_range25: "10"
  max_current_range26: "10"
  max_current_range27: "10"
  max_current_range28: "10"
  max_current_range29: "10"
  max_current_range30: "10"

esphome:
  name: m30
  friendly_name: m30

esp32:
  board: esp32dev
  framework:
    type: arduino


# Enable logging
logger:
  # baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: "8G0kVEA0/DqgAavgKNyy9EYUrWo6pEZM38JVMAryJv8="

ota:
  password: "2a26484203d80a83798414c879541760"

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0

uart:
  id: modbus_uart
  rx_pin: 32
  tx_pin: 33
  baud_rate: 115200
  stop_bits: 1
  data_bits: 8
  parity: NONE
 

modbus:
  id: modbus_hub
  uart_id: modbus_uart
 

modbus_controller:
  - id: modbus_hub_m30
    address: 1
    modbus_id: modbus_hub
    update_interval: 5s

sensor:
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 100
    register_type: holding
    name: m30_1_current_1
    id: m30_1_current_1
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_1).state;
              float red = (current - 0.0) / ${max_current_range1};
              float green = (${max_current_range1} - current) / ${max_current_range1};
              float blue = 0.0;
             
              auto call = id(M30_LED1).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 101
    register_type: holding
    name: m30_1_current_2
    id: m30_1_current_2
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_2).state;
              float red = (current - 0.0) / ${max_current_range2};
              float green = (${max_current_range2} - current) / ${max_current_range2};
              float blue = 0.0;
             
              auto call = id(M30_LED2).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();   
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 102
    register_type: holding
    name: m30_1_current_3
    id: m30_1_current_3
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_3).state;
              float red = (current - 0.0) / ${max_current_range3};
              float green = (${max_current_range3} - current) / ${max_current_range3};
              float blue = 0.0;
             
              auto call = id(M30_LED3).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 103
    register_type: holding
    name: m30_1_current_4
    id: m30_1_current_4
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_4).state;
              float red = (current - 0.0) / ${max_current_range4};
              float green = (${max_current_range4} - current) / ${max_current_range4};
              float blue = 0.0;
             
              auto call = id(M30_LED4).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 104
    register_type: holding
    name: m30_1_current_5
    id: m30_1_current_5
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_5).state;
              float red = (current - 0.0) / ${max_current_range5};
              float green = (${max_current_range5} - current) / ${max_current_range5};
              float blue = 0.0;
             
              auto call = id(M30_LED5).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 105
    register_type: holding
    name: m30_1_current_6
    id: m30_1_current_6
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_6).state;
              float red = (current - 0.0) / ${max_current_range6};
              float green = (${max_current_range6} - current) / ${max_current_range6};
              float blue = 0.0;
             
              auto call = id(M30_LED6).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 106
    register_type: holding
    name: m30_1_current_7
    id: m30_1_current_7
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_7).state;
              float red = (current - 0.0) / ${max_current_range7};
              float green = (${max_current_range7} - current) / ${max_current_range7};
              float blue = 0.0;
             
              auto call = id(M30_LED7).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 107
    register_type: holding
    name: m30_1_current_8
    id: m30_1_current_8
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_8).state;
              float red = (current - 0.0) / ${max_current_range8};
              float green = (${max_current_range8} - current) / ${max_current_range8};
              float blue = 0.0;
             
              auto call = id(M30_LED8).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 108
    register_type: holding
    name: m30_1_current_9
    id: m30_1_current_9
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_9).state;
              float red = (current - 0.0) / ${max_current_range9};
              float green = (${max_current_range9} - current) / ${max_current_range9};
              float blue = 0.0;
             
              auto call = id(M30_LED9).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 109
    register_type: holding
    name: m30_1_current_10
    id: m30_1_current_10
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_1_current_10).state;
              float red = (current - 0.0) / ${max_current_range10};
              float green = (${max_current_range10} - current) / ${max_current_range10};
              float blue = 0.0;
             
              auto call = id(M30_LED10).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 110
    register_type: holding
    name: m30_1_voltage
    id: m30_1_voltage
    unit_of_measurement: V
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 111
    register_type: holding
    name: m30_1_watt_1
    id: m30_1_watt_1
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 112
    register_type: holding
    name: m30_1_watt_2
    id: m30_1_watt_2
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 113
    register_type: holding
    name: m30_1_watt_3
    id: m30_1_watt_3
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 114
    register_type: holding
    name: m30_1_watt_4
    id: m30_1_watt_4
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 115
    register_type: holding
    name: m30_1_watt_5
    id: m30_1_watt_5
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 116
    register_type: holding
    name: m30_1_watt_6
    id: m30_1_watt_6
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 117
    register_type: holding
    name: m30_1_watt_7
    id: m30_1_watt_7
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 118
    register_type: holding
    name: m30_1_watt_8
    id: m30_1_watt_8
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 119
    register_type: holding
    name: m30_1_watt_9
    id: m30_1_watt_9
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 120
    register_type: holding
    name: m30_1_watt_10
    id: m30_1_watt_10
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 121
    register_type: holding
    name: m30_1_energy_1
    id: m30_1_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 122
    register_type: holding
    name: m30_1_energy_2
    id: m30_1_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 123
    register_type: holding
    name: m30_1_energy_3
    id: m30_1_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 124
    register_type: holding
    name: m30_1_energy_4
    id: m30_1_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 125
    register_type: holding
    name: m30_1_energy_5
    id: m30_1_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 126
    register_type: holding
    name: m30_1_energy_6
    id: m30_1_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 127
    register_type: holding
    name: m30_1_energy_7
    id: m30_1_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 128
    register_type: holding
    name: m30_1_energy_8
    id: m30_1_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 129
    register_type: holding
    name: m30_1_energy_9
    id: m30_1_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 130
    register_type: holding
    name: m30_1_energy_10
    id: m30_1_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 131
    register_type: holding
    name: m30_1_energy_sum
    id: m30_1_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 132
    register_type: holding
    name: m30_1_period
    id: m30_1_period
    unit_of_measurement: Hz
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 133
    register_type: holding
    name: m30_1_tps_1
    id: m30_1_tps_1
    unit_of_measurement: °C
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  # - platform: modbus_controller
  #  modbus_controller_id: modbus_hub_m30
  #  address: 134
  #  register_type: holding
  #  name: m30_1_tps_2
  #  id: m30_1_tps_2
  #  unit_of_measurement: °C
  #  accuracy_decimals: 1
  #  value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 200
    register_type: holding
    name: m30_2_current_1
    id: m30_2_current_1
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_1).state;
              float red = (current - 0.0) / ${max_current_range11};
              float green = (${max_current_range11} - current) / ${max_current_range11};
              float blue = 0.0;
             
              auto call = id(M30_LED11).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 201
    register_type: holding
    name: m30_2_current_2
    id: m30_2_current_2
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_2).state;
              float red = (current - 0.0) / ${max_current_range12};
              float green = (${max_current_range12} - current) / ${max_current_range12};
              float blue = 0.0;
             
              auto call = id(M30_LED12).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 202
    register_type: holding
    name: m30_2_current_3
    id: m30_2_current_3
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_3).state;
              float red = (current - 0.0) / ${max_current_range13};
              float green = (${max_current_range13} - current) / ${max_current_range13};
              float blue = 0.0;
             
              auto call = id(M30_LED13).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 203
    register_type: holding
    name: m30_2_current_4
    id: m30_2_current_4
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_4).state;
              float red = (current - 0.0) / ${max_current_range14};
              float green = (${max_current_range14} - current) / ${max_current_range14};
              float blue = 0.0;
             
              auto call = id(M30_LED14).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 204
    register_type: holding
    name: m30_2_current_5
    id: m30_2_current_5
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_5).state;
              float red = (current - 0.0) / ${max_current_range15};
              float green = (${max_current_range15} - current) / ${max_current_range15};
              float blue = 0.0;
             
              auto call = id(M30_LED15).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 205
    register_type: holding
    name: m30_2_current_6
    id: m30_2_current_6
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_6).state;
              float red = (current - 0.0) / ${max_current_range16};
              float green = (${max_current_range16} - current) / ${max_current_range16};
              float blue = 0.0;
             
              auto call = id(M30_LED16).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 206
    register_type: holding
    name: m30_2_current_7
    id: m30_2_current_7
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_7).state;
              float red = (current - 0.0) / ${max_current_range17};
              float green = (${max_current_range17} - current) / ${max_current_range17};
              float blue = 0.0;
             
              auto call = id(M30_LED17).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 207
    register_type: holding
    name: m30_2_current_8
    id: m30_2_current_8
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_8).state;
              float red = (current - 0.0) / ${max_current_range18};
              float green = (${max_current_range18} - current) / ${max_current_range18};
              float blue = 0.0;
             
              auto call = id(M30_LED18).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 208
    register_type: holding
    name: m30_2_current_9
    id: m30_2_current_9
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_9).state;
              float red = (current - 0.0) / ${max_current_range19};
              float green = (${max_current_range19} - current) / ${max_current_range19};
              float blue = 0.0;
             
              auto call = id(M30_LED19).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 209
    register_type: holding
    name: m30_2_current_10
    id: m30_2_current_10
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_2_current_10).state;
              float red = (current - 0.0) / ${max_current_range20};
              float green = (${max_current_range20} - current) / ${max_current_range20};
              float blue = 0.0;
             
              auto call = id(M30_LED20).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 210
    register_type: holding
    name: m30_2_voltage
    id: m30_2_voltage
    unit_of_measurement: V
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 211
    register_type: holding
    name: m30_2_watt_1
    id: m30_2_watt_1
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 212
    register_type: holding
    name: m30_2_watt_2
    id: m30_2_watt_2
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 213
    register_type: holding
    name: m30_2_watt_3
    id: m30_2_watt_3
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 214
    register_type: holding
    name: m30_2_watt_4
    id: m30_2_watt_4
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 215
    register_type: holding
    name: m30_2_watt_5
    id: m30_2_watt_5
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 216
    register_type: holding
    name: m30_2_watt_6
    id: m30_2_watt_6
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 217
    register_type: holding
    name: m30_2_watt_7
    id: m30_2_watt_7
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 218
    register_type: holding
    name: m30_2_watt_8
    id: m30_2_watt_8
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 219
    register_type: holding
    name: m30_2_watt_9
    id: m30_2_watt_9
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 220
    register_type: holding
    name: m30_2_watt_10
    id: m30_2_watt_10
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 221
    register_type: holding
    name: m30_2_energy_1
    id: m30_2_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 222
    register_type: holding
    name: m30_2_energy_2
    id: m30_2_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 223
    register_type: holding
    name: m30_2_energy_3
    id: m30_2_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 224
    register_type: holding
    name: m30_2_energy_4
    id: m30_2_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 225
    register_type: holding
    name: m30_2_energy_5
    id: m30_2_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 226
    register_type: holding
    name: m30_2_energy_6
    id: m30_2_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 227
    register_type: holding
    name: m30_2_energy_7
    id: m30_2_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 228
    register_type: holding
    name: m30_2_energy_8
    id: m30_2_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 229
    register_type: holding
    name: m30_2_energy_9
    id: m30_2_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 230
    register_type: holding
    name: m30_2_energy_10
    id: m30_2_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 231
    register_type: holding
    name: m30_2_energy_sum
    id: m30_2_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 232
    register_type: holding
    name: m30_2_period
    id: m30_2_period
    unit_of_measurement: Hz
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 233
    register_type: holding
    name: m30_2_tps_1
    id: m30_2_tps_1
    unit_of_measurement: °C
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  # - platform: modbus_controller
  #  modbus_controller_id: modbus_hub_m30
  #  address: 234
  #  register_type: holding
  #  name: m30_2_tps_2
  #  id: m30_2_tps_2
  #  unit_of_measurement: °C
  #  accuracy_decimals: 1
  #  value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 300
    register_type: holding
    name: m30_3_current_1
    id: m30_3_current_1
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_1).state;
              float red = (current - 0.0) / ${max_current_range21};
              float green = (${max_current_range21} - current) / ${max_current_range21};
              float blue = 0.0;
             
              auto call = id(M30_LED21).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 301
    register_type: holding
    name: m30_3_current_2
    id: m30_3_current_2
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_2).state;
              float red = (current - 0.0) / ${max_current_range22};
              float green = (${max_current_range22} - current) / ${max_current_range22};
              float blue = 0.0;
             
              auto call = id(M30_LED22).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 302
    register_type: holding
    name: m30_3_current_3
    id: m30_3_current_3
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_3).state;
              float red = (current - 0.0) / ${max_current_range23};
              float green = (${max_current_range23} - current) / ${max_current_range23};
              float blue = 0.0;
             
              auto call = id(M30_LED23).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 303
    register_type: holding
    name: m30_3_current_4
    id: m30_3_current_4
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_4).state;
              float red = (current - 0.0) / ${max_current_range24};
              float green = (${max_current_range24} - current) / ${max_current_range24};
              float blue = 0.0;
             
              auto call = id(M30_LED24).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 304
    register_type: holding
    name: m30_3_current_5
    id: m30_3_current_5
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_5).state;
              float red = (current - 0.0) / ${max_current_range25};
              float green = (${max_current_range25} - current) / ${max_current_range25};
              float blue = 0.0;
             
              auto call = id(M30_LED25).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 305
    register_type: holding
    name: m30_3_current_6
    id: m30_3_current_6
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_6).state;
              float red = (current - 0.0) / ${max_current_range26};
              float green = (${max_current_range26} - current) / ${max_current_range26};
              float blue = 0.0;
             
              auto call = id(M30_LED26).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 306
    register_type: holding
    name: m30_3_current_7
    id: m30_3_current_7
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_7).state;
              float red = (current - 0.0) / ${max_current_range27};
              float green = (${max_current_range27} - current) / ${max_current_range27};
              float blue = 0.0;
             
              auto call = id(M30_LED27).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 307
    register_type: holding
    name: m30_3_current_8
    id: m30_3_current_8
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_8).state;
              float red = (current - 0.0) / ${max_current_range28};
              float green = (${max_current_range28} - current) / ${max_current_range28};
              float blue = 0.0;
             
              auto call = id(M30_LED28).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 308
    register_type: holding
    name: m30_3_current_9
    id: m30_3_current_9
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_9).state;
              float red = (current - 0.0) / ${max_current_range29};
              float green = (${max_current_range29} - current) / ${max_current_range29};
              float blue = 0.0;
             
              auto call = id(M30_LED29).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 309
    register_type: holding
    name: m30_3_current_10
    id: m30_3_current_10
    unit_of_measurement: A
    accuracy_decimals: 3
    value_type: U_WORD
    filters:
      - multiply: 0.00098
    on_value:
      - then:
          - lambda: |-
              float current = id(m30_3_current_10).state;
              float red = (current - 0.0) / ${max_current_range30};
              float green = (${max_current_range30} - current) / ${max_current_range30};
              float blue = 0.0;
             
              auto call = id(M30_LED30).turn_on();
              call.set_brightness(0.6);
              call.set_rgb(red, green, blue);
              call.set_color_mode(ColorMode::RGB);
              call.perform();
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 310
    register_type: holding
    name: m30_3_voltage
    id: m30_3_voltage
    unit_of_measurement: V
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 311
    register_type: holding
    name: m30_3_watt_1
    id: m30_3_watt_1
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 312
    register_type: holding
    name: m30_3_watt_2
    id: m30_3_watt_2
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 313
    register_type: holding
    name: m30_3_watt_3
    id: m30_3_watt_3
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 314
    register_type: holding
    name: m30_3_watt_4
    id: m30_3_watt_4
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 315
    register_type: holding
    name: m30_3_watt_5
    id: m30_3_watt_5
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 316
    register_type: holding
    name: m30_3_watt_6
    id: m30_3_watt_6
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 317
    register_type: holding
    name: m30_3_watt_7
    id: m30_3_watt_7
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 318
    register_type: holding
    name: m30_3_watt_8
    id: m30_3_watt_8
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 319
    register_type: holding
    name: m30_3_watt_9
    id: m30_3_watt_9
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 320
    register_type: holding
    name: m30_3_watt_10
    id: m30_3_watt_10
    unit_of_measurement: W
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 321
    register_type: holding
    name: m30_3_energy_1
    id: m30_3_energy_1
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 322
    register_type: holding
    name: m30_3_energy_2
    id: m30_3_energy_2
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 323
    register_type: holding
    name: m30_3_energy_3
    id: m30_3_energy_3
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 324
    register_type: holding
    name: m30_3_energy_4
    id: m30_3_energy_4
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 325
    register_type: holding
    name: m30_3_energy_5
    id: m30_3_energy_5
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 326
    register_type: holding
    name: m30_3_energy_6
    id: m30_3_energy_6
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 327
    register_type: holding
    name: m30_3_energy_7
    id: m30_3_energy_7
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 328
    register_type: holding
    name: m30_3_energy_8
    id: m30_3_energy_8
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 329
    register_type: holding
    name: m30_3_energy_9
    id: m30_3_energy_9
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 330
    register_type: holding
    name: m30_3_energy_10
    id: m30_3_energy_10
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 331
    register_type: holding
    name: m30_3_energy_sum
    id: m30_3_energy_sum
    unit_of_measurement: kWh
    accuracy_decimals: 1
    value_type: U_WORD
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 332
    register_type: holding
    name: m30_3_period
    id: m30_3_period
    unit_of_measurement: Hz
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.01
  - platform: modbus_controller
    modbus_controller_id: modbus_hub_m30
    address: 333
    register_type: holding
    name: m30_3_tps_1
    id: m30_3_tps_1
    unit_of_measurement: °C
    accuracy_decimals: 1
    value_type: U_WORD
    filters:
      - multiply: 0.1
  # - platform: modbus_controller
  #  modbus_controller_id: modbus_hub_m30
  #  address: 334
  #  register_type: holding
  #  name: m30_3_tps_2
  #  id: m30_3_tps_2
  #  unit_of_measurement: °C
  #  accuracy_decimals: 1
  #  value_type: U_WORD


light:
  - platform: partition
    name: "M30_LED1"
    id: M30_LED1
    segments:
      - id: light1
        from: 14
        to: 14


  - platform: partition
    name: "M30_LED2"
    id: M30_LED2
    segments:
      - id: light1
        from: 13
        to: 13

  - platform: partition
    name: "M30_LED3"
    id: M30_LED3
    segments:
      - id: light1
        from: 12
        to: 12

  - platform: partition
    name: "M30_LED4"
    id: M30_LED4
    segments:
      - id: light1
        from: 11
        to: 11

  - platform: partition
    name: "M30_LED5"
    id: M30_LED5
    segments:
      - id: light1
        from: 10
        to: 10

  - platform: partition
    name: "M30_LED6"
    id: M30_LED6
    segments:
      - id: light1
        from: 9
        to: 9

  - platform: partition
    name: "M30_LED7"
    id: M30_LED7
    segments:
      - id: light1
        from: 8
        to: 8

  - platform: partition
    name: "M30_LED8"
    id: M30_LED8
    segments:
      - id: light1
        from: 7
        to: 7

  - platform: partition
    name: "M30_LED9"
    id: M30_LED9
    segments:
      - id: light1
        from: 6
        to: 6

  - platform: partition
    name: "M30_LED10"
    id: M30_LED10
    segments:
      - id: light1
        from: 5
        to: 5

  - platform: partition
    name: "M30_LED11"
    id: M30_LED11
    segments:
      - id: light1
        from: 4
        to: 4

  - platform: partition
    name: "M30_LED12"
    id: M30_LED12
    segments:
      - id: light1
        from: 3
        to: 3

  - platform: partition
    name: "M30_LED13"
    id: M30_LED13
    segments:
      - id: light1
        from: 2
        to: 2

  - platform: partition
    name: "M30_LED14"
    id: M30_LED14
    segments:
      - id: light1
        from: 1
        to: 1

  - platform: partition
    name: "M30_LED15"
    id: M30_LED15
    segments:
      - id: light1
        from: 0
        to: 0

  - platform: partition
    name: "M30_LED16"
    id: M30_LED16
    segments:
      - id: light1
        from: 15
        to: 15

  - platform: partition
    name: "M30_LED17"
    id: M30_LED17
    segments:
      - id: light1
        from: 16
        to: 16

  - platform: partition
    name: "M30_LED18"
    id: M30_LED18
    segments:
      - id: light1
        from: 17
        to: 17

  - platform: partition
    name: "M30_LED19"
    id: M30_LED19
    segments:
      - id: light1
        from: 18
        to: 18

  - platform: partition
    name: "M30_LED20"
    id: M30_LED20
    segments:
      - id: light1
        from: 19
        to: 19

  - platform: partition
    name: "M30_LED21"
    id: M30_LED21
    segments:
      - id: light1
        from: 20
        to: 20

  - platform: partition
    name: "M30_LED22"
    id: M30_LED22
    segments:
      - id: light1
        from: 21
        to: 21

  - platform: partition
    name: "M30_LED23"
    id: M30_LED23
    segments:
      - id: light1
        from: 22
        to: 22

  - platform: partition
    name: "M30_LED24"
    id: M30_LED24
    segments:
      - id: light1
        from: 23
        to: 23

  - platform: partition
    name: "M30_LED25"
    id: M30_LED25
    segments:
      - id: light1
        from: 24
        to: 24

  - platform: partition
    name: "M30_LED26"
    id: M30_LED26
    segments:
      - id: light1
        from: 25
        to: 25

  - platform: partition
    name: "M30_LED27"
    id: M30_LED27
    segments:
      - id: light1
        from: 26
        to: 26

  - platform: partition
    name: "M30_LED28"
    id: M30_LED28
    segments:
      - id: light1
        from: 27
        to: 27

  - platform: partition
    name: "M30_LED29"
    id: M30_LED29
    segments:
      - id: light1
        from: 28
        to: 28

  - platform: partition
    name: "M30_LED30"
    id: M30_LED30
    segments:
      - id: light1
        from: 29
        to: 29
       
  # Example for light segment source
  - platform: esp32_rmt_led_strip
    id: light1
    rgb_order: GRB
    pin: GPIO12
    num_leds: 30
    rmt_channel: 0
    chipset: ws2812

Print this item

  M30 ESP32 I/O pin define
Posted by: admin - 01-05-2024, 11:02 AM - Forum: KC868-M16 / M1 / MB / M30 - No Replies

Ethernet (LAN8720) I/O define:

ETH_ADDR        0
ETH_POWER_PIN  -1
ETH_MDC_PIN    23
ETH_MDIO_PIN  18
ETH_TYPE      ETH_PHY_LAN8720
ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

IIC BUS:
SDA:5
SCL:16

SPI BUS:
SCK:14
MOSI:15
MISO:2

WS2812 RGBW LED:12

----------------------------------
ARM CPU TXD:32
ARM CPU RXD:33

4G:
RXD:13
TXD:4

Print this item