You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Sample NTCIP Configuration
print icon

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 Sighthound 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 sensorLabel 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 Sighthound 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 Sighthound 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 10.202.9.1:161 on PRESENCE_SENSOR_1 entry and exit events. 

scroll to top icon