def _init_sit_modbus_registers(self, a_slave_address): """ Initializes self._sit_modbus_registers """ assert len(self._sit_modbus_registers) == 0 l_reg_list = OrderedDict() l_slave_address = a_slave_address self._add_common_registers(l_reg_list, l_slave_address) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor('A', 'AC Current sum of all inverters', 40188, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'A', a_scale_factor=40192)) self.append_modbus_registers(l_reg_list) #error self.add_modbus_register('ID', 'Model ID (ID): 120 = Sunspec nameplate model', 40238, SitModbusRegister.REGISTER_TYPE_INT_16_U, SitModbusRegister.ACCESS_MODE_R, 'uint16') #error self.add_modbus_register('VArPct_Mod', 'Mode of the percentile reactive power limitation: 1 = in % of WMax', 40365, SitModbusRegister.REGISTER_TYPE_ENUM_16, SitModbusRegister.ACCESS_MODE_R, 'enum16') #self.add_modbus_register('VArPct_Ena', 'Control of the percentile reactive power limitation,(SMA: Qext): 1 = activated', 40365, SitModbusRegister.REGISTER_TYPE_ENUM_16, SitModbusRegister.ACCESS_MODE_RW, 'enum16') self.invariants()
def _init_sit_modbus_registers(self, a_slave_address): """ Initializes self._sit_modbus_registers """ assert self.valid_slave_address( a_slave_address), 'invalid a_slave_address:{}'.format( a_slave_address) l_reg_list = OrderedDict() SitUtils.od_extend( l_reg_list, RegisterTypeInt16u( 'GHI', 'Total irradiation on the external irradiation sensor/pyranometer (W/m2)', 0x00, a_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int16u', an_is_metadata=False)) #SitUtils.od_extend(l_reg_list, RegisterTypeInt16u('GHIDev', 'Solar radiation deviation (0~1800)', 0x52, a_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int16u', an_is_metadata=False)) #SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('WDigIo', 'Active power setpoint Digital I/O', 31235, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) self.append_modbus_registers(l_reg_list) # self.add_cc_only_sit_modbus_registers(1) # self.add_common_sit_modbus_registers(2) self.invariants()
def add_common_sit_modbus_registers(self, a_slave_address): """ COMMON REGISTERS to ClusterController and Inverters """ super().add_common_sit_modbus_registers(a_slave_address) l_reg_list = OrderedDict() l_slave_address = a_slave_address #PARAMETERS UNIT_ID = 2 (p.26 of doc) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('EvtNr', '30213: For error description refere to SMA register address 30247; 30247: Description of the event message, see the documentation of the product', 30247, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'enum', an_is_metadata=False)) #SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('EvtNr', '30213: For error description refere to SMA register address 30247; 30247: Description of the event message, see the documentation of the product', 30247, SitModbusRegister.ACCESS_MODE_R, 'enum', an_is_metadata=False, a_slave_address=a_slave_address)) self.append_modbus_registers(l_reg_list)
def add_inverter_modbus_registers(self, a_slave_address, an_inverter_index): """ INVERTERS see p.20 of documentation """ assert an_inverter_index >= 1, 'inverter index >= 1: {}'.format(an_inverter_index) l_initial_register_address = 51000 l_base_address = l_initial_register_address + (25 * (an_inverter_index - 1)) l_reg_list = OrderedDict() l_slave_address = a_slave_address self._logger.info('add_inverter_modbus_registers-> Base address: {}'.format(l_base_address)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s(SitConstants.SS_REG_SHORT_ABB_AC_POWER, 'Active power for inverter nr: {}'.format(an_inverter_index), l_base_address, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=False, an_event=SitModbusRegisterEvent(self._W_event))) SitUtils.od_extend(l_reg_list, RegisterTypeInt16u(SitConstants.SS_REG_SHORT_ABB_STATUS_OPERATING_STATE, 'Status for inverter nr: {}'.format(an_inverter_index), l_base_address + 9, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'deg celcius', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt16s(SitConstants.SS_REG_SHORT_ABB_TEMP_CAB, 'Cabinet temperatore for inverter nr: {}'.format(an_inverter_index), l_base_address + 11, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'deg celcius', an_is_metadata=False)) self.append_modbus_registers(l_reg_list)
def _add_common_registers(self, a_reg_list, a_slave_address): """ adds to a_reg_list """ l_reg_list = a_reg_list l_slave_address = a_slave_address SitUtils.od_extend( l_reg_list, RegisterTypeString16('Mn', 'Manufacturer', 40005, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String16', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeString16('Md', 'Model (Md): SMA Inverter Manager', 40021, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String16', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeString8('Opt', 'Options (Opt): Inverter Manager name', 40037, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String8', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeString8( 'Vr', 'Version (Vr): Version number of the installed firmware', 40045, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String8', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeString16( 'SN', 'Serial number (SN) of the device that uses the Modbus unit ID', 40053, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String16', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphAB', 'Voltage, line conductor L1 to L2, in V V_SF (40199) : average value of all inverters', 40193, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphBC', 'Voltage, line conductor L2 to L3, in V V_SF (40199) : average value of all inverters', 40194, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphCA', 'Voltage, line conductor L3 to L1, in V V_SF (40199) : average value of all inverters', 40195, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphA', 'Voltage, line conductor L1 to N (PPVphA), in V-V_SF (40199): average value of all inverters', 40196, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphB', 'Voltage, line conductor L1 to N (PPVphB), in V-V_SF (40199): average value of all inverters', 40197, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'PPVphC', 'Voltage, line conductor L1 to N (PPVphC), in V-V_SF (40199): average value of all inverters', 40198, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', a_scale_factor=40199)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'W', 'Active power (W), in W-W_SF (40201): sum of all inverters', 40200, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', a_scale_factor=40192, an_event=SitModbusRegisterEvent(self._W_event), a_post_set_value_call=self.w_fix)) SitUtils.od_extend( l_reg_list, RegisterTypeInt32uScaleFactor( 'WH', 'Total yield (WH), in Wh WH_SF (40212): sum of all inverters', 40210, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'WH', a_scale_factor=40212)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'TmpCab', 'Internal temperature, in °C Tmp_SF (40223): average value of all inverters', 40219, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '°C', a_scale_factor=40223))
def _init_sit_modbus_registers(self, a_slave_address): """ Initializes self._sit_modbus_registers """ l_reg_list = OrderedDict() l_slave_address = a_slave_address self._add_common_registers(l_reg_list, l_slave_address) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u('ID', 'Model ID (ID): 120 = Sunspec nameplate model', 40238, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'uint16', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor('AC_A', 'AC Current sum of all inverters', 40188, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'A', a_scale_factor=40192)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u( 'VArPct_Mod', 'Mode of the percentile reactive power limitation: 1 = in % of WMax', 40365, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'enum16')) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u( 'VArPct_Ena', 'Control of the percentile reactive power limitation,(SMA: Qext): 1 = activated', 40365, l_slave_address, SitModbusRegister.ACCESS_MODE_RW, 'enum16')) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u('WMaxLim_Ena', 'Limiting (0 Deactivate, 1 activated):', 40353, l_slave_address, SitModbusRegister.ACCESS_MODE_RW, 'enum16')) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'WMaxLimPct', 'Set power to default value, in % of WMax-WMaxLimPct_SF', 40349, l_slave_address, SitModbusRegister.ACCESS_MODE_RW, 'uint16', a_scale_factor=40367)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'VRef', 'Voltage at the PCC (VRef), in V VRef_SF (40289)', 40269, l_slave_address, SitModbusRegister.ACCESS_MODE_RW, 'uint16', 40289)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16uScaleFactor( 'VMax', 'Set value for maximum voltage (VMax), in V VMinMax_SF', 40271, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'uint16', a_scale_factor=40291)) self.append_modbus_registers(l_reg_list) self.invariants()
def add_cc_only_sit_modbus_registers(self, a_slave_address): """ Registers particular to cluster controller """ assert self.valid_slave_address(a_slave_address), 'invalid a_slave_address:{}'.format(a_slave_address) assert a_slave_address == 2, 'add_cc_only_sit_modbus_registers->for this part slave_address should be =2 and is:{}'.format(a_slave_address) l_reg_list = OrderedDict() l_slave_address = a_slave_address #PARAMETERS UNIT_ID = 2 (p.26 of doc) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('WDigIo', 'Active power setpoint Digital I/O', 31235, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('WAnalog', 'Active power setpoint Analog', 31237, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('WSetPoint', 'Active power setpoint in %s', 31239, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('WSetPointDirMar', 'Active power setpoint in %s Specification Modbus Direct marketing', 31241, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('ResSetPoint', 'Resulting setpoint (minimum value definition of all specifications)', 31243, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) #Strange SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('WExport', 'Current utility grid export active power P in W (actual value of the active power fed in at the grid-connection point; measured with an external measuring device).', 31249, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('VArExport', 'Current utility grid export reactive power Q in VAr (actual value of the reactive power fed in at the grid- connection point; measured with an external measuring device).', 31251, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('AC_1', 'Analog current input 1 (mA)', 34637, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'mA', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('AC_2', 'Analog current input 2 (mA)', 34639, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'mA', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('AC_3', 'Analog current input 3 (mA)', 34641, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'mA', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('AC_4', 'Analog current input 4 (mA)', 34643, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'mA', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('InDCV_1', 'Analog voltage input 1 (V)', 34645, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('InDCV_2', 'Analog voltage input 2 (V)', 34647, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('InDCV_3', 'Analog voltage input 3 (V)', 34649, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('InDCV_4', 'Analog voltage input 4 (V)', 34651, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'V', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt16s('WSetPointDirTotal', 'Direct marketer: Active power setpoint P, in % of the maximum active power (PMAX) of the PV plant. -100-0=Load|0=No active power|0-100 generator', 40493, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('WSetPointMan', 'Active power setpoint (manual specification)', 41167, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False, a_post_set_value_call=self.sma_fix2)) # IRRADIATIONS # not working on sanbe, getting max_int, SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('IrradiationSurfaceTot', 'Total irradiation on the sensor surface (W/m2)', 34613, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W/m2', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('GHI', 'Total irradiation on the external irradiation sensor/pyranometer (W/m2)', 34623, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W/m2', an_is_metadata=False)) self.append_modbus_registers(l_reg_list)
def add_common_sit_modbus_registers(self, a_slave_address): """ Common devices registers """ assert self.valid_slave_address(a_slave_address), 'invalid a_slave_address:{}'.format(a_slave_address) assert a_slave_address == 1 or a_slave_address >= 3, 'Dont ask for slave_address 2, the add_cc_only_sit_modbus_registers is done for that! addr:{}'.format(a_slave_address) l_reg_list = OrderedDict() l_slave_address = a_slave_address # CLUSTER AND INVERTERS SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('Vr', 'Version number of the SMA Modbus profile', 30001, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('ID', 'SUSy ID (of the Cluster Controller)', 30003, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('SN', 'Serial number (of the Cluster Controller)', 30005, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('NewData', 'Modbus data change: meter value is increased by the Cluster Controller if new data is available.', 30007, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeSmaCCDeviceClass('DeviceClass', 'Device Class', 30051, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Enum', an_is_metadata=True)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('W', 'Current active power on all line conductors (W), accumulated values of the inverters', 30775, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=False, an_event=SitModbusRegisterEvent(self._W_event))) SitUtils.od_extend(l_reg_list, RegisterTypeInt64u('Wh', 'Total energy fed in across all line conductors, in Wh (accumulated values of the inverters) System param', 30513, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Wh', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('VAr', 'Reactive power on all line conductors (var), accumulated values of the inverters', 30805, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'VAr', an_is_metadata=False)) SitUtils.od_extend(l_reg_list, RegisterTypeInt64u('TotWhDay', 'Energy fed in on current day across all line conductors, in Wh (accumulated values of the inverters)', 30517, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Wh', an_is_metadata=False)) self.append_modbus_registers(l_reg_list)
def add_common_sit_modbus_registers(self, a_slave_address): """ Common devices registers """ assert self.valid_slave_address( a_slave_address), 'invalid a_slave_address:{}'.format( a_slave_address) assert a_slave_address == 1 or a_slave_address >= 3, 'Dont ask for slave_address 2, the add_cc_only_sit_modbus_registers is done for that! addr:{}'.format( a_slave_address) l_reg_list = OrderedDict() l_slave_address = a_slave_address SitUtils.od_extend( l_reg_list, RegisterTypeStringVar(SitConstants.SS_REG_SHORT_ABB_SERIAL_NUMBER, 'ESN', 40713, 10, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=True)) SitUtils.od_extend( l_reg_list, RegisterTypeInt32s(SitConstants.SS_REG_SHORT_ABB_AC_POWER, 'Total active output power of all inverters', 40525, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=False, an_event=SitModbusRegisterEvent(self._W_event))) SitUtils.od_extend( l_reg_list, RegisterTypeInt32s( SitConstants.SS_REG_SHORT_ABB_AC_S_REACTIVE_POWER, 'Reactive power', 40544, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'kVar', an_is_metadata=False)) # Active power control # SitUtils.od_extend(l_reg_list, RegisterTypeInt16u(SitConstants.SS_REG_SHORT_ABB_STATUS_OPERATING_STATE, 'Plant Status 1=Unlimited/2Limited/3Idle/4Fault/5Communication_interrupt', 40543, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Enum', an_is_metadata=False)) # Not working on tranque sante and maristas santamaria SitUtils.od_extend( l_reg_list, RegisterTypeInt16u('PlantSt2', 'Plant Status 2 0=ildle/1=on-grid/...', 40566, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Enum', an_is_metadata=False)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u('ActPwrCtlMode', 'Active power control mode 0=no limit/other...', 40737, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Enum', an_is_metadata=False)) #Meter # UNABLE TO READ IT SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('WMeter', 'Active power of meter', 32278, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=False)) #Huawei specials SitUtils.od_extend( l_reg_list, RegisterTypeInt32s( SitConstants.SS_REG_SHORT_EXTRA_HUAWEI_ACT_POWER_ADJ, 'Active Power adjustment', 40426, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int', an_is_metadata=False)) SitUtils.od_extend( l_reg_list, RegisterTypeInt16u( SitConstants.SS_REG_SHORT_EXTRA_HUAWEI_ACT_POWER_ADJ_PCT, 'Active Power adjustment percentage', 40428, l_slave_address, SitModbusRegister.ACCESS_MODE_R, '%', an_is_metadata=False)) SitUtils.od_extend( l_reg_list, RegisterTypeInt32u( 'LifeTimeKWHOut', 'Equals the total energy yield generatedby all inverters.', 40560, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'UInt', an_is_metadata=False)) SitUtils.od_extend( l_reg_list, RegisterTypeInt32u( 'TodaykWhOutput', 'Equals daily energy yield generated byall inverters.', 40562, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'UInt', an_is_metadata=False)) #SitUtils.od_extend(l_reg_list, RegisterTypeStrVar('Mn', 'Model', 30000, 15, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'String15', an_is_metadata=True)) # CLUSTER AND INVERTERS # SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('Vr', 'Version number of the SMA Modbus profile', 30001, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) # # SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('ID', 'SUSy ID (of the Cluster Controller)', 30003, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) # SitUtils.od_extend(l_reg_list, RegisterTypeInt32u('SN', 'Serial number (of the Cluster Controller)', 30005, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=True)) # SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('NewData', 'Modbus data change: meter value is increased by the Cluster Controller if new data is available.', 30007, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Int32u', an_is_metadata=False)) # SitUtils.od_extend(l_reg_list, RegisterTypeSmaCCDeviceClass('DeviceClass', 'Device Class', 30051, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Enum', an_is_metadata=True)) # # SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('W', 'Current active power on all line conductors (W), accumulated values of the inverters', 30775, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'W', an_is_metadata=False, an_event=SitModbusRegisterEvent(self._W_event))) # SitUtils.od_extend(l_reg_list, RegisterTypeInt64u('Wh', 'Total energy fed in across all line conductors, in Wh (accumulated values of the inverters) System param', 30513, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Wh', an_is_metadata=False)) # SitUtils.od_extend(l_reg_list, RegisterTypeInt32s('VAr', 'Reactive power on all line conductors (var), accumulated values of the inverters', 30805, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'VAr', an_is_metadata=False)) # SitUtils.od_extend(l_reg_list, RegisterTypeInt64u('TotWhDay', 'Energy fed in on current day across all line conductors, in Wh (accumulated values of the inverters)', 30517, l_slave_address, SitModbusRegister.ACCESS_MODE_R, 'Wh', an_is_metadata=False)) # self.append_modbus_registers(l_reg_list)