Data from a Niagara JACE can be seamlessly mapped to Sedona Framework when it is sent to a BASSG Edge Analytics Controller (EAC). In this demo of an application built to use the EAC as a pulse meter for solar panel energy monitoring, you can see how easy this is.

Goal :

Learn how to count bool changes in pulse meter data to calculate kW and kWH using SkySpark's Computed History function.

With this function, you can sense the bool pulse and create trends, converting to a value like kW or other with a predefined multiplier.

How did we create the demo?

Within Niagara, we generated demo data for a pulse meter.

Created a demo logic: Pulse.bog

SkySpark Steps:

Within SkySpark, we generated a record and mapped it to obix. Then we historized with COV.  

Real goal is to map within device with sedona and historize it with cov.

  1. Generate Equip 
  2. Create Pulse Meter record 
  3. Create 3 records with computed history

  4. Create 2 Axon Functions

    meterCompKW2(rec, dates, opts, yield, mult:5, rollup: 5min) => do
      count: 0;
      prevVal: 0;
      history: read( pulse and meter and equipRef == rec->equipRef)
        .hisRead(dates, opts)
        .map( row => do
            v0: row["v0"]
            if (v0 == true) count = count + 1;
            val: mult * count;
            {ts: row->ts, v0: val}
        .hisRollup(max, rollup)
        .hisFindAll(val => val != null);
      if (rec.has("hisTotalized")) do
        history = => do
          con: row->v0 - prevVal;
          prevVal = row->v0;
          return {ts: row->ts, v0: con};
      history.each(row => do
        yield(row->ts, v0: row->;
    meterCompKWh(rec, dates, opts, yield) => do
      read(power and equipRef == rec->equipRef)
        .hisRead(dates, opts)
        .map( row => do
            v0: row["v0"]
            val: if (v0 == na()) na() else
            yield(row->ts+1hr, val)

    Final result

BASSG's Edge Analytics Controllers with embedded SkySpark can perform sophisticated processing tasks at the edge, close to the equipment being managed for a tight feedback loop. This example showed how an EAC can be used as a pulse meter, to pulse and calculate kW and kWH directly from an on/off pulse.  You can implement this pulse meter code today.  Check out to learn about all the other ways that EACs can serve to bring edge computing to your building control system designs.





  • No labels