openWB software2 2.1.4 Beta 1, 2 und 3

Fragen zur Nutzung, Features, usw..
Pendragon
Beiträge: 145
Registriert: Di Jan 30, 2024 5:43 pm

Re: openWB software2 2.1.4 Beta 1

Beitrag von Pendragon »

LenaK hat geschrieben: Do Mai 02, 2024 12:50 pm
Pendragon hat geschrieben: Do Apr 25, 2024 2:45 pm Und mal wieder soll die WB laden, sagt auch dass sie lädt, aber tut es dann doch nicht.

Code: Alles auswählen

2024-04-25 16:43:40,161 - {root:75} - {INFO:MainThread} - # ***Start*** 
2024-04-25 16:43:45,179 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=smarthome_handler, args=(), kwargs={})
2024-04-25 16:43:45,181 - {root:56} - {DEBUG:MainThread} - Don't start multiple instances of smarthome thread.
2024-04-25 16:43:50,193 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=smarthome_handler, args=(), kwargs={})
2024-04-25 16:43:50,195 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=handler10Sec, args=(), kwargs={})
2024-04-25 16:43:50,196 - {root:75} - {INFO:MainThread} - # ***Start*** 
2024-04-25 16:43:50,227 - {modules.common.component_context:54} - {DEBUG:device1} - Update Komponenten ['MQTT-Zähler', 'MQTT-Wechselrichter']
2024-04-25 16:43:50,227 - {modules.devices.mqtt.device:47} - {DEBUG:device1} - MQTT-Module müssen nicht ausgelesen werden.
2024-04-25 16:43:50,231 - {modules.common.component_context:25} - {DEBUG:set values cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,284 - {modules.common.component_context:25} - {DEBUG:component3} - Update Komponente ['MQTT-Wechselrichter']
2024-04-25 16:43:50,285 - {modules.common.component_context:25} - {DEBUG:update values cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,297 - {modules.common.component_context:25} - {DEBUG:component2} - Update Komponente ['MQTT-Zähler']
2024-04-25 16:43:50,404 - {control.counter:145} - {INFO:MainThread} - Verbleibende Ströme an Zähler 2: [66.73, 66.75, 66.79]A
2024-04-25 16:43:50,405 - {control.counter:168} - {INFO:MainThread} - Verbleibende Leistung an Zähler 2: 45372W
2024-04-25 16:43:50,416 - {control.chargepoint.chargepoint:550} - {DEBUG:MainThread} - EV-Phasenzahl beschränkt die nutzbaren Phasen auf 3
2024-04-25 16:43:50,420 - {control.chargepoint.chargepoint:533} - {DEBUG:MainThread} - Phasenzahl Lademodus: 1
2024-04-25 16:43:50,425 - {control.chargepoint.chargepoint:674} - {INFO:MainThread} - LP 1, EV: Opel Corsa-e (EV-Nr.1): Theoretisch benötigter Strom 6A, Lademodus pv_charging, Submodus: Chargemode.PV_CHARGING, Phasen: 1, Priorität: False, max. Ist-Strom: 0.0
2024-04-25 16:43:50,443 - {modules.common.simcount._simcount:38} - {DEBUG:MainThread} - Previous state: SimCounterState(timestamp=1714056210.6634357, power=582.6100000000001, imported=1093462.825598368, exported=0)
2024-04-25 16:43:50,446 - {modules.common.simcount._calculate:11} - {DEBUG:MainThread} - time passed: 0.0054944, power1: 582.61, power2: 605.45
2024-04-25 16:43:50,447 - {modules.common.simcount._calculate:27} - {DEBUG:MainThread} - power did not change sign. Total energy: 3.26384
2024-04-25 16:43:50,459 - {modules.common.simcount._simcount:53} - {DEBUG:MainThread} - imported: 3.26384 Wh, exported: 0 Wh, new state: SimCounterState(timestamp=1714056230.4432807, power=605.4499999999998, imported=1093466.089437625, exported=0)
2024-04-25 16:43:50,462 - {control.data:236} - {INFO:MainThread} - bat_all_data
BatAllData(config=Config(configured=False), get=Get(soc=0, daily_exported=0.0, daily_imported=0.0, fault_str='Kein Fehler.', fault_state=0, imported=0, exported=0, power=0), set=Set(charging_power_left=0, regulate_up=False))
2024-04-25 16:43:50,463 - {control.data:237} - {INFO:MainThread} - cp_all_data
AllChargepointData(get=AllGet(daily_imported=6719.0, daily_exported=0.0, power=0, imported=529671.02, exported=0))
2024-04-25 16:43:50,465 - {control.data:266} - {INFO:MainThread} - cp1
ChargepointData(control_parameter=ControlParameter(chargemode=<Chargemode.PV_CHARGING: 'pv_charging'>, current_plan='Zielladen-Standard', failed_phase_switches=0, imported_at_plan_start=529671.02, imported_instant_charging=None, limit=None, phases=1, prio=False, required_current=6, required_currents=[0.0, 0.0, 6], state=4, submode=<Chargemode.PV_CHARGING: 'pv_charging'>, timestamp_auto_phase_switch=None, timestamp_perform_phase_switch=None, timestamp_switch_on_off=None), get=Get(charge_state=False, connected_vehicle=ConnectedVehicle(config=ConnectedConfig(average_consumption=17, charge_template=0, chargemode='stop', current_plan=0, ev_template=0, priority=False, time_charging_in_use=False), info=ConnectedInfo(id=0, name='Ladepunkt'), soc=50), currents=[0.0, 0.0, 0.0], daily_imported=6719.0, daily_exported=0.0, evse_current=600, exported=0, fault_str='Kein Fehler.', fault_state=0, imported=529671.02, phases_in_use=1, plug_state=True, power=0, rfid_timestamp=None, rfid=None, serial_number='240121692', soc=None, soc_timestamp=None, state_str=None, vehicle_id=None, voltages=[227.15, 225.62, 224.75]), set=Set(change_ev_permitted=[True, ''], charging_ev=1, charging_ev_prev=1, current=6, energy_to_charge=0, loadmanagement_available=True, log=Log(chargemode_log_entry='_', costs=0, imported_at_mode_switch=529671.02, imported_at_plugtime=529671.02, imported_since_mode_switch=0, imported_since_plugged=0.0, range_charged=0, time_charged='00:00', timestamp_start_charging=None, ev=-1, prio=False, rfid=None, serial_number=None), manual_lock=False, phases_to_use=1, plug_state_prev=True, plug_time=1714052270.621543, required_power=1380.0, rfid=None, target_current=0, charging_ev_data=<control.ev.Ev object at 0x6ec700a0>), config=Config(configuration={'mode': 'series', 'ip_address': 'localhost', 'duo_num': 0}, ev=1, name='Interne openWB', type='internal_openwb', template=0, connected_phases=3, phase_1=3, auto_phase_switch_hw=1, control_pilot_interruption_hw=1, id=1))
2024-04-25 16:43:50,466 - {control.data:266} - {INFO:MainThread} - cpt0
CpTemplateData(autolock=Autolock(active=False, plans={}, wait_for_charging_end=False), id=0, max_current_multi_phases=16, max_current_single_phase=16, name='Standard Ladepunkt-Profil', rfid_enabling=False, valid_tags=[])
2024-04-25 16:43:50,467 - {control.data:266} - {INFO:MainThread} - counter2
CounterData(config=Config(max_currents=[63, 63, 63], max_total_power=43000), get=Get(powers=[-797, -832, -850], currents=[-3.73, -3.75, -3.79], voltages=[224.6, 227.6, 226.3], power_factors=[0.55999994277954, 0.68999993801117, 0.7299998998642], unbalanced_load=0, frequency=49.93, daily_exported=23830.0, daily_imported=3250.0, imported=6297220, exported=23333240, fault_state=0, fault_str='Kein Fehler.', power=-2372), set=Set(error_counter=0, reserved_surplus=0, released_surplus=0, raw_power_left=45372, raw_currents_left=[66.73, 66.75, 66.79], surplus_power_left=0, state_str=''))
2024-04-25 16:43:50,471 - {control.data:241} - {INFO:MainThread} - counter_all_data
CounterAllData(config=Config(reserve_for_not_charging=True), get=Get(hierarchy=[{'id': 2, 'type': 'counter', 'children': [{'id': 3, 'type': 'inverter', 'children': []}, {'id': 1, 'type': 'cp', 'children': []}]}]), set=Set(loadmanagement_active=False, home_consumption=605.4499999999998, smarthome_power_excluded_from_home_consumption=0, invalid_home_consumption=0, daily_yield_home_consumption=8714.0, imported_home_consumption=1093466.089437625, disengageable_smarthome_power=0))
2024-04-25 16:43:50,474 - {control.data:266} - {INFO:MainThread} - ct0
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={}), chargemode=Chargemode(selected='pv_charging', pv_charging=PvCharging(min_soc_current=12, min_current=0, feed_in_limit=False, min_soc=0, max_soc=80), scheduled_charging=ScheduledCharging(plans={'1': ScheduledChargingPlan(active=True, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, False, False, False]), current=12, name='Zielladen-Standard', limit=ScheduledLimit(selected='soc', amount=1000, soc_limit=80, soc_scheduled=40), time='07:40')}), instant_charging=InstantCharging(current=13, limit=Limit(selected='soc', amount=50000, soc=60))))
2024-04-25 16:43:50,479 - {control.data:266} - {INFO:MainThread} - ct1
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={'0': TimeChargingPlan(active=False, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, True, False, False]), time=['07:00', '08:00'], name='Wochentags morgens', current=7, limit=Limit(selected='none', amount=1000, soc=50))}), chargemode=Chargemode(selected='stop', pv_charging=PvCharging(min_soc_current=10, min_current=0, feed_in_limit=False, min_soc=0, max_soc=100), scheduled_charging=ScheduledCharging(plans={'0': ScheduledChargingPlan(active=True, frequency=Frequency(selected='daily', once=['2021-11-01', '2021-11-05'], weekly=[False, False, False, False, False, False, False]), current=14, name='Morgens', limit=ScheduledLimit(selected='soc', amount=3000, soc_limit=90, soc_scheduled=80), time='07:45')}), instant_charging=InstantCharging(current=10, limit=Limit(selected='none', amount=1000, soc=50))))
2024-04-25 16:43:50,481 - {control.data:266} - {INFO:MainThread} - ct2
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={'2': TimeChargingPlan(active=True, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, True, False, False]), time=['07:15', '08:00'], name='Wochentags morgens', current=7, limit=Limit(selected='none', amount=1000, soc=50))}), chargemode=Chargemode(selected='stop', pv_charging=PvCharging(min_soc_current=10, min_current=0, feed_in_limit=False, min_soc=0, max_soc=100), scheduled_charging=ScheduledCharging(plans={}), instant_charging=InstantCharging(current=10, limit=Limit(selected='none', amount=1000, soc=50))))
2024-04-25 16:43:50,487 - {control.data:266} - {INFO:MainThread} - ev0
EvData(set=Set(soc_error_counter=0), charge_template=0, ev_template=0, name='Standard-Fahrzeug', tag_id=[], get=Get(soc=0, soc_timestamp=1706991493.0, force_soc_update=True, range=None, fault_state=0, fault_str='Kein Fehler.'))
2024-04-25 16:43:50,490 - {control.data:266} - {INFO:MainThread} - ev1
EvData(set=Set(soc_error_counter=0), charge_template=0, ev_template=1, name='Opel Corsa-e', tag_id=[], get=Get(soc=50, soc_timestamp=1714052270.676733, force_soc_update=False, range=94, fault_state=0, fault_str='Kein Fehler.'))
2024-04-25 16:43:50,491 - {control.data:266} - {INFO:MainThread} - et0
EvTemplateData(name='Standard-Fahrzeug-Profil', max_current_multi_phases=16, max_phases=3, phase_switch_pause=2, prevent_phase_switch=False, prevent_charge_stop=False, control_pilot_interruption=True, control_pilot_interruption_duration=7, average_consump=17000, min_current=6, max_current_single_phase=32, battery_capacity=46000, efficiency=95, nominal_difference=1, keep_charge_active_duration=50)
2024-04-25 16:43:50,496 - {control.data:266} - {INFO:MainThread} - et1
EvTemplateData(name='Opel Corsa-e', max_current_multi_phases=16, max_phases=3, phase_switch_pause=60, prevent_phase_switch=False, prevent_charge_stop=False, control_pilot_interruption=True, control_pilot_interruption_duration=4, average_consump=20000, min_current=6, max_current_single_phase=16, battery_capacity=46000, efficiency=95, nominal_difference=1, keep_charge_active_duration=40)
2024-04-25 16:43:50,498 - {control.data:245} - {INFO:MainThread} - general_data
GeneralData(chargemode_config=ChargemodeConfig(instant_charging=InstantCharging(phases_to_use=3), pv_charging=PvCharging(bat_power_reserve=200, bat_power_reserve_active=False, control_range=[-115, 115], feed_in_yield=0, phase_switch_delay=5, phases_to_use=0, bat_power_discharge=1000, bat_power_discharge_active=False, min_bat_soc=50, bat_mode='min_soc_bat_mode', switch_off_delay=180, switch_off_threshold=500, switch_on_delay=30, switch_on_threshold=1500), retry_failed_phase_switches=True, scheduled_charging=ScheduledCharging(phases_to_use=0), time_charging=TimeCharging(phases_to_use=3), unbalanced_load_limit=18, unbalanced_load=False), control_interval=20, extern_display_mode='primary', extern=False, external_buttons_hw=False, grid_protection_active=False, grid_protection_configured=True, grid_protection_random_stop=0, grid_protection_timestamp='', mqtt_bridge=False, prices=Prices(bat=0.00033, cp=0, grid=0.00033, pv=7e-05), range_unit='km', ripple_control_receiver=RippleControlReceiver(get=RippleControlReceiverGet(fault_state=0, fault_str='Kein Fehler.', override_value=100), module=None, overrice_reference=<OverrideReference.CHARGEPOINT: 'chargepoint'>))
2024-04-25 16:43:50,501 - {control.data:246} - {INFO:MainThread} - general_data-display
primary
2024-04-25 16:43:50,503 - {control.data:247} - {INFO:MainThread} - graph_data
GraphData(config=Config(duration=120))
2024-04-25 16:43:50,504 - {control.data:248} - {INFO:MainThread} - optional_data
OptionalData(et=Et(get=EtGet(fault_state=0, fault_str='Kein Fehler.', prices={})), int_display=InternalDisplay(active=False, on_if_plugged_in=True, pin_active=False, pin_code='0000', standby=60, theme=<modules.display_themes.cards.config.CardsDisplayTheme object at 0x6ec7b8b0>), led=Led(active=False), rfid=Rfid(active=True))
2024-04-25 16:43:50,505 - {control.data:266} - {INFO:MainThread} - pv3
PvData(config=Config(max_ac_out=13000), get=Get(currents=[0.0, 0.0, 0.0], daily_exported=34990.0, monthly_exported=971060, yearly_exported=2177020, exported=28335000, fault_state=0, fault_str='Kein Fehler.', power=-2977.45))
2024-04-25 16:43:50,507 - {control.data:250} - {INFO:MainThread} - pv_all_data
PvAllData(config=Config(configured=True), get=Get(daily_exported=34990.0, fault_str='Kein Fehler.', fault_state=0, monthly_exported=971060, yearly_exported=28334620, exported=28335000, power=-2977.45))
2024-04-25 16:43:50,510 - {control.data:266} - {INFO:MainThread} - system
{'update_in_progress': False, 'perform_update': False, 'ip_address': '192.168.1.60', 'current_commit': '2024-04-19 16:02:46 +0200 [72f765e68]', 'current_branch': 'Beta', 'current_branch_commit': '2024-04-19 16:02:46 +0200 [72f765e68]', 'current_missing_commits': [], 'datastore_version': 44, 'dataprotection_acknowledged': True, 'usage_terms_acknowledged': True, 'debug_level': 10, 'release_train': 'master', 'version': '2.1.4-Beta.1', 'boot_done': True, 'lastlivevaluesJson': {'timestamp': 1714056210, 'time': '16:43:30', 'grid': -2.48, 'house-power': 0.583, 'charging-all': 0.0, 'pv-all': 3.063, 'cp1-power': 0.0, 'ev1-soc': 50}, 'backup_before_update': True, 'module_update_completed': True}
2024-04-25 16:43:50,516 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT', 'type': 'mqtt', 'id': 1, 'configuration': <modules.devices.mqtt.config.MqttConfiguration object at 0x712a4e38>}
2024-04-25 16:43:50,518 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,521 - {control.data:279} - {INFO:MainThread} - device1
{'name': 'MQTT', 'type': 'mqtt', 'id': 1, 'configuration': {}}
2024-04-25 16:43:50,523 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT-Zähler', 'type': 'counter', 'id': 2, 'configuration': <modules.devices.mqtt.config.MqttCounterConfiguration object at 0x700c0688>}
2024-04-25 16:43:50,524 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,525 - {control.data:281} - {INFO:MainThread} - component2
{'name': 'MQTT-Zähler', 'type': 'counter', 'id': 2, 'configuration': {}}
2024-04-25 16:43:50,526 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT-Wechselrichter', 'type': 'inverter', 'id': 3, 'configuration': <modules.devices.mqtt.config.MqttInverterConfiguration object at 0x700c07a8>}
2024-04-25 16:43:50,526 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,527 - {control.data:281} - {INFO:MainThread} - component3
{'name': 'MQTT-Wechselrichter', 'type': 'inverter', 'id': 3, 'configuration': {}}
2024-04-25 16:43:50,527 - {control.data:253} - {INFO:MainThread} - 

