# Development of a Low-Cost Automated Demand Response Controller for Home Energy Management
## 2 Materials and Methods
### OpenADR
PULL mode is currently adopted in most equipment, presenting users with easy settings and installation. XMPP was initially used in network communication software for peer-to-peer (P2P) information exchange, showing high flexibility. Information transfer in all communications is processed between a VTN and VENs; that is, VTNs cannot directly communicate with other VTNs. Similarly, VENs cannot directly communicate with other VENs. A VTN device compulsorily asked for certification by OpenADR has to support two protocols of Simple HTTP and XMPP, while a VEN has to support at least one protocol. Figure 2: Application of OpenADR [17]. Moreover, communication between a VTN and a VEN must be established through Transport Layer Security (TLS) with Public Key Infrastructure (PKI) certification as the transmitted content information is a power system-sensitive message. OpenADR 2.0 requires two levels of security, namely standard and high. The standard level is a secure communication channel established with TLS, and the high level has to support an extra enhanced XML signature. The device with certification should at least present standard-level security encryption. A VEN device should at least support an encryption algorithm of ECC (error correcting code) or RSA. OpenADR 2.0 Profile is a flexible data model that provides convenient message delivery and exchange among power suppliers, energy aggregators, and end users. It contains two-way messages among VTN servers and VEN automation user ends and messages related to specific demand responses to reduce power consumption or demand transfer strategies. Table 1 lists the service and function support required for OpenADR 2.0 certification. OpenADR 2.0a Profile supports Limited Profile in EiEvent and simple HTTP and XMPP (optional) in EiRegisterParty. The services supported by OpenADR 2.0a Profile are explained as follows. **Event (EiEvent)**  
This is the core event of demand response. In the automated demand response process, a VTN transmits necessary information for demand response to VEN equipment through this service. The content of EiEvent follows the regulations of OASIS EI 1.0. Figure 3 shows a complete OpenADR EiEvent. There is a notification time before the event enters the active state. The duration is used to notify users involved in the demand response program, and the users will shed the load step by step during ramp-up. During the event duration, various types of signals could be dynamically sent according to actual demand requests. Finally, the load would be gradually returned to service during recovery. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **VTN** & \multicolumn{2}{c}{**VEN**} \\ \hline  & **b** & **a** & **b** & **b (Report Only)** \\ \hline Services and Functions & & & & \\ support & & & & \\ \hline EiEvent 2.0a Profile & M & M & NA & NA \\ \hline EiEvent Full Profile & M & NA & M & NA \\ \hline Eireport & M & NA & M \({}^{*}\) & M \({}^{*}\) \\ \hline EiRegisterParty & M & NA & M & M \\ \hline Transport Protocols & & & & \\ \hline Simple HTTP & M & M & O-1 & O-1 \\ \hline XMPP & M & O & O-1 & O-1 \\ \hline Security Levels & & & & \\ \hline Standard & M & M & M & M \\ \hline High & O & NA & O & O \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Functions of OpenADR 2.0a and OpenADR 2.0b.