Skip to content
Kevin Swiber edited this page May 20, 2015 · 1 revision

Monitor Log Streams

Zetta provides an easy way to stream data from streams to clients using web sockets. Below are some considerations for what this data would look like coming out of the system.

Some general notes on the Stream Responses.

  1. topic is what is used to subscribe to the stream in general. For single stream readings it will be <device type>/<device-uuid>/<stream name>
  2. For globally subscribing to topics the format will be <device type>/<device id>/<stream name>
  • All devices with that particular type and stream name will be subscribed to
  • The id property will contain the device id of the particular device returned.
Example Microphone Amplitude Stream
{
  "data":30,
  "topic":"sound/7A8B1779-FEEE-493C-8ADC-32460A6BD8A1/amplitude",
  "timestamp":1402676545565
}

Example Device Log Streams

Example log message after a lcd screen's text is updated through a transition.

{
  "topic":"lcd/8142E11C-87AE-4C13-9DD1-E2900EB97BF0/logs",
  "timestamp":1402676545565,
  "transition":"change",
  "input":[
    {
      "name":"message",
      "value":"I heard dat!"
    }
  ],
  "properties": {
    "id": "8142E11C-87AE-4C13-9DD1-E2900EB97BF0",
    "type":"lcd",
    "name":"My LCD",
    "state":"ready",
    "message": "I heard dat!"
  }
}