How to model fault messages

Hi,

I have nearly completed my new binding for wolf heating systems.
One last thing is not clear for me:

The Heating system provides fault messages. I get a list with current messages and a list with past messages:

{
  "MessagesChanged": true,
  "LastRead": "2021-05-23T11:39:18.7947672Z",
  "CurrentMessages": [],
  "HistoryMessages": [
    {
      "Id": 4282,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-05T17:55:47",
      "OutgoingTimeLocal": "2020-02-06T06:48:18",
      "Active": false,
      "Index": 0,
      "Device": "HG <1>"
    },
    {
      "Id": 4283,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-05T17:20:42",
      "OutgoingTimeLocal": "2020-02-05T17:22:48",
      "Active": false,
      "Index": 1,
      "Device": "HG <1>"
    },
    {
      "Id": 4284,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-05T07:45:26",
      "OutgoingTimeLocal": "2020-02-05T08:05:26",
      "Active": false,
      "Index": 2,
      "Device": "HG <1>"
    },
    {
      "Id": 4285,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-04T18:32:59",
      "OutgoingTimeLocal": "2020-02-04T20:38:57",
      "Active": false,
      "Index": 3,
      "Device": "HG <1>"
    },
    {
      "Id": 4286,
      "ErrorCode": 52,
      "Description": "Max. Speicherladezeit",
      "OccurTimeLocal": "2020-02-04T17:46:57",
      "OutgoingTimeLocal": "2020-02-04T17:52:56",
      "Active": false,
      "Index": 4,
      "Device": "HG <1>"
    },
    {
      "Id": 4287,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-04T15:40:57",
      "OutgoingTimeLocal": "2020-02-04T17:40:57",
      "Active": false,
      "Index": 5,
      "Device": "HG <1>"
    },
    {
      "Id": 4288,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-04T08:30:56",
      "OutgoingTimeLocal": "2020-02-04T15:27:56",
      "Active": false,
      "Index": 6,
      "Device": "HG <1>"
    },
    {
      "Id": 4289,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-04T06:48:56",
      "OutgoingTimeLocal": "2020-02-04T07:11:56",
      "Active": false,
      "Index": 7,
      "Device": "HG <1>"
    },
    {
      "Id": 4290,
      "ErrorCode": 107,
      "Description": "Druck Heizkreis",
      "OccurTimeLocal": "2020-02-03T19:55:54",
      "OutgoingTimeLocal": "2020-02-03T20:01:54",
      "Active": false,
      "Index": 8,
      "Device": "HG <1>"
    }
  ],
  "DeviceFaultMessages": []
}

What is the best way to model this for openHAB?

My two cents on that:

I would raise a standard message (in this case probably a WARN message) for each current fault message.
Such message would show in case of the default settings in the logs ( so no need to handle the history messages, because they are already logged).

You can also send them to a set of channels you’ve defined, e.g. errorCode, errorDescription, errorDevice, etc. This would allow users to link them to items and then display them, consume them in rules, etc.
If the messages are related to system faults rather than communication faults, this is probably the way to go.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.