Class BatteryFeneconCommercialImpl

All Implemented Interfaces:
Battery, BatteryFeneconCommercial, ModbusComponent, OpenemsComponent, ModbusSlave, StartStoppable, org.osgi.service.event.EventHandler

public class BatteryFeneconCommercialImpl extends AbstractOpenemsModbusComponent implements BatteryFeneconCommercial, Battery, ModbusComponent, OpenemsComponent, org.osgi.service.event.EventHandler, ModbusSlave, StartStoppable
  • Field Details

    • VERSION_CONVERTER

      protected static final ElementToChannelConverter VERSION_CONVERTER
      Converts master and sub master versions. e.g.input: "012001SM05" --> MASTER_MCU_HARDWARE_VERSION, "100201MS50"
    • SERIAL_NUMBER_CONVERTER

      protected static final ElementToChannelConverter SERIAL_NUMBER_CONVERTER
      Generates serial number converter helper to read master and battery module serial numbers. e.g. input: "17005740232238EMSD0W0000" --> MASTER_SERIAL_NUMBER, "00000WSDEM38222340570017"
  • Constructor Details

    • BatteryFeneconCommercialImpl

      public BatteryFeneconCommercialImpl()
  • Method Details

    • setModbus

      protected void setModbus(BridgeModbus modbus)
      Description copied from class: AbstractOpenemsModbusComponent
      Set the Modbus bridge. Should be called by @Reference
      Overrides:
      setModbus in class AbstractOpenemsModbusComponent
      Parameters:
      modbus - the BridgeModbus Reference
    • deactivate

      protected void deactivate()
      Description copied from class: AbstractOpenemsComponent
      Handles @Deactivate of implementations. Prints log output.
      Overrides:
      deactivate in class AbstractOpenemsModbusComponent
    • defineModbusProtocol

      protected ModbusProtocol defineModbusProtocol()
      Description copied from class: AbstractOpenemsModbusComponent
      Defines the Modbus protocol.
      Specified by:
      defineModbusProtocol in class AbstractOpenemsModbusComponent
      Returns:
      the ModbusProtocol
    • updateNumberOfTowersAndModulesAndCells

      protected void updateNumberOfTowersAndModulesAndCells()
      Update Number of towers,modules and cells; called on onChange event.

      Recalculate the number of towers, modules and cells. Unfortunately the battery may report too small wrong values in the beginning, so we need to recalculate on every change.

    • updateSoc

      protected void updateSoc()
      SoC to be set maximum(100) or minimum(0) based on discharge and charge current of the battery.
    • debugLog

      public String debugLog()
      Description copied from interface: OpenemsComponent
      Gets some output that is suitable for a continuous Debug log. Returns 'null' by default which causes no output.
      Specified by:
      debugLog in interface OpenemsComponent
      Returns:
      the debug log output
    • getModbusSlaveTable

      public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode)
      Description copied from interface: ModbusSlave
      Gets the Modbus-Slave-Table for this OpenEMS-Component.
      Specified by:
      getModbusSlaveTable in interface ModbusSlave
      Parameters:
      accessMode - filters the Modbus-Records that should be shown
      Returns:
      the Modbus-Slave-Table
    • handleEvent

      public void handleEvent(org.osgi.service.event.Event event)
      Specified by:
      handleEvent in interface org.osgi.service.event.EventHandler
    • setStartStop

      public void setStartStop(StartStop value)
      Description copied from interface: StartStoppable
      Starts or stops the device or service represented by this OpenEMS Component.
      Specified by:
      setStartStop in interface StartStoppable
      Parameters:
      value - target StartStop state
    • getStartStopTarget

      public StartStop getStartStopTarget()
      Description copied from interface: BatteryFeneconCommercial
      Gets the target Start/Stop mode from config or StartStop-Channel.
      Specified by:
      getStartStopTarget in interface BatteryFeneconCommercial
      Returns:
      StartStop