📊 Real‑Time Analytics & Diagnostics
Once OCPI events are streamed into Event Hubs and ingested by Microsoft Fabric RTI, Zynka ONE unlocks powerful analytics and operational insights. Fabric’s Eventstream and Eventhouse components enable both streaming and batch processing, while Activator rules automate responses to anomalies.
Materialised views and KQL
Zynka ONE defines a series of materialised views using Kusto Query Language (KQL) to maintain up‑to‑date aggregations. Materialised views are incremental and efficient; they update automatically as new events arrive. Examples include:
- EVSE status: Latest status of each connector. The view uses
arg_max(ts_utc)to pick the most recent event and exposes fields likestatus,power_type, andlast_updated. - Active sessions: Number of sessions currently in progress per location or per tenant. This helps monitor utilisation and detect congestion.
- Energy delivered: Total kWh delivered per charger or per tariff period. Combine this with tariff metadata to compute revenue and occupancy.
- Session durations: Average, median and percentile durations to identify outliers (e.g. vehicles occupying a charger long after charging stops).
Use KQL queries within Fabric or Azure Monitor to explore your data. For example:
-- Chargers currently out of order for more than 10 minutes
let now_utc = datetime('2025-11-14T12:00:00Z');
ocpi_events_raw
| where module == "evse_status" and payload.status == "OUTOFORDER"
| summarize last_event = arg_max(ts_utc, payload) by entityId, tenantId
| where now_utc - last_event_ts_utc > 00:10:00
Diagnostics rules (Activator)
To automatically detect issues, Zynka ONE uses Activator rules—logic apps that evaluate the streaming data and trigger notifications or remediation actions. Common diagnostic patterns include:
- Missing heartbeat: If no status update is received from a charger within 30 minutes, trigger an alert. This may indicate connectivity issues or offline hardware.
- Out‑of‑order dwell: If a connector remains in
OUTOFORDERstatus for more than 10 minutes, open a service ticket. Pair this with the location info to dispatch a technician. - Stale CDRs: If a session has ended but no CDR is received within 1 hour, raise an exception. This ensures billing data is delivered promptly【826352846409834†L1345-L1348】.
- Pre‑auth limit reached: For Direct Payment sessions, monitor energy consumed versus the pre‑authorization limit. If the limit is exceeded, automatically stop the session to avoid overcharging【661383774245363†L606-L637】.
Activator rules can call webhooks, send emails or integrate with ITSM platforms like ServiceNow or Dynamics 365 Field Service. For example, when a charger is offline, an Activator rule can create a case in ServiceNow with details such as location, EVSE UID and last heartbeat time. Once the technician resolves the issue, another event will close the case.
Dashboards & reporting
With data stored in Eventhouse, you can build rich dashboards using Power BI or Fabric visualisations:
- Charger utilisation: Heat maps showing sessions per hour/day and occupancy rates per site. Identify peak periods and plan expansions accordingly.
- Revenue & energy reports: Combine CDRs and tariffs to compute revenue, taxes and net energy delivered. Break down by tariff type (flat, time‑of‑use, dynamic) to assess pricing strategies.
- User behaviour: Analyse session start times, durations and repeat visits. Use this to tailor loyalty programmes or targeted promotions.
Use row‑level security to segregate tenants; each CPO or hub sees only its own data. Role‑based dashboards ensure sensitive information like revenue or payment details is visible only to authorised users.
Best practices
- Backfill historical data: When onboarding an existing network, ingest historical sessions and CDRs to provide continuity. Use the same envelope schema and partition keys.
- Schedule retention policies: Define retention periods for raw events and materialised views. For example, keep detailed event data for 30 days and aggregated summaries for 5 years.
- Monitor streaming health: Track ingestion lag, errors per partition and throughput using Azure Monitor. Configure alerts for spikes or drops in event flow.
- Data privacy: Apply GDPR and local privacy laws. Mask personally identifiable information in events and restrict access to user data.
By combining streaming ingestion, materialised views, diagnostics rules and dashboards, Zynka ONE turns raw OCPI events into actionable insights that drive operational efficiency and customer satisfaction.