eebus-go

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MIT

README

eebus-go

Build Status GoDoc Coverage Status Go report

This library provides a complete foundation for implementing EEBUS use cases. The use cases define various functional scenarios for different device categories, e.g. energy management systems, charging stations, heat pumps, and more.

Introduction

The supported functionality contains:

  • Support for SHIP 1.0.1
  • Support for big parts of SPINE 1.1.1
  • (De-)serialization for EEBUS specific JSON format requirements
  • Certificate handling
  • mDNS Support, incl. avahi support (recommended)
  • Connection (websocket) handling, including reconnection and double connections
  • Support for handling pairing of devices

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.

An open source SDK written in go providing the foundation to use EEBUS in your projects. Contains support for SHIP and SPINE communication.

Usage

The included small demo applications do not implement any usecases and thus will end the connection once it reached exchanging usecase information.

Services with implemented use cases will be implemented in different repositories and are also early work in progress:

HEMS
First Run
go run cmd/hems/main.go 4715

4715 is the example server port that this process should use

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
Usage: go run cmd/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
First Run
go run cmd/hems/main.go 4715

4715 is the example server port that this process should use

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
Usage: go run cmd/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.

This approach has been tested with:

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

Roadmap - Spine specification implementation

General request processing
  • Request and process full data
  • Request partial data
    • Delete Selectors
    • Update Selectors
    • Elements
  • Send
    • Full data
    • Partial data
  • Process partial data
    • Delete Selectors
    • Update Selectors
    • Elements
  • [ ] Request types
    • Read
      • Send
        • Full Request
        • Partial Request
        • Partial Delete
      • Receive
        • Full Request
        • Partial Request
        • Partial Delete
    • Reply
      • Send
        • Full Request
        • Partial Request
        • Partial Delete
      • Receive
        • Full Request
        • Partial Request
        • Partial Delete
    • Notify
      • Send
        • Full Request
        • Partial Request
        • Partial Delete
      • Receive
        • Full Request
        • Partial Request
        • Partial Delete
    • Write
      • Send
        • Full Request
        • Partial Request
        • Partial Delete
      • Receive
        • Full Request
        • Partial Request
        • Partial Delete
  • Result message handling
    • Handle incoming error results
    • Handle incoming success results
    • Respond with error result when processing failed
  • Acknowledgement support
    • Request
    • Respond
  • Use maximum response delay to timeout requests
Node Management
  • Detailed Discovery
    • [ ] Read Messages
      • Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
    • Reply Messages
      • Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
    • Notify Messages
      • [ ] Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
  • Destination List
    • Request and process full data
    • Response full data
    • Request and process partial data
    • Response partial data
    • Notify subscribers
  • Binding
    • Send Requests
      • Add Binding
      • Delete Binding
    • Receive Requests
      • Add Binding
      • Delete Binding
  • Subscription
    • Send Requests
      • Add Subscription
      • Delete Subscription
    • Receive Requests
      • Add Subscription
      • Delete Subscription
    • Notify subscribers
  • Use Case Discovery
    • [ ] Read Messages
      • Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
    • Reply Messages
      • Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
    • Notify Messages
      • [ ] Send
        • Full Request
        • Partial Request
      • Receive
        • Full Request
        • Partial Request
General feature implementation
  • Hearbeat Support
    • Send hearbeats
    • Receive hearbeats
Partial, selector, elements support

All list types do support processing of incoming partial messages, including selectors and elements. Sending partial messages is possible but there is no special support implemented right now.

Interfaces

Verbose logging

Use SetLogger on Service to set the logger which needs to conform to the logging.Logging interface.

Example:

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

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL