Sample NTCIP Configuration

Sample NTCIP Configuration

This article will go through an example of setting up a DNN Cam/Node to interact with an NTCIP traffic controller on virtual sensor events. 

Once a DNNCam or DNNNode is installed and monitoring an intersection, you can set up some virtual sensors. For this example, we will be creating a Presence sensor to detect when a pedestrian enters and exits a crosswalk, then inform the traffic controller on these events. 

Virtual Sensor Configuration

Virtual sensors can be created in the Traffic Counter service configuration, as explained in the Virtual Sensor Config Guide. Here, I will be creating a presence sensor that will trigger once a person has been present in the region of interest (ROI) for at least 0.1 seconds (entry debounce) and will trigger again once that person has exited the sensor for at least 0.5 seconds (exit debounce). 

As shown in the gif above, the sensor name will be PRESENCE_PERSON_1. The presence sensor will have a boolean active field that will be True when the presence sensor is occupied and will be False when the presence sensor is empty. 

With the presence virtual sensor set up, we will now configure the BAI Folder Watcher application to trigger an NTCIP event every time someone enters and exits the presence sensor. Opening the Folder Watcher configuration page, we will want to add a Webhook configuration. 

We will first configure a webhook for when someone enters the presence sensor. To do this, we will create two sensor data filters. The first filter will check that the sensorName is PRESENCE_PERSON_1 and the second filter will check to see if it's active field is true (meaning the presence sensor is occupied). 

Now, we will set the webhook target to http://bai-ntcip-server.docker:8080/pedcall/, which is the pedcall endpoint on the onboard BAI NTCIP Server service that will be configured later. We will POST to this endpoint, as we would like to include a payload along with the request.  

The Webhook Payload field specifies what will be sent as part of the POST request. Here, I will enter the MIB address, Phase Control Group, and Phase bit that I would like to modify. Note that the 'Bit Enable' selection is enabled, as I would like to enable the specified bit. Also note the timeout_seconds entry, that indicates how long to wait before inverting the bit if it's sent to a non-zero value.

This completes the configuration for the presence sensor entry. Now, to configure for the presence sensor exit we can use create another Webhook and use similar values for all fields, except filter for the active field to be False (presence sensor empty). I will also un-check the 'Bit Enable', to disable the specified Phase Control bit and set the timeout_seconds value to 0, as we'd like to invert immediately. 

With these configurations saved, the FolderWatcher container will now make calls to the onboard NTCIP service on both entry and exit events for the PRESENCE_PERSON_1 virtual sensor. 

NTCIP Service Configuration

The BAI NTCIP Server application is the service on the device which manages communication between the device and the NTCIP traffic controller. Opening the configuration, we can specify the IP address and port of the NTCIP traffic controller. Make sure to configure the http_server_port to 8080 to match the previous FolderWatcher configuration endpoint of http://bai-ntcip-server.docker:8080/pedcall/

Saving this configuration, our device will now be modifying the specified MIB/Phase Control Bits on the traffic controller located at on PRESENCE_SENSOR_1 entry and exit events. 

    • Related Articles

    • Virtual Sensor Configuration Guide

      Virtual Service Configuration Guide This guide will explain how to configure virtual sensors using Boulder AI's configuration tool. This tool is currently used for all BAI Mobility Services, TrafficCounter, and PeopleCounter applications.  Virtual ...
    • Using the Virtual Sensor Config Tool v2

      This article will explain how to use the Config Tool v2 to configure virtual sensors for TrafficCounter, PeopleCounter, and Mobility Services.  The Config Tool v2 is currently in beta and is slowly being rolled out. If you would like to use this tool ...
    • How to configure BAI Mobility Services

      Mobility Services Application Guide This guide will help you configure and view the data from the BAI Mobility Services Application on your Boulder AI device. You will need access to the Boulder AI Platform and have your device properly powered and ...
    • Using the Metadata Dashboard v2

      This guide will walk through the Metadata Dashboard tool available in the Boulder AI Platform that can be used to view the data output from DNN-Devices. If you cannot see this Metadata dashboard, please contact to add this ...