eebus-go

EEBUS protocol implementation in go

https://github.com/enbility/eebus-go

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

charging-stations eebus electric-vehicles emobility energy-management energy-management-systems
Last synced: 6 months ago · JSON representation

Repository

EEBUS protocol implementation in go

Basic Info
  • Host: GitHub
  • Owner: enbility
  • License: mit
  • Language: Go
  • Default Branch: dev
  • Homepage: https://enbility.net
  • Size: 2.57 MB
Statistics
  • Stars: 81
  • Watchers: 17
  • Forks: 37
  • Open Issues: 19
  • Releases: 12
Topics
charging-stations eebus electric-vehicles emobility energy-management energy-management-systems
Created almost 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

eebus-go

Build Status GoDoc Coverage Status Go report CodeFactor Ask DeepWiki

This library provides a foundation for implementing EEBUS use cases in go. It uses the SHIP implementation ship-go and the SPINE implementation spine-go. Both repositories started as part of this repository, before they were moved into their own separate repositories and go packages.

Basic understanding of the EEBUS concepts SHIP and SPINE to use this library is required. Please check the corresponding specifications on the EEBUS downloads website.

Introduction

The supported functionality contains:

  • Support for SHIP 1.0.1 via ship-go
  • Support for SPINE 1.3.0 via spine-go
  • Certificate handling
  • mDNS Support, incl. avahi support
  • Connection (websocket) handling, including reconnection and double connections
  • Support for handling pairing of devices

Packages

  • api: global API interface definitions and eebus service configuration
  • features/client: provides feature helpers with the local SPINE feature having the client role and the remote SPINE feature being the server for easy access to commonly used functions
  • features/server: provides feature helpers with the local SPINE feature having the server role for easy access to commonly used functions
  • service: central package which provides access to SHIP and SPINE. Use this to create the EEBUS service, its configuration and connect to remote EEBUS services
  • usecases: containing actor and use case based implementations with use case scenario based APIs and events

Examples

The examples folder contains a few demo applications using this stack. These do not provide complete implementations of any use case, but are intended as usage guidelines for the eebus-go stack in general and to have a quick demo.

Therefore, please do not expect any of these examples to provide any meaningful functionality on their own, but instead view them as rough guidelines on the functionality you could implement using the eebus-go stack.

Controlbox

This includes example code for sending an LPC limit 5 seconds after connecting to a compatible device that can receive LPC limits.

First Run

sh go run examples/controlbox/main.go 4713

4713 is the example server port that this process should listen on

The certificate and key and the local SKI will be generated and printed. You should then save the certificate and the key to a file.

General Usage

sh Usage: go run examples/controlbox/main.go <serverport> <remoteski> <certfile> <keyfile>

  • remoteski is the SKI of the remote device or service you want to connect to
  • certfile is a local file containing the generated certificate in the first usage run
  • keyfile is a local file containing the generated key in the first usage run

HEMS

This includes example code for accepting LPC and LPP limits from a control box, receiving and printing data to the console from battery (VABD) and pv inverters (VAPD) and grid connection point data (MGCP).

First Run

sh go run examples/hems/main.go 4714

4714 is the example server port that this process should listen on

The certificate and key and the local SKI will be generated and printed. You should then save the certificate and the key to a file.

General Usage

sh Usage: go run examples/hems/main.go <serverport> <remoteski> <certfile> <keyfile>

  • remoteski is the SKI of the remote device or service you want to connect to
  • certfile is a local file containing the generated certificate in the first usage run
  • keyfile is a local file containing the generated key in the first usage run

EVSE

This includes example code for accepting LPC from a control box.

First Run

sh go run examples/hems/main.go 4715

4715 is the example server port that this process should listen on

The certificate and key and the local SKI will be generated and printed. You should then save the certificate and the key to a file.

General Usage

sh Usage: go run examples/evse/main.go <serverport> <remoteski> <certfile> <keyfile>

  • remoteski is the SKI of the remote device or service you want to connect to
  • certfile is a local file containing the generated certificate in the first usage run
  • keyfile is a local file containing the generated key in the first usage run

Explanation