2024-04-25 16:43:50,528 - {control.algorithm.algorithm:25} - {INFO:MainThread} - # Algorithmus
2024-04-25 16:43:50,529 - {control.counter:204} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: -2372W
2024-04-25 16:43:50,530 - {control.counter:382} - {DEBUG:MainThread} - LP1 Switch-Off-Threshold prüfen: -2372W, Schwelle: 500W, freigegebener Überschuss 0W, Einspeisegrenze 0W
2024-04-25 16:43:50,530 - {control.counter:249} - {DEBUG:MainThread} - Anpassen des Regelbereichs 0.0W
2024-04-25 16:43:50,531 - {control.counter:217} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: 2372.0W
2024-04-25 16:43:50,531 - {control.algorithm.algorithm:30} - {INFO:MainThread} - **Mindestrom setzen**
2024-04-25 16:43:50,534 - {control.algorithm.min_current:18} - {INFO:MainThread} - Mode-Tuple Chargemode.PV_CHARGING - Chargemode.PV_CHARGING - False, Zähler 2
2024-04-25 16:43:50,535 - {control.counter:176} - {DEBUG:MainThread} - Zähler 2: [66.73, 66.75, 60.790000000000006]A verbleibende Ströme, 43992W verbleibende Leistung
2024-04-25 16:43:50,536 - {control.algorithm.common:95} - {INFO:MainThread} - LP1: Stromstärke 6A
2024-04-25 16:43:50,537 - {control.algorithm.algorithm:32} - {INFO:MainThread} - **Sollstrom setzen**
2024-04-25 16:43:50,540 - {control.counter:249} - {DEBUG:MainThread} - Anpassen des Regelbereichs 0.0W
2024-04-25 16:43:50,540 - {control.counter:217} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: 992.0W
2024-04-25 16:43:50,541 - {control.counter:495} - {DEBUG:MainThread} - Zähler 2: Begrenzung der verbleibenden Leistung auf 992.0W
2024-04-25 16:43:50,542 - {control.algorithm.algorithm:38} - {INFO:MainThread} - **PV-geführten Strom setzen**
2024-04-25 16:43:50,544 - {control.algorithm.filter_chargepoints:116} - {DEBUG:MainThread} - Geordnete Ladepunkte [1]
2024-04-25 16:43:50,545 - {control.algorithm.filter_chargepoints:49} - {INFO:MainThread} - LP 1: Lädt nicht, daher keine weitere Berücksichtigung
2024-04-25 16:43:50,545 - {control.process:23} - {INFO:MainThread} - # Ladung starten.
2024-04-25 16:43:50,547 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'chargemode_log_entry': '_', 'costs': 0, 'imported_at_mode_switch': 529671.02, 'imported_at_plugtime': 529671.02, 'imported_since_mode_switch': 0, 'imported_since_plugged': 0.0, 'range_charged': 0, 'time_charged': '00:00', 'timestamp_start_charging': None, 'ev': -1, 'prio': False, 'rfid': None, 'serial_number': None}
2024-04-25 16:43:50,549 - {control.process:111} - {INFO:MainThread} - LP1: set current 6 A, state CHARGING_ALLOWED
2024-04-25 16:43:50,558 - {modules.common.component_context:25} - {DEBUG:set current cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,592 - {control.counter:193} - {INFO:MainThread} - 0W reservierte EVU-Leistung, 0W freigegebene EVU-Leistung
Falls das Problem nochmal auftritt bitte ein Ticket erstellen. Dann werden alle Logdateien erfasst. Hier fehlt das Log vom internen Ladepunkt, um zu sehen, ob die EVSE den Strom freigibt und es ein Problem des Fahrzeugs ist.
Habe das log vom 17.4. noch lokal gespeichert:
2024-04-17 Internal Charpoint.txt
(263.08 KiB) 65-mal heruntergeladen
Und das passende Main Log dazu:
2024-04-17 MainLog_kleiner.txt
(511.1 KiB) 49-mal heruntergeladen
Danke für's Kümmern! habe die letzten Male vor dem Einstecken immer mit dem Handy schnell den Debug Modus angeschmissen, aber es lief wie eine 1...
mrinas hat geschrieben: Do Mai 02, 2024 12:52 pm Mach' ich gern, kein Problem. Problem ist seither nicht wieder aufgetreten, was auch immer das gewesen sein mag.
Ich war gemeint :P :lol: :lol: :lol:
openWB series 2 custom 1/3 Umschaltung 22kW & RFID
16kWp mit Huawei Sun2000-12KTL
Opel Corsa-e mit 46kWh
Datenfluss: Datenabfrage via Solaranzeige.de (alle 20s), Verarbeitung mit Edomi und direkte Weiterleitung via MQTT
spooky82
Beiträge: 216
Registriert: Mo Okt 25, 2021 6:22 pm

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von spooky82 »

LutzB hat geschrieben: Do Mai 02, 2024 1:20 pm
spooky82 hat geschrieben: Do Mai 02, 2024 11:42 am Ich nutze das Script aus diesem Thread - etwas abgewandelt:

https://forum.iobroker.net/topic/53005/ ... oniert/471

Ob und wenn ja, was das Script anders macht, vermag ich nicht zu sagen - ich habe mich nicht mit dem Huawei Modul der oWB in der Tiefe auseinandergesetzt.
Geht der Link etwas genauer? In dem Beitrag gibt es viele Varianten für Huawei...
Guter Einwand - sorry.

Ich habe irgendwann aufgehört dem Thread zu folgen.
Ich habe hier meinen funktionierenden und entrümpelten Code gepackt:

Code: Alles auswählen

// From iobroker Forum: "Huawei Sun2000 & ioBroker via JS script funktioniert"
// https://forum.iobroker.net/topic/53005/huawei-sun2000-iobroker-via-js-script-funktioniert
// Started by Kachel, modidfied and extended by Chris_B
//

// define javascript instance; please change according to your setup
const JavaInst = "javascript.3.";

createState(JavaInst + "Solarpower.Derived.BatteryOverview",  "",  {read: true, write: true, name: "Battery Overview SOC"});
createState(JavaInst + "Solarpower.Derived.HouseConsumption", "",  {read: true, write: true, name: "Consumption of House", unit: "W"});
createState(JavaInst + "Solarpower.Derived.YieldToday",       "",  {read: true, write: true, name: "Yield Today", unit: "kW"});
createState(JavaInst + "Solarpower.Derived.IsBatteryLoading",  0,  {read: true, write: true, name: "Luna 2000 Battery is loading", type: "number"});
createState(JavaInst + "Solarpower.Derived.IsGridExporting",   0,  {read: true, write: true, name: "Exporting Power to Grid", type: "number"});
createState(JavaInst + "Solarpower.Derived.PeakPanelPower",    0,  {read: true, write: true, name: "Peak panel power today"});
createState(JavaInst + "Solarpower.Derived.GridExportSum",     0,  {read: true, write: true, name: "Total export to grid", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.GridImportSum",     0,  {read: true, write: true, name: "Total import from grid", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.GridExportToday",   0,  {read: true, write: true, name: "Export to grid today", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.GridImportToday",   0,  {read: true, write: true, name: "Import from grid today", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.ConsumptionToday",  0,  {read: true, write: true, name: "Consumption today", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.ConsumptionSum",    0,  {read: true, write: true, name: "Consumption total sum", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.ConsumptionStart",  0,  {read: true, write: true, name: "Consumption total sum at start of day", unit: "kWh"});
createState(JavaInst + "Solarpower.Derived.WorkingMode",       0,  {read: true, write: true, name: "Working mode", unit: "kWh"});


var ModbusRTU = require("modbus-serial");
var fs = require('fs');
var client = new ModbusRTU();
var testCreateState = 0;
const SHI = "Solarpower.Huawei.Inverter.";
const SHM = "Solarpower.Huawei.Meter.";

var currentinverter = 1;

var modbusErrorMessages =
[   "Unknown error",
    "Illegal function (device does not support this read/write function)",
    "Illegal data address (register not supported by device)",
    "Illegal data value (value cannot be written to this register)",
    "Slave device failure (device reports internal error)",
    "Acknowledge (requested data will be available later)",
    "Slave device busy (retry request again later)"
];

// Enter your inverter modbus IP and port here
const ModBusPort = 502;
const ModBusHost = "192.168.20.201"; // WR direkt
// const ModBusHost = "192.168.20.220"; // Modbus Proxy

ConnectModbus();

// Enter the Modbus-IDs of your Sun2000 inverters here (example for two inverters): const ModBusIDs = [16, 1];
const ModBusIDs = [1];
// On which Modbus-ID can we reach the power meter? (via Sun2000!)
const PowerMeterID = 0;
// Enter your battery stack setup. 2 dimensional array, e.g. [[3, 2], [3, 0]] means:
// First inverter has two battery stacks with 3 + 2 battery modules
// while second inverter has only one battery stack with 3 battery modules
const BatteryUnits = [[2, 0]];

// These register spaces need to be read
const RegToRead = 
[ [32000, 116],   // inverter status -                            read fast
  [37000, 68],    // battery information -                        read fast
  [37100, 114],   // meter info -                                 read fast
  [37700, 100],   // battery information -                        read fast
  [38200, 100],   // additional battery information -             read fast
  [30000, 81],    // model info, SN, max Power (static info) -    read slow
  [37800, 100],   // additional battery information -             read slow
  [38300, 100],   // additional battery information -             read slow
  [38400, 100],   // additional battery information -             read slow
  [47081, 2]      // additional battery information -             read slow
//[35300, 40]     // inverter power adjustments -                 do not read
];  
const RegFast = 5;      // number of register spaces to read fast (must be < RegToRead.length)
const RegFastMod = 10;  // read slow registers every n'th time (mod operator)
var RegReadCnt = 0;     // Loop counter
var RegToReadPtr = 0;   // pointer to register spaces

// create data buffer (can be optimzed further)
// BufOffset must be equal or smaller to smallest register address that is read
// BufOffset + BufLength must be at leat as large as largest register address read
const BufOffset = 30000;
const BufLength = 18000;
var Buffer = new Array(2);
for ( var i=0; i < ModBusIDs.length; i++) Buffer[i] = new Array(BufLength);


// some helper functions
function readUnsignedInt16(array)
{   return array[0];
}

function readUnsignedInt32(array)
{   return array[0] * 256 * 256 + array[1];
}

function readSignedInt16(array)
{   var value = 0;
    if (array[0] > 32767)   value = array[0] - 65535; 
        else                value = array[0];
    return value;
}

function readSignedInt32(array)
{   var value = 0;
    for (var i = 0; i < 2; i++) { value = (value << 16) | array[i]; }
    return value;
}


// the following five functions directly read data from the buffer
// the buffer offset must therefore be used
function getU16(dataarray, index)
{   
    index = index - BufOffset;
    return readUnsignedInt16(dataarray.slice(index, index+1));
}

function getU32(dataarray, index)
{   
    index = index - BufOffset;
    return readUnsignedInt32(dataarray.slice(index, index+2));
}

function getI16(dataarray, index)
{   
    index = index - BufOffset;
    return readSignedInt16(dataarray.slice(index, index+1));
}

function getI32(dataarray, index)
{   
    index = index - BufOffset;
    return readSignedInt32(dataarray.slice(index, index+2));
}

function getStr(dataarray, index, length)
{   
    index = index - BufOffset;
    var bytearray = [];
    for(var i = 0; i < length; i++)
    {   bytearray.push(dataarray[index+i] >> 8);
        bytearray.push(dataarray[index+i] & 0xff);
    }       
    var value =  String.fromCharCode.apply(null, bytearray);    
    var value2 = new String(value).trim();
    return value2;
}


function forcesetState(objectname, value, options)
//------------------------------------------------
// perform createState() only if variable does not yet exist, and perform the check via existsState() only once for each processing round
{   if (testCreateState == 0)
    {   if (!existsState(JavaInst + objectname)) { createState(objectname, value, options); }
        else                                            { setState(objectname, value); }
    } else
    {   setState(objectname, value);
    }
}  


function ConnectModbus()
//----------------------
// connects to modbus
 {
    console.log("Init connection to: " + ModBusHost +":" + ModBusPort);

    // set requests parameters and try to connect
    client.setTimeout (10000);
    client.connectTCP (ModBusHost, { port: ModBusPort })
        .then(function()
        {   console.log("Connected"); })
        .catch(function(e)
        {   console.log(e); });
}


// Functions to map registers into ioBreaker objects
function ProcessOptimizers(id)
//----------------------------
{
    forcesetState(SHI + id + ".OptimizerTotalNumber",     getU16(Buffer[id-1], 37200), {name: "", unit: ""});
    forcesetState(SHI + id + ".OptimizerOnlineNumber",    getU16(Buffer[id-1], 37201), {name: "", unit: ""});
    forcesetState(SHI + id + ".OptimizerFeatureData",     getU16(Buffer[id-1], 37202), {name: "", unit: ""});
}

function ProcessInverterPowerAdjustments(id)
//------------------------------------------
{
    forcesetState(SHI + id + ".ActiveAdjustement.ActiveAdjustementMode",     getU16(Buffer[id-1], 35300), {name: "", unit: ""});
    forcesetState(SHI + id + ".ActiveAdjustement.ActiveAdjustementValue",    getU32(Buffer[id-1], 35301), {name: "", unit: ""}); // Note: This might be an error in the manual. It says register 35302 with quantity 2, but on 35303 is already the next value.
    forcesetState(SHI + id + ".ActiveAdjustement.ActiveAdjustementCommand",  getU16(Buffer[id-1], 35303), {name: "", unit: ""});
    forcesetState(SHI + id + ".ActiveAdjustement.ReactiveAdjustementMode",   getU16(Buffer[id-1], 35304), {name: "", unit: ""});
    forcesetState(SHI + id + ".ActiveAdjustement.ReactiveAdjustementValue",  getU32(Buffer[id-1], 35305), {name: "", unit: ""});
    forcesetState(SHI + id + ".ActiveAdjustement.ReactiveAdjustementCommand",getU16(Buffer[id-1], 35307), {name: "", unit: ""});
    forcesetState(SHI + id + ".ActiveAdjustement.PowerMeterActivePower",     getI32(Buffer[id-1], 35313), {name: "", unit: ""});
}

function ProcessBattery(id)
//-------------------------
{
    // Battery registers 1-15 (Stack 1 related)
    if ( BatteryUnits[id-1][0] > 0)
    {
        forcesetState(SHI + id + ".Batterystack.1.RunningStatus",               getU16(Buffer[id-1], 37000), {name: "", unit: ""});
        forcesetState(SHI + id + ".Batterystack.1.ChargeAndDischargePower",     getI32(Buffer[id-1], 37001), {name: "Charge and Discharge Power", unit: "W"});
        forcesetState(SHI + id + ".Batterystack.1.BusVoltage",                  getU16(Buffer[id-1], 37003) / 10, {name: "Busvoltage", unit: "V"});
        forcesetState(SHI + id + ".Batterystack.1.BatterySOC",                  getU16(Buffer[id-1], 37004) / 10, {name: "Battery SOC", unit: "%"});
        forcesetState(SHI + id + ".Batterystack.1.WorkingMode",                 getU16(Buffer[id-1], 37006), {name: "Working Mode", unit: ""});
        forcesetState(SHI + id + ".Batterystack.1.RatedChargePower",            getU32(Buffer[id-1], 37007), {name: "", unit: "W"});
        forcesetState(SHI + id + ".Batterystack.1.RatedDischargePower",         getU32(Buffer[id-1], 37009), {name: "", unit: "W"});
        forcesetState(SHI + id + ".Batterystack.1.FaultID",                     getU16(Buffer[id-1], 37014), {name: "", unit: ""});
        forcesetState(SHI + id + ".Batterystack.1.CurrentDayChargeCapacity",    getU32(Buffer[id-1], 37015) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.1.CurrentDayDischargeCapacity", getU32(Buffer[id-1], 37017) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.1.BusCurrent",                  getI16(Buffer[id-1], 37021) / 10, {name: "Buscurrent", unit: "A"});
        forcesetState(SHI + id + ".Batterystack.1.BatteryTemperature",          getI16(Buffer[id-1], 37022) / 10, {name: "Battery Temperatue", unit: "°C"});
        forcesetState(SHI + id + ".Batterystack.1.RemainingChargeDischargeTime",getU16(Buffer[id-1], 37025), {name: "", unit: "mins"});
        //forcesetState(SHI + id + ".Batterystack.1.DCDCversion",                 getStr(Buffer[id-1], 37026, 10), {name: "", unit: ""});
        //forcesetState(SHI + id + ".Batterystack.1.BMSversion",                  getStr(Buffer[id-1], 37036, 10), {name: "", unit: ""});
    }
    // Battery registers 16+17 (Storage-related)
    forcesetState(SHI + id + ".Battery.MaximumChargePower",                     getU32(Buffer[id-1], 37046), {name: "", unit: "W"});
    forcesetState(SHI + id + ".Battery.MaximumDischargePower",                  getU32(Buffer[id-1], 37048), {name: "", unit: "W"});

    // Battery register 18-20 (Stack 1 related)
    if (BatteryUnits[id-1][0] > 0)
    {
        forcesetState(SHI + id + ".Batterystack.1.SN",                          getStr(Buffer[id-1], 37052, 10), {name: "Serialnumber", unit: ""});       
        forcesetState(SHI + id + ".Batterystack.1.TotalCharge",                 getU32(Buffer[id-1], 37066) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.1.TotalDischarge",              getU32(Buffer[id-1], 37068) / 100, {name: "", unit: "kWh"});
    }
    // Battery register 21-31 (Stack 2 related)
    if ( BatteryUnits[id-1][1] > 0)
    {
        //forcesetState(SHI + id + ".Batterystack.2.SN",                          getStr(Buffer[id-1], 37700, 10), {name: "Serialnumber", unit: ""});        
        forcesetState(SHI + id + ".Batterystack.2.BatterySOC",                  getU16(Buffer[id-1], 37738) / 10, {name: "", unit: "%"});
        forcesetState(SHI + id + ".Batterystack.2.RunningStatus",               getU16(Buffer[id-1], 37741), {name: "", unit: ""});
        forcesetState(SHI + id + ".Batterystack.2.ChargeAndDischargePower",     getI32(Buffer[id-1], 37743), {name: "", unit: "W"});
        forcesetState(SHI + id + ".Batterystack.2.CurrentDayChargeCapacity",    getU32(Buffer[id-1], 37746) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.2.CurrentDayDischargeCapacity", getU32(Buffer[id-1], 37748) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.2.BusVoltage",                  getU16(Buffer[id-1], 37750) / 10, {name: "", unit: "V"});
        forcesetState(SHI + id + ".Batterystack.2.BusCurrent",                  getI16(Buffer[id-1], 37751) / 10, {name: "", unit: "A"});
        forcesetState(SHI + id + ".Batterystack.2.BatteryTemperature",          getI16(Buffer[id-1], 37752) / 10, {name: "", unit: "°C"});
        forcesetState(SHI + id + ".Batterystack.2.TotalCharge",                 getU32(Buffer[id-1], 37753) / 100, {name: "", unit: "kWh"});
        forcesetState(SHI + id + ".Batterystack.2.TotalDischarge",              getU32(Buffer[id-1], 37755) / 100, {name: "", unit: "kWh"});
    }
    // Battery register 32-41 (Storage related)
    forcesetState(SHI + id + ".Battery.RatedCapacity",                          getU32(Buffer[id-1], 37758) / 1, {name: "", unit: "Wh"});
    forcesetState(SHI + id + ".Battery.SOC",                                    getU16(Buffer[id-1], 37760) / 10, {name: "", unit: "%"});
    forcesetState(SHI + id + ".Battery.RunningStatus",                          getU16(Buffer[id-1], 37762) / 1, {name: "", unit: ""});
    forcesetState(SHI + id + ".Battery.BusVoltage",                             getU16(Buffer[id-1], 37763) / 10, {name: "", unit: "V"});
    forcesetState(SHI + id + ".Battery.BusCurrent",                             getI16(Buffer[id-1], 37764) / 10, {name: "", unit: "A"});
    forcesetState(SHI + id + ".Battery.ChargeAndDischargePower",                getI32(Buffer[id-1], 37765) / 1, {name: "", unit: "W"});
    forcesetState(SHI + id + ".Battery.TotalCharge",                            getU32(Buffer[id-1], 37780) / 100, {name: "", unit: "kWh"});
    forcesetState(SHI + id + ".Battery.TotalDischarge",                         getU32(Buffer[id-1], 37782) / 100, {name: "", unit: "kWh"});
    forcesetState(SHI + id + ".Battery.CurrentDayChargeCapacity",               getU32(Buffer[id-1], 37784) / 100, {name: "", unit: "kWh"});
    forcesetState(SHI + id + ".Battery.CurrentDayDischargeCapacity",            getU32(Buffer[id-1], 37786) / 100, {name: "Current DayDiscarge ", unit: "kWh"});

    //forcesetState(SHI + id + ".Battery.ChargingCutoffCapacity",                 getU16(Buffer[id-1], 47081) / 10, {name: "", unit: "%"});
    forcesetState(SHI + id + ".Battery.DischargeCutoffCapacity",                getU16(Buffer[id-1], 47082) / 10, {name: "", unit: "%"});

    // Battery registers 42+43 (Battery stack related)   
    if (BatteryUnits[id-1][1] > 0)
    {
        forcesetState(SHI + id + ".Batterystack.2.SoftwareVersion",             getStr(Buffer[id-1], 37814, 8), {name: "Softwareversion", unit: ""});
    }
    
    if (BatteryUnits[id-1][0] > 0)
    {
        forcesetState(SHI + id + ".Batterystack.1.SoftwareVersion", getStr(Buffer[id-1], 37799, 8), {name: "Softwareversion", unit: ""});
    }

    // Registers 44 to 98: (Battery pack related)
    for(var i = 1; i <= 2; i++)
    {        
        if(BatteryUnits[id-1][i-1] >= 0)
        {            
            for(var j = 1; j <= BatteryUnits[id-1][i-1]; j++)
            {
                //[[38200, 38242, 38284] [38326, 38368, 38410]]; (+42 for each battery pack, +126 for each stack)
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".SN",                     getStr(Buffer[id-1], 38200+(i-1)*126+(j-1)*42, 6), {name: "", unit: ""});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".FirmwareVersion",        getStr(Buffer[id-1], 38210+(i-1)*126+(j-1)*42, 8), {name: "", unit: ""});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".WorkingStatus",          getU16(Buffer[id-1], 38228+(i-1)*126+(j-1)*42), {name: "", unit: ""});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".BatterySOC",             getU16(Buffer[id-1], 38229+(i-1)*126+(j-1)*42) / 10, {name: "", unit: "%"});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".ChargeAndDischargePower",getI32(Buffer[id-1], 38233+(i-1)*126+(j-1)*42) / 1000, {name: "", unit: "kW"});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".Voltage",                getU16(Buffer[id-1], 38235+(i-1)*126+(j-1)*42) / 10, {name: "", unit: "V"});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".Current",                getI16(Buffer[id-1], 38236+(i-1)*126+(j-1)*42) / 10, {name: "", unit: "A"});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".TotalCharge",            getU32(Buffer[id-1], 38238+(i-1)*126+(j-1)*42) / 100, {name: "", unit: "kWh"});
                forcesetState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".TotalDischarge",         getU32(Buffer[id-1], 38240+(i-1)*126+(j-1)*42) / 100, {name: "", unit: "kWh"});

                // [[38452, 38454, 38456][38458, 38460, 38462]] ( +2 for each pack, +6 for each stack)
                createState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".MaxTemperature",           getI16(Buffer[id-1], 38452+(i-1)*6+(j-1)*2) / 10, {name: "", unit: "°C"});
                createState(SHI + id + ".Batterystack." + i + ".Battery" + j + ".MinTemperature",           getI16(Buffer[id-1], 38453+(i-1)*6+(j-1)*2) / 10, {name: "", unit: "°C"});
            }
        }        
    }

    // Battery registers 110-141 are not supported by this script yet!
}


