I am new to OpenEMS and would like to try the simulated test system as described in the Getting Started guide on a Laptop running Debian Linux. I have installed Java 21, started Edge and configured following the guide, including the websocket server on port 8085. Now I am stuck at the section “3. Run OpenEMS UI”. I have downloaded openems-ui.tar.xz from here and extracted it. But how do I start the UI? This is not described in the guide. It only says:
Make sure OpenEMS Edge is running locally and the websocket is running on port 8085.
Open the UI URL
You should see OpenEMS UI.
It does not say what the URL is or what else I have to do to run the UI. Apparently I am missing something. localhost:4200 says “connection failed”. In some forum posts it says that a webserver is needed - additionally to the webserver run by Edge? Also the information I found is related to building the UI using VSCode. As I am not planning to develop on the UI, I would like to use the prebuilt version.
I would be grateful for the information missing in the Getting Started Guide, or a hint where I can find it. If need be I do volunteer to make a PR to improve the Getting Started guide section.
Would it be an option for you, to run the UI in a docker? (Thats what I do, when testing on my Raspberry Pi). You could look here: Deploy the UI with Docker :: Open Energy Management System. There you can see in the docker-compose.yml that the container is listening on port 4200. This should allow to reach the ui with a browser on “url:4200”.
Or if you like, I am also happy to share my docker-compose.yml.
I would also recommend the docker way outlined by S1m0n. It is very easy to use.
I recommend to install the original docker instead of using some stuff provided by the distribution.
Unfortunately this forum refuses to let me post a link to the page describing it. You can easily find it if you do a Google search with keywords “Docker install debian”
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:
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?