home.social

#evcharger — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #evcharger, aggregated by home.social.

  1. **Deye EV charger – inverter oscillations**

    TL;DR

    Deye’s EV charger coupled with Deye’s inverter in ‘solar only’ mode of charging is misbehaving when the house battery is full – there are power swings / oscillations that are not normal IMHO.

    Sometimes inverter even drops PV production to zero when EV charger is ramping up. The cycle repeats until the afternoon, when the inverter starts to use the battery and the power swings stabilize. Who is chasing who?

    Setup and settings:

    • 12,5 kWp panels
    • Deye’s battery and BMS
    • Deye 3 phase hybrid inverter, in “Zero export to CT” mode (set to 20W)
    • Deye’s 22kW EV charger connected to inverter’s grid port
    • EV charger in ‘solar only’ mode
    • EV charger power limit to 8kW

    Graph of power oscillations:

    It looks like inverter control loop oscillation. It becomes worse when induction cooktop is running.

    When charging in ‘plug-and-play’ mode, it the charging power is stable and PV power too.

    If anyone knows the solution / which setting should I adjust, please let me know.

    I had some success when I set Zero-export-to-CT to 500W and EV charger limit to 8kW.

    https://blog.rozman.info/deye-ev-charger-inverter-oscillations/ #Deye #Evcharger #Solar
  2. **Integrating Deye EV charger to Home Assistant**

    TL;DR

    It works, somehow, via ha-solarman integration.

    Charger type: Deye SUN-EVSE22K01-EU-AC

    What works

    I managed to integrate 2 entities for now:

    • EV charger control power
    • Max EV charging power

    The process

    I’ve started with David Rapan’s ha-solarman integration which works well with my Deye inverter (SUN-12K-SG04LP3-EU).

    Then I edited config/custom_components/solarman/inverter_definitions/deye_p3.yaml and added:

    #EV test
      - group: EV Charger
        items:
          - name: "EV Charge Control Power"
            l: 1
            class: "power"
            state_class: "measurement"
            uom: "W"
            rule: 1
            scale: 1
            registers: [0x02C5]
            icon: "mdi:car-electric"
     
          - name: EV Max Charge power
            alt: EV Max Charge power
            platform: number
            class: "power"
            state_class: "measurement"
            uom: "W"
            scale: 1
            rule: 1
            registers: [0x0104]
            configurable:
              min: 0
              max: 22000
            range:
              min: 0
              max: 22000
    

    Restarted HA and those 2 entities appeared in solarman device:

    Both entities show the same data as Deye’s app. I can set EV Max Charging Power and it will reflect in the app and the inverter.

    About “EV Charge Control Power” entity – Inverter tells the charger what is the max allowed charging power (for example, how much is the solar power excess).

    Today it changed like this: (it was cloudy and I had ‘solar only’ enabled):

    Don’t mind the initial spike, I wrongly set the scale factor (x10).

    I call it partial success.

    What doesn’t work (yet)

    I still didn’t find modbus register for the most important entity: actual charging power. If exists at all. Maybe there is no mapping from EV charger to modbus registers. I’m communicating with Deye tech support, but I didn’t get the answer yet. Though, they sent me an updated modbus registers document.

    I’m still working on EV charger configuration settings (Solar only, Grid off–>Charger Off, Free work, EV port Load/Grid). I found the register in Deye docs, but haven’t implemented yet (some bit manipulation needed):

    AddrRegister meaningR/Wdata rangeunitnote259EV_charge_modeR/W[0x0,0xFFFF]
    High 8 bits: Off grid SOC Low 8 bits: Bit0:solar energy only   Bit1:free work  Bit4:EV_charge device connet at Grid port   Bit5:EV_charge device connect at LD port

    Anyone?

    If anyone knows which register holds actual charging power value, consumption, charging schedules, please let me know.

    https://blog.rozman.info/integrating-deye-ev-charger-to-home-assistant/ #deye #evcharger #homeassistant
  3. **Integrating Deye EV charger to Home Assistant**

    (link to blog)

    TL;DR

    Integration of Deye EV charger to HA works (somehow) via ha-solarman integration (EV control power, Max. charging power) and parsing of EV charger local admin web page + Command line HA integration to get realtime charging power and energy.

    Charger type: Deye SUN-EVSE22K01-EU-AC, connected to Deye’s inverter via LoRa and Wifi.

    What works

    I managed to integrate 2 entities via ha-solarman/modbus for now:

    Via Solarman/modbus registers:

    • EV charger control power
    • Max EV charging power

    And also (via scraping of EV charger admin web page + Command line HA integration):

    • L1 Power
    • L2 Power
    • L3 Power

    The process (reading modbus registers)

    I’ve started with David Rapan’s ha-solarman integration which works well with my Deye inverter (SUN-12K-SG04LP3-EU).

    Then I edited config/custom_components/solarman/inverter_definitions/deye_p3.yaml and added:

    #EV test
      - group: EV Charger
        items:
          - name: "EV Charge Control Power"
            l: 1
            class: "power"
            state_class: "measurement"
            uom: "W"
            rule: 1
            scale: 1
            registers: [0x02C5]
            icon: "mdi:car-electric"
     
          - name: EV Max Charge power
            alt: EV Max Charge power
            platform: number
            class: "power"
            state_class: "measurement"
            uom: "W"
            scale: 1
            rule: 1
            registers: [0x0104]
            configurable:
              min: 0
              max: 22000
            range:
              min: 0
              max: 22000
    

    Restarted HA and those 2 entities appeared in solarman device:

    Both entities show the same data as Deye’s app. I can set EV Max Charging Power and it will reflect in the app and the inverter.

    About “EV Charge Control Power” entity – Inverter tells the charger what is the max allowed charging power (for example, how much is the solar power excess).

    Today the control power swinged like this: (it was cloudy and I had ‘solar only’ enabled):

    Don’t mind the initial spike, I wrongly set the scale factor (x10).

    I call it partial success.

    What doesn’t work (yet) via solarman/modbus

    I still didn’t find modbus register for the most important entity: actual charging power. If exists at all. Maybe there is no mapping from EV charger to modbus registers. I’m communicating with Deye tech support, but I didn’t get the answer yet. Though, they sent me an updated modbus registers document.

    I’m still working on EV charger configuration settings (Solar only, Grid off–>Charger Off, Free work, EV port Load/Grid). I found the register in Deye docs, but haven’t implemented yet (some bit manipulation needed):

    AddrRegister meaningR/Wdata rangeunitnote259EV_charge_modeR/W[0x0,0xFFFF]
    High 8 bits: Off grid SOC Low 8 bits: Bit0:solar energy only   Bit1:free work  Bit4:EV_charge device connet at Grid port   Bit5:EV_charge device connect at LD port

    Anyone?

    If anyone knows which modbus register holds actual charging power value, consumption, charging schedules, please let me know.

    Workaround – getting data from EV charger via http / local web interface

    Anyways, while waiting for Deye’s support to answer me which modbus registers contain actual charging power, I managed to get these numbers by parsing the EV charger’s web interface.

    1. I wrote a little curl script to get L1, L2 and L3 power from charger’s web interface. I found they’re hidden besides webdata_power1,2,3 variables:

    get_EV_power.sh file:

    #!/bin/sh
    
    DATA=$(curl -u user:pass -s http://EV_CHARGER_IP_ADDR/status.html)
    
    P1=$(echo "$DATA" | sed -n 's/.*webdata_power1[[:space:]]*=[[:space:]]*"\([0-9]\+\)".*/\1/p')
    P2=$(echo "$DATA" | sed -n 's/.*webdata_power2[[:space:]]*=[[:space:]]*"\([0-9]\+\)".*/\1/p')
    P3=$(echo "$DATA" | sed -n 's/.*webdata_power3[[:space:]]*=[[:space:]]*"\([0-9]\+\)".*/\1/p')
    
    echo "${P1:-0},${P2:-0},${P3:-0}"

    This script returns power of 3 phases in format X, Y, Z. The reason to put all three values together is to make only one http request instead of 3 (one for each phase).

    2. Made it executable: chmod +x get_EV_power.sh

    3. I put this script in Home Assistant’s directory /config/scripts/get_EV_power.sh

    4. created new Command line sensor in my configuration yaml that executes the script above:

    command_line:
      - sensor:
          name: EV Charger Raw
          command: "/config/scripts/get_EV_power2.sh"
          scan_interval: 10
    

    Then I added 3 sensors for each phase’s power and one combined sensor (summary charging power):

    
    template:
      - sensor:
          - name: EV Power L1
            state: "{{ states('sensor.ev_charger_raw').split(',')[0] | int }}"
            unit_of_measurement: "W"
            device_class: power
            state_class: measurement
    
          - name: EV Power L2
            state: "{{ states('sensor.ev_charger_raw').split(',')[1] | int }}"
            unit_of_measurement: "W"
            device_class: power
            state_class: measurement
    
          - name: EV Power L3
            state: "{{ states('sensor.ev_charger_raw').split(',')[2] | int }}"
            unit_of_measurement: "W"
            device_class: power
            state_class: measurement
    
    #summary charging power
          - name: EV Charger Power
            device_class: power
            state_class: measurement
            unit_of_measurement: "W"
            state: >
              {{ states('sensor.ev_power_l1') | int(0) + states('sensor.ev_power_l2') | int(0) +  states('sensor.ev_power_l3') | int(0) }}

    5. Created a dashboard for tracking charging power:

    6. Added my power sensor to Powercalc, to calculate the energy (using integration) needed for charging (kWh) and let it create some helpers: daily, weekly, monthly, yearly consumption.

    7. Added power consumption to my power and energy dashboards:

    Conclusion

    Anyways, it works, now I can track the (almost realtime) power and consumption of the EV charger, which was the main goal.

    The integration of Deye’s EV charger to HA could be easier, if Deye disclosed all inverter’s modbus registers OR provided a documented local API to the EV charger.

    I wonder if companies that produce IoT aren’t aware that if they make the access to their devices easy for tinkerers like me, this is free marketing / recommendation for them. I would never recommend devices with closed local access to anyone.

    Deye’s openness is so-so. It definitely could be improved. The local access is at least somehow possible, but not well documented and hacky.

    https://blog.rozman.info/integrating-deye-ev-charger-to-home-assistant/ #deye #evcharger #homeassistant
  4. **Integrating Deye EV charger to Home Assistant**

    TL;DR

    It works, somehow, via ha-solarman integration.

    Charger type: Deye SUN-EVSE22K01-EU-AC

    What works

    I managed to integrate 2 entities for now:

    • EV charger control power
    • Max EV charging power

    The process

    I’ve started with David Rapan’s ha-solarman integration which works well with my Deye inverter (SUN-12K-SG04LP3-EU).

    Then I edited config/custom_components/solarman/inverter_definitions/deye_p3.yaml and added:

    #EV test
      - group: EV Charger
        items:
          - name: "EV Charge Control Power"
            l: 1
            class: "power"
            state_class: "measurement"
            uom: "W"
            rule: 1
            scale: 1
            registers: [0x02C5]
            icon: "mdi:car-electric"
     
          - name: EV Max Charge power
            alt: EV Max Charge power
            platform: number
            class: "power"
            state_class: "measurement"
            uom: "W"
            scale: 1
            rule: 1
            registers: [0x0104]
            configurable:
              min: 0
              max: 22000
            range:
              min: 0
              max: 22000
    

    Restarted HA and those 2 entities appeared in solarman device:

    Both entities show the same data as Deye’s app. I can set EV Max Charging Power and it will reflect in the app and the inverter.

    About “EV Charge Control Power” entity – Inverter tells the charger what is the max allowed charging power (for example, how much is the solar power excess).

    Today it changed like this: (it was cloudy and I had ‘solar only’ enabled):

    Don’t mind the initial spike, I wrongly set the scale factor (x10).

    I call it partial success.

    What doesn’t work (yet)

    I still didn’t find modbus register for the most important entity: actual charging power. If exists at all. Maybe there is no mapping from EV charger to modbus registers. I’m communicating with Deye tech support, but I didn’t get the answer yet. Though, they sent me an updated modbus registers document.

    I’m still working on EV charger configuration settings (Solar only, Grid off–>Charger Off, Free work, EV port Load/Grid). I found the register in Deye docs, but haven’t implemented yet (some bit manipulation needed):

    AddrRegister meaningR/Wdata rangeunitnote259EV_charge_modeR/W[0x0,0xFFFF]
    High 8 bits: Off grid SOC Low 8 bits: Bit0:solar energy only   Bit1:free work  Bit4:EV_charge device connet at Grid port   Bit5:EV_charge device connect at LD port

    Anyone?

    If anyone knows which register holds actual charging power value, consumption, charging schedules, please let me know.

    https://blog.rozman.info/integrating-deye-ev-charger-to-home-assistant/ #deye #evcharger #homeassistant
  5. **Integrating Deye EV charger to Home Assistant**

    TL;DR

    It works, somehow, via ha-solarman integration.

    Charger type: Deye SUN-EVSE22K01-EU-AC

    What works

    I managed to integrate 2 entities for now:

    • EV charger control power
    • Max EV charging power

    The process

    I’ve started with David Rapan’s ha-solarman integration which works well with my Deye inverter (SUN-12K-SG04LP3-EU).

    Then I edited config/custom_components/solarman/inverter_definitions/deye_p3.yaml and added:

    #EV test
      - group: EV Charger
        items:
          - name: "EV Charge Control Power"
            l: 1
            class: "power"
            state_class: "measurement"
            uom: "W"
            rule: 1
            scale: 1
            registers: [0x02C5]
            icon: "mdi:car-electric"
     
          - name: EV Max Charge power
            alt: EV Max Charge power
            platform: number
            class: "power"
            state_class: "measurement"
            uom: "W"
            scale: 1
            rule: 1
            registers: [0x0104]
            configurable:
              min: 0
              max: 22000
            range:
              min: 0
              max: 22000
    

    Restarted HA and those 2 entities appeared in solarman device:

    Both entities show the same data as Deye’s app. I can set EV Max Charging Power and it will reflect in the app and the inverter.

    About “EV Charge Control Power” entity – Inverter tells the charger what is the max allowed charging power (for example, how much is the solar power excess).

    Today it changed like this: (it was cloudy and I had ‘solar only’ enabled):

    Don’t mind the initial spike, I wrongly set the scale factor (x10).

    I call it partial success.

    What doesn’t work (yet)

    I still didn’t find modbus register for the most important entity: actual charging power. If exists at all. Maybe there is no mapping from EV charger to modbus registers. I’m communicating with Deye tech support, but I didn’t get the answer yet. Though, they sent me an updated modbus registers document.

    I’m still working on EV charger configuration settings (Solar only, Grid off–>Charger Off, Free work, EV port Load/Grid). I found the register in Deye docs, but haven’t implemented yet (some bit manipulation needed):

    AddrRegister meaningR/Wdata rangeunitnote259EV_charge_modeR/W[0x0,0xFFFF]
    High 8 bits: Off grid SOC Low 8 bits: Bit0:solar energy only   Bit1:free work  Bit4:EV_charge device connet at Grid port   Bit5:EV_charge device connect at LD port

    Anyone?

    If anyone knows which register holds actual charging power value, consumption, charging schedules, please let me know.

    https://blog.rozman.info/integrating-deye-ev-charger-to-home-assistant/ #deye #evcharger #homeassistant
  6. **Integrating Deye EV charger to Home Assistant**

    TL;DR

    It works, somehow, via ha-solarman integration.

    Charger type: Deye SUN-EVSE22K01-EU-AC

    What works

    I managed to integrate 2 entities for now:

    • EV charger control power
    • Max EV charging power

    The process

    I’ve started with David Rapan’s ha-solarman integration which works well with my Deye inverter (SUN-12K-SG04LP3-EU).

    Then I edited config/custom_components/solarman/inverter_definitions/deye_p3.yaml and added:

    #EV test
      - group: EV Charger
        items:
          - name: "EV Charge Control Power"
            l: 1
            class: "power"
            state_class: "measurement"
            uom: "W"
            rule: 1
            scale: 1
            registers: [0x02C5]
            icon: "mdi:car-electric"
     
          - name: EV Max Charge power
            alt: EV Max Charge power
            platform: number
            class: "power"
            state_class: "measurement"
            uom: "W"
            scale: 1
            rule: 1
            registers: [0x0104]
            configurable:
              min: 0
              max: 22000
            range:
              min: 0
              max: 22000
    

    Restarted HA and those 2 entities appeared in solarman device:

    Both entities show the same data as Deye’s app. I can set EV Max Charging Power and it will reflect in the app and the inverter.

    About “EV Charge Control Power” entity – Inverter tells the charger what is the max allowed charging power (for example, how much is the solar power excess).

    Today it changed like this: (it was cloudy and I had ‘solar only’ enabled):

    Don’t mind the initial spike, I wrongly set the scale factor (x10).

    I call it partial success.

    What doesn’t work (yet)

    I still didn’t find modbus register for the most important entity: actual charging power. If exists at all. Maybe there is no mapping from EV charger to modbus registers. I’m communicating with Deye tech support, but I didn’t get the answer yet. Though, they sent me an updated modbus registers document.

    I’m still working on EV charger configuration settings (Solar only, Grid off–>Charger Off, Free work, EV port Load/Grid). I found the register in Deye docs, but haven’t implemented yet (some bit manipulation needed):

    AddrRegister meaningR/Wdata rangeunitnote259EV_charge_modeR/W[0x0,0xFFFF]
    High 8 bits: Off grid SOC Low 8 bits: Bit0:solar energy only   Bit1:free work  Bit4:EV_charge device connet at Grid port   Bit5:EV_charge device connect at LD port

    Anyone?

    If anyone knows which register holds actual charging power value, consumption, charging schedules, please let me know.

    https://blog.rozman.info/integrating-deye-ev-charger-to-home-assistant/ #deye #evcharger #homeassistant