Skip to main content Link Menu Expand (external link) Copy Copied

Camera monitoring

Managing a large fleet of cameras can be challenging. There are many reasons why a camera might not produce any data and understanding exactly what’s happening is difficult and time consuming.

To help with monitoring and understanding potential issues, we provide a dedicated MQTT feed that produces reports for locations and cameras.

MQTT feed

When connecting, make sure to use the brand UUID as the username and password in your MQTT client. Using mqtt.js over websockets as an example:

mqtt.connect("wss://streams.analytiks.ai", {username: "__BRAND_UUID__", password: "__BRAND_UUID__"})

The main subscription pattern is /brand/__BRAND_UUID__/location/__LOCATION_UUID__/status.

To subscribe to all locations your brand has access to, you can use /brand/__BRAND_UUID__/location/+/status.

For each location deployed with cameras, you’ll immediately get a message describing the current status upon subscription.

The next section describes what type of issues can be detected at the location and camera levels. To give a better idea of the general structure, an example message is provided at the bottom of the page.

Location status

A location might be in one of four different states described as follows.

Ok

Everything is configured correctly and we’re processing data successfully.
The value field is omitted.

{
  "type": "ok",
  ...
}

No activity

Everything is configured correctly, we’re receiving messages, but no activity is detected.
This is likely because cameras are deployed in a location with little traffic.
The value field is set and includes a date indicating when we stopped observing activity.
This status will be set after one hour without any detection during business hours.

{
  "type": "noActivity",
  "value": "2024-01-03T00:48:09.337164815Z",
  ...
}

Degraded

A location may currently be in a degraded state for only one reason:
Multiple cameras are configured for people counting and some of them are down (but not all).

{
  "type": "degraded",
  "value": "somePeopleCountingDown",
  ...
}

Offline

A location will be considered offline if either conditions are met:

  • Multiple cameras are configured for people counting and none of them are OK.
  • No cameras have been configured for people counting.

The value field can contain one of the following strings:

  • noPeopleCounting
  • allPeopleCountingDown
{
  "type": "offline",
  "value": "noPeopleCounting",
  ...
}

Camera status

A camera may be in one of three different states. Offline cameras may be affected by multiple issues.
The global location status is derived from cameras.

Ok

The camera is configured and receiving valid messages.

...
{
  "type": "ok"

}
...

No activity

Similarly to the noActivity location status, this means the camera is configured, receiving messages, but no activity is detected.
This is likely because the camera is deployed in a location with little traffic.
The value field is set and includes a date indicating when we stopped observing activity.
This status will be set after one hour without any detection during business hours.

{
  "type": "noActivity",
  "value": "2024-01-03T00:48:09.337164815Z"
}

Offline

A camera may be offline for multiple reasons. When a camera is reporing an offline status, a reasons array will be included to provide as much context as possible.

Offline - Unresponsive

Unresponsive means we were unable to collect additional context from Meraki’s API.
This typically happens when the camera serial number does not exist on Meraki’s side.
It can also mean Meraki’s API is having issues, or we don’t have the required authorization.

{
  "type": "unresponsive"
}

Offline - Disconnected

The camera isn’t connecting to the Meraki cloud. This is most likely due to network/firewall issues.

{
  "type": "disconnected"
}

Offline - Smart detection disabled

This can happen when a camera was not configured on Meraki’s side and no people detection is being performed at all.

{
  "type": "smartDetectionDisabled"
}

Offline - Bad firmware

Some firmwares are known to be problematic and must be avoided.
For instance, v5.3 has a bug preventing it from forwarding any detection through MQTT.
The value field indicates which problematic firmare version is currently in use.

{
  "type": "badFirmware",
  "value": "meraki-5.3.x"
}

Offline - No broker

No MQTT broker has been configured for this camera.

{
  "type": "noBroker"
}

Offline - Unknown broker

A MQTT broker is configured, but it doesn’t point to Analytiks’ servers.

{
  "type": "unknownBroker"
}

Offline - Bad broker configuration

A MQTT broker is configured, pointed at our servers, but some of the configuration is incorrect and needs to be double checked. If your camera is in this state, you should make sure that:

  • No username / password have been set (both fields must be empty)
  • The port number is correct (1883 for MQTT, 8883 for MQTTs)
  • When using the encrypted broker (MQTTs on 8883), our CA certificate has been set.
{
  "type": "badBrokerConfiguration"
}

Offline - No data

This is usually included when any other issue is detected and indicates when data stopped coming in through the value field.
If nothing else is reported, it probably means a firewall is preventing the camera from communicating with the broker.

{
  "type": "noData",
  "value": "2024-01-03T00:48:09.337164815Z"
}

Offline - No calibration

This means this camera has not been calibrated for people counting.

{
  "type": "noCalibration"
}

Example message

Status report messages contain a global status for the location as well as details for each camera.
In both cases, the status field will always be an object with a type field describing the current state.
In some cases, there might be a value field containing additional information, such as a date.

{
  "locationId": __LOCATION_ID__,
  "reference": __LOCATIOn_REFERENCE_NUMBER__,
  "status": {
    "type": "offline",
    "value": "noPeopleCounting"
  },
  "cameras": [
    {
      "serial": "AAAA-AAAA-1111",
      "status": {
        "type": "offline",
        "reasons": [
          {
            "type": "noData",
            "value": "2024-01-03T00:48:09.337164815Z"
          }
        ]
      }
    },
    {
      "serial": "AAAA-AAAA-1111",
      "status": {
        "type": "offline",
        "reasons": [
          {
            "type": "noData",
            "value": "2024-01-03T00:48:09.337164815Z"
          }
        ]
      }
    }
  ]
}