Getting Started
7 Lessons
Section
















The FixedIT Data Agent is an incredibly versatile tool that allows you to do most of the tasks you might want to do at the edge in your Axis devices, but in our pursue to make it as easy to use as possible, we have made some assumptions on how it is going to be used.
The FixedIT Data Agent is built on Telegraf which is not intended for processing binary data like images, video or audio. If you wish to work with binary data like images, you can make use of shell scripts to process the data and base64 encode it before you let Telegraf consume it. An example of this can be seen in our Timelapse example project where we get an image from the camera using a shell script (axis_image_consumber.sh) and write it as a JSON message with a base64 encoded image enclosed:
{"image_base64":"<base64_data>","length":<size>}This JSON message can then be parsed by Telegraf which handles it like any other text string.
We are working on extending these capabilities further by introducing special tools for interacting with images, audio and overlays.
A common use case for the FixedIT Data Agent is to use it to process object detections and predictions from a deep learning model. By creating the filtering and processing of detection data in the FixedIT Data Agent you can write the code in high-level easy to use languages such as the Python-like Starlark language and you can easily add or change functionality (even on a site-by-site basis) by uploading a new config file.
Although the detection data is being processed in the FixedIT Data Agent, the model inference itself should be done in another application or service. All modern Axis cameras comes with built-in deep learning models in the form of AXIS Scene Metadata. This is a detection service that finds objects in the image, such as people and vehicles, and outputs each detection as a JSON message. A common use case for the FixedIT Data Agent is to consume these detections and then create custom analytics and automations based on where the objects are observed and what they are doing. We have a work-in-progress example of how this can be done in our public repository.

If the object types you need to analyse are not detected by the built-in AXIS Scene Metadata, then you need to create your own ACAP application with a custom deep learning model trained to detect your objects. Despite this, we recommend to keep the model inference application as simple as possible and implement the analysis and logic in the FixedIT Data Agent. This creates a robust and easy to extend system. There are multiple ways to read the detection data from your inference ACAP to the FixedIT Data Agent. One way is to let the FixedIT Data Agent create a socket on which to the inference ACAP can write all detections:

Another option that is even easier to get started with (but possibly not as robust) is to let the deep learning ACAP app write the detections to the system log and configure the FixedIT Data Agent to parse the detection data from the system log messages. Here's a working input configuration to parse the default messages from the Axis open-source object detection ACAP application:
[[inputs.tail]]
files = ["/var/log/info.log"]
from_beginning = false
data_format = "grok"
name_override = "yolov5_metrics"
grok_patterns = [
# Inference latency line
'%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME:host} \[ *%{LOGLEVEL:level} *\] %{WORD:app}\[%{NUMBER:pid}\]: Ran inference for %{NUMBER:inference_latency_ms:int} ms',
# Detection line
'%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME:host} \[ *%{LOGLEVEL:level} *\] %{WORD:app}\[%{NUMBER:pid}\]: Object %{NUMBER:object_id:int}\s*: Label=%{DATA:label}, Object Likelihood=%{NUMBER:obj_likelihood:float}, Class Likelihood=%{NUMBER:cls_likelihood:float},'
]
grok_timezone = "UTC"
[inputs.tail.tags]
appname = "object_detection_yolov5"
Once you have the object detection data in the FixedIT Data Agent, you can easily create workflows that analyses, filter and acts on the data. These workflows can send alarms to a VMS, trigger alarms in an Axis speaker or an Axis strobe, or it can affect the camera's digital I/O pins to control external actuators such as gates, relays and much more.
With this method, there's no need to modify the deep learning ACAP app at all. All you need to do is to install it, start it and upload the config to the FixedIT Data Agent to start parsing and acting on the detections in the log messages.
In summary, you can say that the FixedIT Data Agent is built like a Swiss Army Knife that in many cases might be used by itself, but can be even more powerful when used together with other applications. The FixedIT Data Agent can be used as a data bridge or plumber tool to connect different applications together, extend them with more logic and build a complete system on a single device without the need for any cloud services or extra hardware devices.