c8y-realtime

star 1

Instructions for implementing real-time data updates in Cumulocity UI components using the RealtimeService and its variants. Use when adding real-time capabilities to the UI.

Cumulocity-IoT By Cumulocity-IoT schedule Updated 5/19/2026

name: c8y-realtime description: Instructions for implementing real-time data updates in Cumulocity UI components using the RealtimeService and its variants. Use when adding real-time capabilities to the UI.

The RealtimeService is a generic abstract class which implements the interactions with the real-time API.

There are multiple classes based on this class to match the different real-time channels. These are for example:

  • AlarmRealtimeService
  • AuditRealtimeService
  • EventRealtimeService
  • MeasurementRealtimeService
  • OperationRealtimeService
  • ManagedObjectRealtimeService

Usage Example

import { Component, inject } from '@angular/core';
import { AlarmRealtimeService } from '@c8y/ngx-components';

@Component({
  selector: 'my-alarm-realtime-btn',
  template: `<button (click)="alarmRealtime.subscribe()">Subscribe</button>`,
  providers: [AlarmRealtimeService]
})
export class MyAlarmRealtimeBtnComponent {
  alarmRealtime = inject(AlarmRealtimeService);
}

This approach allows users to control the subscription via the UI, while you can still subscribe to updates in your component logic as needed.

For a more advanced example, see the tutorial component below, which demonstrates how to combine multiple realtime services and manage their subscriptions programmatically.

Install via CLI
npx skills add https://github.com/Cumulocity-IoT/cumulocity-fleet-intelligence-demos --skill c8y-realtime
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
Cumulocity-IoT
Cumulocity-IoT Explore all skills →