function ProcessPowerMeterStatus()
//--------------------------------
{       
    //forcesetState(SHM + "Status",                   getU16(Buffer[PowerMeterID], 37100), {name: "", unit: ""});
    forcesetState(SHM + "VoltageL1",                getI32(Buffer[PowerMeterID], 37101)  / 10, {name: "", unit: "V"});
    forcesetState(SHM + "VoltageL2",                getI32(Buffer[PowerMeterID], 37103)  / 10, {name: "", unit: "V"});
    forcesetState(SHM + "VoltageL3",                getI32(Buffer[PowerMeterID], 37105)  / 10, {name: "", unit: "V"});
    forcesetState(SHM + "CurrentL1",                getI32(Buffer[PowerMeterID], 37107)  / 100, {name: "", unit: "A"});
    forcesetState(SHM + "CurrentL2",                getI32(Buffer[PowerMeterID], 37109)  / 100, {name: "", unit: "A"});
    forcesetState(SHM + "CurrentL3",                getI32(Buffer[PowerMeterID], 37111) / 100, {name: "", unit: "A"});
    forcesetState(SHM + "ActivePower",              getI32(Buffer[PowerMeterID], 37113) / 1, {name: "", unit: "W"});
    forcesetState(SHM + "ReactivePower",            getI32(Buffer[PowerMeterID], 37115) / 1, {name: "", unit: "Var"});
    forcesetState(SHM + "PowerFactor",              getI16(Buffer[PowerMeterID], 37117) / 1000, {name: "", unit: ""});
    forcesetState(SHM + "GridFrequency",            getI16(Buffer[PowerMeterID], 37118) / 100, {name: "", unit: "Hz"});
    forcesetState(SHM + "PositiveActiveEnergy",     getI32(Buffer[PowerMeterID], 37119) / 100, {name: "", unit: "kWh"});
    forcesetState(SHM + "ReverseActiveEnergy",      getI32(Buffer[PowerMeterID], 37121) / 100, {name: "", unit: "kWh"});
    forcesetState(SHM + "AccumulatedReactivePower", getI32(Buffer[PowerMeterID], 37123) / 100, {name: "", unit: "kVarh"});
    //forcesetState(SHM + "MeterType",                getU16(Buffer[PowerMeterID], 37125), {name: "", unit: ""});
    forcesetState(SHM + "VoltageL1-L2",             getI32(Buffer[PowerMeterID], 37126) / 10, {name: "", unit: "V"});
    forcesetState(SHM + "VoltageL2-L3",             getI32(Buffer[PowerMeterID], 37128) / 10, {name: "", unit: "V"});
    forcesetState(SHM + "VoltageL3-L1",             getI32(Buffer[PowerMeterID], 37130) / 10, {name: "", unit: "V"});
    forcesetState(SHM + "ActivePowerL1",            getI32(Buffer[PowerMeterID], 37132) / 1, {name: "", unit: "W"});
    forcesetState(SHM + "ActivePowerL2",            getI32(Buffer[PowerMeterID], 37134) / 1, {name: "", unit: "W"});
    forcesetState(SHM + "ActivePowerL3",            getI32(Buffer[PowerMeterID], 37136) / 1, {name: "", unit: "W"});
    //forcesetState(SHM + "MeterModel",               getU16(Buffer[PowerMeterID], 37138), {name: "", unit: ""});
}

