|
DLI EPCR7 Object Model Reference
|
| object | mqtt/ |
| Object representing the MQTT client configuration | |
Retrieving the value is denied if not administrative user
This object contains the following items:
Sample uom library write command:
uom.mqtt=<...>
Sample uom library read command:
print(uom.dump(uom.mqtt))
⇒
<...>
| sum (boolean) | mqtt/enabled/ |
| MQTT client enable status | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Enabled | The feature is enabled | |
| constant false | Disabled | The feature is disabled | |
Sample requests read command:
print(requests.get('http://192.168.0.100/restapi/mqtt/enabled/',auth=auth,headers=headers).json())
⇒
True
Sample CLI write command:
uom set "mqtt/enabled" "true"
| array | mqtt/outlets/ |
| Properties related to exposing outlets via MQTT | |
The value is subject to the following constraints: length of the value is equal to length of outlets
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This array represents a value in persistent storage.
This array contains Outlet MQTT configuration elements.
Sample uom library read command:
print(uom.dump(uom.mqtt.outlets))
⇒
Sample uom library outlet MQTT configuration creation command:
uom.insert(uom.mqtt.outlets,2,{allow_read=false,allow_write=true,qos=1,topic_subtree="ir16H8dWqZ"})
See also Outlet MQTT configuration settings: Outlet MQTT configuration
| object | mqtt/outlets/N/ |
| Properties related to exposing the outlet via MQTT | |
The value is subject to the following constraints: outlets[index of the value]
This object contains the following items:
| topic_subtree | Topic subtree, if any |
| allow_read | Allow read |
| allow_write | Allow write |
| qos | State subscription and report QoS |
Sample CLI write command (note that outlet_mqtt_configuration_index is a variable):
uom set "mqtt/outlets/${outlet_mqtt_configuration_index}" "{\"allow_read\":true,\"topic_subtree\":\"rz6fRieUq\",\"qos\":0,\"allow_write\":true}"
Sample requests read command (note that _outlet_mqtt_configuration_index is a variable):
print(requests.get('http://192.168.0.100/restapi/mqtt/outlets/'+str(_outlet_mqtt_configuration_index)+'/',auth=auth,headers=headers).json())
⇒
{'allow_read': False, 'topic_subtree': 'wVxDd', 'qos': 1, 'allow_write': False}
| sum (optional string) | mqtt/outlets/N/topic_subtree/ |
| MQTT topic subtree (relative to the topic root), if any | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant null | Outlet index-based | Use 'outlets/'+the 0-based outlet index as topic subtree | |
| string | Topic subtree | MQTT topic subtree (relative to the topic root) | |
Sample JS request read command (note that _outlet_mqtt_configuration_index is a variable):
request.get({url:"mqtt/outlets/"+_outlet_mqtt_configuration_index.toString()+"/topic_subtree/"},function(error,response,body) {console.log(body)});
⇒
"/OF/pfrVX"
Sample CLI read command (note that outlet_mqtt_configuration_index is a variable):
uom get "mqtt/outlets/${outlet_mqtt_configuration_index}/topic_subtree"
⇒
"Wat50rO"
| sum (boolean) | mqtt/outlets/N/allow_read/ |
| Outlet state is broadcasted via MQTT | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Enabled | The feature is enabled | |
| constant false | Disabled | The feature is disabled | |
Sample uom library read command (note that _outlet_mqtt_configuration_index is a variable):
print(uom.dump(uom.mqtt.outlets[_outlet_mqtt_configuration_index].allow_read))
⇒
false
Sample JS request read command (note that _outlet_mqtt_configuration_index is a variable):
request.get({url:"mqtt/outlets/"+_outlet_mqtt_configuration_index.toString()+"/allow_read/"},function(error,response,body) {console.log(body)});
⇒
true
| sum (boolean) | mqtt/outlets/N/allow_write/ |
| Outlet state can be changed via MQTT | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Enabled | The feature is enabled | |
| constant false | Disabled | The feature is disabled | |
Sample curl write command (note that :outlet_mqtt_configuration_index is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "false" "http://192.168.0.100/restapi/mqtt/outlets/:outlet_mqtt_configuration_index/allow_write/"
Sample uom library read command (note that _outlet_mqtt_configuration_index is a variable):
print(uom.dump(uom.mqtt.outlets[_outlet_mqtt_configuration_index].allow_write))
⇒
false
| sum (enumerated number) | mqtt/outlets/N/qos/ |
| Quality of service when subscribing to and broadcasting outlet state | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant 0 | At most once | Message should be delivered at most once | |
| constant 1 | At least once | Message should be delivered at least once | |
| constant 2 | Exactly once | Message should be delivered exactly once | |
Sample JS request read command (note that _outlet_mqtt_configuration_index is a variable):
request.get({url:"mqtt/outlets/"+_outlet_mqtt_configuration_index.toString()+"/qos/"},function(error,response,body) {console.log(body)});
⇒
2
Sample CLI write command (note that outlet_mqtt_configuration_index is a variable):
uom set "mqtt/outlets/${outlet_mqtt_configuration_index}/qos" "0"
| sum (string) | mqtt/broker_address/ |
| Host name or IP address of the MQTT broker to connect to | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| string | Hostname | Hostname | the value matches ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]).)*([A-Za-z]([A-Za-z0-9-]*[A-Za-z0-9])?|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z]([A-Za-z0-9-]*[A-Za-z0-9])?)$ |
| string | IPv4 address | IPv4 address in dotted quad notation | the value matches ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ |
| string | IPv6 address | IPv6 address in colon notation | the value matches ^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$ |
Sample curl read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/mqtt/broker_address/"
⇒
"mkBE.yZOTN9A.example.com"
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"183.3.250.0\"" "http://192.168.0.100/restapi/mqtt/broker_address/"
| sum (optional number) | mqtt/broker_port/ |
| Port of the MQTT broker to connect to, if any | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant null | Use default port | Connect to port 1883 when SSL is not used, port 8883 if SSL is used | |
| number | MQTT broker port | Port of the MQTT broker to connect to | all of the following is true: |
Sample CLI read command:
uom get "mqtt/broker_port"
⇒
null
Sample requests write command:
requests.put('http://192.168.0.100/restapi/mqtt/broker_port/',auth=auth,headers=headers,json='898')
| sum (boolean) | mqtt/use_ssl/ |
| Use SSL when connecting to the MQTT broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Enabled | The feature is enabled | |
| constant false | Disabled | The feature is disabled | |
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "true" "http://192.168.0.100/restapi/mqtt/use_ssl/"
Sample CLI read command:
uom get "mqtt/use_ssl"
⇒
true
| string | mqtt/username/ |
| Username to use when connecting to the MQTT broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"userKY9Vnm\"" "http://192.168.0.100/restapi/mqtt/username/"
Sample JS request read command:
request.get({url:"mqtt/username/"},function(error,response,body) {console.log(body)});
⇒
"userDyz1"
| string | mqtt/password/ |
| Password to use when connecting to the MQTT broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
This string should be displayed in a secure manner.
Sample JS request read command:
request.get({url:"mqtt/password/"},function(error,response,body) {console.log(body)});
⇒
"5bFUZf&!"
Sample requests read command:
print(requests.get('http://192.168.0.100/restapi/mqtt/password/',auth=auth,headers=headers).json())
⇒
'ELgcGkUEy7No'
| string | mqtt/topic_root/ |
| Topic root to use for all messages | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request read command:
request.get({url:"mqtt/topic_root/"},function(error,response,body) {console.log(body)});
⇒
"pgFX6uzTv"
Sample CLI write command:
uom set "mqtt/topic_root" "\"pdcG9J\""
| string | mqtt/connect_topic/ |
| Topic of the message to send on initial connection to broker (not relative to the topic root) | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request read command:
request.get({url:"mqtt/connect_topic/"},function(error,response,body) {console.log(body)});
⇒
"6jdt"
Sample uom library read command:
print(uom.dump(uom.mqtt.connect_topic))
⇒
"1MVdz"
| string | mqtt/connect_payload/ |
| Payload of the message to send on initial connection to broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample curl read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/mqtt/connect_payload/"
⇒
"ID0"
Sample requests read command:
print(requests.get('http://192.168.0.100/restapi/mqtt/connect_payload/',auth=auth,headers=headers).json())
⇒
'ZWU8Ek'
| sum (enumerated number) | mqtt/connect_qos/ |
| Quality of service for the message to send on initial connection to broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant 0 | At most once | Message should be delivered at most once | |
| constant 1 | At least once | Message should be delivered at least once | |
| constant 2 | Exactly once | Message should be delivered exactly once | |
Sample CLI write command:
uom set "mqtt/connect_qos" "0"
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "1" "http://192.168.0.100/restapi/mqtt/connect_qos/"
| sum (boolean) | mqtt/connect_retain/ |
| Flag indicating whether the message to be sent on initial connection to broker should be retained | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Retained | The latest message payload should be retained on the broker and sent on subscription | |
| constant false | Not retained | Messages should not be retained on the broker | |
Sample JS request read command:
request.get({url:"mqtt/connect_retain/"},function(error,response,body) {console.log(body)});
⇒
true
Sample requests write command:
requests.put('http://192.168.0.100/restapi/mqtt/connect_retain/',auth=auth,headers=headers,json=False)
| string | mqtt/reconnect_topic/ |
| Topic of the message to send on reconnection to broker (not relative to the topic root) | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request write command:
request.put({url:"mqtt/reconnect_topic/",body:"padK3cn"});
Sample uom library write command:
uom.mqtt.reconnect_topic="EzZdPF3x"
| string | mqtt/reconnect_payload/ |
| Payload of the message to send on reconnection to broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests write command:
requests.put('http://192.168.0.100/restapi/mqtt/reconnect_payload/',auth=auth,headers=headers,json='pgLxmE')
Sample uom library write command:
uom.mqtt.reconnect_payload="Am"
| sum (enumerated number) | mqtt/reconnect_qos/ |
| Quality of service for the message to send on reconnection to broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant 0 | At most once | Message should be delivered at most once | |
| constant 1 | At least once | Message should be delivered at least once | |
| constant 2 | Exactly once | Message should be delivered exactly once | |
Sample uom library write command:
uom.mqtt.reconnect_qos=1
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "0" "http://192.168.0.100/restapi/mqtt/reconnect_qos/"
| sum (boolean) | mqtt/reconnect_retain/ |
| Flag indicating whether the message to be sent on reconnection to broker should be retained | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Retained | The latest message payload should be retained on the broker and sent on subscription | |
| constant false | Not retained | Messages should not be retained on the broker | |
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "true" "http://192.168.0.100/restapi/mqtt/reconnect_retain/"
Sample uom library write command:
uom.mqtt.reconnect_retain=true
| string | mqtt/disconnect_topic/ |
| Topic of the message to send before disconnecting from broker (not relative to the topic root) | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample uom library write command:
uom.mqtt.disconnect_topic="rKq0u"
Sample CLI write command:
uom set "mqtt/disconnect_topic" "\"L644\""
| string | mqtt/disconnect_payload/ |
| Payload of the message to send before disconnecting from broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample uom library write command:
uom.mqtt.disconnect_payload="e2G"
Sample JS request write command:
request.put({url:"mqtt/disconnect_payload/",body:"mpfXF"});
| sum (enumerated number) | mqtt/disconnect_qos/ |
| Quality of service for the message to send before disconnecting from broker | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant 0 | At most once | Message should be delivered at most once | |
| constant 1 | At least once | Message should be delivered at least once | |
| constant 2 | Exactly once | Message should be delivered exactly once | |
Sample requests write command:
requests.put('http://192.168.0.100/restapi/mqtt/disconnect_qos/',auth=auth,headers=headers,json=2)
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "2" "http://192.168.0.100/restapi/mqtt/disconnect_qos/"
| sum (boolean) | mqtt/disconnect_retain/ |
| Flag indicating whether the message to be sent before disconnecting from broker should be retained | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Retained | The latest message payload should be retained on the broker and sent on subscription | |
| constant false | Not retained | Messages should not be retained on the broker | |
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "false" "http://192.168.0.100/restapi/mqtt/disconnect_retain/"
Sample requests write command:
requests.put('http://192.168.0.100/restapi/mqtt/disconnect_retain/',auth=auth,headers=headers,json=True)
| string | mqtt/lwt_topic/ |
| Topic of the message for the broker to send if the unit goes offline unexpectedly (not relative to the topic root) | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request read command:
request.get({url:"mqtt/lwt_topic/"},function(error,response,body) {console.log(body)});
⇒
"M3Uot"
Sample uom library read command:
print(uom.dump(uom.mqtt.lwt_topic))
⇒
"kcw5SnqM"
| string | mqtt/lwt_payload/ |
| Payload of the message for the broker to send if the unit goes offline unexpectedly | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request read command:
request.get({url:"mqtt/lwt_payload/"},function(error,response,body) {console.log(body)});
⇒
"6P0V"
Sample uom library write command:
uom.mqtt.lwt_payload="6HGHZ"
| sum (enumerated number) | mqtt/lwt_qos/ |
| Quality of service for the message for the broker to send if the unit goes offline unexpectedly | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant 0 | At most once | Message should be delivered at most once | |
| constant 1 | At least once | Message should be delivered at least once | |
| constant 2 | Exactly once | Message should be delivered exactly once | |
Sample uom library write command:
uom.mqtt.lwt_qos=2
Sample CLI write command:
uom set "mqtt/lwt_qos" "2"
| sum (boolean) | mqtt/lwt_retain/ |
| Flag indicating whether the message to be sent if the unit goes offline unexpectedly should be retained | |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Retained | The latest message payload should be retained on the broker and sent on subscription | |
| constant false | Not retained | Messages should not be retained on the broker | |
Sample curl write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "true" "http://192.168.0.100/restapi/mqtt/lwt_retain/"
Sample uom library read command:
print(uom.dump(uom.mqtt.lwt_retain))
⇒
false
| object | mqtt/notifications/ |
| MQTT-related notifications | |
Retrieving the value is denied if not administrative user
This object does not support direct modification.
This object contains the following items:
| parameter_kinds | Parameter kinds |
| events | Events |
Sample curl read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/mqtt/notifications/"
⇒
Sample CLI read command:
uom get "mqtt/notifications"
⇒
See also Notifications: Parameter kinds
| map | mqtt/notifications/events/ |
| Event templates | |
Retrieving the value is denied if not administrative user
This map is composite, i.e. is modified as a whole.
This map does not support direct modification.
This map contains Event elements.
Creating elements in this collection is not supported.
Sample JS request read command:
request.get({url:"mqtt/notifications/events/"},function(error,response,body) {console.log(body)});
⇒
Sample uom library read command:
print(uom.dump(uom.mqtt.notifications.events))
⇒
See also Events: Event
| object | mqtt/notifications/parameter_kinds/ |
| Kinds of event parameters | |
This object does not correspond to an actual resource.
This object contains the following items:
| connected | Connection status |
| sum (boolean) | mqtt/notifications/parameter_kinds/connected/ |
| Broker connection status | |
This sum can assume the following values:
| constant true | Connected | Broker connection successful | |
| constant false | Failed to connect | Broker connection failed | |
| object | mqtt/notifications/events/S/parameters/N/ |
| Properties of a parameter associated with the event | |
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| id | Identifier |
| has_fixed_value | Fixed value flag |
| fixed_value | Fixed value |
Sample requests read command (note that _event and _event_parameter_index are variables):
print(requests.get('http://192.168.0.100/restapi/mqtt/notifications/events/'+_event+'/parameters/'+str(_event_parameter_index)+'/',auth=auth,headers=headers).json())
⇒
{'fixed_value': True, 'has_fixed_value': True, 'id': 'connected'}
Sample curl write command (note that :event and :event_parameter_index are URL template arguments):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "{\"fixed_value\":false,\"has_fixed_value\":true,\"id\":\"connected\"}" "http://192.168.0.100/restapi/mqtt/notifications/events/:event/parameters/:event_parameter_index/"
| string | mqtt/notifications/events/S/parameters/N/id/ |
| Parameter identifier | |
The value is subject to the following constraints: parameter kinds[the value]
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample JS request read command (note that _event and _event_parameter_index are variables):
request.get({url:"mqtt/notifications/events/"+_event+"/parameters/"+_event_parameter_index.toString()+"/id/"},function(error,response,body) {console.log(body)});
⇒
"connected"
Sample uom library read command (note that _event and _event_parameter_index are variables):
print(uom.dump(uom.mqtt.notifications.events[_event].parameters[_event_parameter_index].id))
⇒
"connected"
| sum (boolean) | mqtt/notifications/events/S/parameters/N/has_fixed_value/ |
| Flag indicating that the parameter's value for this event is fixed | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant true | Fixed | The value is fixed | |
| constant false | Variable | The value is variable | |
Sample JS request read command (note that _event and _event_parameter_index are variables):
request.get({url:"mqtt/notifications/events/"+_event+"/parameters/"+_event_parameter_index.toString()+"/has_fixed_value/"},function(error,response,body) {console.log(body)});
⇒
true
Sample uom library read command (note that _event and _event_parameter_index are variables):
print(uom.dump(uom.mqtt.notifications.events[_event].parameters[_event_parameter_index].has_fixed_value))
⇒
true
| sum (variant) | mqtt/notifications/events/S/parameters/N/fixed_value/ |
| Fixed parameter value for this particular event | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant null | Null | Null | |
| constant true | True | True | |
| constant false | False | False | |
| string | String | This string | |
| number | Number | This number | |
Sample uom library read command (note that _event and _event_parameter_index are variables):
print(uom.dump(uom.mqtt.notifications.events[_event].parameters[_event_parameter_index].fixed_value))
⇒
true
Sample JS request read command (note that _event and _event_parameter_index are variables):
request.get({url:"mqtt/notifications/events/"+_event+"/parameters/"+_event_parameter_index.toString()+"/fixed_value/"},function(error,response,body) {console.log(body)});
⇒
false
| object | mqtt/notifications/events/S/ |
| Event template | |
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| message_template | Message template |
| severity | Severity |
| parameters | Event parameters |
Sample curl read command (note that :event is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/mqtt/notifications/events/:event/"
⇒
{"severity":6,"message_template":["connected to broker"],"parameters":[{"fixed_value":true,"has_fixed_value":true,"id":"connected"}]}
Sample CLI write command (note that event is a variable):
uom set "mqtt/notifications/events/${event}" "{\"severity\":5,\"message_template\":[\"failed to connect to broker\"],\"parameters\":[{\"fixed_value\":false,\"has_fixed_value\":true,\"id\":\"connected\"}]}"
| array | mqtt/notifications/events/S/message_template/ |
| Template for human-readable message generation | |
Retrieving the value is denied if not administrative user
This array is a part of a composite value which is modified as a whole.
This array does not support direct modification.
This array contains Message template element elements.
Creating elements in this collection is not supported.
Sample uom library read command (note that _event is a variable):
print(uom.dump(uom.mqtt.notifications.events[_event].message_template))
⇒
{"failed to connect to broker"}
Sample requests read command (note that _event is a variable):
print(requests.get('http://192.168.0.100/restapi/mqtt/notifications/events/'+_event+'/message_template/',auth=auth,headers=headers).json())
⇒
['failed to connect to broker']
| sum (variant) | mqtt/notifications/events/S/message_template/N/ |
| Element of human-readable message template | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| string | String | Fixed string | |
| number | Parameter | Index of message parameter to insert | event parameters[the value] |
Sample CLI read command (note that event and message_template_element_index are variables):
uom get "mqtt/notifications/events/${event}/message_template/${message_template_element_index}"
⇒
"failed to connect to broker"
Sample requests read command (note that _event and _message_template_element_index are variables):
print(requests.get('http://192.168.0.100/restapi/mqtt/notifications/events/'+_event+'/message_template/'+str(_message_template_element_index)+'/',auth=auth,headers=headers).json())
⇒
'failed to connect to broker'
| sum (enumerated number) | mqtt/notifications/events/S/severity/ |
| Severity rating assigned to the event | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant 1 | Emergency | Treat the event as an emergency | |
| constant 2 | Alert | Treat the event as an alert | |
| constant 3 | Critical | Treat the event as critical | |
| constant 4 | Error | Treat the event as an error | |
| constant 5 | Warning | Treat the event as a warning | |
| constant 6 | Notice | Treat the event as a notice | |
| constant 7 | Informational | Treat the event as informational | |
| constant 8 | Debug | Treat the event as debugging-related | |
Sample requests read command (note that _event is a variable):
print(requests.get('http://192.168.0.100/restapi/mqtt/notifications/events/'+_event+'/severity/',auth=auth,headers=headers).json())
⇒
5
Sample curl read command (note that :event is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/mqtt/notifications/events/:event/severity/"
⇒
5
| array | mqtt/notifications/events/S/parameters/ |
| Additional data associated with the event | |
Retrieving the value is denied if not administrative user
This array is a part of a composite value which is modified as a whole.
This array does not support direct modification.
This array contains Event parameter elements.
Creating elements in this collection is not supported.
Sample requests read command (note that _event is a variable):
print(requests.get('http://192.168.0.100/restapi/mqtt/notifications/events/'+_event+'/parameters/',auth=auth,headers=headers).json())
⇒
[{'fixed_value': True, 'has_fixed_value': True, 'id': 'connected'}]
Sample JS request read command (note that _event is a variable):
request.get({url:"mqtt/notifications/events/"+_event+"/parameters/"},function(error,response,body) {console.log(body)});
⇒
[{"fixed_value":true,"has_fixed_value":true,"id":"connected"}]
See also Event parameters: Event parameter