Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement]: Be aware of running schedules and kill them properly on Script-restart #1756

Open
1 task done
seb2010 opened this issue Nov 1, 2024 · 2 comments
Open
1 task done

Comments

@seb2010
Copy link

seb2010 commented Nov 1, 2024

No existing issues.

  • There is no existing issue for my request.

Description

Disclaimer: das Problem tritt vor allem auf langsamen Systemen auf, egal welche Controller version. Aktuell läuft alles auf v8.8.3.

Wenn ich eine Änderung an einem Skript während der Laufzeit der Codes eines Schedules speichere und damit das Script neustarte, läuft der Schedule des alten Scripts weiter und wird nicht gelöscht.
Erst ein echter Neustart der Instanz lässt dann nur noch einen Schedule laufen.

Ich habe in folgendem Log der Script-Instanz als "Namen" einen Zeitstempel mitgegeben, womit sie sich mit der Zeile "schedule start by instance xy" melden. Während der Laufzeit hab ich zwei mal Änderungen gespeichert. Man sieht, dass am Ende 3 Instanzen des Scripts parallel laufen, in den Schedule-listen der Instanz (getSchedules(true)) aber immer nur ein schedule auftaucht. Sie laufen also parallel und nicht in derselben schedule Liste.

Konkret geht es hier um das Skript "jsStrom_Ladesteuerung" welches die Parallelität erzeugt. Der Instanz"name" ist auch den Log einträgen beim auflisten der Schedules vorangestellt.

1.11.2024, 09:56:00.018	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451350313
1.11.2024, 09:56:00.019	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.021	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.022	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.022	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.025	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:00.028	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:00.028	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:00.028	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:00.029	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:00.029	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:00.029	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:00.061	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451349677
1.11.2024, 09:56:00.062	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.062	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.062	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.063	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.063	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:00.064	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:00.064	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:00.064	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:00.064	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:00.065	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:00.065	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:00.085	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451282020
1.11.2024, 09:56:00.085	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.086	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.086	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.086	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:00.087	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:00.088	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:00.088	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:00.088	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:00.089	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:00.089	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:00.089	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:05.572	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:05.573	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:05.573	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:180
1.11.2024, 09:56:05.573	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:05.573	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:05.573	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:05.574	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:05.574	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:05.673	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:05.674	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:05.674	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:05.816	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:05.909	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}
1.11.2024, 09:56:05.929	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:05.930	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:05.930	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:180
1.11.2024, 09:56:05.930	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:05.930	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:05.930	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:05.931	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:05.931	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:05.937	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:05.937	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:05.937	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:180
1.11.2024, 09:56:05.937	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:05.937	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:05.938	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:05.938	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:05.938	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:06.033	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:06.033	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:06.033	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:06.058	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:06.059	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:06.059	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:06.164	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:06.200	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:06.269	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}
1.11.2024, 09:56:06.302	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}
1.11.2024, 09:56:27.401	[info ]: javascript.1 (56379) Stopping script script.js.common.jsStrom_Ladesteuerung
1.11.2024, 09:56:30.077	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451282020
1.11.2024, 09:56:30.082	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.083	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.088	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.088	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.089	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:30.094	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:30.094	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:30.094	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:30.094	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:30.095	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:30.095	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451282020: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:30.150	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451349677
1.11.2024, 09:56:30.151	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.151	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.160	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.160	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.161	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:30.161	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:30.161	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:30.161	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:30.163	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:30.164	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:30.164	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451349677: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:30.240	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: schedule start by instance 1730451350313
1.11.2024, 09:56:30.241	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_339176.1730445911646","type":"schedule","schedule":"{\"time\":{\"exactTime\":true,\"start\":\"00:00\"},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.241	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_424137.1730445911794","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.242	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_185504.1730445911795","type":"schedule","schedule":"{\"time\":{\"start\":\"12:00\",\"end\":\"13:00\",\"mode\":\"minutes\",\"interval\":10},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.242	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"id":"schedule_31188.1730445911919","type":"schedule","schedule":"{\"time\":{\"start\":\"00:00\",\"end\":\"23:59\",\"mode\":\"hours\",\"interval\":1},\"period\":{\"days\":1}}"}
1.11.2024, 09:56:30.243	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/15 * * * *","scriptName":"script.js.common.jsPV_forecast","id":"cron_1730445911807_61668"}
1.11.2024, 09:56:30.243	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"15 */11 * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911851_95618"}
1.11.2024, 09:56:30.243	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsStrom_Ladeplanung","id":"cron_1730445911866_9988"}
1.11.2024, 09:56:30.254	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Battery_Control","id":"cron_1730445911907_66330"}
1.11.2024, 09:56:30.254	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/10 * * * * *","scriptName":"script.js.common.jsVisInteraction","id":"cron_1730445911944_43872"}
1.11.2024, 09:56:30.255	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"* * * * *","scriptName":"script.js.common.jsOptionalsSVG","id":"cron_1730445911969_46017"}
1.11.2024, 09:56:30.255	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: 1730451350313: {"type":"cron","pattern":"*/30 * * * * *","scriptName":"script.js.common.jsStrom_Ladesteuerung","id":"cron_1730451350316_91985"}
1.11.2024, 09:56:51.448	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:51.448	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:51.449	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:170
1.11.2024, 09:56:51.449	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:51.449	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:51.449	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:51.449	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:51.450	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:51.457	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:51.458	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:51.458	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:170
1.11.2024, 09:56:51.458	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:51.458	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:51.458	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:51.459	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:51.459	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:51.462	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_actual:170
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Batt_Plan:0
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Verbrauch_plan:170
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: PV_Netz_Plan:0
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant: 0
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ladeleistung geplant korrigiert: 0 offset:0, SoC-factor:1
1.11.2024, 09:56:51.463	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Ist-Ampere:0
1.11.2024, 09:56:51.464	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: soll_ampere: 0, kurzfristiges soll_ampere: 0 (0kW)
1.11.2024, 09:56:51.590	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:51.590	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:51.591	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:51.617	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:51.617	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:51.617	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:51.644	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"psm":1}
1.11.2024, 09:56:51.644	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: authorized but not loading yet
1.11.2024, 09:56:51.644	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: Current status: off
1.11.2024, 09:56:51.904	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:51.913	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:51.977	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":false,"amp":16,"frc":1,"car":4,"psm":1}
1.11.2024, 09:56:52.017	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}
1.11.2024, 09:56:52.045	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}
1.11.2024, 09:56:52.070	[info ]: javascript.0 (56304) script.js.common.jsStrom_Ladesteuerung: {"alw":"0","amx":"0","car":"4"}

Why?

Schedule per onStop im Script zu handlen ist nicht benutzerfreundlich. Das Problem erzeugt vor allem auf leistungsschwachen Systemen zusätzliche Probleme, die nicht von jedem User erkannt werden. Die Problematik sollte Controller-seitig gelöst werden.

How?

Per onStop() und einen als Variable deklarierten schedule zu löschen wäre die manuelle Variante, die aber nicht benutzerfreundlich ist. Bei Erzeugung des schedules sollte dieser vom Controller registriert und bei Neustart des Scripts gelöscht werden.

@seb2010
Copy link
Author

seb2010 commented Nov 1, 2024

@ofri2607
Copy link

ofri2607 commented Nov 1, 2024

same for me

@foxriver76 foxriver76 transferred this issue from ioBroker/ioBroker.js-controller Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants