You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/modules/ROOT/pages/gettingstarted.adoc
+56-20
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ NOTE: Eclipse IDE is the recommended development environment for newcomers to Op
43
43
44
44
. Prepare Eclipse IDE
45
45
.. Download Java Development Kit (JDK) 17 and install it. We recommend the https://adoptium.net/de/temurin/releases/?version=17[OpenJDK Temurin builds by the Adoptium project]
46
-
.. Download https://www.eclipse.org[Eclipse for Java icon:external-link[]], install and start it
46
+
.. Download https://www.eclipse.org/downloads/[Eclipse for Java icon:external-link[]], install and start it
47
47
.. On first start you will get asked to create a workspace.
48
48
Select your source code directory (`C:\Users\your.user\git\openems` in our example) and press btn:[Launch].
.io.openems.edge.application project in Eclipse IDE
84
84
image::eclipse-io.openems.edge.application.png[io.openems.edge.application project in Eclipse IDE]
85
+
+
86
+
NOTE: Instead of navigating through the projects tree, you can simply use the keyboard shortcut btn:[Ctrl] + btn:[Shift] + btn:[R] to start the "Open Resource" dialog. Enter "EdgeApp.bndrun" there and press btn:[Enter] to open the file.
87
+
+
88
+
The `EdgeApp.bndrun` file declares all the bundles and runtime properties. For now it should not be necessary to edit it, but it hides some useful settings unter the btn:[Source] tab:
89
+
+
90
+
- `org.osgi.service.http.port=8080`: start the Apache Felix Web Console on port `8080`
91
+
- `felix.cm.dir=c:/openems/config`: persist configurations in the folder `c:/openems/config`. Adjust this if you are working on Linux to keep your configurations after restart
92
+
- `openems.data.dir=c:/openems/data`: this is where bundles are allowed to persist data. It is used e.g. by the RRD4j timedata storage
85
93
86
94
.. Click on btn:[Run OSGi] to run OpenEMS Edge. You should see log outputs in the **Console** tab inside Eclipse IDE.
87
95
+
@@ -98,7 +106,7 @@ image::apache-felix-console-configuration.png[Apache Felix Web Console Configura
98
106
99
107
.. Configure a Scheduler
100
108
+
101
-
NOTE: The Scheduler is responsible for executing the control algorithms (Controllers) and defines the OpenEMS Edge application cycle
109
+
NOTE: The Scheduler is responsible for executing the control algorithms (Controllers) in order and defines the OpenEMS Edge application cycle
102
110
103
111
... Click on _**Scheduler All Alphabetically**_
104
112
+
@@ -113,7 +121,9 @@ image::config-scheduler-all-alphabetically.png[Configuration of All Alphabetical
113
121
INFO [onent.AbstractOpenemsComponent] [scheduler0] Activate Scheduler.AllAlphabetically
114
122
```
115
123
+
116
-
Add any other OpenEMS Components in the same way:
124
+
Add any other OpenEMS Components in the same way.
125
+
+
126
+
NOTE: Once everything is setup you can configure Components more easily via OpenEMS UI using the "Install components" feature in the Settings.
117
127
118
128
.. Configure debug outputs on the console: _**Controller Debug Log**_. The default values can be accepted without changes.
119
129
+
@@ -152,7 +162,7 @@ NOTE: The data source was configured with the OpenEMS Component ID `datasource0`
152
162
.Configuration of Simulator GridMeter Acting
153
163
image::config-simulator-grid-meter-acting.png[Configuration of Simulator GridMeter Acting]
154
164
+
155
-
This time some more logs will show up. Most importantly they show, that the Grid meter now shows a power value and the Consumption is derived directly from this value, because no PV system or energy storage system is configured yet.
165
+
This time some more logs will appear. Most importantly they show, that the Grid meter now measures (simulates) a power value and the Consumption is derived directly from this value, because no PV system or energy storage system is configured yet.
156
166
+
157
167
```
158
168
INFO [onent.AbstractOpenemsComponent] [meter0] Activate Simulator.GridMeter.Acting
@@ -165,7 +175,7 @@ NOTE: This setup causes the simulated grid-meter to take the standardized load-p
165
175
+
166
176
NOTE: 'Acting' in the name 'Simulator GridMeter Acting' refers to the fact, that this meter actively provides data - in opposite to a 'Reacting' simulated device that is reacting on other components: for example the 'Simulator.EssSymmetric.Reacting' configured below.
167
177
168
-
.. Configure a simulated reacting energy storage system: _**Simulator EssSymmetric Reacting**_. The default values can be accepted without changes. (If you choose an other setup as the one described here you may have to create a new Datasource-Component and provide its ID here. The actual data is ignored, but the Datasource's Time-Delta value is required to calculate values with time-dependant units.)
178
+
.. Configure a simulated reacting energy storage system: _**Simulator EssSymmetric Reacting**_. The default values can be accepted without changes.
169
179
+
170
180
.Configuration of Simulator EssSymmetric Reacting
171
181
image::config-simulator-esssymmetric-reacting.png[Configuration of Simulator EssSymmetric Reacting]
@@ -180,10 +190,10 @@ INFO [ntroller.debuglog.DebugLogImpl] [ctrlDebugLog0] _sum[State:Ok Ess SoC:50
180
190
+
181
191
NOTE: The debug log now shows data for the battery, but the charge/discharge power stays at "0 W" and the state of charge stays at "50 %" as configured. Next step is to configure a control algorithm that tells the battery to charge or discharge depending on the power measured by the simulated grid meter.
182
192
183
-
.. Configure the self-consumption optimization algorithm: _**Controller Balancing Symmetric**_. Configure the `Ess-ID` `'ess0'` and `Grid-Meter-ID` `'meter0'` to refer to the components configured above.
193
+
.. Configure the self-consumption optimization algorithm: _**Controller Ess Balancing**_. Configure the `Ess-ID` `'ess0'` and `Grid-Meter-ID` `'meter0'` to refer to the components configured above.
184
194
+
185
-
.Configuration of Symmetric Balancing Controller
186
-
image::config-controller-balancing-symmetric.png[Configuration of Symmetric Balancing Controller]
195
+
.Configuration of Controller Ess Balancing
196
+
image::config-controller-ess-balancing.png[Configuration of Controller Ess Balancing]
_Unfortunately the hosted version of OpenEMS UI is currently slightly outdated and incompatble with latest OpenEMS Edge. Follow the xref:ui/setup-ide.adoc[OpenEMS UI guide] to produce the following visualization. The language can be changed in the "burger menu" on top left -> btn:[admin] -> btn:[Allgemeine Einstellungen]._
Instead of having Edge and UI talk to each other directly, the communication can also be proxied via Backend.
@@ -251,15 +266,12 @@ NOTE: Disable the two icon buttons "Show Console When Standard Out changes" and
251
266
NOTE: Apache Felix Web Console for OpenEMS Backend is started on port 8079 by default. This is configured using the `org.osgi.service.http.port` setting in BackendApp.bndrun.
252
267
+
253
268
Login with username *admin* and password *admin*.
254
-
+
255
-
.Apache Felix Web Console Configuration for OpenEMS Backend
256
-
image::apache-felix-console-backend-configuration.png[Apache Felix Web Console Configuration for OpenEMS Backend]
257
269
258
270
.. Configure Edge.Websocket
259
271
+
260
272
NOTE: The _**Edge.Websocket**_ service is responsible for the communication between OpenEMS Backend and OpenEMS Edge.
261
273
+
262
-
In the example we are configuring the `Port '8081'`. This port needs to match with what we configure later in OpenEMS Edge.
274
+
In the example we are configuring the `Port '8081'`. This port needs to match with what we configure later in OpenEMS Edge. The `Debug Mode 'DETAILED'` setting helps us to get some more details on the internal behaviour.
263
275
+
264
276
.Configuration of Backend Edge.Websocket
265
277
image::config-backend-edge.websocket.png[Configuration of Backend Edge.Websocket]
@@ -268,7 +280,7 @@ image::config-backend-edge.websocket.png[Configuration of Backend Edge.Websocket
268
280
+
269
281
NOTE: The _**Ui.Websocket**_ service is responsible for the communication between OpenEMS Backend and OpenEMS UI.
270
282
+
271
-
In the example we are configuring the `Port '8082'`. This port needs to match with what we configure later in the OpenEMS UI environment file.
283
+
In the example we are configuring the `Port '8082'`. This port needs to match with what we configure later in the OpenEMS UI environment file. We are again setting `Debug Mode 'DETAILED'`
272
284
+
273
285
.Configuration of Backend Ui.Websocket
274
286
image::config-backend-ui.websocket.png[Configuration of Backend Ui.Websocket]
@@ -277,7 +289,7 @@ image::config-backend-ui.websocket.png[Configuration of Backend Ui.Websocket]
277
289
+
278
290
NOTE: The *Timedata* service provider is responsible for holding the current and historic data of each connected Edge device.
279
291
+
280
-
In the example we are configuring the _**Timedata.Dummy**_ service. It takes no configuration parameters, so just press btn:[Save]. In a production system you would want to use a real implementation like *Timedata.InfluxDB*.
292
+
In the example we are configuring the _**Timedata.Dummy**_ service. The default value for _Component-ID` can be accepted without changes, so just press btn:[Save]. In a production system you would want to use a real implementation like *Timedata.InfluxDB*.
281
293
+
282
294
.Configuration of Backend Timedata.Dummy
283
295
image::config-backend-timedata.dummy.png[Configuration of Backend Timedata.Dummy]
@@ -291,6 +303,16 @@ image::config-backend-metadata.dummy.png[Configuration of Backend Metadata.Dummy
291
303
+
292
304
NOTE: In the example we are configuring the _**Metadata.Dummy**_ service. It takes no configuration parameters, so just press btn:[Save]. In a production system you would want to use a real implementation like _**Metadata.File**_, which uses a static JSON file as input, or _**Metadata.Odoo**_, which uses the *Odoo* business software for authentication and IoT device management. This will require the https://github.com/OpenEMS/odoo-openems[Odoo-OpenEMS-Addon] to be installed on your Odoo instance. See the https://gitpod.io/#https://github.com/OpenEMS/openems/tree/main[OpenEMS Live-Demo Gitpod workspace] for a full, production ready example configuration. For more information see → xref:simulation/gitpod.adoc[Gitpod Workspace]
293
305
306
+
.. Backend is ready
307
+
+
308
+
You should have seen some important log messages by now, that indicate that the OpenEMS Backend is ready to accept connections:
309
+
```
310
+
INFO [d.timedata.dummy.TimedataDummy] [Timedata.Dummy] Activate
311
+
INFO [d.metadata.dummy.MetadataDummy] [Metadata.Dummy] Activate
312
+
INFO [socket.AbstractWebsocketServer] [Ui.Websocket] Starting websocket server [port=8082]
313
+
INFO [socket.AbstractWebsocketServer] [Edge.Websocket] Starting websocket server [port=8081]
314
+
```
315
+
294
316
=== Configure OpenEMS Edge
295
317
296
318
Next we will configure OpenEMS Edge to connect to the OpenEMS Backend _**Edge.Websocket**_ service.
@@ -311,18 +333,24 @@ Once you press btn:[save] you should see logs in OpenEMS Edge
311
333
+
312
334
```
313
335
INFO [onent.AbstractOpenemsComponent] [ctrlBackend0] Activate Controller.Api.Backend
314
-
INFO [socket.AbstractWebsocketClient] Opening connection [Controller.Api.Backend:ctrlBackend0] to websocket server [ws://localhost:8081]
336
+
INFO [socket.AbstractWebsocketClient] [ctrlBackend0] Opening connection to websocket server [ws://localhost:8081]
337
+
INFO [socket.ClientReconnectorWorker] [ctrlBackend0] Connecting WebSocket... [NOT_YET_CONNECTED]
338
+
INFO [socket.ClientReconnectorWorker] [ctrlBackend0] Connected WebSocket successfully [0s]
315
339
INFO [.controller.api.backend.OnOpen] [ctrlBackend0] Connected to OpenEMS Backend
316
340
```
317
341
+
318
342
and OpenEMS Backend
319
343
+
320
344
```
321
-
INFO [s.backend.edgewebsocket.OnOpen] [Edge.Websocket] Edge [edge0] connected
345
+
INFO [s.backend.common.metadata.Edge] Edge [edge0]: Update version from [0.0.0] to [...]
346
+
INFO [mon.metadata.SimpleEdgeHandler] Edge [edge0]. Update config: ...
347
+
INFO [dgewebsocket.EdgeWebsocketImpl] [monitor] Edge-Connections: 1
322
348
```
323
349
324
350
=== Connect OpenEMS UI with Backend
325
351
352
+
_(You need to have completed the xref:ui/setup-ide.adoc[OpenEMS UI guide] for the following steps)_
353
+
326
354
. In the Visual Studio Code terminal stop the running `ng serve...` by pressing btn:[ctrl] + btn:[c]
327
355
328
356
. Restart OpenEMS UI in 'local backend mode':
@@ -337,10 +365,18 @@ NOTE: OpenEMS UI can work both for local connections to OpenEMS Edge as well as
337
365
+
338
366
NOTE: _**Metadata.Dummy**_ accepts any user/password combination. For production use, switch to a different *Metadata* implementation as described above.
0 commit comments