How to launch prebuilt OpenEMS UI?

Hi,

thank you S1m0n and ostkamp for your replies.

To be honest, I have never worked with docker and do not really see why I should add a level of complexity here.

In the meantime, I have managed to get OpenEMS working on my Debian laptop using the prebuilt packages for Edge and UI. I found the missing information in the (german) forum, especially in UI am Raspberry konfigurieren - #3 by windpower . So from my point of view the additional steps not mentioned in section 3 of the Getting Started guide (for Linux) are:

  • Go to Releases · OpenEMS/openems · GitHub and download the latest openems-ui.tar.xz

  • Extract it to a local directory on your local machine (e.g. /home/user/openems/openems-ui)

  • To run the UI, you need a web server. In the following, nginx is assumed, but another webserver (e.g. Apache) may also be used.

  • Install nginx

  • Create a file /etc/nginx/conf.d/openems_nginx.conf with the following contents:

server {
listen 4200;
server_name openems;

# OpenEMS Web-Interface
location / {
root /home/user/openems/openems-ui;
index index.html index.htm;

error_page 404 300 /index.html;
}

}

  • Start nginx
  • Open localhost:4200 in a browser. You can also open 192.168.xx.yy:4200 from a remote machine, where 192.168.xx.yy is the IP address of the machine running OpenEMS.

To get the UI to run, I needed the following additional steps:

  • If there are error messages saying that port 80 is already used (this was the case on my machine as Apache was installed by default): Remove /etc/nginx/sites-enabled/default. This is a link to /etc/nginx/sites-available/default where port 80 is configured to be used.
  • If the browser shows “403 forbidden”, this may be due to missing permissions. All directories on the path to the openems-ui need to have read and execute permissions. You can check this with the command namei -l /home/user/openems/openems-ui.For example, /home/user might have “rwx” permissions only for user. In that case, the command chmod a+rx /home/user changes the permissions, so that nginx can run openems-ui.
  • The Controller API Websocket port needs to be set to 8075 (instead of 8085) as the prebuilt version of the UI seems to be compiled for this port, see Ui bauen und installieren - #4 by stefan.feilmeier .

I hope this information helps someone. Question to the OpenEMS team: Do you want me to add it to the Getting Started guide with a pull request?

Matthias