//
// Self enumeration event (a device is describing itself)
// Sent on MQTT topic: /devices/{device_id}/events/discovery
// where {device_id} is that of the enumerated node.
//
{
  "version": "1.5.2",
  "timestamp": "2018-08-26T21:42:12.237Z",
  "family": "vendor",
  "event_no": 2,
  "refs": {
    // Numerical value with an articulated unit
    "analog-value_29": {  // Internal reference used on-prem (e.g. reference to bacnet property)
      "point": "sup_flow_actual_avo_1",
      "units": "percent",  // with units, type typically defaults to 'number'
      "writable": true,
      "description": "Basic value reading"
    },
    // Multi-state enumerated value
    "978A87C5": {
      "name": "zone_mode_msv_1",
      "possible_values": [ "Deadband Mode", "Heating Mode", "Cooling Mode" ],
      "type": "multistate"  // enumerated values defining the multistate
    },
    // Example boolean value, which is just a degenerate case of multi-state
    "ztmp_hi_alm_1": {
      "possible_values": [ "Off", "On" ],
      "type": "multistate"  // enumerated values, can be mapped to inactive/active boolean states
    },
    // General-purpose string value, e.g. for a descriptive string
    "string_value": {
      "type": "string"
    },
    // Representation of a point with unknown/arbitrary parameters
    "NClass_1": {
      "point": "notification_class",
      // 'notificaiton-class' is not a UDMI-defined type, so can't be exported outside of object-type
      "ancillary": {  // arbitrary json not codifed with a UDMI schema
        "object-type": "notification-class",
        "ack-required": [
          false,
          false,
          false
        ],
        "recipient-list": [
          {
            "fromTime": {
              "hour": 0,
              "minute": 0,
              "second": 0,
              "hundredth": 0
            },
            "toTime": {
              "hour": 23,
              "minute": 59,
              "second": 59,
              "hundredth": 99
            },
            "recipient": {
              "address": "Address [networkNumber=27000, macAddress=[64,45,41,32,ba,c0]]"
            },
            "processIdentifier": 1,
            "validDays": [
              true,
              true,
              true,
              true,
              true,
              true,
              true
            ],
            "issueConfirmedNotifications": true,
            "transitions": [
              true,
              true,
              true
            ]
          }
        ],
        "notification-class": 1,
        "priority": [
          128,
          64,
          128
        ]
      }
    }
  }
}