function ProcessInverterStatus(id)
//--------------------------------
{
    //forcesetState(SHI + id + ".State1",                 getU16(Buffer[id-1], 32000), {name: "", unit: ""});
    forcesetState(SHI + id + ".State2",                 getU16(Buffer[id-1], 32001), {name: "", unit: ""});
    forcesetState(SHI + id + ".State3",                 getU16(Buffer[id-1], 32002), {name: "", unit: ""});
    forcesetState(SHI + id + ".Alarm1",                 getU16(Buffer[id-1], 32008), {name: "", unit: ""});
    forcesetState(SHI + id + ".Alarm2",                 getU16(Buffer[id-1], 32009), {name: "", unit: ""});
    forcesetState(SHI + id + ".Alarm3",                 getU16(Buffer[id-1], 32010), {name: "", unit: ""});
    forcesetState(SHI + id + ".String.1_Voltage",       getI16(Buffer[id-1], 32016) / 10  , {name: "", unit: "V"});
    forcesetState(SHI + id + ".String.1_Current",       getI16(Buffer[id-1], 32017) / 100 , {name: "", unit: "A"});
    forcesetState(SHI + id + ".String.2_Voltage",       getI16(Buffer[id-1], 32018) / 10  , {name: "", unit: "V"});
    forcesetState(SHI + id + ".String.2_Current",       getI16(Buffer[id-1], 32019) / 100 , {name: "", unit: "A"});
    forcesetState(SHI + id + ".InputPower",             getI32(Buffer[id-1], 32064) / 1000, {name: "", unit: "kW"});
    forcesetState(SHI + id + ".Grid.L1-L2_Voltage",     getU16(Buffer[id-1], 32066) / 10  , {name: "", unit: "V"});      
    forcesetState(SHI + id + ".Grid.L2-L3_Voltage",     getU16(Buffer[id-1], 32067) / 10  , {name: "", unit: "V"});
    forcesetState(SHI + id + ".Grid.L3-L1_Voltage",     getU16(Buffer[id-1], 32068) / 10  , {name: "", unit: "V"});
    forcesetState(SHI + id + ".Grid.L1_Voltage",        getU16(Buffer[id-1], 32069) / 10  , {name: "", unit: "V"});                              
    forcesetState(SHI + id + ".Grid.L2_Voltage",        getU16(Buffer[id-1], 32070) / 10  , {name: "", unit: "V"});                                                  
    forcesetState(SHI + id + ".Grid.L3_Voltage",        getU16(Buffer[id-1], 32071) / 10  , {name: "", unit: "V"});
    forcesetState(SHI + id + ".Grid.L1_Current",        getI32(Buffer[id-1], 32072) / 1000, {name: "", unit: "A"});
    forcesetState(SHI + id + ".Grid.L2_Current",        getI32(Buffer[id-1], 32074) / 1000, {name: "", unit: "A"});
    forcesetState(SHI + id + ".Grid.L3_Current",        getI32(Buffer[id-1], 32076) / 1000, {name: "", unit: "A"});
    forcesetState(SHI + id + ".PeakActivePowerDay",     getI32(Buffer[id-1], 32078) / 1000, {name: "", unit: "kW"});
    forcesetState(SHI + id + ".ActivePower",            getI32(Buffer[id-1], 32080) / 1000, {name: "", unit: "kW"});
    forcesetState(SHI + id + ".ReactivePower",          getI32(Buffer[id-1], 32082) / 1000, {name: "", unit: "kVar"});
    forcesetState(SHI + id + ".PowerFactor",            getI16(Buffer[id-1], 32084) / 1000, {name: "", unit: ""});
    forcesetState(SHI + id + ".GridFrequency",          getU16(Buffer[id-1], 32085) / 100 , {name: "", unit: "Hz"});
    forcesetState(SHI + id + ".Efficiency",             getU16(Buffer[id-1], 32086) / 100 , {name: "", unit: "%"});
    forcesetState(SHI + id + ".InternalTemperature",    getI16(Buffer[id-1], 32087) / 10  , {name: "", unit: "°C"});
    forcesetState(SHI + id + ".InsulationResistance",   getU16(Buffer[id-1], 32088) / 1000, {name: "", unit: "MOhm"});
    forcesetState(SHI + id + ".DeviceStatus",           getU16(Buffer[id-1], 32089), {name: "", unit: ""});
    forcesetState(SHI + id + ".FaultCode",              getU16(Buffer[id-1], 32090), {name: "", unit: ""});
    forcesetState(SHI + id + ".StartupTime",            getU32(Buffer[id-1], 32091), {name: "", unit: ""});
    forcesetState(SHI + id + ".ShutdownTime",           getU32(Buffer[id-1], 32093), {name: "", unit: ""});
    forcesetState(SHI + id + ".AccumulatedEnergyYield", getU32(Buffer[id-1], 32106) / 100, {name: "", unit: "kWh"});
    forcesetState(SHI + id + ".DailyEnergyYield",       getU32(Buffer[id-1], 32114) / 100, {name: "", unit: "kWh"});
}


