openWB in Docker installieren

Fragen zur Nutzung, Features, usw..
ingmarstein
Beiträge: 14
Registriert: Fr Apr 02, 2021 9:29 pm

Re: openWB in Docker installieren

Beitrag von ingmarstein »

Ja, das Image könnte sicher durch ein schlankeres Base-Image deutlich reduziert werden, momentan sind es komprimiert 396 MiB (x64), bzw. 362 MiB (ARMv7).

Die README hat jetzt auch eine Anleitung für Portainer, ich hoffe das hilft.
alexg
Beiträge: 3
Registriert: Fr Mai 28, 2021 1:29 pm

Re: openWB in Docker installieren

Beitrag von alexg »

Hallo, Danke für die Mühe ein Docker Image zu erstellen. Habe es versuche auf meine Raspberry 4 zum laufen zu bringen, leider "loopt" bei mir das Fenster mit dem Assistenten.

Habe mich an die Anleitung gehalten. Sowohl mit leerer openwb.conf als auch mit der Kopierten das gleiche Verhalten.

Auszug aus dem log-file:

Code: Alles auswählen

Custom WEB_PORT set to 8888
Starting periodic command scheduler: cron.
Starting network daemon:: mosquitto.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Starting Apache httpd web server: apache2.
atreboot.sh started
atreboot.sh: Seems like openwb.conf is not loaded. Reading file.
/var/www/html/openWB/loadconfig.sh: line 8: export: `06:15'': not a valid identifier
Updating /var/www/html/openWB/openwb.conf...
root@raspberrypi:/srv/dev-disk-by-uuid-A8C66A29C669F848/config/openwb# docker logs 00a9ae9af7c3
Custom WEB_PORT set to 8888
Starting periodic command scheduler: cron.
Starting network daemon:: mosquitto.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Starting Apache httpd web server: apache2.
atreboot.sh started
atreboot.sh: Seems like openwb.conf is not loaded. Reading file.
/var/www/html/openWB/loadconfig.sh: line 8: export: `06:15'': not a valid identifier
Updating /var/www/html/openWB/openwb.conf...
Config file Update done.
Initializing Ramdisk /var/www/html/openWB/ramdisk
Trigger update of logfiles...
Ramdisk init done.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41    0     0  100    41      0    390 --:--:-- --:--:-- --:--:--   390
grep: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-05-28 16:27:17: not activated, skipping (LV1) at 415 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: fix upload limit... (LV0) at 420 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: OS Buster (LV0) at 426 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: boot done :-) (LV0) at 433 main /var/www/html/openWB/runs/atreboot.sh
chmod: changing permissions of '/var/www/html/openWB/ramdisk/lastregelungaktiv': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthome.log': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthomehandlerloglevel': Operation not permitted
2021-05-28 16:27:17: etprovider... (LV0) at 408 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: ##### atreboot.sh finished ##### (LV0) at 439 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: not activated, skipping (LV1) at 415 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: fix upload limit... (LV0) at 420 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:17: OS Buster (LV0) at 426 main /var/www/html/openWB/runs/atreboot.sh
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-05-28 16:27:18: boot done :-) (LV0) at 433 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:18: ##### atreboot.sh finished ##### (LV0) at 439 main /var/www/html/openWB/runs/atreboot.sh
2021-05-28 16:27:21: **** Regulation loop start **** (LV1) at 50 main /var/www/html/openWB/regel.sh
/var/www/html/openWB/web/logging/data/ladelog/202105.csv
loadvars.sh: line 440: modules//main.sh: No such file or directory
loadvars.sh: line 454: modules//main.sh: No such file or directory
timeout: failed to run command 'modules//main.sh': No such file or directory
timeout: failed to run command 'modules//main.sh': No such file or directory
loadvars.sh: line 851: modules//main.sh: No such file or directory
loadvars.sh: line 941: modules//main.sh: No such file or directory
2021-05-28 16:27:22: speicherleistung 0 speichersoc 0 (LV1) at 1173 loadvars loadvars.sh
loadvars.sh: line 1175: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
2021-05-28 16:27:22: pv1watt 0 pv2watt  pvwatt 0 ladeleistung 0 llalt 0 nachtladen  nachtladen  minimalA  maximalA  (LV1) at 1178 loadvars loadvars.sh
2021-05-28 16:27:22: lla1 0	llv1 0	llas11  llas21  mindestuberschuss  abschaltuberschuss  lademodus 3 (LV1) at 1179 loadvars loadvars.sh
2021-05-28 16:27:22: lla2 0	llv2 0	llas12  llas22  sofortll 10 hausverbrauch 0 wattbezug 0 uberschuss 0 (LV1) at 1180 loadvars loadvars.sh
2021-05-28 16:27:22: lla3 0	llv3 0	llas13  llas23  soclp1 0 soclp2 (LV1) at 1181 loadvars loadvars.sh
2021-05-28 16:27:22: EVU 1:V/0A 2: V/0A 3: V/0A (LV1) at 1182 loadvars loadvars.sh
2021-05-28 16:27:22: lp1enabled 1	lp2enabled 1	lp3enabled 1 (LV1) at 1183 loadvars loadvars.sh
2021-05-28 16:27:22: plugstatlp1 0	plugstatlp2 0	plugstatlp3 0 (LV1) at 1184 loadvars loadvars.sh
2021-05-28 16:27:22: chargestatlp1 0	chargestatlp2 0	chargestatlp3 0 (LV1) at 1185 loadvars loadvars.sh
head: cannot open '/var/www/html/openWB/web/logging/data/daily/20210528.csv' for reading: No such file or directory
tail: cannot open '/var/www/html/openWB/web/logging/data/daily/20210528.csv' for reading: No such file or directory
evsedintest.sh: line 117: [: ==: unary operator expected
evsedintest.sh: line 117: [: ==: unary operator expected
ingmarstein
Beiträge: 14
Registriert: Fr Apr 02, 2021 9:29 pm

Re: openWB in Docker installieren

Beitrag von ingmarstein »

Das war ein Fehler in openWB 1.9.236 - ich habe das Image jetzt auf 1.9.237 aktualisiert.
alexg
Beiträge: 3
Registriert: Fr Mai 28, 2021 1:29 pm

Re: openWB in Docker installieren

Beitrag von alexg »

Image neu gezogen. Sieht leider nicht viel besser aus. Über die "Bitte warten, während die Seite aufgebaut wird" komme ich nicht hinaus.

Code: Alles auswählen

Custom WEB_PORT set to 8888
Starting periodic command scheduler: cron.
Starting network daemon:: mosquitto.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Starting Apache httpd web server: apache2.
atreboot.sh started
loading config
Updating /var/www/html/openWB/openwb.conf...
sed: cannot rename /var/www/html/openWB/sedOw3qO5: Device or resource busy
sed: cannot rename /var/www/html/openWB/sed5IcImf: Device or resource busy
Config file Update done.
Initializing Ramdisk /var/www/html/openWB/ramdisk
Trigger update of logfiles...
Ramdisk init done.
smarthome handler...
mqtt handler...
crontab 1...
LAN/WLAN...
apache...
...changed
crontab 2...
packages 1...
evdev installed...
timezone...
mosquitto...
packages 2...
mqtt installed...
docopt installed...
certifi installed...
aiohttp installed...
pymodbus installed...
jq installed...
version...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41    0     0  100    41      0    172 --:--:-- --:--:-- --:--:--   172
clear warning...
display update...
grep: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
load versions...
update broker...
etprovider...
not activated, skipping
fix upload limit...OS Buster
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-05-31 10:14:26: boot done :-)
/var/www/html/openWB/runs/atreboot.sh: line 352: /var/www/html/openWB/web/lastcommit: Permission denied
update broker...
chmod: changing permissions of '/var/www/html/openWB/ramdisk/lastregelungaktiv': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthome.log': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthomehandlerloglevel': Operation not permitted
etprovider...
not activated, skipping
fix upload limit...OS Buster
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-05-31 10:14:26: boot done :-)
2021-05-31 10:15:01: **** Regulation loop start **** (LV1) at 50 main /var/www/html/openWB/regel.sh
2021-05-31 10:15:01: ##### cron5min.sh started ##### (LV0) at 8 main /var/www/html/openWB/runs/cron5min.sh
cat: /var/www/html/openWB/web/logging/data/ladelog/202105.csv: No such file or directory
2021-05-31 10:15:01: creating new monthly chargelog: /var/www/html/openWB/web/logging/data/ladelog/202105.csv (LV1) at 16 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:01: daily csv updated: /var/www/html/openWB/web/logging/data/daily/20210531.csv (LV1) at 77 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:01: Netzschutz konfiguriert; aktuelle Frequenz: 0 (LV1) at 85 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:01: electricity provider not set up; skipping price update (LV2) at 136 main /var/www/html/openWB/runs/cron5min.sh
loadvars.sh: line 440: modules//main.sh: No such file or directory
2021-05-31 10:15:01: updating daily yield stats (LV1) at 140 main /var/www/html/openWB/runs/cron5min.sh
timeout: failed to run command 'modules//main.sh': No such file or directory
loadvars.sh: line 851: modules//main.sh: No such file or directory
loadvars.sh: line 941: modules//main.sh: No such file or directory
2021-05-31 10:15:02: pv1watt 0 pv2watt  pvwatt 0 ladeleistung 0 llalt 0 nachtladen  nachtladen 0 minimalA  maximalA  (LV1) at 1178 loadvars loadvars.sh
2021-05-31 10:15:02: current ip: 192.168.178.22 (LV1) at 239 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: lla1 0	llv1 0	llas11  llas21  mindestuberschuss  abschaltuberschuss  lademodus 3 (LV1) at 1179 loadvars loadvars.sh
2021-05-31 10:15:02: lla2 0	llv2 0	llas12  llas22  sofortll 10 hausverbrauch 0 wattbezug 0 uberschuss 0 (LV1) at 1180 loadvars loadvars.sh
2021-05-31 10:15:02: lla3 0	llv3 0	llas13  llas23  soclp1 0 soclp2 (LV1) at 1181 loadvars loadvars.sh
2021-05-31 10:15:02: mqtt handler is already running (LV1) at 244 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: EVU 1:V/0A 2: V/0A 3: V/0A (LV1) at 1182 loadvars loadvars.sh
2021-05-31 10:15:02: lp1enabled 1	lp2enabled 1	lp3enabled 1 (LV1) at 1183 loadvars loadvars.sh
2021-05-31 10:15:02: smarthome handler is already running (LV1) at 253 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: plugstatlp1 0	plugstatlp2 0	plugstatlp3 0 (LV1) at 1184 loadvars loadvars.sh
2021-05-31 10:15:02: external openWB or daemon mode not configured; checking network setup (LV1) at 270 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: chargestatlp1 0	chargestatlp2 0	chargestatlp3 0 (LV1) at 1185 loadvars loadvars.sh
2021-05-31 10:15:02: modbus tcp server not running! restarting process (LV0) at 337 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: starting evsecheck (LV1) at 348 main /var/www/html/openWB/runs/cron5min.sh
2021-05-31 10:15:02: logfile cleanup triggered (LV1) at 352 main /var/www/html/openWB/runs/cron5min.sh
loadvars.sh: line 1752: ramdisk/mqttslavemode: No such file or directory
2021-05-31 10:15:02: ##### cron5min.sh finished ##### (LV0) at 355 main /var/www/html/openWB/runs/cron5min.sh
evsedintest.sh: line 117: [: ==: unary operator expected
evsedintest.sh: line 117: [: ==: unary operator expected
ingmarstein
Beiträge: 14
Registriert: Fr Apr 02, 2021 9:29 pm

Re: openWB in Docker installieren

Beitrag von ingmarstein »

Die beiden Fehler

Code: Alles auswählen

sed: cannot rename /var/www/html/openWB/sedOw3qO5: Device or resource busy
sed: cannot rename /var/www/html/openWB/sed5IcImf: Device or resource busy
sind wegen https://github.com/IngmarStein/openwb-docker/issues/3, sollte aber nicht zu dem beschriebenen Problem führen.

Ist Deine openwb.config denn leer oder die Vorlage?
alexg
Beiträge: 3
Registriert: Fr Mai 28, 2021 1:29 pm

Re: openWB in Docker installieren

Beitrag von alexg »

Das ist das Log mit einer openwb.conf aus dem GitHub repo.

Code: Alles auswählen

Custom WEB_PORT set to 8888
Starting periodic command scheduler: cron.
Starting network daemon:: mosquitto.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Starting Apache httpd web server: apache2.
atreboot.sh started
loading config
Updating /var/www/html/openWB/openwb.conf...
sed: cannot rename /var/www/html/openWB/seddRs6dt: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedD7gWPw: Device or resource busy
sed: cannot rename /var/www/html/openWB/seddDVcXy: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedpi8eVx: Device or resource busy
sed: cannot rename /var/www/html/openWB/sed7des4z: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedraAjwE: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedHUpFEC: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedtF3hFV: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedM2dJkj: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedrrO9vl: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedufryZj: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedro3ZTo: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedCZn13u: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedyOViuv: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedurPnl0: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedIpjSE3: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedIoVFMH: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedLJOV3K: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedFGCp3L: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedX2tcfO: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedhPvEd1: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedRr2Sf4: Device or resource busy
sed: cannot rename /var/www/html/openWB/sed0huSq2: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedm22lw4: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedBB8AC8: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedLf66Wd: Device or resource busy
sed: -e expression #1, char 15: extra characters after command
sed: cannot rename /var/www/html/openWB/seddAdA1g: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedWD2hkh: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedwjCaul: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedyeEafk: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedcmrmFj: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedK9a1ao: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedkZbbCn: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedkL6bzo: Device or resource busy
sed: cannot rename /var/www/html/openWB/sedy5BneB: Device or resource busy
Config file Update done.
Initializing Ramdisk /var/www/html/openWB/ramdisk
Trigger update of logfiles...
Ramdisk init done.
smarthome handler...
mqtt handler...
crontab 1...
LAN/WLAN...
apache...
...changed
crontab 2...
packages 1...
evdev installed...
timezone...
mosquitto...
packages 2...
mqtt installed...
docopt installed...
certifi installed...
aiohttp installed...
pymodbus installed...
jq installed...
version...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    41    0     0  100    41      0    369 --:--:-- --:--:-- --:--:--   369
clear warning...
display update...
grep: /home/pi/.config/lxsession/LXDE-pi/autostart: No such file or directory
load versions...
update broker...
etprovider...
not activated, skipping
fix upload limit...OS Buster
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-06-01 09:54:05: boot done :-)
/var/www/html/openWB/runs/atreboot.sh: line 352: /var/www/html/openWB/web/lastcommit: Permission denied
update broker...
chmod: changing permissions of '/var/www/html/openWB/ramdisk/lastregelungaktiv': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthome.log': Operation not permitted
chmod: changing permissions of '/var/www/html/openWB/ramdisk/smarthomehandlerloglevel': Operation not permitted
etprovider...
not activated, skipping
fix upload limit...OS Buster
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
2021-06-01 09:54:05: boot done :-)
JSAnyone
Beiträge: 291
Registriert: Fr Jun 05, 2020 5:56 pm

