Custom Configuration for Monocle Gateway



Overview

The Monocle Gateway does support a limited number of custom configuration settings that can be applied via the placement of a monocle.properties file.

The monocle.properties file is a simple text based file that you can edit with any basic text editor. (VI, EMACS, NANO, NOTEPAD, etc)

The primary use case for creating and editing a monocle.properties file is on computers that may have more than one network interface and the Monocle Gateway auto detects the "wrong" IP address when it starts up.


Download and Install

Below is download link to a default monocle.properties template file that you can use as a starting point. Download this file to your system where the Monocle Gateway is installed.

<< Download monocle.properties file >>

Next you will need to copy the monocle.properties file to the correct location based on your operating system.

  • Windows
    This file should be placed in the same directory as the monocle-gateway.exe file on Windows. When the Monocle Gateway starts up it will simply look for a monocle.properties file in the same directory as the executable.

  • OSX / Linux / Raspberry Pi
    This file should be placed in the path /etc/monocle/monocle.properties. Your system may require administrative access or the use of SUDO to copy the file to this system location.


Override Auto-Detected IP Address

Edit the monocle.properties file with your favorite text editor. Scroll down and look for the section "RTSP SERVICE REGISTRATION OVERRIDES"

You will need to uncomment the line that starts with 'rtsp.register.host' and set the value to the IP address that is hosting the Monocle Gateway service on your computer/server.

Example below

#--------------------------------------
# RTSP SERVICE REGISTRATION OVERRIDES
#--------------------------------------
#rtsp.register.fqdn=
rtsp.register.host=10.1.1.56
#rtsp.register.port=443

When you re-start Monocle Gateway, this will register a DNS record on our servers for this gateway instance using your updated IP address.

If you already had a previous Monocle Gateway instance up and running with an invalid IP address, the existing DNS record will get updated. However, this could take an hour or more to propagate the DNS change to other DNS servers on the Internet. It's also a good idea to reboot the Alexa devices to flush their DNS cache as well.

On startup of the Monocle Gateway service you should see something like this in the log/console:

-------------------------------------------------
MONOCLE RTSP SERVICE - INITIALIZED
-------------------------------------------------
FQDN = f065fdn6-2e66-433d-axa8-6g3aau7132aae.mproxy.io
HOST = 10.1.1.56
PORT = 443
-------------------------------------------------

This is telling you exactly what DNS record is created/updated and the HOST field should be your newly assigned IP address. The FQDN will of course be different and unique to your system.