Developer Guide for Seervision's Audio Integration

How to start developing for our Audio Tracking Node-RED flows

This guide aims to get you started in connecting to and developing for Seervision’s Audio Tracking. Typically, a customer might want to switch between camera feeds once our automation frames an active speaker, and we provide you with these “framing triggers” via our Node-RED flows, so that you can write the feed switching logic.

We’ll divide this guide into two parts. The first part is for those that are entirely new to Node-RED. We’ll provide you with some pointers and resources to get acquainted with the general Node-RED ecosystem and write some very simple flows, just to get a feeling for it. If you’ve already worked with Node-RED in the past and know your way around, you can safely skip this.

The second part will focus very concretely on your integration with Seervision, the general architecture, what you can expect, and some general guidelines from our side on what your integration will most probably look like.

Getting started with Node-RED

To get started with Node-RED, our first recommendation would be that you install it on your PC so you can familiarise yourself with it and have an experimentation environment. The final work and integration with us will happen on the Node-RED instance on our Seervision servers, but if you’re new to Node-RED, it will be good to have your own experimental install where you can play around and test things without fear of breaking our integration.

The official Node-RED website lists all possible ways (Windows, macOS, Linux, Docker), so we will let their documentation guide you through the installation on your personal machine. Here is the link for their local install instructions: Running Node-RED Locally.

Hello World

Now that you’ve installed Node-RED on your machine, you’ll likely want to play around with it. Two resources we like a lot (and are somewhat similar) for your first Hello World project are:

Connecting to Seervision's Node-RED Instance

At this point, you should have some idea of what Node-RED is and what it does, so it’s time to take a look at our Audio Tracking flow and start writing automation for it.

What is expected of my integration with Node-RED?

In general, the idea is that you write a “bridge” logic in Node-RED, that exports our microphone automation triggers to the platform of your choice. For example, let’s imagine that the room that is being automated runs on a Q-Sys Core. The Q-Sys core will be responsible for switching which camera feed is live, turning the system on/off and a couple of other things.

Your Node-RED “bridge” logic will be responsible for consuming our triggers and sending them to the Q-Sys Core in the way that suits you best. Node-RED provides multiple ways to do this (UDP/TCP sockets, HTTP calls and more), up to you to decide what works best for the current situation.

You could even do all of this in Node-RED itself if you wanted to, our experience just shows that often, the camera feed switching happens in another software ecosystem.

Why do I have to write anything in Node-RED at all? Can't you just send me triggers over a TCP/UDP/WebSocket call?

Good question! We did this initially, but our experience has shown that such an approach requires extensive, detailed synchronisation between everyone involved, which slows down the progress considerably. When you control both sides of the communication, you will be able to iterate and deploy much faster, without having to reach out to us each time you wish to make a change/add/remove functionality.

Where can I find Seervision's Node-RED flows?

Each of our Seervision Servers comes with Node-RED pre-installed. To access the Node-RED instance containing our automation flows:

  1. Make sure our system is launched. If you’re not sure how to do that, read our Getting Started guide first.
  2. You can now access the Node-RED instance on port 1880 using your web browser. For example, if the LAN IP of the Seervision Server is 192.168.1.5, you can access the Node-RED instance by navigating to http://192.168.1.5:1880/

Where can I find the triggers that I need to process?

These flows need to be configured to actually connect them to the relevant microphone panels and Seervision Suite instances. You can follow our Audio Tracking guide in order to connect and configure everything correctly.

If everything went well, you should now be looking at our Node-RED flow. Specifically, you should see one or more large nodes called Compute movement for [...]. These are the nodes that you will want to connect to.

Each Compute node has 3 exit nodes:

  1. The first one, Movement Started, means that Seervision has started to move this particular camera. You will want to use this trigger to make sure to switch away from this cameras feed (if it is live), so that the movement is not seen live on the feed.
  2. The second one, Movement Finished, means that Seervision has stopped moving the camera, and it is safe to switch its feed to the live feed again.
  3. The third one, Active Speaker Framed, is the node you probably want to be listening to 99% of the time (the other two only have niche use-cases). This trigger means that this camera is currently framing somebody who is talking, regardless of whether we moved the camera or not (which is what the above nodes are for). So any time we fire a trigger on this exit node, it probably means you will want to switch to its feed.

To get started with these triggers, a typical approach would be to:

  1. Drag a function node from the left-hand side of the Node-RED interface onto the canvas
  2. Connect the 3rd exit node of the Compute node to the input of your new function node
  3. Double-click the new function node to start writing your JavaScript to parse incoming triggers (part of the msg object), manipulate them, and eventually send them out of your function node using return msg.

Can I expect Seervision to support me in this?

Absolutely! While we can’t write the code for you, we would be more than happy to sit together with you, guide you through the process, provide tips and tricks from our experience, and much more. Definitely don’t hesitate to get in touch, helping you is literally why we are here!