function ProcessDeviceInfo(id)
//----------------------------
{      
    // Note: Manual says its quantitiy is 15, but that is the number (+1) of 8bit characters
    //forcesetState(SHI + id + ".Model",                   getStr(Buffer[id-1], 30000, 8), {name: "", unit: ""}); 
    forcesetState(SHI + id + ".SN",                      getStr(Buffer[id-1], 30015, 6), {name: "", unit: ""});
    forcesetState(SHI + id + ".PN",                      getStr(Buffer[id-1], 30025, 6), {name: "", unit: ""});
    forcesetState(SHI + id + ".ModelID",                 getU16(Buffer[id-1], 30070), {name: "", unit: ""});
    forcesetState(SHI + id + ".PVStrings",               getU16(Buffer[id-1], 30071), {name: "", unit: ""});
    forcesetState(SHI + id + ".MPPTrackers",             getU16(Buffer[id-1], 30072), {name: "", unit: ""});
    forcesetState(SHI + id + ".MaxRatedPower",           getU32(Buffer[id-1], 30073) / 1000, {name: "", unit: "kW"});
    forcesetState(SHI + id + ".MaxActivePower",          getU32(Buffer[id-1], 30075) / 1000, {name: "", unit: "kW"});
    forcesetState(SHI + id + ".MaxApparentPower",        getU32(Buffer[id-1], 30077) / 1000, {name: "", unit: "kVA"});
    forcesetState(SHI + id + ".MaxReactivePowerToGrid",  getI32(Buffer[id-1], 30079) / 1000, {name: "", unit: "kVAr"});
    forcesetState(SHI + id + ".MaxReactivePowerFromGrid",getI32(Buffer[id-1], 30081) / 1000, {name: "", unit: "kVAr"});
}


function readRegisterSpace(id, address, length)
//---------------------------------------------
{
    client.setID(ModBusIDs[id-1]);
    client.readHoldingRegisters(address, length, function(err, data)
    {   
        if (err)
        {   
// this error handling does not work and/or is not required for my installation
//            if (err.modbusCode == null)
//            {   console.warn("Lost connection to client. Trying to reconnect...");
//                ConnectModbus();
//            } else             
            console.warn("Error received reading address " + address + " from id: " + ModBusIDs[id-1] + " with error: " + modbusErrorMessages[err.modbusCode]);            
        }
        else
        {   //console.debug("Read data from id/address " + ModBusIDs[id-1] + "/" + address + "\nData is: " + data.data);
            for (var i = 0; i < length; i++) Buffer[id-1][address + i - BufOffset] = data.data[i];
        }
    });
}


function ProcessData()
//--------------------
{
    //console.debug("Processing new data...");
    for ( var i = 1; i <= ModBusIDs.length; i++)
    {
        ProcessDeviceInfo(i);
        ProcessInverterStatus(i);
        ProcessBattery(i);
        //ProcessInverterPowerAdjustments(i);
        ProcessOptimizers(i); 
    }    
    ProcessPowerMeterStatus();

    // get SOC of first battery stack and combine to one string
    var BatOverview = "";
    for(var j = 1; j <= BatteryUnits[0][0]; j++)
    { 
        if (j > 1) BatOverview += ", ";
        BatOverview += getState(JavaInst + "Solarpower.Huawei.Inverter.1.Batterystack.1.Battery" + j + ".BatterySOC").val + "%";
    }
    setState(JavaInst + "Solarpower.Derived.BatteryOverview", BatOverview);

    // determine peak panel power
    var PanelPower = getState(JavaInst + "Solarpower.Huawei.Inverter.1.InputPower").val;
    var PanelMax = getState(JavaInst + "Solarpower.Derived.PeakPanelPower").val;
    if (PanelPower > PanelMax) setState(JavaInst + "Solarpower.Derived.PeakPanelPower", PanelPower);
    
    // determine power used by house
    setState(JavaInst + "Solarpower.Derived.HouseConsumption", getState(JavaInst + "Solarpower.Huawei.Inverter.1.ActivePower").val * 1000 -
        getState(JavaInst + "Solarpower.Huawei.Meter.ActivePower").val);

    // determine yield today
    setState(JavaInst + "Solarpower.Derived.YieldToday", getState(JavaInst + "Solarpower.Huawei.Inverter.1.DailyEnergyYield").val +
        getState(JavaInst + "Solarpower.Huawei.Inverter.1.Batterystack.1.CurrentDayChargeCapacity").val -
        getState(JavaInst + "Solarpower.Huawei.Inverter.1.Batterystack.1.CurrentDayDischargeCapacity").val)

    // determine if battery is loading
    setState(JavaInst + "Solarpower.Derived.IsBatteryLoading", getState(JavaInst + "Solarpower.Huawei.Inverter.1.Batterystack.1.ChargeAndDischargePower").val > 0 ? 0 : 1);

    // determine if power is imported or exported
    setState(JavaInst + "Solarpower.Derived.IsGridExporting", getState(JavaInst + "Solarpower.Huawei.Meter.ActivePower").val > 0 ? 1 : 0);

    // compute export and import today
    setState(JavaInst + "Solarpower.Derived.GridExportToday", getState(JavaInst + "Solarpower.Huawei.Meter.PositiveActiveEnergy").val - getState(JavaInst + "Solarpower.Derived.GridExportSum").val);
    setState(JavaInst + "Solarpower.Derived.GridImportToday", getState(JavaInst + "Solarpower.Huawei.Meter.ReverseActiveEnergy").val - getState(JavaInst + "Solarpower.Derived.GridImportSum").val);
    
    // compute consumption today
    setState(JavaInst + "Solarpower.Derived.ConsumptionSum",
        getState(JavaInst + "Solarpower.Huawei.Inverter.1.AccumulatedEnergyYield").val +
        getState(JavaInst + "Solarpower.Huawei.Meter.ReverseActiveEnergy").val -
        getState(JavaInst + "Solarpower.Huawei.Meter.PositiveActiveEnergy").val);
    setState(JavaInst + "Solarpower.Derived.ConsumptionToday", 
        getState(JavaInst + "Solarpower.Derived.ConsumptionSum").val -
        getState(JavaInst + "Solarpower.Derived.ConsumptionStart").val); 

    // convert working mode to string that can be displayed
    var wom = "";
    switch (getState(JavaInst + "Solarpower.Huawei.Inverter.1.Batterystack.1.WorkingMode").val)
    {
        case  0: wom = "none"; break;
        case  1: wom = "Forcible charge/discharge"; break;
        case  2: wom = "Time of Use(LG)"; break;
        case  3: wom = "Fixed charge/discharge"; break;
        case  4: wom = "Maximise self consumption"; break;
        case  5: wom = "Fully fed to grid"; break;
        case  6: wom = "Time of Use(LUNA2000)"; break;
        default: wom = "undefined";
    }
    setState(JavaInst + "Solarpower.Derived.WorkingMode", wom);
    
    testCreateState = 1;                // do not check on createState any more
}


