Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
M30 configure yaml for ESPhome
#31
same situation on other channels, with 2 different type of CT.
The current is OK, but the calculated power is not good.
It should be (Current * Voltage * Power Factor) But as you can see on the screenshot, it is far out of range...
Reply
#32
Question - is there default code on the M30? Or will I need to upload the esphome code in order to use it? Not a problem, but I recall other products have a default config already
Reply
#33
(04-22-2025, 09:13 PM)uslackr Wrote: Question - is there default code on the M30? Or will I need to upload the esphome code in order to use it? Not a problem, but I recall other products have a default config already

this thread top floor is M30 ESPHome yaml.
Reply
#34
I modified the YAML file and added some features:

- Renamed xxx_1 xxx_2 xxx_3... to xxx_01 xxx_02 xxx_03... (So they are arranged in the list)
- Renamed M30_1_xxx M30_2_xxx M30_3_xxx to M30_L1_xxx M30_L2_xxx M30_L3_xxx (I prefere)
- Renamed m30_x_watt_x to m30_x_Power_x

- Created variable for led_brightness (To set the brightness value for all LEDs at once)
- Created variable for the min current to trigger the LEDs (So all the sensors that have the current value under this threshold are off)
- Created variable for power factor (As i had issues with power (watt) value indicated by the original yaml, I changed the way the power value is calculated to: [current * voltage * power factor])
- Created variable for current correction (To be able to calibrate the measured current)

- created slider for LEDs brightness (so it can be adjusted in HASS user GUI)
- created slider for LEDs trigger current (so it can be adjusted in HASS user GUI)
- created slider for Power factor (so it can be adjusted in HASS user GUI)
- created slider for Current factor (so it can be adjusted in HASS user GUI)

- changed LEDs color scheme:
- current <= led_trigger_current = LED "Off"
- current <= max_current_rangeX * 0.25 led = "Blue"
- current <= max_current_rangeX * 0.5 led = "Violet"
- current <= max_current_rangeX * 0.75 led = "Orange"
- current > max_current_rangeX * 0.75 led = "Red"



If you want to try it, here it is: https://drive.google.com/file/d/1D6feGfj...sp=sharing

Don't forget to enter you wifi settings or un-comment the ethernet section if you use cable (and comment wifi)

wifi:
  ssid: "YOUR_SSID"
  password: "YOUR_PASSWORD"

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


Attached Files Image(s)
   
Reply
#35
thanks share your code.
Reply
#36
how to calculate my power factor value? is it same for all connectors? My M30 looks wrong. Got shelly connected and CT at the same circuit, and completly different values. shelly show 170w vs 70w.
Compleatly not usable...
Reply
#37
if you use home assistant, you can calculate the ratio using a formula based on the actual value and the true value, set in home assistant yaml file. every CT channel have own value.
Reply
#38
I've done a bit of investigation using GPT Wink and it suggests that my 20A CT clamp might be incorrect for my setup — I should be using a 60A clamp to get accurate readings. It also recommended dividing the values by 3, which seems to give more reasonable results.

Is this a valid approach? Could the issue really be caused by using the wrong CT clamp?
Reply
#39
It seems that’s also not working correctly. When my AC is idle, the readings are close to what Shelly reports. But when the AC is running, Shelly shows just under 500W, while Kincony shows not even 100W. WTF? That’s unusable.

Is it more reliable with your KCS firmware?
Reply
#40
sure, if you are using ESPHome yaml file. i suggest you download KCS firmware for testing.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)