githubEdit

Node-RED Config

Traffic Monitor Node-RED configuration logic

circle-info

This page is for the Traffic Monitor -specific configuration of the Node-RED flows. This controls much of the logic and flow for the traffic monitor but does not control other applications such as Frigate or the operating system.

circle-info

See Frigate Config for controlling object detection parameters.

Environment File

The environment file defines variables that can be used during Node-RED start-up in the settings filearrow-up-right and within a flows' node properties.

A sample script can be found at node-red-project/environmentarrow-up-right.

The environment file is loaded by the systemd service node-red.service that is set up during by the Node-RED Rapsberry Pi Install scriptarrow-up-right. It shall be located in the user node-red directory, by default at ~/.node-red/environment. Changes to the environment file must be applied by restarting the Node-RED service by executing the command node-red-restart in the terminal.

########
# This file contains node-red environment variables loaded by node-red.service
#   Read more at https://nodered.org/docs/user-guide/environment-variables
#     and https://fedoraproject.org/wiki/Packaging:Systemd
#  
# This file shall be located at the root node-red directory, usually `~/.node-red`
#   this file is loaded by `systemd`, changes can be applied 
#   by running the command `node-red-restart` in the terminal
#   read more at https://nodered.org/docs/getting-started/raspberrypi
#
# Uses:
#   - variables can be used in settings.js by calling `process.env.ENV_VAR`
#   - node property can be set by calling `${ENV_VAR}
#
########

# traffic monitor open source software release version
TM_VERSION='0.3.0'

# used in settings.js for credentialSecret 
NODE_RED_CREDENTIAL_SECRET='myNodeRED1234'

# database locations, relative to user directory defined in settings.js
#  will be relative path to store SQLite databases
TM_DATABASE_PATH_TMDB='code/nodered/db/tmdb.sqlite'

# mqtt broker for incoming Frigate events 
#  Settings below set up the aedes broker node
TM_MQTT_BROKER_HOST='localhost'
TM_MQTT_BROKER_PORT='1883'
# mqtt user, leave blank for no authentication
TM_MQTT_BROKER_USERNAME=''
# mqtt password, leave blank for no authentication
TM_MQTT_BROKER_PASSWORD=''

# defines system USB serial port for radar
# run `ls -lat /sys/class/tty/ttyACM*` to list devices
TM_RADAR_SERIAL_PORT_00='/dev/ttyACM0'
TM_RADAR_SERIAL_PORT_01='/dev/ttyACM1'
TM_RADAR_SERIAL_PORT_02='/dev/ttyACM2'
TM_RADAR_SERIAL_PORT_03='/dev/ttyACM3'

Config File

The Traffic Monitor Node-RED config file changes definitions to various services and functionality.

The config file is loaded whenever the TM flows restart. It is located in the user node-red directory,~/.node-red/config.yml.

circle-info

It is not necessary to copy this full configuration file. Default values are specified below.

Last updated

Was this helpful?