The Experiences about OpenADR-based architecture
Slide

Outline
-
About me
-
OpenADR標準與介紹
-
接手開發一路辛酸心得
-
研究原本的架構並加以改良的心路歷程
-
開源的解決方案----OpenLEADR介紹
About me
- Peter
- GitHub
- Active open source contributor
-
An associate engineer
- DevOps
- Back-end
- System Architecture Researching
- Web Application Security
- PHP, Python and JavaScript
- Smart Grid Technology (2017~2021)
- Database, Data platform architecture (2021~)

OpenADR標準與介紹
Open Automated Demand Response
OpenADR
-
A Research Standard
-
Founded by North American research labs
-
1.0a
-
2.0b
OpenADR Scenario

OpenADR Roles
-
VTN, Virtual Top Node (server)
-
Aggregator
-
Utility
-
Power Station System Server
-
-
VEN, Virtual End Node (client)
-
Aggregator
-
Device
-
Smart Meter
-
Embedded Device
-
-
更多OpenADR 介紹
OpenADR 重要Specs
-
VEN Registration
-
VEN Poll & Event
-
VEN Pull & Event
-
VEN Report
-
VEN Opt
-
VEN device Identification
-
Application Error Codes
-
Communication Modes
-
Network Communication Protocol
-
Data Format
VEN Registration(Part 1)

VEN Registration(Part 1)

VEN Sends oadrQueryRegistration

VEN Receives oadrCreatedPartyRegistration

VEN Registration(Part 2)

VEN Sends oadrCreatePartyRegistration

VEN Receives oadrCreatedPartyRegistration

VEN Poll & Event

VEN Sends oadrPoll

VEN Receives oadrResponse

VEN Receives oadrDistributeEvent

VEN Receives oadrDistributeEvent

VEN Receives oadrDistributeEvent

VEN Receives oadrDistributeEvent

VEN Receives oadrDistributeEvent

VEN Report

VEN Sends oadrRegisterReport

VEN Receives oadrCreateReport

VEN Sends oadrCreatedReport

VEN Receives oadrResponse

VEN Sends oadrUpdateReport

VEN Receives oadrUpdatedReport

VEN Opt

VEN Sends oadrCreateOpt

VEN Receives oadrCreatedOpt

VEN device Identification Issue

VEN device Identification Issue

VEN device Identification Issue

VEN device Identification Issue

VEN device Identification(By their VEN name)

VEN device Identification(Use fixed VEN ID)

VEN device Identification(By certificate)

Application Error Codes
Application Error Codes

接手開發一路辛酸心得
故事是這樣的......
Development Team


PM
工程師A(VTN)
我
工程師B(VEN)


有一天......
工程師B要請長(ㄔㄢˇ)假
你要負責VEN專案
接手VEN專案
專案結構
C + PHP + Go
VEN傳輸→C
VEN API service→Go
ven-web Dockerfile?
VEN網頁→PHP
Compile C & Run
Then....
Segmentation fault
(core dumped)
Why?
configuration setting issue......
But she doesn't tell me......
Environment is not consistency...
ven-web Dockerfile?
COPY VEN-Comm-pull /root
Fix some C codes...
OpenADR standard implementation issue
C codes are not easy to fix...
Writing Dockerfile
Building Docker image
Make environment consistency
Compiling, Building and environment setup
VEN傳輸→openadr-ven
VEN API service→ven-rest
Architecture
Deploy 30 VENs on same machine
How?

Docker-based architecture
Run 30 times docker run commands?
Run 30 times configure
Nginx subdomain?
Run 30 times configure
subdomain DNS Record?
No, I'm lazy guy.
Using Bash script to save my life.
Deployment Steps
-
Export related Docker images
-
Import related Docker images
-
Setup credential settings file
-
Creating VEN REST token lists
-
Creating Cloudflare API token setting file
-
-
Configure Nginx subdomain
-
Configure subdomain DNS record via Cloudflare API
Why not using
container orchestration?
K8s, K3s, MicroK8s.......
Reasons


Hating OpenADR standard development?
You should checkout OpenLEADR!
What's OpenLEADR?
OpenLEADR
-
Founded by Linux Energy Foundation
-
Repository is available on GitHub
-
OpenLEADR Introduction Video
-
Docker image version
-
Full VTN and VEN supports

應用情境

User Scenario in Foreign Country
User Scenario in Taiwan

References
Thanks!
MOPCON 2021
By peter279k
MOPCON 2021
The Experiences about OpenADR-based architecture
- 1,069