setInterval(function()
// -------------------
// This is the main function triggering a  read via modbus-tcp every 5000 ms (see end of SetInterval)
// Processing of data is triggered as soon as one complete set of registers is copied
// with 5 seconds, new values are displyed every 50 seconds
{
    //console.debug("Triggering read of inverter " + currentinverter + " at address " + RegToRead[RegToReadPtr][0] + " with length " +  RegToRead[RegToReadPtr][1]);
    readRegisterSpace(currentinverter, RegToRead[RegToReadPtr][0], RegToRead[RegToReadPtr][1]);
    
    // determine if all or only fast registers should be read
    var CurLength = RegFast;
    if ((RegReadCnt % RegFastMod) == 0) CurLength = RegToRead.length

    RegToReadPtr++;               
    if (RegToReadPtr >= CurLength)
    {
        RegToReadPtr = 0;
        // go through all inverters, if there are several
        currentinverter++
        if (currentinverter > ModBusIDs.length)
        {
            currentinverter = 1;  
            ProcessData();
            //if (CurLength == RegFast) log("Processing done (FAST)!", "info"); else log("Processing done (SLOW)!", "info");
            RegReadCnt++;
        }
    }     
}, 5000);


// one minute before midnight - perform housekeeping actions
schedule("59 23 * * *", function ()
{   
    // reset peak power for next day
    setState(JavaInst + "Solarpower.Derived.PeakPanelPower", 0);
    // copy current export/import kWh - used to compute daily import/export in kWh
    setState(JavaInst + "Solarpower.Derived.GridExportSum", getState(JavaInst + "Solarpower.Huawei.Meter.PositiveActiveEnergy").val);
    setState(JavaInst + "Solarpower.Derived.GridImportSum", getState(JavaInst + "Solarpower.Huawei.Meter.ReverseActiveEnergy").val);
    // copy consumption Sum to Start for the next day
    setState(JavaInst + "Solarpower.Derived.ConsumptionStart", getState(JavaInst + "Solarpower.Derived.ConsumptionSum").val);
    // log important iformation to file
    SolarPowerLogging();
});


function SolarPowerLogging() 
//--------------------------
// write values of today in file
{
    // get 
    var log1 = getState(JavaInst + "Solarpower.Derived.YieldToday").val;
    var log2 = getState(JavaInst + "Solarpower.Derived.GridExportToday").val;
    var log3 = getState(JavaInst + "Solarpower.Derived.GridImportToday").val;
    var log4 = getState(JavaInst + "Solarpower.Derived.ConsumptionToday").val;

    // Zerlege Datum und Zeit in Variable
    var now =    new Date();
    var year =   now.getFullYear();
    var month =  addZero(now.getMonth() + 1);
    var day =    addZero(now.getDate());
    var currDate = day + '.' + month + '.' + year;
    var string = " ";

    // create string that is appended to the file
    string = currDate + ";" + log1.toFixed(3) + ";" + log2.toFixed(3) + ";" + log3.toFixed(3) + ";" + log4.toFixed(3) + "\n";
    fs.appendFileSync("/opt/iobroker/iobroker-data/SolarpowerLog.csv", string);   

    // erzeuge Log-Eintrag
    log("Solerpower log:" + string, "info"); 
}


function addZero(Num)
//-----------------
// if number <10 add zero values at the beginning of numbers
{
    if (Num < 10) Num = "0" + Num;
    return Num;
}

Nasdero
Beiträge: 482
Registriert: Mo Dez 16, 2019 9:01 pm

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von Nasdero »

LenaK hat geschrieben: Do Mai 02, 2024 12:54 pm Als Datengrundlage für die Diagramme werden die Zählerstände verwendet. Wenn diese nicht aktualisiert werden und dann einen Sprung machen, schlägt sich das als Peak im Diagramm nieder.
Das doch endlich einmal ein Antwort, da kann ich mit arbeiten, openWB hatte sicherlich seine Gründe warum man das so macht. Dann schau ich mal nach den Zählerständen bei mir, ob ich das auch noch konstistent machen kann. So sollte nun auch ohne Lücken kommen, falls ein Wert fehlt, wird der alte halt wiederholt.
Gero
Beiträge: 3412
Registriert: Sa Feb 20, 2021 9:55 am
Has thanked: 4 times
Been thanked: 59 times

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von Gero »

Probier‘ mal ob‘s mit Zähler besser wird. Mein e3dc bietet auch keinen Zähler, nur die Leistungswerte. In der openWB wird dann ein Zähler simuliert. Vielleicht hat der ja bei einigen Modulen einen Bug? Bei mir habe ich noch keine Peaks feststellen können.
openWB-series2, openWB-Buchse, E3/DC S10pro+19.5kWh, 30kWp Ost-Süd, Model 3 und Ion
Frank-H
Beiträge: 307
Registriert: Mi Apr 26, 2023 7:56 am
Has thanked: 3 times
Been thanked: 3 times

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von Frank-H »

LenaK hat geschrieben: Do Mai 02, 2024 12:54 pm Als Datengrundlage für die Diagramme werden die Zählerstände verwendet. Wenn diese nicht aktualisiert werden und dann einen Sprung machen, schlägt sich das als Peak im Diagramm nieder.
Auch ich habe nach wie vor täglich diese Peaks durch den SMA Wechselrichter, die sich dann auch auf die Verbrauchsdaten niederschlagen. Ich habe ehrlich gesagt, keine Ahnung mehr, was ich noch tun kann. Die Datenverbindungen habe ich schon mehrfach überprüft und teilweise umgesteckt und anders verlegt, aber es bleibt dabei. Könnte man das softwaretechnisch irgendwie abfangen?
5,68 kwp PV, SMA Tripower 6.0 SE, 5,2 kw BYD-Speicher
1,6 kwp Balkonkraftwerk + Hoymiles HMS1600 und 0,8 kwp Balkonkraftwerk + Hoymiles HM 800
OpenDTU fusion
VW ID.4 (77 kwh)
OpenWB series 2 standart+, 22 kw
Nasdero
Beiträge: 482
Registriert: Mo Dez 16, 2019 9:01 pm

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von Nasdero »

Gero hat geschrieben: Do Mai 02, 2024 4:00 pm Probier‘ mal ob‘s mit Zähler besser wird. Mein e3dc bietet auch keinen Zähler, nur die Leistungswerte. In der openWB wird dann ein Zähler simuliert. Vielleicht hat der ja bei einigen Modulen einen Bug? Bei mir habe ich noch keine Peaks feststellen können.
Was meinst du genau?
Meine 3 SolarEdge WR liefern die Werte, bis dato habe ich die Werte summiert und alle 4s an die openWB übergeben.
Ab heute wird ein vermisster Wert ersetzt durch den letzten empfangen Wert, so das lückenlos Werte kommen müssten.
LenaK
Beiträge: 1310
Registriert: Fr Jan 22, 2021 6:40 am
Been thanked: 16 times

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von LenaK »

Elchkopp hat geschrieben: Mo Apr 29, 2024 2:06 pm Und bei mir greift die Einstellung "Maximale Ausgangsleistung des Wechselrichters" (Einstellungen/Konfiguration/Lastmanagement) nicht. Mein SolarEdge-WR kann nur maximal 10kW (AC) ausgeben (sehr wohl aber parallel noch max. 5kW DC in die Batterie schieben), die Regelung geht aber regelmäßig über 14/15A hinaus, was unweigerlich zum Netzbezug führt:

Siehe um 15:44 Uhr:
Screenshot 2024-04-29 155912.png

Hier der relevante Log-Auszug:
main.log


Die Einstellung ist definitiv gesetzt:
Screenshot 2024-04-29 160603.png


EDIT:
Und ja, bin auf der aktuellen Beta 2 => 2024-04-26 12:46:16 +0200 [39550084c] ;)
Ich habe die Berücksichtigung der maximalen Ausgangsleistung angepasst, bitte nochmal testen.
LenaK
Beiträge: 1310
Registriert: Fr Jan 22, 2021 6:40 am
Been thanked: 16 times

Re: openWB software2 2.1.4 Beta 1

Beitrag von LenaK »

Pendragon hat geschrieben: Do Mai 02, 2024 1:36 pm
LenaK hat geschrieben: Do Mai 02, 2024 12:50 pm
Pendragon hat geschrieben: Do Apr 25, 2024 2:45 pm Und mal wieder soll die WB laden, sagt auch dass sie lädt, aber tut es dann doch nicht.

Code: Alles auswählen