The remoteski is from the eebus service to connect to. If no certfile or keyfile are provided, they are generated and printed in the console so they can be saved in a file and later used again. The local SKI is also printed.

SHIP implementation notes

  • Double connection handling is not implemented according to SHIP 12.2.2. Instead the connection initiated by the higher SKI will be kept. Much simpler and always works
  • PIN Verification is NOT supported other than SHIP 13.4.4.3.5.1 "none" PIN state is supported!
  • Access Methods SHIP 13.4.6 only supports the most basic scenario and only works after PIN verification state is completed.
  • Supported registration mechanisms (SHIP 5):
    • auto accept (without any interaction mechanism!)
    • user verification

This approach has been tested with:

  • Elli Charger Connect
  • Porsche Mobile Charger Connect
  • SMA Home Energy Manager 2.0

Interfaces

Verbose logging

Use SetLogger on Service to set the logger which needs to conform to the logging.Logging interface of ship-go.

Example:

go configuration = service.NewConfiguration(...) h.myService = service.NewEEBUSService(configuration, h) h.myService.SetLogging(h)

Owner

  • Name: enbility
  • Login: enbility
  • Kind: organization
  • Location: Germany

Solutions for using the EEBUS protocol

GitHub Events

Total
  • Issues event: 6
  • Watch event: 26
  • Delete event: 6
  • Issue comment event: 48
  • Push event: 38
  • Pull request review comment event: 60
  • Pull request review event: 37
  • Pull request event: 43
  • Fork event: 13
  • Create event: 12
Last Year
  • Issues event: 6
  • Watch event: 26
  • Delete event: 6
  • Issue comment event: 48
  • Push event: 38
  • Pull request review comment event: 60
  • Pull request review event: 37
  • Pull request event: 43
  • Fork event: 13
  • Create event: 12

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 902
  • Total Committers: 8
  • Avg Commits per committer: 112.75
  • Development Distribution Score (DDS): 0.079
Past Year
  • Commits: 83
  • Committers: 5
  • Avg Commits per committer: 16.6
  • Development Distribution Score (DDS): 0.145
Top Committers
Name Email Commits
Andreas Linde m****l@a****e 831
taimo42 6****2 53
Lukas Einfalt l****x@l****e 5
Simon Thelen s****n@e****e 5
Andrew Johnson a****9@g****m 3
Klaus Jaroslawsky K****y@s****e 2
ahmed.magdy a****y@c****m 2
StefanSchoof 4****f 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 50
  • Total pull requests: 95
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 12 days
  • Total issue authors: 12
  • Total pull request authors: 12
  • Average comments per issue: 1.32
  • Average comments per pull request: 1.14
  • Merged pull requests: 71
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 10
  • Pull requests: 44
  • Average time to close issues: about 7 hours
  • Average time to close pull requests: 4 days
  • Issue authors: 6
  • Pull request authors: 8
  • Average comments per issue: 0.7
  • Average comments per pull request: 1.25
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • DerAndereAndi (39)
  • heavyweight87 (2)
  • randomdudebunchofnumbers (1)
  • elgohr (1)
  • AhmedMagdyCoretech (1)
  • lukx (1)
  • tbazire (1)
  • sthelen-enqs (1)
  • Ab0Ddore (1)
  • lyn0904 (1)
  • TobiasHuber1980 (1)
  • andig (1)
  • Ka0o0 (1)
  • Rosi1981 (1)
Pull Request Authors
  • DerAndereAndi (85)
  • sthelen-enqs (17)
  • anjrew (8)
  • taimo42 (7)
  • lukx (5)
  • andig (5)
  • heavyweight87 (4)
  • AhmedMagdyCoretech (3)
  • heinemannj (2)
  • jaroslawsky (2)
  • daviddsapir (2)
  • StefanSchoof (1)
