Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSON-RPC for communication between Edge, Backend and UI #211

Merged
merged 53 commits into from
Jan 15, 2019

Conversation

sfeilmeier
Copy link
Contributor

Currently the websocket communication protocol between the components is based on custom designed messages (see https://github.com/OpenEMS/openems/blob/develop/doc/_old/websocket-communication.md). The target is, to change this to the well-defined structure of JSON-RPC (see https://www.jsonrpc.org/specification).

One of the benefits of using this, is a clear encapsulation of messages, that need to be forwarded from UI to Edge via Backend. It also enables to structured forwarding of JSON messages from Edge "Backend Api Controller" to specialized Components (e.g. Controllers).

See ticket #197

- Add core Classes for JSON-RPC
- Start implementation of backend-to-backend websocket service
- Deprecate old classes
- fully asynchronous handling with functional interfaces
- Takes a schedule with ActivePowerSetPoints for defined timestamps and periods
- Adjust parts of UI to JSON-RPC
- Restructure the way Channels are subscribed in UI
- add handler for Non-JSON-RPC messages
- Migrate CurrentDataWorker -> SubscribedChannelsWorker
- Fix UI environment files
- Start documentation in antora + asciidoc + mermaid.js
- Fix writing to InfluxDB Timedata service
- Clearly name Request, Response, Notification classes
- Write data to InfluxDB
- Fix AbstractWebsocketClient WsData initialization
- AbstractWebsocketServer: stop immediately on request
- Implement GetEdgeConfigRequest/Response
- Definde new EdgeConfig format
- UI: cleaning of deprecated files
# Conflicts:
#	io.openems.backend.application/BackendApp.bndrun
#	io.openems.common/src/io/openems/common/timedata/CommonTimedataService.java
#	io.openems.common/src/io/openems/common/timedata/TimedataUtils.java
#	io.openems.common/src/io/openems/common/types/ChannelAddress.java
#	io.openems.common/src/io/openems/common/utils/JsonUtils.java
#	io.openems.common/src/io/openems/common/websocket/AbstractWebsocketServer.java
#	io.openems.common/src/io/openems/common/websocket/JsonrpcMessage.java
#	io.openems.edge.application/EdgeApp.bndrun
#	io.openems.edge.controller.io.fixdigitaloutput/src/io/openems/edge/controller/io/fixdigitaloutput/FixDigitalOutput.java
#	io.openems.wrapper/bnd.bnd
#	io.openems.wrapper/retrofit2-converter-moshi.bnd
#	io.openems.wrapper/retrofit2.bnd
#	ui/package-lock.json
#	ui/src/app/edge/index/energymonitor/chart/chart.component.ts
#	ui/src/app/edge/index/energytable/energytable.component.ts
#	ui/src/app/index/index.component.html
#	ui/src/app/shared/edge/config.2018.7.ts
#	ui/src/app/shared/edge/currentdata.2018.7.ts
#	ui/src/app/shared/edge/currentdata.2018.8.ts
#	ui/src/app/shared/shared.module.ts
- Fix merge errors.
- Fully working Soc- and Energycharts.
- Avoid having 'Edge' and 'Config' as @input parameter; use Service instead
- Ignore 'currentData' notifications in debug log
- Get rid of mandatory 'service_pid' in every Component Config.
- Make Factory-PID available
- Parse meta information from Bundle
- UI: simply imports with shared module
- add UpdateComponentConfigRequest
- ComponentManager is able to update a component configuration
- Split 'Sum' in 'Sum' and 'SumImpl'
- Refactor OpenemsComponent.activate()-method. No need for properties, as they are available via ComponentContext
- Trigger OsgiValidateWorker on every configuration change
- Fix KEBA using value instead of writeValue
- Set EVCS Controller Charge-Mode from UI Widget
- Add EVCS Controller
- Remove obsolete abstract websocket
- Update WebsocketApi-Controller to new AbstractWebsocket implementation
- Add getComponents() to ComponentManager
- Improve EVCS Controller
- Add EVCS Widgets to Index & Historic view
- Fix formatting of numbers in UI using 'formatNumber'
- UI to Edge: authenticate with password
- Add mermaid diagram for authentication with password
- Add AbstractOpenemsBackendComponent parent class
- Fix parsing cookie from handshake
- Apply Checkstyle to many projects
- Improve Javadoc
- Add security checks
- Add Equals/LessThan/GreaterThan Channels for ManagedSymmetricEss and ManagedAsymmetricEss
- Refactor UI Chart Sections
- Refactor UI language selection
- Add "count" to SubscribeChannelsRequest
- Remove temporarily disabled parts of UI
- Fix some small release bugs
# Conflicts:
#	ui/package-lock.json
#	ui/package.json
@sfeilmeier sfeilmeier merged commit 7207fc4 into develop Jan 15, 2019
@sfeilmeier sfeilmeier deleted the feature/jsonrpc branch January 15, 2019 17:16
lukasrgr pushed a commit that referenced this pull request May 24, 2023
negative alerting:
sends notification when EMS stays disconnected from the backend for certain configured period

events:
change backend structure to use OSGis EventAdmin

Co-authored-by: Kai Jeschek <[email protected]>
Co-authored-by: Maximilian Lang <[email protected]>
Co-authored-by: Stefan Feilmeier <[email protected]>
Reviewed-on: https://git.intranet.fenecon.de/FENECON/fems/pulls/211
Reviewed-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Kai Jeschek <[email protected]>
Co-committed-by: Kai Jeschek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant