Skip to content

Commit

Permalink
Merge branch 'release/2021.17.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Oct 7, 2021
2 parents 7966617 + 66f7a5e commit e048c39
Show file tree
Hide file tree
Showing 22 changed files with 157 additions and 35 deletions.
18 changes: 17 additions & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gitpod/workspace-full
FROM gitpod/workspace-postgres

RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sdk install java 8.0.265-open"
Expand All @@ -10,3 +10,19 @@ ENV NG_CLI_ANALYTICS=false
ENV TRIGGER_REBUILD 3

RUN npm install -g @angular/cli

# Install odoo
ENV ODOO_VERSION 12.0
ENV ODOO_RELEASE latest
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& sudo apt-get update \
&& sudo apt-get -y install --no-install-recommends ./odoo.deb \
&& sudo rm -rf /var/lib/apt/lists/* odoo.deb

# Install wkhtmltopdf
ENV WKHTMLTOPDF_VERSION 0.12.6-1
ENV WKHTMLTOPDF_RELEASE focal_amd64
RUN curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}.${WKHTMLTOPDF_RELEASE}.deb \
&& sudo apt-get update \
&& sudo apt-get install -y ./wkhtmltox.deb \
&& sudo rm -rf /var/lib/apt/lists/* wkhtmltox.deb
17 changes: 15 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ tasks:
-jar build/openems-edge.jar
- init: cd ui && npm install
command: ng serve
-c gitpod
-c openems-gitpod
--host 0.0.0.0
--disable-host-check
- init: |
mkdir /workspace/odoo && cd /workspace/odoo
git clone --depth=1 -b feature/gitpod https://github.com/OpenEMS/odoo-openems.git openems
git clone --depth=1 -b 12.0 https://github.com/OCA/partner-contact
git clone --depth=1 -b 12.0 https://github.com/OCA/web.git
ln -s ./partner-contact/partner_firstname ./partner_firstname
ln -s ./web/web_m2x_options ./web_m2x_options
command: odoo -d v12 --addons-path=/workspace/odoo -i base,partner_firstname,web_m2x_options,stock,openems
ports:
# Backend
Expand All @@ -43,4 +51,9 @@ ports:
onOpen: ignore
# UI
- port: 4200
onOpen: open-browser
onOpen: open-browser
# Odoo
- port: 8069
onOpen: open-browser
- port: 5432
onOpen: ignore
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* OpenEMS Backend
** xref:backend/architecture.adoc[Architecture]
** xref:backend/backend-to-backend.adoc[Backend-to-Backend]
** xref:backend/gitpod.adoc[Gitpod Workspace]
** xref:backend/build.adoc[Build OpenEMS Backend]
** xref:backend/deploy.adoc[Deploy OpenEMS Backend]
* xref:component-communication/index.adoc[Component Communication]
Expand Down
61 changes: 61 additions & 0 deletions doc/modules/ROOT/pages/backend/gitpod.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
= Gitpod Workspace
:sectnums:
:sectnumlevels: 4
:toc:
:toclevels: 4
:experimental:
:keywords: AsciiDoc
:source-highlighter: highlight.js
:icons: font
:imagesdir: ../../assets/images

link:https://gitpod.io/[Gitpod] is used to startup the complete OpenEMS System using Docker images. The container contains the following services:

* OpenEMS UI
* OpenEMS Backend
* OpenEMS Edge
* Odoo (with link:https://github.com/OpenEMS/openems[OpenEMS Module])
* PostgreSQL
== Start Gitpod Workspace

. Open in a browser link:https://gitpod.io/#https://github.com/OpenEMS/openems/tree/develop[Gitpod Workspace] to start the Gitpod workspace on develop branch
. Gitpod starts a build based on the local Docker image (see `.gitpod.Dockerfile`)
+
.Docker Build
image::gitpod-docker-build.png[Docker Build]
. After the build you were redirected to a Visual Studio Code instance in your browser
+
.Gitpod Redirect
image::gitpod-vscode-redirect.png[Gitpod Redirect]

== Running Visual Studio Code instance in browser

. Inside your online editor Gitpod execute everything you defined in the `.gitpod.yml` tasks section
+
.Services started in Visual Studio Code
image::gitpod-vscode-services.png[Services started in Visual Studio Code]
. You can see all opened ports in Visual Studio Code that started from your services. Here you can open the ports by clicking on it.
+
.All opened Ports in Visual Studio Code
image::gitpod-vscode-ports.png[All opened Ports in Visual Studio Code]
. After to configured port (`.gitpod.yml`) for the OpenEMS UI is reachable, it will automatically open that in a new tab

=== Troubleshooting

After odoo started restart backend and edge (current timing problem)

== OpenEMS

. After the OpenEMS UI is opened you can login
.. Username *[email protected]* and password *mustermann*
.. To user will be authenticated against the running Odoo server
+
.OpenEMS Login via Odoo authentication
image::gitpod-openems-login.png[OpenEMS Login via Odoo authentication]
. List of Edges from Odoo
.. The first Edge (Edge 1) is your local started OpenEMS Edge service
.. It is connected via API-Key
+
.OpenEMS List of Edges
image::gitpod-openems-edges.png[OpenEMS List of Edges]
24 changes: 18 additions & 6 deletions doc/modules/ROOT/pages/edge/controller.adoc.d/_include.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ include::io.openems.edge.controller.api.backend.adoc[leveloffset=+1]

include::io.openems.edge.controller.api.modbus.adoc[leveloffset=+1]

include::io.openems.edge.controller.api.mqtt.adoc[leveloffset=+1]

include::io.openems.edge.controller.api.rest.adoc[leveloffset=+1]

include::io.openems.edge.controller.api.websocket.adoc[leveloffset=+1]
Expand All @@ -27,20 +29,34 @@ include::io.openems.edge.controller.debug.log.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.acisland.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.activepowervoltagecharacteristic.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.delaycharge.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.delayedselltogrid.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.fixactivepower.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.gridoptimizedcharge.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.hybrid.surplusfeedtogrid.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.limittotaldischarge.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.linearpowerband.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.mindischargeperiod.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.onefullcycle.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.predictivedelaycharge.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.reactivepowervoltagecharacteristic.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.selltogridlimit.adoc[leveloffset=+1]

include::io.openems.edge.controller.ess.standby.adoc[leveloffset=+1]

include::io.openems.edge.controller.evcs.adoc[leveloffset=+1]

include::io.openems.edge.controller.evcs.fixactivepower.adoc[leveloffset=+1]
Expand All @@ -57,6 +73,8 @@ include::io.openems.edge.controller.io.fixdigitaloutput.adoc[leveloffset=+1]

include::io.openems.edge.controller.io.heatingelement.adoc[leveloffset=+1]

include::io.openems.edge.controller.io.heatpump.sgready.adoc[leveloffset=+1]

include::io.openems.edge.controller.pvinverter.fixpowerlimit.adoc[leveloffset=+1]

include::io.openems.edge.controller.pvinverter.selltogridlimit.adoc[leveloffset=+1]
Expand All @@ -65,18 +83,12 @@ include::io.openems.edge.controller.symmetric.balancing.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.balancingschedule.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.fixactivepower.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.fixreactivepower.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.limitactivepower.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.linearpowerband.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.peakshaving.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.randompower.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.reactivepowervoltagecharacteristic.adoc[leveloffset=+1]

include::io.openems.edge.controller.symmetric.timeslotpeakshaving.adoc[leveloffset=+1]
26 changes: 19 additions & 7 deletions doc/modules/ROOT/pages/edge/device_service.adoc.d/_include.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@

include::io.openems.edge.battery.bydcommercial.adoc[leveloffset=+1]

include::io.openems.edge.battery.fenecon.home.adoc[leveloffset=+1]

include::io.openems.edge.battery.soltaro.adoc[leveloffset=+1]

include::io.openems.edge.batteryinverter.kaco.blueplanetgridsave.adoc[leveloffset=+1]

include::io.openems.edge.batteryinverter.refu88k.adoc[leveloffset=+1]

include::io.openems.edge.batteryinverter.sunspec.adoc[leveloffset=+1]

include::io.openems.edge.bosch.bpts5hybrid.adoc[leveloffset=+1]

include::io.openems.edge.core.adoc[leveloffset=+1]

include::io.openems.edge.ess.adstec.storaxe.adoc[leveloffset=+1]

include::io.openems.edge.ess.byd.container.adoc[leveloffset=+1]

include::io.openems.edge.ess.cluster.adoc[leveloffset=+1]
Expand All @@ -17,20 +25,20 @@ include::io.openems.edge.ess.fenecon.commercial40.adoc[leveloffset=+1]

include::io.openems.edge.ess.generic.adoc[leveloffset=+1]

include::io.openems.edge.ess.kaco.blueplanet.gridsave50.adoc[leveloffset=+1]

include::io.openems.edge.ess.mr.gridcon.adoc[leveloffset=+1]

include::io.openems.edge.ess.refu.adoc[leveloffset=+1]

include::io.openems.edge.ess.refu88k.adoc[leveloffset=+1]

include::io.openems.edge.ess.sinexcel.adoc[leveloffset=+1]

include::io.openems.edge.ess.sma.adoc[leveloffset=+1]

include::io.openems.edge.evcs.cluster.adoc[leveloffset=+1]

include::io.openems.edge.evcs.core.adoc[leveloffset=+1]

include::io.openems.edge.evcs.goe.chargerhome.adoc[leveloffset=+1]

include::io.openems.edge.evcs.hardybarth.adoc[leveloffset=+1]

include::io.openems.edge.evcs.keba.kecontact.adoc[leveloffset=+1]

include::io.openems.edge.evcs.ocpp.abl.adoc[leveloffset=+1]
Expand All @@ -47,7 +55,7 @@ include::io.openems.edge.fenecon.mini.adoc[leveloffset=+1]

include::io.openems.edge.fenecon.pro.adoc[leveloffset=+1]

include::io.openems.edge.goodwe.et.adoc[leveloffset=+1]
include::io.openems.edge.goodwe.adoc[leveloffset=+1]

include::io.openems.edge.io.kmtronic.adoc[leveloffset=+1]

Expand Down Expand Up @@ -77,6 +85,8 @@ include::io.openems.edge.meter.pqplus.umd97.adoc[leveloffset=+1]

include::io.openems.edge.meter.schneider.acti9.smartlink.adoc[leveloffset=+1]

include::io.openems.edge.meter.sma.shm20.adoc[leveloffset=+1]

include::io.openems.edge.meter.socomec.adoc[leveloffset=+1]

include::io.openems.edge.meter.sunspec.adoc[leveloffset=+1]
Expand All @@ -89,6 +99,8 @@ include::io.openems.edge.onewire.thermometer.adoc[leveloffset=+1]

include::io.openems.edge.predictor.persistencemodel.adoc[leveloffset=+1]

include::io.openems.edge.predictor.similardaymodel.adoc[leveloffset=+1]

include::io.openems.edge.pvinverter.cluster.adoc[leveloffset=+1]

include::io.openems.edge.pvinverter.kaco.blueplanet.adoc[leveloffset=+1]
Expand Down
4 changes: 4 additions & 0 deletions doc/modules/ROOT/pages/gettingstarted.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ It is again noteworthy here, that:
.UI via Backend
image::ui-via-backend.png[UI via Backend]

=== Connect OpenEMS Backend with Odoo (Optional)

How mentioned above in production system you want to use the *Metadata.Odoo* service. For that the OpenEMS GitHub repository provides a Gitpod container. To start the Gitpod workspace open https://gitpod.io/#https://github.com/OpenEMS/openems/tree/master in a browser. For more information see → xref:backend/gitpod.adoc[Gitpod Workspace]

## Next steps

Now that you setup a complete development environment and have a working instance of OpenEMS Edge, OpenEMS Backend an OpenEMS UI, you can continue implementing your first device driver in OpenEMS. We provide a tutorial that explains the steps to implement an electric meter in OpenEMS Edge that is connected via Modbus/TCP. The meter itself is simulated using a small Modbus slave application, so no external hardware is required for this guide. → xref:edge/implement.adoc[Implementing a Device]
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/single_document.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= OpenEMS - Open Energy Management System
ifndef::toc[]
(c) 2020 OpenEMS Association e.V.
Version 2021.16.0
Version 2021.17.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public enum EdgeDevice implements Field {
OPENEMS_SUM_STATE("openems_sum_state_level", true), //
OPENEMS_IS_CONNECTED("openems_is_connected", false);

public static final String ODOO_MODEL = "edge.device";
public static final String ODOO_MODEL = "openems.edge";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -86,7 +86,7 @@ public boolean isQuery() {
* The EdgeDeviceStatus-Model.
*/
public enum EdgeDeviceStatus implements Field {
DEVICE_ID("device_id", false), //
DEVICE_ID("edge_id", false), //
CHANNEL_ADDRESS("channel_address", false), //
LEVEL("level", true), //
COMPONENT_ID("component_id", true), //
Expand All @@ -95,7 +95,7 @@ public enum EdgeDeviceStatus implements Field {
LAST_ACKNOWLEDGE("last_acknowledge", false), //
ACKNOWLEDGE_DAYS("acknowledge_days", false);

public static final String ODOO_MODEL = "edge.device_status";
public static final String ODOO_MODEL = "openems.edge_status";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -138,11 +138,11 @@ public boolean isQuery() {
* The EdgeConfigUpdate-Model.
*/
public enum EdgeConfigUpdate implements Field {
DEVICE_ID("device_id", false), //
DEVICE_ID("edge_id", false), //
TEASER("teaser", false), //
DETAILS("details", false);

public static final String ODOO_MODEL = "edge.openemsconfigupdate";
public static final String ODOO_MODEL = "openems.openemsconfigupdate";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -185,11 +185,11 @@ public boolean isQuery() {
* The EdgeDeviceUserRole-Model.
*/
public enum EdgeDeviceUserRole implements Field {
DEVICE_ID("device_id", false), //
DEVICE_ID("edge_id", false), //
USER_ID("user_id", false), //
ROLE("role", false);

public static final String ODOO_MODEL = "edge.device_user_role";
public static final String ODOO_MODEL = "openems.edge_user_role";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -392,9 +392,9 @@ public enum SetupProtocol implements Field {
CUSTOMER("customer_id", true), //
DIFFERENT_LOCATION("different_location_id", true), //
INSTALLER("installer_id", true), //
EDGE("edge_device_id", true);
EDGE("edge_id", true);

public static final String ODOO_MODEL = "edge.setup_protocol";
public static final String ODOO_MODEL = "openems.setup_protocol";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -441,7 +441,7 @@ public enum SetupProtocolProductionLot implements Field {
SEQUENCE("sequence", true), //
LOT("lot_id", true);

public static final String ODOO_MODEL = "edge.setup_protocol_production_lot";
public static final String ODOO_MODEL = "openems.setup_protocol_production_lot";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down Expand Up @@ -487,7 +487,7 @@ public enum SetupProtocolItem implements Field {
SETUP_PROTOCOL("setup_protocol_id", true), //
SEQUENCE("sequence", true);

public static final String ODOO_MODEL = "edge.setup_protocol_item";
public static final String ODOO_MODEL = "openems.setup_protocol_item";
public static final String ODOO_TABLE = ODOO_MODEL.replace(".", "_");

private static final class StaticFields {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class OpenemsConstants {
*
* This is usually the number of the sprint within the year
*/
public final static short VERSION_MINOR = 16;
public final static short VERSION_MINOR = 17;

/**
* The patch version of OpenEMS.
Expand Down
2 changes: 0 additions & 2 deletions tools/docker/openems-backend/config.d/Metadata/Dummy.config

This file was deleted.

4 changes: 4 additions & 0 deletions tools/docker/openems-backend/config.d/Metadata/Odoo.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:org.apache.felix.configadmin.revision:=L"1"
database="v12"
pgUser="gitpod"
service.pid="Metadata.Odoo"
Loading

0 comments on commit e048c39

Please sign in to comment.