Top Labels
Issue Labels
enhancement (23) SHIP (10) eebus spec (9) SPINE (8) help wanted (7) bug (6) question (1) documentation (1) wontfix (1)
Pull Request Labels
enhancement (19) bug (7) SHIP (1) SPINE (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total docker downloads: 363,242
  • Total dependent packages: 10
  • Total dependent repositories: 12
  • Total versions: 16
proxy.golang.org: github.com/enbility/eebus-go
  • Versions: 16
  • Dependent Packages: 10
  • Dependent Repositories: 12
  • Docker Downloads: 363,242
Rankings
Docker downloads count: 0.8%
Dependent repos count: 1.6%
Dependent packages count: 3.0%
Average: 4.6%
Forks count: 8.9%
Stargazers count: 8.9%
Last synced: 6 months ago

Dependencies

go.mod go
  • github.com/ahmetb/go-linq/v3 v3.2.0
  • github.com/davecgh/go-spew v1.1.1
  • github.com/godbus/dbus/v5 v5.0.4
  • github.com/google/go-cmp v0.5.8
  • github.com/gorilla/websocket v1.5.0
  • github.com/holoplot/go-avahi v1.0.0
  • github.com/libp2p/zeroconf/v2 v2.0.0-20220623102032-af1f1d3ada85
  • github.com/miekg/dns v1.1.49
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/rickb777/date v1.19.1
  • github.com/rickb777/plural v1.4.1
  • github.com/stretchr/objx v0.4.0
  • github.com/stretchr/testify v1.7.1
  • gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a
  • golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
  • golang.org/x/net v0.0.0-20220531201128-c960675eff93
  • golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
  • golang.org/x/tools v0.1.10
  • golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df
  • gopkg.in/yaml.v3 v3.0.1
go.sum go
  • github.com/DerAndereAndi/go-avahi v0.0.0-20220623134409-61c3cd3f6dd4
  • github.com/ahmetb/go-linq/v3 v3.2.0
  • github.com/davecgh/go-spew v1.1.0
  • github.com/davecgh/go-spew v1.1.1
  • github.com/godbus/dbus/v5 v5.0.4
  • github.com/google/go-cmp v0.5.8
  • github.com/gorilla/websocket v1.5.0
  • github.com/libp2p/zeroconf/v2 v2.0.0-20220623102032-af1f1d3ada85
  • github.com/miekg/dns v1.1.43
  • github.com/miekg/dns v1.1.49
  • github.com/onsi/gomega v1.19.0
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/rickb777/date v1.19.1
  • github.com/rickb777/plural v1.4.1
  • github.com/stretchr/objx v0.1.0
  • github.com/stretchr/objx v0.4.0
  • github.com/stretchr/testify v1.7.1
  • github.com/yuin/goldmark v1.3.5
  • gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a
  • golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
  • golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
  • golang.org/x/mod v0.4.2
  • golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
  • golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
  • golang.org/x/net v0.0.0-20190620200207-3b0461eec859
  • golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
  • golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
  • golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6
  • golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985
  • golang.org/x/net v0.0.0-20220531201128-c960675eff93
  • golang.org/x/sync v0.0.0-20190423024810-112230192c58
  • golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
  • golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
  • golang.org/x/sys v0.0.0-20190412213103-97732733099d
  • golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
  • golang.org/x/sys v0.0.0-20210303074136-134d130e1a04
  • golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44
  • golang.org/x/sys v0.0.0-20210423082822-04245dca01da
  • golang.org/x/sys v0.0.0-20210426080607-c94f62235c83
  • golang.org/x/sys v0.0.0-20210510120138-977fb7262007
  • golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
  • golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
  • golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
  • golang.org/x/text v0.3.0
  • golang.org/x/text v0.3.3
  • golang.org/x/text v0.3.6
  • golang.org/x/text v0.3.7
  • golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e
  • golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
  • golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2
  • golang.org/x/tools v0.1.10
  • golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
  • golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
  • golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
  • golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df
  • gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
  • gopkg.in/yaml.v2 v2.4.0
  • gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
  • gopkg.in/yaml.v3 v3.0.1
.github/workflows/default.yml actions
  • actions/checkout v2 composite
  • actions/setup-go v2 composite
  • golangci/golangci-lint-action v3 composite
  • shogo82148/actions-goveralls v1 composite