# modbus sensors for EPEver
  - platform: modbus
    scan_interval: 30
    registers:
    - name: EPEver_Battery_Voltage #0x00331A
      hub: hub1
      unit_of_measurement: V
      slave: 01
      register: 13082
      register_type: input
      scale: 0.01
      precision: 2
    - name: Epever_Battery Current #0x00331B & 1C
      hub: hub1
      unit_of_measurement: A
      slave: 1
      register: 13083
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true



  

    - name: Epever_Battery Temperature #0x003110
      hub: hub1
      unit_of_measurement: °C
      slave: 1
      register: 12560
      register_type: input
      scale: 0.01
      precision: 2
    - name: EPEver_Battery_SOC
      hub: hub1
      unit_of_measurement: '%'
      slave: 01
      register: 12570
      register_type: input
    - name: Epever_Battery Status #0x003200
      hub: hub1
      slave: 1
      register: 12800
      register_type: input
      scale: 1
      precision: 0
      #######################################################################
        #D15: 1-Wrong identification for rated voltage
        #D8: Battery inner resistance, abnormal 1, normal 0
        #D7-D4: 00H Normal, 01H Over, Temp.(Higher than the warning settings) 02H Low Temp.(Lower than the warning settings),
        #D3-D0: 00H Normal ,01H Over Voltage. , 02H Under Voltage, 03H Over discharge, 04H Fault
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
    - name: Epever_Device Temperature #0x003111
      hub: hub1
      unit_of_measurement: °C
      slave: 1
      register: 12561
      register_type: input
      scale: 0.01
      precision: 2
    
    - name: Solar Charging Equipment Status #0x003201
      hub: hub1
      slave: 1
      register: 12801
      register_type: input
      scale: 1
      precision: 0
        #######################################################################
        #D15-D14: Input voltage status. 00H normal, 01H No input power connected, 02H Higher input voltage , 03H Input voltage error.
        #D13: Charging MOSFET is short circuit.
        #D12: Charging or Anti-reverse MOSFET is open circuit.
        #D11: Anti-reverse MOSFET is short circuit.
        #D10: Input is over current.
        #D9: The load is over current.
        #D8: The load is short circuit.
        #D7: Load MOSFET is short circuit.
        #D6:Disequilibrium in three circuits.A17
        #D4: PV input is short circuit.
        #D3-D2: Charging status. 00H No charging,01H Float,02H Boost, 03H Equalization.
        #D1: 0 Normal, 1 Fault.
        #D0: 1 Running, 0 Standby.
        #Status analysis
        #Array status:address 3201 bits D15-D10
        #Charging status:address 3201 bits D3-D2
        #Battery status: address 3200 bits D7-D0
        #Load status: address 3201 bits D9-D7,
        #Device status: address 3200 bit D15 address 3202 bits D13-D8,D6-D4 address 3201 bits D6 address 2000
        ############################################################################################
    - name: Solar Consumed Energy Today #0x003304 and 0x003305
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13060
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true


    - name: EPEver_Load_Current # 310D
      hub: hub1
      unit_of_measurement: A
      slave: 01
      register: 12557
      register_type: input
      scale: 0.01
      precision: 2
    - name: EPEver_Load_voltage #310C
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 12556
      register_type: input
      scale: 0.01
    - name: EPEver_Load_Power #0x00310E and 0x00310F
      hub: hub1
      unit_of_measurement: W
      slave: 1
      register: 12558
      register_type: input
      scale: 0.01
      count: 2
      reverse_order: true
    - name: EPEver_Load_Status #0x003202
      hub: hub1
      slave: 1
      register: 12802
      register_type: input
      scale: 1
      precision: 0


    - name: EPEver_Solar_voltage #3100
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 12544
      register_type: input
      scale: 0.01
    - name: EPEver_Solar_Current # 3101
      hub: hub1
      unit_of_measurement: A
      slave: 01
      register: 12545
      register_type: input
      scale: 0.01
      precision: 2
    - name: EPEver_Solar_Power #0x003102 and 0x003103
      hub: hub1
      unit_of_measurement: W
      slave: 1
      register: 12546
      register_type: input
      scale: 0.01
      count: 2
      reverse_order: true


# modbus sensors for EPEver
  - platform: modbus
    scan_interval: 600
    registers:
    
    - name: Epever_Maximum Battery Voltage Today #0x003302
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 13058
      register_type: input
      scale: 0.01
      precision: 2
    - name: Epever_Minimum Battery Voltage Today #0x003303
      hub: hub1
      unit_of_measurement: V
      slave: 1
      register: 13059
      register_type: input
      scale: 0.01
      precision: 2

    - name: Epever Consumed Energy Today #0x003304 and 0x003305
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13060
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    
    - name: Epever Consumed Energy This Month #0x003306 and 07
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13062
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: Epever Consumed Energy This Year #0x003308 & 09
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13064
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true

    - name: Solar Total Consumed Energy #0x00330A & 0B
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13066
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
  
    - name: Solar Generated Energy This Month #0x00330E & 0F
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13070
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: Solar Generated Energy This Year #0x003310 & 11
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13072
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true
    - name: Solar Total Generated Energy #0x003312 & 13
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13074
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true

   
    - name: Solar Consumed Energy Today #0x003304 and 0x003305
      hub: hub1
      unit_of_measurement: KWh
      slave: 1
      register: 13060
      register_type: input
      scale: 0.01
      precision: 2
      count: 2
      reverse_order: true


  