Examples.md 5.77 KB

Examples and Contributions

A simple example
Multi Socket Electrical-Extension-Block

A very simple SDT example

In the ideal case, a large organization or SDO would define a widely-applicable set of ModuleClasses, each of which could be used as needed to compose the description of a complex device. In order to show the appoach, this section will create a few example ModuleClasses based on - or inspired by - featues in the Echonet Lite protocol. Please note that the examples shown in this document are very "cut down" and by no means represent a true representation of Echonet Lite.

The Echonet Consortium has standardized their specifications within IEC/ISO (IEC62394, ISO/IEC24767-1, ISO/IEC24767-2, IEC62480, ISO/IEC14543-4-1, ISO/IEC14543-4-2, IEC62457) and they provide a comprehensive collection of various types of home appliances relevant to SmartGrid applications as ECHONET Device objects (see https://echonet.jp/spec_object_rf_en/ ).

For the example in this document, to show re-use of ModuleClass definitions, two complex devices are chosen which have some common features and hence could be expected to both use some of the same ModuleClasses: an air conditioner and a washing machine.

Funtionality Air Conditioner Washing Machine
operationStatus operates on/off operates on/off
measuredCumulativePowerConsumption the cumulative power consumption the cumulative power consumption
installationLocation this sets/reads a string text describing the location (room) of the air-conditioner. this sets/reads a string text describing the location (room) of the washing machine.
setTimer (not applicable. there is no preset start for an air-conditioner) This sets/reads use the on/off timer

Based on the simplified example above, the two appliances will need the ModuleClasses below:

  • air-conditioner: operationStatus, measuredCumulativePowerConsumption, installationLocation;
  • washing-machine: operationStatus, measuredCumulativePowerConsumption, and setTimer.

    <ModuleClass name="operationStatus">
        <Data>
            <DataPoint name="operationStatus" writable="true">
                <Doc>This property sets/reads the ON/OFF status.</Doc>
                    <DataType>
                        <SimpleType type="boolean"/> 
                    </DataType>
            </DataPoint>
        </Data>
        <Events>
            <Event name="operationStatus">
            </Event>
        </Events>
    </ModuleClass>
    
    <ModuleClass name="measuredCumulativePowerConsumption">
        <Data>
            <DataPoint name="measuredCumulativePowerConsumption" writable="false">
                <Doc>This indicates cumulative power consumption of the device in increments of 0.001kWh.</Doc>
                <DataType>
                    <SimpleType type="integer"/>
                </DataType>
            </DataPoint>
        </Data>
    </ModuleClass>
    
    <ModuleClass name="installationLocation">
        <Data>
            <DataPoint name="installationLocation" writable="true">
                <Doc>This property indicates the installation location</Doc>
                <DataType>
                    <SimpleType type="string"/>
                </DataType>
            </DataPoint>
        </Data>
        <Events>
            <Event name="installationLocation"> </Event>
        </Events>
    </ModuleClass>
    
    <ModuleClass name="onTimerSetting">
        <DataPoint name="onTimer" writable="true">
            <Doc>Timer value (HH:MM)</Doc>
            <DataType>
                <SimpleType type="time"/>
            </DataType>
        </DataPoint>
    </ModuleClass>

The structure and the according SDT now looks like this:

Example1.SDT
Namespace information
Modules (contains ModuleClasses)
operationStatus
  • measuredCumulativePowerConsumption
  • installationLocation
  • onTimerSetting
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!-- Example1 SDT inspired by some Echonet Lite examples -->
    <Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
        xmlns:xi="http://www.w3.org/2001/XInclude"
        id="example1.SDT">

    <Modules>
    <!-- Various examples for module classes -->
    <ModuleClass name="operationStatus">
        <Data>
            <DataPoint name="operationStatus" writable="true">
                <Doc>This property sets the ON/OFF status.</Doc>
                    <DataType>
                        <SimpleType type="boolean"/> 
                    </DataType>
            </DataPoint>
        </Data>
        <Events>
            <Event name="operationStatus">
            </Event>
        </Events>
    </ModuleClass>

    <ModuleClass name="installationLocation">
        <Data>
            <DataPoint name="installationLocation" writable="true">
                <Doc>This property indicates the installation location</Doc>
                <DataType>
                    <SimpleType type="string"/>
                </DataType>
            </DataPoint>
        </Data>
        <Events>
            <Event name="installationLocation"> </Event>
        </Events>
    </ModuleClass>

    <ModuleClass name="measuredCumulativePowerConsumption">
        <Data>
            <DataPoint name="measuredCumulativePowerConsumption" writable="false">
                <Doc>This indicates cumulative power consumption of the device in increments of 0.001kWh.</Doc>
                <DataType>
                    <SimpleType type="integer"/>
                </DataType>
            </DataPoint>
        </Data>
    </ModuleClass>

    <ModuleClass name="onTimerSetting">
        <DataPoint name="onTimer" writable="true">
            <Doc>Timer value (HH:MM)</Doc>
            <DataType>
                <SimpleType type="time"/>
            </DataType>
        </DataPoint>
    </ModuleClass>
        </Modules>
    </Domain>

Multi Socket Electrical-Extension-Block

This example is a specification for an imaginged device, a connected extension block with multiple power socket where each of the sockets are modeled as a separate SubDevice.

mseeb.xml