Re: openWB in Docker installieren

Beitrag von JSAnyone »

Ich habe jetzt noch nicht so viel mit Docker gemacht, aber so wie ich das verstanden habe soll da ja Anwendung und Daten voneinander getrennt werden, sodass man einen Container auch einfach „ersetzen“ kann. Dafür müssen die Daten dann alle in einem Volume gespeichert werden.
Bei OpenWB ist das aber ja mehr als die OpenWB.conf. Sind auf der Ramdisk Dateien die langfristig gesehen von Bedeutung sind? Was ist mit den CSVs für die Logging-Daten?…
Oder habe ich das Prinzip von Docker falsch verstanden?

Edit: Gerade nochmal auf GitHub angeschaut, das Docker-Compose File enthält ja sogar ein Volume für die Logging-Daten. Wäre trotzdem interessant zu wissen, ob mit Logging und Config alles abgedeckt ist, oder ob sonst noch irgendwo irgendwas abgespeichert wird. Weil sonst ist OpenWB ja nicht so sonderlich aufgeräumt ;)
derNeueDet
Beiträge: 4197
Registriert: Mi Nov 11, 2020 7:16 pm

Re: openWB in Docker installieren

Beitrag von derNeueDet »

Ich bin bisher einmal über eine Inkonsistenz bei Backup Restore gestoßen im Smarthome 2.0 Bereich. Da gibt es wohl Dinge, die im Mosquitto gespeichert werden.
Der Smarthome Handler lief mit den konfigurierten Geräten, aber im Frontend waren die Geräte glaube ich nicht als aktiv sichtbar.

