Filtering On-Demand Read Payloads

By default, the On-Demand Read command is initiated for a specific meter (device) and returns readings (measurement data) for each register or channel (measuring component) on the meter. However, in some circumstances, an implementation may not want measurements returned for every channel. For instance, they may only want or need billing-related data, or only a subset of the data recorded by the meter.

Measurement payloads received via On-Demand Read commands can be filtered based on unit of measure (UOM) by adding custom logic to the XLS files used to send and receive On-Demand Read command.

This filtering can be implemented by editing the appropriate XSL to include a variable containing a list of "approved UOMs" list and logic that filters the payload based on the "approved list" variable.

Examples

The lines noted by “<!-- List of approved UOMS -->” and “<!-- UOM Filtering here -->” in the following excerpts from Landis+Gyr XSL files illustrate how the files can be edited to apply UOM filtering.

L+G Reading Changed Notification Request (D3-ReadingChgNotifRequest.xsl)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="soap11 soap12 ns1" xmlns:ns1="http://www.multispeak.org/Version_3.0" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:import href="D3-MultiSpeakMsgHeader.xsl"/>
    <!-- List of approved UOMS -->
    <xsl:variable name="Approved_UOMs">|kWh|</xsl:variable>
  <xsl:template match="soap11:Envelope">
    <xsl:apply-templates select="//ns1:ReadingChangedNotification"/>
    ...
<xsl:template match="ns1:readingValues">
  <xsl:for-each select="./ns1:readingValue">
    <readingValue>
      <extensions>
        <xsl:value-of select="./ns1:extensions"/>
      </extensions>
      <extensionsList>
        <xsl:apply-templates select="./ns1:extensionsList"/>
      </extensionsList>
      <units>
        <xsl:value-of select="./ns1:units"/>
      </units>
      <value>
        <xsl:value-of select="./ns1:value"/>
      </value>
      <!-- UOM Filtering here -->
      <xsl:if test="contains($Approved_UOMs, concat('|', ./ns1:name , '|'))">
        <name>
          <xsl:value-of select="./ns1:name"/>
        </name>
      </xsl:if>
      <dateTime>
        <xsl:value-of select="./ns1:dateTime"/>
      </dateTime>
    </readingValue>
  </xsl:for-each>
</xsl:template>
...

SGG L+G CIM AsyncReply MeterReadings Request XSL (D3-CIMMeterReadingRequest.xsl)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="xsl env sec msg mtr ede xsi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ede="http://iec.ch/TC57/2009/EndDeviceEvents#" xmlns:mtr="http://iec.ch/TC57/2009/MeterReadings#" xmlns:msg="http://www.iec.ch/TC57/2008/schema/message" xmlns:sec="http://www.landisgyr.com/iec61968/2010/03" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="yes" encoding="utf-8" method="xml"/>
  <!-- List of approved UOMS -->
  <xsl:variable name="Approved_UOMs">|kWh|</xsl:variable>
<xsl:template match="env:Envelope">
  <xsl:apply-templates select="./env:Body/msg:ResponseMessage"/>
</xsl:template>
...

<xsl:template match="mtr:Readings">
  <xsl:if test="string-length(./*) > 0">
    <Readings>
      <timeStamp>
        <xsl:value-of select="./mtr:timeStamp"/>
      </timeStamp>
      <xsl:apply-templates select="./mtr:value" mode="copyif"/>
      <xsl:for-each select="./ReadingQualities[string-length(./mtr:quality) > 0]">
        <ReadingQualities>
          <quality>
            <xsl:value-of select="./mtr:quality"/>
          </quality>
        </ReadingQualities>
      </xsl:for-each>
      <xsl:if test="string-length(./mtr:ReadingType/@ref) > 0">
        <!-- UOM Filtering here -->
        <xsl:if test="contains($Approved_UOMs, concat('|', ./mtr:ReadingType/@ref, '|'))">
          <ReadingTypeRef>
            <xsl:value-of select="./mtr:ReadingType/@ref"/>
          </ReadingTypeRef>
        </xsl:if>
      </xsl:if>
    </Readings>
  </xsl:if>
</xsl:template>
...

Head End System XSL Files

The table below lists the XSL files that can be used to filter payloads using this approach for each head end system.

XSL files can be edited using the Managed Content portal.

Head End System

XSL

Where Used

Landis+Gyr

D3-CIMMeterReadingRequest.xsl

Inbound Web Service (CIM Service Callback)

Landis+Gyr

D3-ReadingChgNotifRequest.xsl

Inbound Web Service (Reading Changed Notification (Callback))

Sensus

D6-ReadingChgNotifRequest.xsl

Inbound Web Service (Sensus MultiSpeak CB_​Server Interface)

Silver Spring Networks

D7-GetMtrRdRsByJobIDResp.xsl

External System Message XSL (provided by implementation)