This tool aims to generate various data models for the ECHONET Lite protocol from the APPENDIX Detailed Requirements for ECHONET Device Objects.
-
Input: A JSON version of the Appendix (Machine Readable Appendix) provided by the Web API Working Group of the ECHONET Consortium.
-
Output: Target data models (Device Description, Fiware Smart Data Model, s4echonet ontology, etc..) and target API documents that are compatible with Swagger.
- Java SE-1.8
- Java Swing (for GUI),
- simple-json (to parse the MRA)
- jackson (to export json-data-models)
- owlapi (to export the s4echonet ontology)
Clone the project and follow the instructions.
- Java >= 1.8
- Maven
- mvn install
-
Pattern 1: Load unstructured MRA files as input:
java -jar {combined-jar-file.jar} -i {input [.json] files} -o {output directory} -g {to enable GUI app} -f {to export EPC=0xFF for special cases}
- input files:
- Full MRA file [xxxmra.json]
- A device object file [0xxxx.json]
- MC rule file [xxx_mcrule.json]
- definition file [xxxdefinitions.json]
- output directory:
- If not specified, take the current folder as the root, generated result is at currentDir/webapi_dd folder
- input files:
-
Pattern 2: Load structured MRA folder as input:
java -jar {combined-jar-file.jar} -mra {input folder} -o {output folder} -f {to export EPC=0xFF for special cases}
- input folder: can not be empty
- . (dot) means current folder, otherwise, specific the MRA folder
- output directory:
-
If not specified, take the current folder as the root, generated result is at currentDir/webapi_dd folder
MRA Folder Structure [*root folder*] - definition [*folder*] - definitions.json [*file*] - device [*folder*] - 0x02A1.json[*file*] - ... - MCRules[*folder*] - 0x02A1_mcrule.json [*file*] - ... - nodeProfile [*folder*] - 0x0EF0.json [*file*] - superClass [*folder*] - 0x0000.json [*file*] - Other files [*file*]
-
- input folder: can not be empty
- No GUI
java -jar {combined-jar-file.jar} -i 0x0000.json 0x0001.json 0x0003.json 0x0000_mcrule.json definitions.json -o /home
- *** With GUI***
java -jar {combined-jar-file.jar} -g
The current version only supports the Device Description. Following features are coming next.
- W3C Thing Description (Completed)
- NSGIv2 Fiware Smart Device Template (Completed)
- s4echonet Ontology ( Draft version is completed, ready to release)
- swagger.yaml template for the ECHONET Lite WebAPI
Any contributions you make are greatly appreciated.
-
Fork the Project
-
Create your Feature Branch (
git checkout -b feature/aFeature
) -
Commit your Changes (
git commit -m 'commit string'
) -
Push to the Branch (
git push origin feature/aFeature
) -
Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
PHAM, Van Cu - cupham@jaist.ac.jp
This work is supported by the ECHONET Consortium:
- Special thanks to ECHONET Web API working group members for their great efforts to create the machine readable appendix