TelemetryCollector-Api for developers

Good to know

Not all console messages are output in debug mode.

During the HP2023 beta phase, I already noticed that no console message is output for classes that inherit directly from the “Homey.SimpleClass”. I reported this to Athom and received the response “It works as designed”.

But the TelemetryCollector-Api sends the message to the agents in any case.

Enhancement of the log message

Each message text is automatically enhanced by the api with the class name and, if available, the name of the device.

this.logInfo('Initialized')

‘[ClassName] > [Message]’ result: ’ MyApp > Initialized’

‘[ClassName] > [DeviceName] > [Message]’ result: ‘MyDevice > Sample Device > Initialized’

Log message and metadata.

Metadata is added to each log message. These can be used by the observability servers as filters (labels).

Example:

{
  level: "debug",
  message: "PlayerDevice > Büro 31 Audio > setUnavailable()",
  timestamp: "2025-03-01T09:20:28.364Z",
  metadata: {
    id: "89e4cf57-29b0-4f38-89ff-0269e04271ea",
    app: "WiiM",
    appID: "org.cflat-inc.wiim",
    facility: "17",
    facilityName: "Device",
    class: "PlayerDevice",
    deviceID: "FF98F09C-74E9-46A5-07FF-155EFF98F09C",
    deviceName: "Büro 31 Audio",
  },
}