odya / esphome-powmr-hybrid-inverter

ESPHome config for various PowMr Hybrid Inverter models.
MIT License
67 stars 10 forks source link

POW-HVM4.2M-24V some issues #26

Open aver-ua opened 7 months ago

aver-ua commented 7 months ago

hi. thanks a lot for your work. i have POW-HVM4.2M-24V inverter. there are some issues that i found.

  1. sensor "Charger Status" displays "0d00". what does it mean?
  2. sensor "Controller Temperature" dispalys "70,6 °C". it's some kind of mistake. it can't be that high..
  3. this invertor model has "Max Total Charging Current" = 140A (max) and "Max Utility Charging Current" = 100A (max). so the corresponding selects "Max Total Charge Current" and "Utility Charge Current" are not displayed normally and have an unknown value. how can i fix this?
zingreen commented 7 months ago

Hello, just FYI: POW-HVM3.6M-24V

  1. sensor "Controller Temperature" displays "37.2 °C" for me. looks like correct.
  2. Max Total Charging Current 80 A Max Utility Charging Current 40 A
aver-ua commented 7 months ago

issue 3 fixed by editing /modules/inverter.yaml and flashing new firmware:

  - platform: modbus_controller
    name: "Max Total Charge Current"
    optimistic: true
    skip_updates: ${select_skip_updates}
    entity_category: config
    address: 5022
    value_type: U_WORD
    optionsmap:
      "10": 10
      "20": 20
      "30": 30
      "40": 40
      "50": 50
      "60": 60
      "70": 70
      "80": 80
      "90": 90
      "100": 100
      "110": 110
      "120": 120
      "130": 130
      "140": 140

  - platform: modbus_controller
    name: "Utility Charge Current"
    optimistic: true
    skip_updates: ${select_skip_updates}
    entity_category: config
    address: 5024
    value_type: U_WORD
    optionsmap:
      "10": 10
      "20": 20
      "30": 30
      "40": 40
      "50": 50
      "60": 60
      "70": 70
      "80": 80
      "90": 90
      "100": 100
aver-ua commented 7 months ago

issue 1, "Charger Status". i have an additional information. when there is no utility power and inverter works on battery, "Charger Status"='0a00'. when utility is back, "Charger Status"='0d00'. additionaly, i noticed that binary sensor "On Battery" does not changed its state. it is always 'off'.

aver-ua commented 7 months ago

how to get working binary sensors "On Battery" and "Grid Active" (verified!)

  - platform: modbus_controller
    modbus_controller_id: smg_inverter
    name: "Grid Active"
    id: grid_active
    address: 4553
    register_type: holding
    bitmask: 0x200

  - platform: modbus_controller
    modbus_controller_id: smg_inverter
    name: "On Battery"
    address: 4553
    register_type: holding
    bitmask: 0x100

and temperature sensor:

  - platform: modbus_controller
    modbus_controller_id: smg_inverter
    name: "PV Temperature"
    accuracy_decimals: 1
    entity_category: diagnostic
    address: 4557
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "°C"
    lambda: |-
      return swapBytes(x);

i confirm that this is PV Temperature, not inverter internal temperature. so, tеhere should be an inverter temperature register somewhere else.. can someone guess where?

Andreychik32 commented 1 month ago

@aver-ua, to fix Charger Status, you can use this config I made:

  - platform: modbus_controller
    modbus_controller_id: smg_inverter
    name: "Charger Status"
    address: 4555
    register_type: holding
    response_size: 2
    raw_encode: HEXBYTES
    lambda: |-
      uint16_t sensorIndex = swapBytes(modbus_controller::word_from_hex_str(x, 0));
      uint8_t byte = sensorIndex & 0x7;
      switch (byte) {
        case 2: return std::string("Off");
        case 5: return std::string("Idle");
        case 4: return std::string("Charging");
        default: return std::string(x);
      }

And thanks for your fix to Grid Active and On Battery sensors!

aver-ua commented 4 weeks ago

@Andreychik32 , my further investigations about Grid Active and On Battery sensor says that their behavior depended on PV power. if PV power is enough and there is no utility power, then sensors states Grid Active and On Battery will be: On and Off. if PV power is not enough, but it is present - Off and On. in short, On Battery will be On only if battery power is running out, Grid Active will be On if utility power present or PV power is enough. so, you can't use the sensor Grid Active to determine state of utility if you have PV... maybe only at night :smirk: thanks for your config for Charger Status, but I think that this sensor represents only solar charger, because its state Idle permanently even if battery is charged from utility. I can’t check charging from PV yet. and there was also an incomprehensible state 0b00

Nando1497 commented 1 week ago

Hi, at the moment my value is "Charger Status". 0c00. I noticed that when charging the battery the "Grid Active" is on and the "On Battery" is Off.