The Experiences about OpenADR-based architecture
Slide
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8981214/pasted-from-clipboard.png)
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~)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/6823935/pasted-from-clipboard.png)
OpenADR標準與介紹
Open Automated Demand Response
OpenADR
-
A Research Standard
-
Founded by North American research labs
-
1.0a
-
2.0b
OpenADR Scenario
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8943935/pasted-from-clipboard.png)
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)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8944033/pasted-from-clipboard.png)
VEN Registration(Part 1)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945162/pasted-from-clipboard.png)
VEN Sends oadrQueryRegistration
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945174/pasted-from-clipboard.png)
VEN Receives oadrCreatedPartyRegistration
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945194/pasted-from-clipboard.png)
VEN Registration(Part 2)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945207/pasted-from-clipboard.png)
VEN Sends oadrCreatePartyRegistration
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945223/pasted-from-clipboard.png)
VEN Receives oadrCreatedPartyRegistration
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945225/pasted-from-clipboard.png)
VEN Poll & Event
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945229/pasted-from-clipboard.png)
VEN Sends oadrPoll
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945236/pasted-from-clipboard.png)
VEN Receives oadrResponse
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945240/pasted-from-clipboard.png)
VEN Receives oadrDistributeEvent
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945246/pasted-from-clipboard.png)
VEN Receives oadrDistributeEvent
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945249/pasted-from-clipboard.png)
VEN Receives oadrDistributeEvent
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945251/pasted-from-clipboard.png)
VEN Receives oadrDistributeEvent
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945255/pasted-from-clipboard.png)
VEN Receives oadrDistributeEvent
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945256/pasted-from-clipboard.png)
VEN Report
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945257/pasted-from-clipboard.png)
VEN Sends oadrRegisterReport
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945260/pasted-from-clipboard.png)
VEN Receives oadrCreateReport
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945261/pasted-from-clipboard.png)
VEN Sends oadrCreatedReport
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945265/pasted-from-clipboard.png)
VEN Receives oadrResponse
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945266/pasted-from-clipboard.png)
VEN Sends oadrUpdateReport
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945272/pasted-from-clipboard.png)
VEN Receives oadrUpdatedReport
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945276/pasted-from-clipboard.png)
VEN Opt
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945281/pasted-from-clipboard.png)
VEN Sends oadrCreateOpt
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945283/pasted-from-clipboard.png)
VEN Receives oadrCreatedOpt
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945286/pasted-from-clipboard.png)
VEN device Identification Issue
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945292/pasted-from-clipboard.png)
VEN device Identification Issue
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945316/pasted-from-clipboard.png)
VEN device Identification Issue
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945319/pasted-from-clipboard.png)
VEN device Identification Issue
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945326/pasted-from-clipboard.png)
VEN device Identification(By their VEN name)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945329/pasted-from-clipboard.png)
VEN device Identification(Use fixed VEN ID)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945331/pasted-from-clipboard.png)
VEN device Identification(By certificate)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945333/pasted-from-clipboard.png)
Application Error Codes
Application Error Codes
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8945338/pasted-from-clipboard.png)
接手開發一路辛酸心得
故事是這樣的......
Development Team
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/5843358/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/5843364/pasted-from-clipboard.png)
PM
工程師A(VTN)
我
工程師B(VEN)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/7838347/未命名.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/5843358/pasted-from-clipboard.png)
有一天......
工程師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?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8983719/multiple_vens.drawio.png)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8984519/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8984520/pasted-from-clipboard.png)
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
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8984526/pasted-from-clipboard.png)
應用情境
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8984552/pasted-from-clipboard.png)
User Scenario in Foreign Country
User Scenario in Taiwan
![](https://s3.amazonaws.com/media-p.slid.es/uploads/404993/images/8984588/openadr_user_scenario_tw.drawio.png)
References
Thanks!
MOPCON 2021
By peter279k
MOPCON 2021
The Experiences about OpenADR-based architecture
- 860