2024-04-25 16:43:40,161 - {root:75} - {INFO:MainThread} - # ***Start*** 
2024-04-25 16:43:45,179 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=smarthome_handler, args=(), kwargs={})
2024-04-25 16:43:45,181 - {root:56} - {DEBUG:MainThread} - Don't start multiple instances of smarthome thread.
2024-04-25 16:43:50,193 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=smarthome_handler, args=(), kwargs={})
2024-04-25 16:43:50,195 - {schedule:660} - {DEBUG:MainThread} - Running job Job(interval=1, unit=minutes, do=handler10Sec, args=(), kwargs={})
2024-04-25 16:43:50,196 - {root:75} - {INFO:MainThread} - # ***Start*** 
2024-04-25 16:43:50,227 - {modules.common.component_context:54} - {DEBUG:device1} - Update Komponenten ['MQTT-Zähler', 'MQTT-Wechselrichter']
2024-04-25 16:43:50,227 - {modules.devices.mqtt.device:47} - {DEBUG:device1} - MQTT-Module müssen nicht ausgelesen werden.
2024-04-25 16:43:50,231 - {modules.common.component_context:25} - {DEBUG:set values cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,284 - {modules.common.component_context:25} - {DEBUG:component3} - Update Komponente ['MQTT-Wechselrichter']
2024-04-25 16:43:50,285 - {modules.common.component_context:25} - {DEBUG:update values cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,297 - {modules.common.component_context:25} - {DEBUG:component2} - Update Komponente ['MQTT-Zähler']
2024-04-25 16:43:50,404 - {control.counter:145} - {INFO:MainThread} - Verbleibende Ströme an Zähler 2: [66.73, 66.75, 66.79]A
2024-04-25 16:43:50,405 - {control.counter:168} - {INFO:MainThread} - Verbleibende Leistung an Zähler 2: 45372W
2024-04-25 16:43:50,416 - {control.chargepoint.chargepoint:550} - {DEBUG:MainThread} - EV-Phasenzahl beschränkt die nutzbaren Phasen auf 3
2024-04-25 16:43:50,420 - {control.chargepoint.chargepoint:533} - {DEBUG:MainThread} - Phasenzahl Lademodus: 1
2024-04-25 16:43:50,425 - {control.chargepoint.chargepoint:674} - {INFO:MainThread} - LP 1, EV: Opel Corsa-e (EV-Nr.1): Theoretisch benötigter Strom 6A, Lademodus pv_charging, Submodus: Chargemode.PV_CHARGING, Phasen: 1, Priorität: False, max. Ist-Strom: 0.0
2024-04-25 16:43:50,443 - {modules.common.simcount._simcount:38} - {DEBUG:MainThread} - Previous state: SimCounterState(timestamp=1714056210.6634357, power=582.6100000000001, imported=1093462.825598368, exported=0)
2024-04-25 16:43:50,446 - {modules.common.simcount._calculate:11} - {DEBUG:MainThread} - time passed: 0.0054944, power1: 582.61, power2: 605.45
2024-04-25 16:43:50,447 - {modules.common.simcount._calculate:27} - {DEBUG:MainThread} - power did not change sign. Total energy: 3.26384
2024-04-25 16:43:50,459 - {modules.common.simcount._simcount:53} - {DEBUG:MainThread} - imported: 3.26384 Wh, exported: 0 Wh, new state: SimCounterState(timestamp=1714056230.4432807, power=605.4499999999998, imported=1093466.089437625, exported=0)
2024-04-25 16:43:50,462 - {control.data:236} - {INFO:MainThread} - bat_all_data
BatAllData(config=Config(configured=False), get=Get(soc=0, daily_exported=0.0, daily_imported=0.0, fault_str='Kein Fehler.', fault_state=0, imported=0, exported=0, power=0), set=Set(charging_power_left=0, regulate_up=False))
2024-04-25 16:43:50,463 - {control.data:237} - {INFO:MainThread} - cp_all_data
AllChargepointData(get=AllGet(daily_imported=6719.0, daily_exported=0.0, power=0, imported=529671.02, exported=0))
2024-04-25 16:43:50,465 - {control.data:266} - {INFO:MainThread} - cp1
ChargepointData(control_parameter=ControlParameter(chargemode=<Chargemode.PV_CHARGING: 'pv_charging'>, current_plan='Zielladen-Standard', failed_phase_switches=0, imported_at_plan_start=529671.02, imported_instant_charging=None, limit=None, phases=1, prio=False, required_current=6, required_currents=[0.0, 0.0, 6], state=4, submode=<Chargemode.PV_CHARGING: 'pv_charging'>, timestamp_auto_phase_switch=None, timestamp_perform_phase_switch=None, timestamp_switch_on_off=None), get=Get(charge_state=False, connected_vehicle=ConnectedVehicle(config=ConnectedConfig(average_consumption=17, charge_template=0, chargemode='stop', current_plan=0, ev_template=0, priority=False, time_charging_in_use=False), info=ConnectedInfo(id=0, name='Ladepunkt'), soc=50), currents=[0.0, 0.0, 0.0], daily_imported=6719.0, daily_exported=0.0, evse_current=600, exported=0, fault_str='Kein Fehler.', fault_state=0, imported=529671.02, phases_in_use=1, plug_state=True, power=0, rfid_timestamp=None, rfid=None, serial_number='240121692', soc=None, soc_timestamp=None, state_str=None, vehicle_id=None, voltages=[227.15, 225.62, 224.75]), set=Set(change_ev_permitted=[True, ''], charging_ev=1, charging_ev_prev=1, current=6, energy_to_charge=0, loadmanagement_available=True, log=Log(chargemode_log_entry='_', costs=0, imported_at_mode_switch=529671.02, imported_at_plugtime=529671.02, imported_since_mode_switch=0, imported_since_plugged=0.0, range_charged=0, time_charged='00:00', timestamp_start_charging=None, ev=-1, prio=False, rfid=None, serial_number=None), manual_lock=False, phases_to_use=1, plug_state_prev=True, plug_time=1714052270.621543, required_power=1380.0, rfid=None, target_current=0, charging_ev_data=<control.ev.Ev object at 0x6ec700a0>), config=Config(configuration={'mode': 'series', 'ip_address': 'localhost', 'duo_num': 0}, ev=1, name='Interne openWB', type='internal_openwb', template=0, connected_phases=3, phase_1=3, auto_phase_switch_hw=1, control_pilot_interruption_hw=1, id=1))
2024-04-25 16:43:50,466 - {control.data:266} - {INFO:MainThread} - cpt0
CpTemplateData(autolock=Autolock(active=False, plans={}, wait_for_charging_end=False), id=0, max_current_multi_phases=16, max_current_single_phase=16, name='Standard Ladepunkt-Profil', rfid_enabling=False, valid_tags=[])
2024-04-25 16:43:50,467 - {control.data:266} - {INFO:MainThread} - counter2
CounterData(config=Config(max_currents=[63, 63, 63], max_total_power=43000), get=Get(powers=[-797, -832, -850], currents=[-3.73, -3.75, -3.79], voltages=[224.6, 227.6, 226.3], power_factors=[0.55999994277954, 0.68999993801117, 0.7299998998642], unbalanced_load=0, frequency=49.93, daily_exported=23830.0, daily_imported=3250.0, imported=6297220, exported=23333240, fault_state=0, fault_str='Kein Fehler.', power=-2372), set=Set(error_counter=0, reserved_surplus=0, released_surplus=0, raw_power_left=45372, raw_currents_left=[66.73, 66.75, 66.79], surplus_power_left=0, state_str=''))
2024-04-25 16:43:50,471 - {control.data:241} - {INFO:MainThread} - counter_all_data
CounterAllData(config=Config(reserve_for_not_charging=True), get=Get(hierarchy=[{'id': 2, 'type': 'counter', 'children': [{'id': 3, 'type': 'inverter', 'children': []}, {'id': 1, 'type': 'cp', 'children': []}]}]), set=Set(loadmanagement_active=False, home_consumption=605.4499999999998, smarthome_power_excluded_from_home_consumption=0, invalid_home_consumption=0, daily_yield_home_consumption=8714.0, imported_home_consumption=1093466.089437625, disengageable_smarthome_power=0))
2024-04-25 16:43:50,474 - {control.data:266} - {INFO:MainThread} - ct0
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={}), chargemode=Chargemode(selected='pv_charging', pv_charging=PvCharging(min_soc_current=12, min_current=0, feed_in_limit=False, min_soc=0, max_soc=80), scheduled_charging=ScheduledCharging(plans={'1': ScheduledChargingPlan(active=True, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, False, False, False]), current=12, name='Zielladen-Standard', limit=ScheduledLimit(selected='soc', amount=1000, soc_limit=80, soc_scheduled=40), time='07:40')}), instant_charging=InstantCharging(current=13, limit=Limit(selected='soc', amount=50000, soc=60))))
2024-04-25 16:43:50,479 - {control.data:266} - {INFO:MainThread} - ct1
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={'0': TimeChargingPlan(active=False, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, True, False, False]), time=['07:00', '08:00'], name='Wochentags morgens', current=7, limit=Limit(selected='none', amount=1000, soc=50))}), chargemode=Chargemode(selected='stop', pv_charging=PvCharging(min_soc_current=10, min_current=0, feed_in_limit=False, min_soc=0, max_soc=100), scheduled_charging=ScheduledCharging(plans={'0': ScheduledChargingPlan(active=True, frequency=Frequency(selected='daily', once=['2021-11-01', '2021-11-05'], weekly=[False, False, False, False, False, False, False]), current=14, name='Morgens', limit=ScheduledLimit(selected='soc', amount=3000, soc_limit=90, soc_scheduled=80), time='07:45')}), instant_charging=InstantCharging(current=10, limit=Limit(selected='none', amount=1000, soc=50))))
2024-04-25 16:43:50,481 - {control.data:266} - {INFO:MainThread} - ct2
ChargeTemplateData(name='Standard-Lade-Profil', disable_after_unplug=False, prio=False, load_default=False, et=Et(active=False, max_price=0.0002), time_charging=TimeCharging(active=False, plans={'2': TimeChargingPlan(active=True, frequency=Frequency(selected='weekly', once=['2021-11-01', '2021-11-05'], weekly=[True, True, True, True, True, False, False]), time=['07:15', '08:00'], name='Wochentags morgens', current=7, limit=Limit(selected='none', amount=1000, soc=50))}), chargemode=Chargemode(selected='stop', pv_charging=PvCharging(min_soc_current=10, min_current=0, feed_in_limit=False, min_soc=0, max_soc=100), scheduled_charging=ScheduledCharging(plans={}), instant_charging=InstantCharging(current=10, limit=Limit(selected='none', amount=1000, soc=50))))
2024-04-25 16:43:50,487 - {control.data:266} - {INFO:MainThread} - ev0
EvData(set=Set(soc_error_counter=0), charge_template=0, ev_template=0, name='Standard-Fahrzeug', tag_id=[], get=Get(soc=0, soc_timestamp=1706991493.0, force_soc_update=True, range=None, fault_state=0, fault_str='Kein Fehler.'))
2024-04-25 16:43:50,490 - {control.data:266} - {INFO:MainThread} - ev1
EvData(set=Set(soc_error_counter=0), charge_template=0, ev_template=1, name='Opel Corsa-e', tag_id=[], get=Get(soc=50, soc_timestamp=1714052270.676733, force_soc_update=False, range=94, fault_state=0, fault_str='Kein Fehler.'))
2024-04-25 16:43:50,491 - {control.data:266} - {INFO:MainThread} - et0
EvTemplateData(name='Standard-Fahrzeug-Profil', max_current_multi_phases=16, max_phases=3, phase_switch_pause=2, prevent_phase_switch=False, prevent_charge_stop=False, control_pilot_interruption=True, control_pilot_interruption_duration=7, average_consump=17000, min_current=6, max_current_single_phase=32, battery_capacity=46000, efficiency=95, nominal_difference=1, keep_charge_active_duration=50)
2024-04-25 16:43:50,496 - {control.data:266} - {INFO:MainThread} - et1
EvTemplateData(name='Opel Corsa-e', max_current_multi_phases=16, max_phases=3, phase_switch_pause=60, prevent_phase_switch=False, prevent_charge_stop=False, control_pilot_interruption=True, control_pilot_interruption_duration=4, average_consump=20000, min_current=6, max_current_single_phase=16, battery_capacity=46000, efficiency=95, nominal_difference=1, keep_charge_active_duration=40)
2024-04-25 16:43:50,498 - {control.data:245} - {INFO:MainThread} - general_data
GeneralData(chargemode_config=ChargemodeConfig(instant_charging=InstantCharging(phases_to_use=3), pv_charging=PvCharging(bat_power_reserve=200, bat_power_reserve_active=False, control_range=[-115, 115], feed_in_yield=0, phase_switch_delay=5, phases_to_use=0, bat_power_discharge=1000, bat_power_discharge_active=False, min_bat_soc=50, bat_mode='min_soc_bat_mode', switch_off_delay=180, switch_off_threshold=500, switch_on_delay=30, switch_on_threshold=1500), retry_failed_phase_switches=True, scheduled_charging=ScheduledCharging(phases_to_use=0), time_charging=TimeCharging(phases_to_use=3), unbalanced_load_limit=18, unbalanced_load=False), control_interval=20, extern_display_mode='primary', extern=False, external_buttons_hw=False, grid_protection_active=False, grid_protection_configured=True, grid_protection_random_stop=0, grid_protection_timestamp='', mqtt_bridge=False, prices=Prices(bat=0.00033, cp=0, grid=0.00033, pv=7e-05), range_unit='km', ripple_control_receiver=RippleControlReceiver(get=RippleControlReceiverGet(fault_state=0, fault_str='Kein Fehler.', override_value=100), module=None, overrice_reference=<OverrideReference.CHARGEPOINT: 'chargepoint'>))
2024-04-25 16:43:50,501 - {control.data:246} - {INFO:MainThread} - general_data-display
primary
2024-04-25 16:43:50,503 - {control.data:247} - {INFO:MainThread} - graph_data
GraphData(config=Config(duration=120))
2024-04-25 16:43:50,504 - {control.data:248} - {INFO:MainThread} - optional_data
OptionalData(et=Et(get=EtGet(fault_state=0, fault_str='Kein Fehler.', prices={})), int_display=InternalDisplay(active=False, on_if_plugged_in=True, pin_active=False, pin_code='0000', standby=60, theme=<modules.display_themes.cards.config.CardsDisplayTheme object at 0x6ec7b8b0>), led=Led(active=False), rfid=Rfid(active=True))
2024-04-25 16:43:50,505 - {control.data:266} - {INFO:MainThread} - pv3
PvData(config=Config(max_ac_out=13000), get=Get(currents=[0.0, 0.0, 0.0], daily_exported=34990.0, monthly_exported=971060, yearly_exported=2177020, exported=28335000, fault_state=0, fault_str='Kein Fehler.', power=-2977.45))
2024-04-25 16:43:50,507 - {control.data:250} - {INFO:MainThread} - pv_all_data
PvAllData(config=Config(configured=True), get=Get(daily_exported=34990.0, fault_str='Kein Fehler.', fault_state=0, monthly_exported=971060, yearly_exported=28334620, exported=28335000, power=-2977.45))
2024-04-25 16:43:50,510 - {control.data:266} - {INFO:MainThread} - system
{'update_in_progress': False, 'perform_update': False, 'ip_address': '192.168.1.60', 'current_commit': '2024-04-19 16:02:46 +0200 [72f765e68]', 'current_branch': 'Beta', 'current_branch_commit': '2024-04-19 16:02:46 +0200 [72f765e68]', 'current_missing_commits': [], 'datastore_version': 44, 'dataprotection_acknowledged': True, 'usage_terms_acknowledged': True, 'debug_level': 10, 'release_train': 'master', 'version': '2.1.4-Beta.1', 'boot_done': True, 'lastlivevaluesJson': {'timestamp': 1714056210, 'time': '16:43:30', 'grid': -2.48, 'house-power': 0.583, 'charging-all': 0.0, 'pv-all': 3.063, 'cp1-power': 0.0, 'ev1-soc': 50}, 'backup_before_update': True, 'module_update_completed': True}
2024-04-25 16:43:50,516 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT', 'type': 'mqtt', 'id': 1, 'configuration': <modules.devices.mqtt.config.MqttConfiguration object at 0x712a4e38>}
2024-04-25 16:43:50,518 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,521 - {control.data:279} - {INFO:MainThread} - device1
{'name': 'MQTT', 'type': 'mqtt', 'id': 1, 'configuration': {}}
2024-04-25 16:43:50,523 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT-Zähler', 'type': 'counter', 'id': 2, 'configuration': <modules.devices.mqtt.config.MqttCounterConfiguration object at 0x700c0688>}
2024-04-25 16:43:50,524 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,525 - {control.data:281} - {INFO:MainThread} - component2
{'name': 'MQTT-Zähler', 'type': 'counter', 'id': 2, 'configuration': {}}
2024-04-25 16:43:50,526 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'name': 'MQTT-Wechselrichter', 'type': 'inverter', 'id': 3, 'configuration': <modules.devices.mqtt.config.MqttInverterConfiguration object at 0x700c07a8>}
2024-04-25 16:43:50,526 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {}
2024-04-25 16:43:50,527 - {control.data:281} - {INFO:MainThread} - component3
{'name': 'MQTT-Wechselrichter', 'type': 'inverter', 'id': 3, 'configuration': {}}
2024-04-25 16:43:50,527 - {control.data:253} - {INFO:MainThread} - 

