zwave-js / certification-backlog

Issues and discussions related to Z-Wave certification of HA + Z-Wave JS
1 stars 0 forks source link

Unknown notifications MUST be exposed to the user #37

Closed AlCalzone closed 4 months ago

AlCalzone commented 5 months ago

If a controlling node receives an unknown Notification, it MUST allow the end user to identify this notification and MAY allow the end user to assign a free-text description to that Notification.

Z-Wave JS exposes values for unknown notifications with a known notification type, the UI does not show them though - Example:

        "45-113-0-Access Control-unknown": {
          "commandClassName": "Notification",
          "commandClass": 113,
          "property": "Access Control",
          "propertyKey": "unknown",
          "endpoint": 0,
          "propertyName": "Access Control",
          "propertyKeyName": "unknown",
          "value": 49
        },
        "45-113-0-Water Valve-unknown": {
          "commandClassName": "Notification",
          "commandClass": 113,
          "property": "Water Valve",
          "propertyKey": "unknown",
          "endpoint": 0,
          "propertyName": "Water Valve",
          "propertyKeyName": "unknown",
          "value": 7
        }

Likewise, entirely unknown notifications are disabled and have to be enabled manually, even though a value has been received:

        "45-113-0-UNKNOWN_0xc0": {
          "endpoint": 0,
          "commandClass": 113,
          "commandClassName": "Notification",
          "property": "UNKNOWN_0xc0",
          "propertyName": "UNKNOWN_0xc0",
          "ccVersion": 8,
          "metadata": {
            "type": "number",
            "readable": true,
            "writeable": false,
            "label": "Unknown notification (0xc0)",
            "ccSpecific": {
              "notificationType": 192
            },
            "min": 0,
            "max": 255,
            "stateful": true,
            "secret": false
          },
          "value": 222
        },

I'd argue these should be enabled once a report is received.

TODO Home Assistant

Simply add a discovery schema for unknown properties so at least they are discovered. This is an edge case and will probably never (or very rarely) happen in practice but certification will test this.

Investigate: There's a chance that the entities are already discovered but just are disabled. Enable them by default. For the top example, check the metadata ?

AlCalzone commented 5 months ago

Update 2024-06-24: The missing metadata for the unknown events with known notification type was a bug. Will be fixed next release.