Open scottyphillips-work opened 11 months ago
I also recently learned about MRA. I also think that this will contribute to greatly reducing maintenance costs in the future. I totally agree with supporting MRA!
Might be able to get some additional ideas from projects such as https://github.com/banban525/echonetlite2mqtt
The ECHONETLite Machine readable Appendix (MRA) provides a JSON formatted representation of ECHONETLite. In the second major redesign of this library, we could look up the MRA in order to parse data rather then trying to hand code objects all the time. Big job to redesign. But could be very worthwhile and save continued effort. Would also provide a built in JA translation for its natural domestic market. May also work better with Home Assistant.
https://echonet.jp/spec-en/#standard-08
MRA Structure The MRA provides:
Definitions.json
-> describes the format of echonetlite payloads.Also provides
devices
,node-profile
andsuperclass
json files. Payloads also can be described within objects, or in the definitions file.Other considerations:
One thing I am unsure of is the 'mcrules' files. (From release notes: The files in the folder MCRules are used to generate Device Descriptions for the ECHONET Lite Web API). Think these can be ignored.
Where I think version 3.0 will be different: There will be no more Python objects like 'HomeAirConditioner' etc and no more class-specific getters/setters. This is less of an issue to Home Assistant as it appears. Pychonet 2.0 currently uses class specific getter/setters merely as wrappers to
setMessage
and could be cleaned up out of the home-assistant custom component in preparation.Design Changes:
Example flow: 0x01:0x30 Home Air Conditioner. EPC: 0xA0