mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
344 stars 92 forks source link

Integration broken in new HA update #141

Closed NBD99 closed 1 year ago

NBD99 commented 1 year ago

I just upgraded HA supervisor and after that upgrade i get invalid configuration.

Home Assistant 2023.8.3 Supervisor 2023.08.1 Frontend 20230802.1 - latest

Check and Restart A basic validation of the configuration is automatically done before restarting. The basic validation ensures the YAML configuration doesn't have errors which will prevent Home Assistant or any integration from starting. It's also possible to only do the basic validation check without restarting. Configuration invalid! Invalid config for [modbus]: Error in sensor BDC rated power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][19]. Got {'name': 'BDC rated power', 'unique_id': 'sg_bdc_rated_power', 'slave': 1, 'address': 5627, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 100, 'scan_interval': 600} Error in sensor BMS max. charging current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][20]. Got {'name': 'BMS max. charging current', 'unique_id': 'sg_bms_max_charging_current', 'slave': 1, 'address': 5634, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'A', 'device_class': 'Current', 'scale': 1, 'scan_interval': 60} Error in sensor BMS max. discharging current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][21]. Got {'name': 'BMS max. discharging current', 'unique_id': 'sg_bms_max_discharging_current', 'slave': 1, 'address': 5635, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'A', 'device_class': 'Current', 'scale': 1, 'scan_interval': 60} Error in sensor Backup phase A power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][23]. Got {'name': 'Backup phase A power', 'unique_id': 'sg_backup_phase_a_power', 'slave': 1, 'address': 5722, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Backup phase B power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][24]. Got {'name': 'Backup phase B power', 'unique_id': 'sg_backup_phase_b_power', 'slave': 1, 'address': 5723, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Backup phase C power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][25]. Got {'name': 'Backup phase C power', 'unique_id': 'sg_backup_phase_c_power', 'slave': 1, 'address': 5724, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Battery capacity swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][112]. Got {'name': 'Battery capacity', 'unique_id': 'sg_battery_capacity', 'slave': 1, 'address': 33048, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'scale': 0.01, 'scan_interval': 600} Error in sensor Battery charging start power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][113]. Got {'name': 'Battery charging start power', 'unique_id': 'sg_battery_charging_start_power', 'slave': 1, 'address': 33148, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 10, 'scan_interval': 10} Error in sensor Battery current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][84]. Got {'name': 'Battery current', 'unique_id': 'sg_battery_current', 'slave': 1, 'address': 13020, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'A', 'device_class': 'Current', 'scale': 0.1, 'scan_interval': 10} Error in sensor Battery discharging start power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][114]. Got {'name': 'Battery discharging start power', 'unique_id': 'sg_battery_discharging_start_power', 'slave': 1, 'address': 33149, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 10, 'scan_interval': 10} Error in sensor Battery forced charge discharge cmd raw swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][103]. Got {'name': 'Battery forced charge discharge cmd raw', 'unique_id': 'sg_battery_forced_charge_discharge_cmd_raw', 'slave': 1, 'address': 13050, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'scan_interval': 10} Error in sensor Battery forced charge discharge power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][104]. Got {'name': 'Battery forced charge discharge power', 'unique_id': 'sg_battery_forced_charge_discharge_power', 'slave': 1, 'address': 13051, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scan_interval': 10} Error in sensor Battery level swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][86]. Got {'name': 'Battery level', 'unique_id': 'sg_battery_level', 'slave': 1, 'address': 13022, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': '%', 'device_class': 'battery', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 60} Error in sensor Battery max charge power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][110]. Got {'name': 'Battery max charge power', 'unique_id': 'sg_battery_max_charge_power', 'slave': 1, 'address': 33046, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 10, 'scan_interval': 10} Error in sensor Battery max discharge power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][111]. Got {'name': 'Battery max discharge power', 'unique_id': 'sg_battery_max_discharge_power', 'slave': 1, 'address': 33047, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 10, 'scan_interval': 10} Error in sensor Battery power raw swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][85]. Got {'name': 'Battery power raw', 'unique_id': 'sg_battery_power_raw', 'slave': 1, 'address': 13021, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Battery state of health swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][87]. Got {'name': 'Battery state of health', 'unique_id': 'sg_battery_state_of_health', 'slave': 1, 'address': 13023, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': '%', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 600} Error in sensor Battery voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][83]. Got {'name': 'Battery voltage', 'unique_id': 'sg_battery_voltage', 'slave': 1, 'address': 13019, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'scale': 0.1, 'scan_interval': 10} Error in sensor Daily PV generation & battery discharge swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][1]. Got {'name': 'Daily PV generation & battery discharge', 'unique_id': 'sg_daily_pv_gen_battery_discharge', 'slave': 1, 'address': 5002, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily PV generation swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][73]. Got {'name': 'Daily PV generation', 'unique_id': 'sg_daily_pv_generation', 'slave': 1, 'address': 13001, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily battery charge from PV swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][79]. Got {'name': 'Daily battery charge from PV', 'unique_id': 'sg_daily_battery_charge_from_pv', 'slave': 1, 'address': 13011, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily battery charge swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][97]. Got {'name': 'Daily battery charge', 'unique_id': 'sg_daily_battery_charge', 'slave': 1, 'address': 13039, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily battery discharge swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][89]. Got {'name': 'Daily battery discharge', 'unique_id': 'sg_daily_battery_discharge', 'slave': 1, 'address': 13025, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily direct energy consumption swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][81]. Got {'name': 'Daily direct energy consumption', 'unique_id': 'sg_daily_direct_energy_consumption', 'slave': 1, 'address': 13016, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily exported energy from PV swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][75]. Got {'name': 'Daily exported energy from PV', 'unique_id': 'sg_daily_exported_energy_from_PV', 'slave': 1, 'address': 13004, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily exported energy swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][99]. Got {'name': 'Daily exported energy', 'unique_id': 'sg_daily_exported_energy', 'slave': 1, 'address': 13044, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Daily imported energy swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][95]. Got {'name': 'Daily imported energy', 'unique_id': 'sg_daily_imported_energy', 'slave': 1, 'address': 13035, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor EMS mode selection raw swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][102]. Got {'name': 'EMS mode selection raw', 'unique_id': 'sg_ems_mode_selection_raw', 'slave': 1, 'address': 13049, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'scan_interval': 10} Error in sensor Export power limit mode raw swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][108]. Got {'name': 'Export power limit mode raw', 'unique_id': 'sg_export_power_limit_mode_raw', 'slave': 1, 'address': 13086, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'scan_interval': 10} Error in sensor Export power limit swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][107]. Got {'name': 'Export power limit', 'unique_id': 'sg_export_power_limit', 'slave': 1, 'address': 13073, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Grid frequency swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][12]. Got {'name': 'Grid frequency', 'unique_id': 'sg_grid_frequency', 'slave': 1, 'address': 5035, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 2, 'unit_of_measurement': 'Hz', 'device_class': 'frequency', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Inverter start stop swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][101]. Got {'name': 'Inverter start stop', 'unique_id': 'sg_inverter_start_stop', 'slave': 1, 'address': 12999, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'scan_interval': 10} Error in sensor MPPT1 current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][5]. Got {'name': 'MPPT1 current', 'unique_id': 'sg_mppt1_current', 'slave': 1, 'address': 5011, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 2, 'unit_of_measurement': 'A', 'device_class': 'Current', 'scale': 0.1, 'scan_interval': 10} Error in sensor MPPT1 voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][4]. Got {'name': 'MPPT1 voltage', 'unique_id': 'sg_mppt1_voltage', 'slave': 1, 'address': 5010, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'scale': 0.1, 'scan_interval': 10} Error in sensor MPPT2 current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][7]. Got {'name': 'MPPT2 current', 'unique_id': 'sg_mppt2_current', 'slave': 1, 'address': 5013, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 2, 'unit_of_measurement': 'A', 'device_class': 'Current', 'scale': 0.1, 'scan_interval': 10} Error in sensor MPPT2 voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][6]. Got {'name': 'MPPT2 voltage', 'unique_id': 'sg_mppt2_voltage', 'slave': 1, 'address': 5012, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'scale': 0.1, 'scan_interval': 10} Error in sensor Max SoC swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][105]. Got {'name': 'Max SoC', 'unique_id': 'sg_max_soc', 'slave': 1, 'address': 13057, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': '%', 'device_class': 'battery', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Min SoC swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][106]. Got {'name': 'Min SoC', 'unique_id': 'sg_min_soc', 'slave': 1, 'address': 13058, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': '%', 'device_class': 'battery', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Monthly PV generation (01 January) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][26]. Got {'name': 'Monthly PV generation (01 January)', 'unique_id': 'sg_monthly_pv_generation_01_january', 'slave': 1, 'address': 6226, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (02 February) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][27]. Got {'name': 'Monthly PV generation (02 February)', 'unique_id': 'sg_monthly_pv_generation_02_february', 'slave': 1, 'address': 6227, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (03 March) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][28]. Got {'name': 'Monthly PV generation (03 March)', 'unique_id': 'sg_monthly_pv_generation_03_march', 'slave': 1, 'address': 6228, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (04 April) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][29]. Got {'name': 'Monthly PV generation (04 April)', 'unique_id': 'sg_monthly_pv_generation_04_april', 'slave': 1, 'address': 6229, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (05 May) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][30]. Got {'name': 'Monthly PV generation (05 May)', 'unique_id': 'sg_monthly_pv_generation_05_may', 'slave': 1, 'address': 6230, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (06 June) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][31]. Got {'name': 'Monthly PV generation (06 June)', 'unique_id': 'sg_monthly_pv_generation_06_june', 'slave': 1, 'address': 6231, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (07 July) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][32]. Got {'name': 'Monthly PV generation (07 July)', 'unique_id': 'sg_monthly_pv_generation_07_july', 'slave': 1, 'address': 6232, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (08 August) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][33]. Got {'name': 'Monthly PV generation (08 August)', 'unique_id': 'sg_monthly_pv_generation_08_august', 'slave': 1, 'address': 6233, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (09 September) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][34]. Got {'name': 'Monthly PV generation (09 September)', 'unique_id': 'sg_monthly_pv_generation_09_september', 'slave': 1, 'address': 6234, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (10 October) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][35]. Got {'name': 'Monthly PV generation (10 October)', 'unique_id': 'sg_monthly_pv_generation_10_october', 'slave': 1, 'address': 6235, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (11 November) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][36]. Got {'name': 'Monthly PV generation (11 November)', 'unique_id': 'sg_monthly_pv_generation_11_november', 'slave': 1, 'address': 6236, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly PV generation (12 December) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][37]. Got {'name': 'Monthly PV generation (12 December)', 'unique_id': 'sg_monthly_pv_generation_12_december', 'slave': 1, 'address': 6237, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (01 January) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][49]. Got {'name': 'Monthly export (01 January)', 'unique_id': 'sg_monthly_export_01_january', 'slave': 1, 'address': 6595, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (02 February) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][50]. Got {'name': 'Monthly export (02 February)', 'unique_id': 'sg_monthly_export_02_february', 'slave': 1, 'address': 6596, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (03 March) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][51]. Got {'name': 'Monthly export (03 March)', 'unique_id': 'sg_monthly_export_03_march', 'slave': 1, 'address': 6597, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (04 April) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][52]. Got {'name': 'Monthly export (04 April)', 'unique_id': 'sg_monthly_export_04_april', 'slave': 1, 'address': 6598, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (05 May) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][53]. Got {'name': 'Monthly export (05 May)', 'unique_id': 'sg_monthly_export_05_may', 'slave': 1, 'address': 6599, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (06 June) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][54]. Got {'name': 'Monthly export (06 June)', 'unique_id': 'sg_monthly_export_06_june', 'slave': 1, 'address': 6600, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (07 July) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][55]. Got {'name': 'Monthly export (07 July)', 'unique_id': 'sg_monthly_export_07_july', 'slave': 1, 'address': 6601, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (08 August) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][56]. Got {'name': 'Monthly export (08 August)', 'unique_id': 'sg_monthly_export_08_august', 'slave': 1, 'address': 6602, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (09 September) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][57]. Got {'name': 'Monthly export (09 September)', 'unique_id': 'sg_monthly_export_09_september', 'slave': 1, 'address': 6603, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (10 October) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][58]. Got {'name': 'Monthly export (10 October)', 'unique_id': 'sg_monthly_export_10_october', 'slave': 1, 'address': 6604, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (11 November) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][59]. Got {'name': 'Monthly export (11 November)', 'unique_id': 'sg_monthly_export_11_november', 'slave': 1, 'address': 6605, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Monthly export (12 December) swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][60]. Got {'name': 'Monthly export (12 December)', 'unique_id': 'sg_monthly_export_12_december', 'slave': 1, 'address': 6606, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'kWh', 'device_class': 'energy', 'state_class': 'total_increasing', 'scale': 0.1, 'scan_interval': 600} Error in sensor Phase A current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][91]. Got {'name': 'Phase A current', 'unique_id': 'sg_phase_a_current', 'slave': 1, 'address': 13030, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'A', 'device_class': 'current', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Phase A voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][9]. Got {'name': 'Phase A voltage', 'unique_id': 'sg_phase_a_voltage', 'slave': 1, 'address': 5018, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Phase B current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][92]. Got {'name': 'Phase B current', 'unique_id': 'sg_phase_b_current', 'slave': 1, 'address': 13031, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'A', 'device_class': 'current', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Phase B voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][10]. Got {'name': 'Phase B voltage', 'unique_id': 'sg_phase_b_voltage', 'slave': 1, 'address': 5019, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Phase C current swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][93]. Got {'name': 'Phase C current', 'unique_id': 'sg_phase_c_current', 'slave': 1, 'address': 13032, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'A', 'device_class': 'current', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Phase C voltage swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][11]. Got {'name': 'Phase C voltage', 'unique_id': 'sg_phase_c_voltage', 'slave': 1, 'address': 5020, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 1, 'unit_of_measurement': 'V', 'device_class': 'Voltage', 'state_class': 'measurement', 'scale': 0.1, 'scan_interval': 10} Error in sensor Power factor swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][14]. Got {'name': 'Power factor', 'unique_id': 'sg_power_factor', 'slave': 1, 'address': 5034, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 3, 'unit_of_measurement': '%', 'device_class': 'power_factor', 'state_class': 'measurement', 'scale': 0.001, 'scan_interval': 10} Error in sensor Reserved SoC for backup swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][109]. Got {'name': 'Reserved SoC for backup', 'unique_id': 'sg_reserved_soc_for_backup', 'slave': 1, 'address': 13099, 'input_type': 'holding', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'unit_of_measurement': '%', 'device_class': 'battery', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10} Error in sensor Running state swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][72]. Got {'name': 'Running state', 'unique_id': 'sg_running_state', 'slave': 1, 'address': 13000, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'scale': 1, 'scan_interval': 10} Error in sensor Sungrow device type code swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][0]. Got {'name': 'Sungrow device type code', 'unique_id': 'sg_dev_code', 'slave': 1, 'address': 4999, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'scan_interval': 600} Error in sensor System state swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][71]. Got {'name': 'System state', 'unique_id': 'sg_system_state', 'slave': 1, 'address': 12999, 'input_type': 'input', 'count': 1, 'data_type': 'uint16', 'swap': 'word', 'precision': 0, 'scale': 1, 'scan_interval': 10} Error in sensor Total backup power swap(word) not possible due to the registers count: 1, needed: 2 @ data['modbus'][0]['sensors'][22]. Got {'name': 'Total backup power', 'slave': 1, 'unique_id': 'sg_total_backup_power', 'address': 5725, 'input_type': 'input', 'count': 1, 'data_type': 'int16', 'swap': 'word', 'precision': 0, 'unit_of_measurement': 'W', 'device_class': 'power', 'state_class': 'measurement', 'scale': 1, 'scan_interval': 10}. (See ?, line ?).

horstvogel commented 1 year ago

for me the same. I go from 2023.08.2 to 2023.08.3. There are some Modbus changes in Home Assistant , but I don´t kown what to do.

https://www.home-assistant.io/blog/2023/08/02/release-20238/#release-202383---august-18

DrBando commented 1 year ago

same here, broken since the upgrade. Was running like a charme before. I did try to change the data types of BDC rated power but then the error just moved to the next register.

mkaiser commented 1 year ago

big uuuff....

could you try to modify some of the "counts" and see, if the errors disappear for some registers?

I was just about to leave the computer for an extra long computer-less weekend .... Shit

NBD99 commented 1 year ago

I tried now for one of the registers that had a count of 1 to 2 then its not invalid anymore.

DrBando commented 1 year ago

I have changed every count 1 to 2 except for inverter and battery temperature. The home assistant error notification is now gone and some entities are working again, but it seems not all of them. I'll have a look tomorrow if some more entities have recovered.

Am Fr., 18. Aug. 2023 um 22:30 Uhr schrieb NBD99 @.***>:

I tried now for one of the registers that had a count of 1 to 2 then its now invalid anymore.

— Reply to this email directly, view it on GitHub https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/issues/141#issuecomment-1684405816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT73LAULCFXFLS63ADKX4BDXV7GIHANCNFSM6AAAAAA3V45JRM . You are receiving this because you commented.Message ID: <mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/issues/141/1684405816@ github.com>

stephan192 commented 1 year ago

I had the same issue. I made a downgrade to 2023.8.2 and everything is working again.

To perform the downgrade:

  1. Install the "Terminal & SSH" Addon
  2. Log into your Home Assistant via SSH. I use PuTTY
  3. Run the following command to downgrade: ha core update --version 2023.8.2

The changelog states four changes for modbus in the update to 2023.8.3 and even one in the update to 2023.8.2

Louisbertelsmann commented 1 year ago

There's also usually a partial backup made before the update. You can restore the old version by going to backups, clicking on the backup done by the update and reverting back to it. That only changes the HA version. It's a bit easier for people not comfortable in the terminal. Also, I had the same problem. I'm gonna check if changing the counts works.

ZEi20T commented 1 year ago

i had the problem also, tried changing the count, only some entities were working

downgrading to 8.3 has fixed the problem

Louisbertelsmann commented 1 year ago

Changing swap: word to swap: none worked for some entities, but some are either reporting nothing or completely wrong values. Btw, that was suggested by Tyron Brandt on the Discord. Seems to be a pretty big issue. Do we even know, if this is a bug or if it's just some change that's going to be permanent? Because I don't think it makes sense to change the entire config just for a new version to break it again.

Louisbertelsmann commented 1 year ago

I'm gonna set up modbus proxy and a new HA instance. I'm gonna try a bit and report back. Any help is appreciated.

WishMaster666 commented 1 year ago

It should be fixed in 2023.8.4 as I read here: https://github.com/home-assistant/core/pull/97798#issuecomment-1684890907

mkaiser commented 1 year ago

fixed in 5af1945325eefc5d360cf219a03ef6b981e3ed3e

hvbargen commented 1 year ago

I'm using a SunGrow inverter. I had the same issue. What I did: Edit the /config/integrations/modbus_sungrow.yaml file. Search for swap:word in sections where the data_type is uint16 or int16 and comment those lines. Do NOT change anything where data_type is uint32 or int32.

image

It seems to work.

mega-hz commented 9 months ago

I just upgraded HA to Home Assistant core 2024.1.0 Home Assistant Operating System 11.3 Home Assistant Supervisor 2023.12.0

many errors with

swap: none, retries: (is not supported anymore)

MKaiser: please give us a fixed File.

Louisbertelsmann commented 9 months ago

There is a fixed file in the repository. Just update to that.