Eventing in the Miele 3rd Party API
The Miele 3rd Party API uses Server-Sent Events (SSE) to deliver real-time updates from the backend to subscribed clients. This eventing mechanism allows external applications to listen for changes,such as device status updates or notifications, without the need for constant polling.
SSE is a lightweight, one-way communication protocol over HTTP, ideal for scenarios where the server needs to push data to the client as soon as something happens.
Note: To consume events via SSE, your client must support persistent HTTP connections and handle incoming event streams according to the EventSource specification.
The API provides two event subscription options for monitoring appliance state changes
All Appliances Subscription
Subscribe to this endpoint to receive an event whenever any connected appliance changes its state.
Single Appliance Subscription
Subscribe to this endpoint to receive an event whenever a specific appliance changes its state.
Event Types
The API sends events to notify clients about different kinds of updates. These updates include information about either a single device or all devices in the account. There are three event types:
PING
Used as a heartbeat signal to verify that the connection between the client and the event stream is active.
Details:
- Sent periodically by the server if no other event has been transmitted within 20 seconds.
IDENT
Provides identification and state information for either a single appliance or all appliances.
Details:
- Initially sent after a successful subscription.
- Sent again whenever the status of the subscribed appliance(s) changes.
ACTION
Indicates which actions are currently accepted by a single appliance or all appliances.
Details:
- Initially sent after a successful subscription.
- Includes the current set of executable actions for the device(s).
- Allows clients to determine what operations can be performed at this moment.