VG
Det
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
ingmarstein
Beiträge: 14
Registriert: Fr Apr 02, 2021 9:29 pm

Re: openWB in Docker installieren

Beitrag von ingmarstein »

Danke für den Hinweis - ich habe /var/lib/mosquitto jetzt als Empfehlung für ein Volume in die Compose Datei aufgenommen.

Ich verwende OpenWB nicht selbst, daher bin ich auf Rückmeldungen angewiesen, ob mit Config, Logdaten und persistierten Mosquitto-Daten nun alles abgedeckt ist. Mittelfristig wäre es wünschenswert, wenn der Betrieb mit Docker vom Kernteam unterstützt würde.
derNeueDet
Beiträge: 4197
Registriert: Mi Nov 11, 2020 7:16 pm

Re: openWB in Docker installieren

Beitrag von derNeueDet »

Ich glaube nicht, dass das Kernteam eine Notwendigkeit für Docker sieht. Ich sehe es ehrlich gesagt auch nicht. Ich habs mal getestet, für mich war es klar, wie es gehen kann und muss, und meine Konfig hat auch funktioniert, aber unterstützen will ich da auch nicht.

VG
Det
10kWp PV mit SMA Tripower 10000TL-10 (PE11 mit SDM72V2); 2,4kWp mit Solis 2.5 G6 (EE11 mit SDM120). OpenWB Standard+. EVU EM540 an einem Raspi mit Venus OS. BEV Mercedes EQA 250 (07/2023)
Antworten