Introduction
Data Analytics solutions need substantial amounts of data to provide meaningful insights. One of the key hurdles in designing Analytics solutions using electricity meters has been the availability of this data. Although Itron Riva electricity meters take readings every second and are always connected to the network using the Itron Adaptive Communications Technology (ACT), transporting this amount of data in real-time over this network from millions of meters would pose many practical challenges.
Itron Riva meters have spare computational power and run standard Linux, hence some computations can be done on the meter itself. Applications can be developed and then installed on Itron Riva meters that can have access to the meter’s data, implement algorithms, and then send the results of these computations to a backend server for further analysis and/or display.
Itron’s Distributed Intelligence (DI) Software Developer Kit (SDK) enables development of such applications that can be run on Itron Riva electricity meters within an environment called an Agent. Third Party organizations (partners) who sign up to the DI program can use the SDK in a standard PC Linux environment to develop their applications. After developing and testing the application on a PC Linux system, developers can cross compile the code and test the application on a real meter. When the appliation is ready, it can be installed on the deployed meters over the air by the Utility company. The SDK ensures that applications run in a controlled environment on the meter so that they do not adversely affect the normal functioning of the meter or each other.
The SDK provides Application Programming Interfaces (APIs) that Agents running on the meter can use to access meter data, and to send real-time events (or alarms) and non-real-time data to the server. A restricted amount of persistent flash storage is available for Agents to store data locally. Additionally, Itron’s APIs provide transparent mechanisms so that developers need not worry about the network connectivity to the backend server.
This page provides a brief overview of several important topics and we recommend that you take the time to read it. However, if you are already familiar with our meter DI solution or just anxious to get started just follow these few steps to be on your way:
-
Join the Itron Developer Program. To create an account click here.
-
Request Access to DI Desktop SDK by clicking here.
-
Once you receive approval you should be granted access to the DI Desktop SDK.
-
Follow the DI Desktop SDK Getting Started Guide to download and setup the DI Desktop SDK and reference agent.
-
Develop and test your application with the DI Desktop SDK.
Resources for DI Program Participants (Please fill out an application to gain access to the DI Developer Program)
Deployment (Network) Architecture
The typical DI network architecture is shown in Figure 1.
Figure 1: DI Network Architecture
Applications, Agents and Features (Agent Management)
Each (DI) Application consists of one or more Agents. An Agent is a “container” that runs the code to implement a set of Features that comprise an application. A Feature performs some discrete function and/or produces some output such as calculating that the voltage has fallen below some threshold and raising an event. Applications (aka apps) are made up of a collection of features. Features can be a part of more than one app.
The Itron Application Management server (Itron Enterprise Application Center) is used to manage the DI Applications. The Itron Enterprise Application Center UI helps to manage the Agents, features, and applications with functions that include: Installation, Configuration, Licensing, Monitoring and Upgrade. When an Application is licensed on the Application Center, the required agents are pushed to and installed on the meter and the required features in them are started.
For more information on Agents refer to How Agents Work.
Agent Environment Resource Limits
Itron Riva electricity meters run (standard) Linux. Agents are developed in C++ and the agents run within a Linux Container (LXC) to enforce access and resource control. The DI APIs enable access to the metrology data and to communicate with the backend server. But there are resource restrictions:
-
Max network usage: Maximum data sent to the backend server per day is 10KB (kiloBytes) and 10 events for all the Agents running on the meter.
-
Max RAM usage: As per what is declared when developing the agent. This would be typically be around 800KB for an agent of medium complexity. If an agent takes more memory, it will be restarted.
-
Max CPU usage: 20% for the entire Linux container. If the agent tries to use more it will get lesser CPU timeslots and run slower.
-
Max storage usage: Maximum data storage on flash memory for each Agent is 1000KB. Flash writes should be avoided as much as possible as flash memory has a limited life in terms of write cycles. IO will be quite slow on the flash memory, compared to the RAM.
Also, when the resource usage reaches high levels, the DI Agent Monitor raises them as warnings to the backend server. These alarms are shown as notifications on the DI Agent Management (App Center) UI.
An Agent can have multiple processes. However, only one process can use the Application Services API, which is used to interact with the meter and network. Other Linux system calls are not available. uClibc library is available instead of libc. Libraries such as stdlib, math, openssl, and zip are available.
Network Communications
DI uses the existing communication mechanisms between the meter and the headend system. Events (or Alarms) will be sent to the Itron Distributed Intelligence Data Service almost in real time, but with no guaranteed delivery. Whereas Data will be sent to the Itron Distributed Intelligence Data Service once a day but with guaranteed delivery
Itron Riva DI Development and Test Process
Itron provides software development kits to make it easy to develop and test DI applications.
To help developers quickly start building Distributed Intelligence (DI) applications in an office environment Itron provides a Desktop SDK. The Desktop SDK can be used without the need for access to meter hardware, back office software, or the Itron Enterprise Application Center. Once the development and testing of the new Agent and server-side application is complete the developer will need access to the full feature SDK (aka Full SDK) to cross compile the source code of the Agent so that it runs on a real Itron Riva electricity meter. Gaining access to the Full SDK will require signing the Itron Distribution Agreement and access to a Riva environment, Riva meters, and the Itron Enterprise Application Center.
The high level process to develop an Itron Riva Distributed Intelligence are shown in the diagram and steps below.
Steps in the DI application development process:
-
Join the Itron Developer Program. To create an account click here.
-
Request Access to DI Desktop SDK by clicking here.
-
Once you receive approval you should be granted access to the DI Desktop SDK.
-
Follow the DI Desktop SDK Getting Started Guide to download and setup the DI Desktop SDK and reference agent.
-
Develop and test your application with the DI Desktop SDK.
-
Create an account in the Itron Enterprise Application Center (Note: app center instructions coming soon)
-
Submit your DI application for review through the Itron Enterprise Application Center.
-
Contact Itron Partner Enablement team to review and sign the DI App Distribution Agreement.
-
Download the Full SDK (instructions will be provided once approved).
-
Work with Itron or an Itron customer to gain access to a test environment with Riva Meters, Itron Openway Riva, and the Itron Enterprise Application Center.
-
Cross-compile your DI App and download to test meters.
-
Field test your DI App.
-
Request App Certification in the Itron Enterprise Application Center
DI Desktop SDK
DI app development starts with developing the application in a desktop development environment we call the DI Desktop SDK. The DI Desktop SDK runs in a linux desktop environment (Canonical Ubuntu 16.04 64-Bit Virtual Machine) and enables rapid development and test of a DI application. The benefits and limitations of the Desktop SDK include:
-
Enables DI app development in a Linux environment
-
Includes reference agent source code
-
No need for OpenWay Riva back office
-
No need for access to Riva meter hardware
-
No need for App Center
-
Includes metrology simulator
-
Cannot digitally sign apps – apps compiled from Desktop SDK can’t be run on a meter
Once the application has been developed and tested in the Desktop SDK environment you will want to engage Itron to submit the application for review and sign the Distribution Agreement.
The Itron Desktop SDK provides the following components:
-
A Reference Agent including full source code and compilation scripts
-
Agent Common Library and the platform libraries and header files (SDK)
-
Metrology Simulator
-
Data Connector and IoT Hub Client applications to push the simulated events or alarms (or data) from the Reference Agent to a cloud based Azure IoT Hub for further processing
In greater detail, on the Ubuntu VM the metrology simulator produces per second metrology data such as phase Voltage or Current. The Reference Agent processes this data and generates (sample) events. For example, with the the metrology simulator provided, if the voltage drops below a threshold (231V), it OPENs an event. If the voltage goes back above the threshold, it CLOSEs the event.
The Data Connector application takes these events (and any data) from the Reference Agent, parses it and inserts the results into a sqlite database. The IoT Hub Client application retrieves the results from the sqlite database and pushes it to the IoT Hub in the Azure cloud all in near real time. Once at the IoT Hub additional processing, such as a Stream Analytics Job, can be setup to push the events onto a Service Bus and into a SQL Server table all in the Azure cloud. The developer could use either of these mechanisms to build a UI to display the events or alarms to an end user. Figure 2 contains a block diagram showing the split between the components on the Ubuntu VM and in the Azure Cloud.
Figure 2: Development Environment
Note that the dependency on the IoT Hub in Azure is for initial development purposes only. In the final deployment, the messages will be directly posted to the Service Bus whose Shared Access Signature (SAS) URI is provided to the DI Subscription Service.
Building the Agent for a Meter
Once the development and testing of the new Agent and server-side application is complete a demonstration can be given to Itron. If this phase is successful, Itron will help the Developer to cross compile the source code of the Agent so that it runs on a real Itron Riva electricity meter. The process for completing the cross-compile, field test, certification, and deployment process is illustrated in the diagram below.