2024-04-25 16:43:50,528 - {control.algorithm.algorithm:25} - {INFO:MainThread} - # Algorithmus
2024-04-25 16:43:50,529 - {control.counter:204} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: -2372W
2024-04-25 16:43:50,530 - {control.counter:382} - {DEBUG:MainThread} - LP1 Switch-Off-Threshold prüfen: -2372W, Schwelle: 500W, freigegebener Überschuss 0W, Einspeisegrenze 0W
2024-04-25 16:43:50,530 - {control.counter:249} - {DEBUG:MainThread} - Anpassen des Regelbereichs 0.0W
2024-04-25 16:43:50,531 - {control.counter:217} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: 2372.0W
2024-04-25 16:43:50,531 - {control.algorithm.algorithm:30} - {INFO:MainThread} - **Mindestrom setzen**
2024-04-25 16:43:50,534 - {control.algorithm.min_current:18} - {INFO:MainThread} - Mode-Tuple Chargemode.PV_CHARGING - Chargemode.PV_CHARGING - False, Zähler 2
2024-04-25 16:43:50,535 - {control.counter:176} - {DEBUG:MainThread} - Zähler 2: [66.73, 66.75, 60.790000000000006]A verbleibende Ströme, 43992W verbleibende Leistung
2024-04-25 16:43:50,536 - {control.algorithm.common:95} - {INFO:MainThread} - LP1: Stromstärke 6A
2024-04-25 16:43:50,537 - {control.algorithm.algorithm:32} - {INFO:MainThread} - **Sollstrom setzen**
2024-04-25 16:43:50,540 - {control.counter:249} - {DEBUG:MainThread} - Anpassen des Regelbereichs 0.0W
2024-04-25 16:43:50,540 - {control.counter:217} - {INFO:MainThread} - Überschuss zur PV-geführten Ladung: 992.0W
2024-04-25 16:43:50,541 - {control.counter:495} - {DEBUG:MainThread} - Zähler 2: Begrenzung der verbleibenden Leistung auf 992.0W
2024-04-25 16:43:50,542 - {control.algorithm.algorithm:38} - {INFO:MainThread} - **PV-geführten Strom setzen**
2024-04-25 16:43:50,544 - {control.algorithm.filter_chargepoints:116} - {DEBUG:MainThread} - Geordnete Ladepunkte [1]
2024-04-25 16:43:50,545 - {control.algorithm.filter_chargepoints:49} - {INFO:MainThread} - LP 1: Lädt nicht, daher keine weitere Berücksichtigung
2024-04-25 16:43:50,545 - {control.process:23} - {INFO:MainThread} - # Ladung starten.
2024-04-25 16:43:50,547 - {dataclass_utils._dataclass_asdict:23} - {DEBUG:MainThread} - {'chargemode_log_entry': '_', 'costs': 0, 'imported_at_mode_switch': 529671.02, 'imported_at_plugtime': 529671.02, 'imported_since_mode_switch': 0, 'imported_since_plugged': 0.0, 'range_charged': 0, 'time_charged': '00:00', 'timestamp_start_charging': None, 'ev': -1, 'prio': False, 'rfid': None, 'serial_number': None}
2024-04-25 16:43:50,549 - {control.process:111} - {INFO:MainThread} - LP1: set current 6 A, state CHARGING_ALLOWED
2024-04-25 16:43:50,558 - {modules.common.component_context:25} - {DEBUG:set current cp1} - Update Komponente ['Ladepunkt']
2024-04-25 16:43:50,592 - {control.counter:193} - {INFO:MainThread} - 0W reservierte EVU-Leistung, 0W freigegebene EVU-Leistung
Falls das Problem nochmal auftritt bitte ein Ticket erstellen. Dann werden alle Logdateien erfasst. Hier fehlt das Log vom internen Ladepunkt, um zu sehen, ob die EVSE den Strom freigibt und es ein Problem des Fahrzeugs ist.
Habe das log vom 17.4. noch lokal gespeichert:
2024-04-17 Internal Charpoint.txt
Und das passende Main Log dazu:
2024-04-17 MainLog_kleiner.txt

Danke für's Kümmern! habe die letzten Male vor dem Einstecken immer mit dem Handy schnell den Debug Modus angeschmissen, aber es lief wie eine 1...
mrinas hat geschrieben: Do Mai 02, 2024 12:52 pm Mach' ich gern, kein Problem. Problem ist seither nicht wieder aufgetreten, was auch immer das gewesen sein mag.
Ich war gemeint :P :lol: :lol: :lol:

Code: Alles auswählen

024-04-17 17:50:08,533 - {modules.common.evse:42} - {DEBUG:Internal Chargepoint} - Gesetzte Stromstärke EVSE: 600
Die EVSE verarbeitet die Ströme als Integer und die Ströme werden mit 100 multipliziert. Die EVSE schreibt die Stromstärke, die sie freigegeben hat, in ein Register, dies wird hier geloggt. Heißt, durch die EVSE sind 6A freigegeben, das Auto lädt aber nicht.

Wann die Ladung abgebrochen ist, ist im Log nicht enthalten. PSA-Fahrzeuge schlafen ein und laden dann nicht mehr, stelle mal die Dauer der CP-Unterbrechung höher ein. https://github.com/snaptec/openWB/wiki/ ... erbrechung
Gero
Beiträge: 3412
Registriert: Sa Feb 20, 2021 9:55 am
Has thanked: 4 times
Been thanked: 59 times

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von Gero »

Nasdero hat geschrieben: Do Mai 02, 2024 5:12 pm
Gero hat geschrieben: Do Mai 02, 2024 4:00 pm Probier‘ mal ob‘s mit Zähler besser wird. Mein e3dc bietet auch keinen Zähler, nur die Leistungswerte. In der openWB wird dann ein Zähler simuliert. Vielleicht hat der ja bei einigen Modulen einen Bug? Bei mir habe ich noch keine Peaks feststellen können.
Was meinst du genau?
Meine 3 SolarEdge WR liefern die Werte, bis dato habe ich die Werte summiert und alle 4s an die openWB übergeben.
Ab heute wird ein vermisster Wert ersetzt durch den letzten empfangen Wert, so das lückenlos Werte kommen müssten.
Lena schrieb ja:
LenaK hat geschrieben: Do Mai 02, 2024 12:54 pm Als Datengrundlage für die Diagramme werden die Zählerstände verwendet. Wenn diese nicht aktualisiert werden und dann einen Sprung machen, schlägt sich das als Peak im Diagramm nieder.
Das habe ich so interpretiert, dass es besser werden würde, wenn Du Zählerstände übermittelst statt nur der momentanen Leistungswerte. Was ich daran dann nicht verstehe, ist dass mein e3dc auch keine Zählerstände übermittelt und die openWB dann einen simcount (Simulierter Zähler) dafür erstellt. Den hätte ich außerhalb des Moduls (mqtt oder e3dc oder anderer Hersteller) erwartet, womit der Lenas Lösungsvorschlag keinen Sinn mehr ergibt.
openWB-series2, openWB-Buchse, E3/DC S10pro+19.5kWh, 30kWp Ost-Süd, Model 3 und Ion
TheMechanic
Beiträge: 4
Registriert: Fr Mai 03, 2024 9:18 am

Re: openWB software2 2.1.4 Beta 1 und 2

Beitrag von TheMechanic »

Hallo,

ich möchte auch eine Auffälligkeit melden.

Die Einspeisung in der Übersichtsseite beträgt immer 0Wh obwohl ich täglich viele kWh einspeise.

Meine Hardware:
Kostal Plenticore 10 G1 mit KSEM G1
Byd HV 6.4
2 Hoymiles HM1500 (nicht in der Open WB mit eingebunden, über den KSEM müsste doch aber der Ertrag mit sichtbar sein)

Softwareversion Open WB:
2024-05-03 10:26:56 +0200 [93a31f7ef]
Dateianhänge
Screenshot_20240503-112446.png
(235.16 KiB) Noch nie heruntergeladen
Gesperrt