Docs menu

ENERGY MONITORING - FULL

Full Track: Meter It All

You chose complete control. Build your energy intelligence from scratch.

This track assumes nothing. You design the metering architecture, create the surface hierarchy, and author every query.

What you will build

ComponentScope
ConnectionsBuilding, floor, line and equipment meters
SurfacesA hierarchy from campus to equipment
Warm queriesAn energy analytics library
TeamAccess for operations, sustainability and finance
MCPAny AI client reading the library

Phase 1: Design the metering architecture

Step 1.1: Map your hierarchy

Before creating connections, map what you will monitor:

Campus / Facility
├── Building 1
│   ├── Floor 1
│   │   ├── Production Line A
│   │   └── Production Line B
│   └── Floor 2
│       ├── Office Space
│       └── Data Center
├── Building 2
└── Utilities
    ├── Chiller Plant
    └── Compressed Air

Step 1.2: Identify metering points

LevelMetersData
CampusMain utility meterTotal consumption, demand
BuildingBuilding submetersElectrical, gas, water
FloorDistribution panelsCircuit-level consumption
EquipmentIndividual metersMachine-specific usage

Step 1.3: Create connections

Ask Azi in the main panel:

"Create connections for the building meters, the production line submeters, and the chiller plant."

She proposes them. Accept each one, then Deploy: a connection is built, and registered as a device on Fathym's shared IoT hub (or your own, once your workspace has its IoT fabric), only when someone deploys. Each connection's Connection Info tab then shows the credentials your meters or gateway send with.

TIP

Hardware not ready? Add a Simulator node shaped like your meter readings. Deploy starts it, and the surfaces and queries work the same way.

Phase 2: Create the surface hierarchy

Step 2.1: Campus surface

"Create a surface for campus-wide energy monitoring, fed by every building's meters."

Azi proposes a Campus-Energy surface wired to those connections. Accept it; it is live at once.

Step 2.2: Building surfaces

SurfaceFed byPurpose
Building-1-EnergyFloor, HVAC and lighting metersBuilding breakdown
Building-2-EnergyProduction, office, support metersBuilding breakdown
Utilities-EnergyChiller, compressed air, steamCentral utilities

Step 2.3: Production surfaces

SurfaceFed byPurpose
Line-A-EnergyMotors, conveyors, line HVACLine-level allocation
Line-B-EnergyMotors, conveyors, line HVACLine-level allocation

Your surface hierarchy decides how finely your queries can break consumption down. Design it to match your reporting.

Phase 3: Build the query library

Where your data is

Device data lands in one table, Data (Devices in workspaces whose IoT fabric was set up earlier), with each payload as JSON in RawData. The queries unpack it with todynamic(RawData). The field names (meterType, kWh, building, productionLine) are examples; use your meters' own. Ask Azi to sample with Data | take 5 first. The queries below are examples to adapt, not tested against your data.

QueryPurposeRead
daily-consumptionDaily kWh by buildingDaily
monthly-costMonthly cost by lineMonthly
peak-demandPeak demand analysisOn demand
baseline-comparisonCurrent against baselineMonthly
sustainability-scope2Scope 2 emissionsQuarterly

Step 3.1: Daily consumption by building

"Create a warm query for daily electricity consumption broken down by building."

Data
| where EnqueuedTime > ago(30d)
| extend Payload = todynamic(RawData)
| where tostring(Payload.meterType) == "Electric"
| summarize DailyKWh = sum(todouble(Payload.kWh)) by Day = bin(EnqueuedTime, 1d), Building = tostring(Payload.building)
| order by Day asc, Building asc

Step 3.2: Cost allocation by line

"Build a query that allocates this month's energy cost to each production line by its share of consumption."

let Readings = Data
| where EnqueuedTime > ago(30d)
| extend Payload = todynamic(RawData)
| extend Line = tostring(Payload.productionLine), KWh = todouble(Payload.kWh);
let Total = toscalar(Readings | summarize sum(KWh));
Readings
| summarize LineConsumption = sum(KWh) by Line
| extend Percentage = LineConsumption / Total * 100
| extend AllocatedCost = Percentage / 100 * 50000 // monthly energy budget
| order by AllocatedCost desc

Step 3.3: Scope 2 emissions

"Create a query for Scope 2 emissions using our grid emission factor."

Data
| where EnqueuedTime > ago(365d)
| extend Payload = todynamic(RawData)
| where tostring(Payload.meterType) == "Electric"
| summarize TotalKWh = sum(todouble(Payload.kWh)) by Month = startofmonth(EnqueuedTime)
| extend EmissionFactor = 0.42 // kg CO2 per kWh - use your grid's factor
| extend Scope2Tonnes = TotalKWh * EmissionFactor / 1000
| order by Month asc

AZI

Every emissions calculation becomes a saved query. When auditors ask how you calculated your carbon footprint, you show them the exact formula.

Phase 4: Give your team access

The owner adds teammates in Workspace -> Team Members: enter their email and click Invite. They are members at once. No AI can invite members, and the role picker in that window is not saved - what a member can change is set by access rights.

TeamWhat they need
Engineering, ITWorkspace.Deploy to build connections; Workspace.Access.Manage to manage access
SustainabilityMembership: any member can save and accept queries; some changes need a management right (see Permissions)
FinanceAn API key from APIs -> API Keys, carrying only the rights its reports need
OperationsMembership, to read the surfaces and queries

Access rights apply to the whole workspace; there is no per-surface permission. See Permissions.

Phase 5: Connect any AI over MCP

The OpenX MCP Server is at https://openx.fathym.com/ox-api/mcp. Sign in through the browser: in Claude.ai or ChatGPT, add a custom connector and paste the URL; for coding agents, run fai mcp install https://openx.fathym.com/ox-api/mcp --name openx and sign in when the browser opens. Setup for each client is in Bring Any AI.

Then ask:

"Which areas have the highest energy intensity, and what's driving it?"

The AI reads your saved queries with call_api. If it wants to build something new, it proposes it with manage_proposals, and a person accepts.

What you built

ComponentCount
Connections5 or more
Surfaces6 or more
Warm queries5
Team accessSet
MCP clients1 or more

Before and after

BeforeAfter
Spreadsheet emissions reportsSaved queries anyone on the team can read
"Trust me" allocationsOne allocation query, the same for everyone
Scattered meter dataOne workspace, organized by surface

Next steps

If you want to...Go to...
Try the hybrid trackHybrid track
See query patternsQuery Patterns
Connect more AI clientsBring Any AI
Explore manufacturingManufacturing
On this page