gmServer Command

Usage

Command Line

gmServer [-a archiveDir] [-A {m|h}]
[[-B batteryMonitor options ] ...]
[-c clientLimit]
[-C configFileName] [-d linesPerSecond] [-D]
[-E meterType meterOption]
[-F firewallRule] [-g] [-H] [-I {iniFileName|systemName}]
{ [-l logFile] | [-L compressedLogFile] }
[[-M [logger:]shunt:type:port] ...] [-N] [-P password]
[-s serverPort]
[-S statusInterval statusFilename]
[-T serverTextPassword] [-t clientTextPassword]
[-u updateSeconds]
[-v] [-V] [-W weatherSource] [-Z]
[inputFileOrDevice [...]]

Linux Service

/etc/init.d/gmserver start

/etc/init.d/gmserver stop

Microsoft Windows Service

net start gmserver

net stop gmserver

Description

The gmServer command creates an advanced network server connection between OutBack Power Technologies Mate, Modbus-based renewable energy equipment and the Internet. In addition to providing network access to the Mate, the gmServer command also maintains statistics about the operation of the renewable energy system. These statistics include the amount of power generated or consumed by each component, operating mode, warnings and errors, runtime data, and other values of interest.

Due to the large number of options, all gmServer options are represented by a single character to avoid command line length limitations in some operating systems. Additionally, the gmServer command may be started as a GUI for windowing operating system users and the options entered interactively, or the "-I" option used to specify an existing options file or system name.  The preferred method for starting the gmServer command is to use an initialization file with the -I option and configure the needed settings in the initialization file using the gmHosts command.

The gmServer command includes security features designed to protect the software from unauthorized access. The user is responsible for providing firewall protection to prevent malicious attacks, or access from systems outside the user's network.

Multiple instances of gmServer may be executed at the same time, such as if a user has more than one Mate1, or is monitoring more than one system over the Internet2.

Options

-a Archive Directory

The -a option specifies the name of a directory, archiveDir, where the daily data will be stored. These files can become very large in total size and the user must be sure to periodically delete the files.  The archiveDir directory must exist before running the gmServer command.  The gmServer command will not create this directory for you.

-A Archive Interval

The -A option specifies whether data is written to the daily data file once a minute (“m”) or once an hour (“h”).  The initialization file value is System.LogInterval.  The permitted values are Minute and Hour.

-B Battery Monitor

The -B option specifies the name of a supported third party battery monitor device. An additional argument, options, is required to initialize the battery monitor module. The options parameter is typically the name of a serial port or network connection,. If there are no required options, the string none must be used. The only supported battery monitor at this time is the PentaMetric battery monitor from Bogart Engineering.

For example, to use a PentaMetric monitor connected to COM3:, use the flags

-B Bogart.PentaMetric COM3:

To specify a PentaMetric monitor connected to /dev/ttyS0 specifying that it use Hub port 7, use the options

-B PentaMetric /dev/ttyS0,port=7

A maximum of 10 third party monitoring devices may be configured.

-c Client Limit

The -c option specifies the limit for the maximum number of clients which may connect to the gmServer command. The default client limit is 32 simultaneous connections. A smaller value may be used for personal installations, or systems with limited processing power. A large value may be used for commercial installations, such as web-enable marketing displays.

The connection limit may be set in the "Connection Information" section of the gmServer GUI.  The initialization file parameter is System.ConnectionLimit.  The permitted values are whole numbers greater than 1.  The maximum recommended value is 50.

-C Configuration File

The gmServer command is capable of automatically recognizing many of the components within the system. However, additional information may be specified in the file named by configFileName to allow the user to customize the appearance of certain commands, provide information which is not part of the Mate data stream, notify the user in the event of error conditions, and many other useful features. configFileName is an XML format file. The gmConfigure command may be used to edit the file. gmConfigure may be launched from the host menu of gmServer.The initialization file parameter is System.Configuration.  The typical value is Systems/mySystem/System.gmc, where mySystem is the name of your system.

-d Simulated Data Rate

The gmServer command includes the ability to write all data from the Mate to a log file using the “-l (lower case “L”) or “-L” option. This data may then be replayed from the file at the number of records specified per second. Additionally, the gmTrace command may be used to capture a limited number of records which are then played back. This is useful for diagnosing problems both with the renewable energy system and the greenMonitor software. Note that the log files created with the “-l” option can become very large. The simulated rate should be equal to the number of devices in the renewable energy system or else time information, and data which are dependent on the once-a-second output from the Mate will be inaccurate. Time information is included in the compressed log files that are specified with the "-L" option and this option is not required when replaying data from one of those files.

-D Debugging Information

The gmServer command includes the ability to request debugging output in the event a software error is detected. You may be requested to enable this option, along with the “-l” or “-L” option, when reporting a software defect.

-E Electric Meter Option

The gmServer command supports option electric meters. At present the only supported meter is the TED® 5000 from Energy, Inc.

The TED 5000 is accessed by specifying the meter type as “TED” and the meter option as the URL used to access the TED 5000 gateway.  Note that the WattNode and Shark 100 power meters are automatically configured when those devices are loaded.

The initialization file is configured in two parts.  The first part indicates the number of electric meters which are present in the system.  This value is given with the PowerMeters.Meters parameter.  The second part describes each electric meter separately.  Each electric meter is in a separate PowerMeter-# section, where '#' is replaced by the number of the meter (1, 2, 3, etc).  The two parameters for each electric meter are Type and InitString.  The only supported Type value at this time is TED.  The InitString value is the URL of the TED 5000 electric meter's XML data file.  The typical value is the IP address of the TED 5000 gateway followed by /api/LiveData.xml.  For example, a gateway IP address of 192.168.1.101 would have an InitString value of http://192.168.1.101/api/LiveData.xml.

-F Firewall Rule

The gmServer command includes a rudimentary firewall which allows you to specify which hosts may connect without requiring a password to issue commands to the network server. The rule consists of a dotted-decimal IP address and dotted-decimal network mask (i.e., 192.168.0.0:255.255.255.0), a dotted-decimal IP address and prefix length (192.168.0.0/24), a single dotted-decimal IP address (192.168.0.1), or a fully qualified domain name (mySystem.myDomain). Only a single “-F” option may be used at this time.  The initialization file parameter is System.LocalNetwork.  The permissible values are the same as the command line option.

Warning: The “-F” option is not a substitute for a properly configured network firewall device.

-g Graphical User Interface mode

The default behavior for the gmServer command is operating in text mode. This enables the gmServer command to be operated on low power systems without a graphical display, such as the greenMonitor Server, a low power embedded system. The “-g” option may be used to start the gmServer command so that additional functionality is provided. In GUI mode, the gmServer command provides statistical trend information as well as real-time analysis of the system's performance.

The “Type” button is used to select between a serial device, such as COM1: or /dev/ttyS0, and a network connection, such as the option which is displayed here. In addition, a named system may be selected, or a system name may be entered in the field and the current settings saved by pressing the “Save” button. When a named system is selected using the “System” option in the “Type” menu, the configuration settings for that system will be restored and the connection resumed.

The following options in the “Type” menu may be used:

After the connection and options pane is the system status bar. It provides a single line, color coded, display of the running system's status. Hovering the mouse over various fields will display additional information. The colors of each field change, as well as the type face for color vision impaired users, to reflect the performance of that metric as compared to historical data. “Green” typically means that the value is performing as well as, or better than, expected. “Yellow” indicates a slight deviation from the expected value, and “Red” indicates a significant deviation. The “Health” value also reports current errors and warnings, as well as any errors or warnings on the current day. Clicking on the system name opens a menu with many commonly used commands.

The “System Status” pane is opened and closed by clicking on the “System Status” button. It displays the status information which is displayed on the screen when the gmServer command is operated in “text” mode.

The “System Events” pane is opened and closed by clicking on the “System Events” button. It displays all of the events which have occurred while the gmServer command is running.

The “Clients” pane is opened and closed by clicking on the “Clients” button. It is used to examine the network clients which are accessing the gmServer command. This can be useful for web server administrators to determine how many people are accessing a company web page, or for individual users to verify that outside connections are occurring correctly.

The host menu includes several commonly used commands with parameters which are appropriate for the server.

gmQuickView – launches the gmQuickView system at a glance display command using the current renewable energy system connection information.

gmMate – launches the gmMate Mate work alike command using the current renewable energy system connection information.

gmMonitor – launches the gmMonitor detailed system viewer command using the current renewable energy system connection information.

gmViewer – launches the gmViewer system viewer command. The gmViewer command is designed to have a similar look and feel to the WattPlot command and is provided for former WattPlot customers.

gmReport – requests a current monthly performance report. The output file from the gmReport command will have the name gmReport-YYYY-MM.csv and will be located in the greenMonitor software directory, or the directory specified by the “Archive Directory” value. It may be opened with your favorite spreadsheet program.

gmMobile – launches the gmMobile web server, allowing you to access your system using a mobile device. By default, the URL is the name of the computer running gmServer and the TCP port 8080. For example, the URL

http://localhost:8080/

may be used on the host computer to verify that the web server is running properly. You must be able to access the computer running the gmServer command to access the mobile device web server. You may need to forward the TCP port from your Internet router to the computer running the gmMobile command for this to be effective.  The web server may also be started automatically by setting the System.WebServer value in the initialization file to the desired TCP port using either the gmHosts or gmInitFile commands.  8080 is the most commonly used value for this parameter.

gmConfigure – launches the gmConfigure system configuration tool. Note that system configuration is an optional process, unless you wish to assign specific device names, or system owner and notification information. For notifications to occur, you must configure the “Notifications” tab with the e-mail server to be used, as well as the “Owner” e-mail address or SMS pager address, then enable notifications with the “Notifications” button. Notifications can be enabled and disabled while gmServer is running, allowing you to disable notifications while correcting a system problem.  Many of the values which can be set using the gmConfigure command may also be set via the integrated web server.

gmStatistics – launches the gmStatistics statistical data gathering tool. The statistical data produced by gmStatistics is required by the advanced management and analysis tools gmForecast and gmManage. The statistics may also be collected automatically by setting the System.Statistics value in the initialization file to the desired file name using either the gmHosts or gmInitFile commands.  Systems/mySystem/gmStatData.xml is the most commonly used value for this parameter.  Replace "mySystem" with the name you've chosen for your system (Standard and Advanced license levels only).

gmForecast – launches the gmForecast day-ahead forecasting tool to produce a statistical projection of the following day's production and consumption. For best results, a weather station must be selected using the “Weather Station” field.  Day-ahead forecasts may also be viewed using the integrated web server (Standard and Advanced license levels only).

gmExercise – launches the gmExercise command to perform a default exercise cycle. See the gmExercise command for a list of default values.

-H Create History Data

The gmServer command can create an additional “History Device” to increase the amount of data in the output stream provided by the network service. This data is saved in the status file created by the “-S” option and reported once per minute to all connected clients. This data is interpreted by the gmMonitor command and displayed as the “History” device. The data includes hourly, daily, day of week, monthly and annual production and consumption and may be displayed in numerical or bar graph format by gmMonitor.  The data is displayed in the history area of the gmQuickView command.  The "History Device" is also used to create time of day events.  The historical data is also displayed on the Dashboard and Summary pages of the integrated web server.

The “-H” option may be selected from the GUI by pressing the “History” button in the “Connection Information” panel.  The intiailization file parameter is System.History and the permitted values are Yes and No.

-I Initialization file or system name

The “-I” option instructs the gmServer command to retrieve the command options from the named file or system folder. System folders are contained in the “Systems” subdirectory and the system name is used to select a subdirectory within the “Systems” subdirectory.

-l Log File

The “-l” (lower case “L”) option instructs the gmServer command to write all of the data received from the Mate, or the upstream server when input is being read from the network, to logFile. Note that these files can become very large and interfere with normal system operation if not periodically deleted. Note: This feature is not intended for normal operation.

The data file will automatically be compressed if it ends with “.bin” or “.gmz”.

A log file may be used by filling in the “Raw Data Log” field in the “Connection Information” panel.  The initialization file parameter is System.Logfile.  A file name must be specified as the value.

-L Log File

The “-L” option instructs the gmServer command to write all of the data received from the Mate to logFile in a highly compressed format. This option is preferable to the “-l” option when the data files will only be read by greenMonitor commands, or when long term logging is required and disk storage is a concern.  The initialization file parameter is System.Logfile.  A file name must be specified as the value.

-M Shunt-Port Mapping

The “-M” option allows the user to map a specific shunt to a device which is not part of the Mate data stream, such as a 3rd party charge controller, inverter, or DC power source. This option requires that a FLEXnet DC shunt based logger, or a supported user-defined logger such as the Bogart Engineering PentaMetric, be present in the system.  The Shunt-Port Mapping feature allows you to monitor hardware that otherwise cannot be monitored.

The optional logger is the port number of the battery monitor. This value must be included when a system has more than one battery monitor.

The shunt is a number in the range 1 to 3, corresponding to one of the three shunts in the FLEXnet DC or PentaMetric battery monitor.

The type is either the letter “I” (a device which converts DC power to AC power, and may optionally provide DC charging) or the letter “C” (a device which only serves as a DC power source). Devices of type “I” will be virtualized as an OutBack Power Technologies inverter having the correct AC voltage (120VAC by default) and a DC voltage corresponding to the voltage indicated by the FLEXnet DC. Devices of type “C” will be virtualized as an OutBack Power Technologies FLEXmax 80 charge controller. The actual make and model of the devices can be specified in the System.gmc configuration file, or by using the gmConfigure command.  A third letter, "T", may be used for turbines which include an integrated dump load controller.  A standard solar charge controller should not require a dump load, and thus there should never be negative charger output.  Turbines, both wind and water, require dump loads and may report negative charger output.  Using the "T" device type rather than "C" instructs the software to ignore negative values. 

The port is a value from 1 to 10, corresponding to one of the 10 possible positions in an OutBack Power Technologies Hub10 communications controller. The selected port must not be in use by an actual device.

The initialization file parameter is System.Shunt#Mapping where '#' is replaced by a number between 1 and 10.  For example, System.Shunt1Mapping refers to the first shunt, shunt number 1, of the system battery monitor.  The permissible values the type of the device being mapped (C = charge controller, I = inverter, T =  turbine), a colon (':') and the port for the simulated device.  For example, the value C:4 indicates that the first shunt of the system battery monitor is measuring the current from a charge controller which is to appear on port 4.

-N Enable Notifications

The configuration file specified by the “-C” option has a section which specifies e-mail and possibly SMS pager information. With the “-N” option selected, gmServer will attempt to send “notify” events to the e-mail and pager entries listed on the Owner and Installer tabs of gmConfigure. The pager address entries may either be e-mail addresses or SMS addresses which may receive messages using e-mail. For notifications to be sent, the Notification tab must include the name of an SMTP server as well as a “From” address.

Notifications can be enabled and disabled from the GUI by clicking on the “Notifications” button in the “Connection Information” panel.  The initialization file parameter is System.Notifications.  The permitted values are Enabled and Disabled.

-P Numeric Password Value

The “-P” option specifies a four digit value ("PIN") which must be sent by a network client in order to perform certain management actions. As with all passwords, care must be taken to avoid disclosing the password to unauthorized users. External users may be prevented from performing actions by specifying two different password values for two connected gmServer instances. For example, specifying a value of “1234” for the gmServer instance connected to the Mate display controller and “5678” for a gmServer instance located in a network DMZ, will prevent users who connect via the DMZ server from performing any actions, even if they have the correct internal password.

Setting the password to “0000” disables sending commands for all users.

A Note About Passwords:

The password security provided by Mate monitoring software is generally somewhat insecure, regardless of the vendor providing the feature, as most systems are secured using a network firewall which prevents access to the Mate display controller and network data stream. Most consumer operating systems suffer from one weakness or another3. In situations where system integrity is a primary concern, password enablement for remote commands should be disabled. In no case should an important password be used in a manner in which it is exposed to untrusted networks or users. Operating systems with a strong separation of roles (Linux and Mac OS X) – where there is an “Administrative” users whose files are inaccesible to ordinary users – are better at protecting stored passwords than those with a weak separation of roles – operating systems where all files tend to be owned by the same user, or where “Administrator” or an administrative user is used to perform all tasks (Microsoft Windows).

The greenMonitor software enables stronger protection of the password information by allowing the gmServer command to be run “detached” from the graphics display, thereby preventing ordinary users from accessing the files needed to run the gmServer command “attached” to the graphics display.

Starting with Version 1.00.08, the numerical password feature has begun being phased out.  Please see the gmAccounts command for the replacement method.

-s Server Port Number

By default, gmServer uses TCP port 9090 for connection requests. The “-s” option may be used to specify a different TCP port. This may be useful to avoid unauthorized access, such as if a server is known to be running the greenMonitor software. It may also be useful if multiple instances of gmServer are running on a system, such as if multiple Mate devices are being monitored.

For example, a computer which is monitoring multiple OutBack Power Technologies systems may use a different server port for each system, thereby allowing the systems to be viewed individually, or displayed using multiple web servers, such as for a customer monitoring service.  The initialization file parameter is System.ServerPort.  The permitted values are whole numbers between 2 and 65535.  The recommended value is 9090.

-S Status File and Interval

gmServer creates a significant amount of data while being executed. In order to restart gmServer without losing that data, a status file and save interval may be specified with the “-S” option. The statusInterval interval is given in seconds. Once every statusInterval seconds, the statusFilename file will be updated with the current accumulated data. If the same file is specified when the command resumes, the internal data will be restored to their previous values.

If using the gmServer command to monitor multiple Mate's, be sure to use a different file name for each system.

The default values are 60 seconds for statusInterval and gmStatus.gms for the file name.  The status file is stored in XML format.

Two initialization file parameters are used for this option.  The System.StatusFile parameter names the location of the file and the System.StatusInterval parameter specifies the number of seconds between updates to the system status file.  A third option, System.RotateStatus, controls whether or not a new status file is created each day.  This option is recommended for flash memory based systems, such as the greenMonitor Lite.  The permitted values for System.RotateStatus are Yes and No.

-t Client Text Password Value

Specifies the text string password needed by down-stream (client) connections. Specifying this password will prevent any client from receiving data until the password is provided.

Note: Systems configured primarily as web servers, such as for customer display purposes, should not include a client password as this would prevent users from viewing the data on their web browser. In this situation, a second instance of gmServer should be configured with a blank value for the client text password. The parameters “-t ''” will allow any web browser to receive data from the gmServer program without needing a password.  Starting in Version 1.00.9, the gmAccounts command may be used to control password access.

-T Server Text Password Value

Specifies the text string password needed to access an up-stream (server) connection. Depending on the up-stream (server) connection, no data access may be permitted unless a password is provided.

Note: Starting in Version 1.00.9, the gmAccounts command may be used to control password access.

-u Screen Update Interval

Each device in the renewable energy system provides certain status information in text format. The “-u” option specifies the number of seconds between the output of this information.

When operating in GUI mode, the “System Status” section of the GUI will be replaced by updated status information every “-u” seconds.

This value may be set using the “Display Interval” field in the “Connection Information” panel.  The initialization file parameter is System.DisplayInterval.  The permitted values are whole numbers of seconds greater than 0.

-v Verbose Output

The “-v” option increases the amount of information which is displayed while the gmServer command is executing. This option is primarily used for debugging purposes and should not be used unless directed to do so by greenHouse Computers, LLC support personnel.

-V Create Virtual shunt-based battery monitor

Many of the features of the greenMonitor software benefit from the presence of an OutBack Power Technologies FLEXnet DC or other manufacturer battery monitor. In order to provide the benefits of having a FLEXnet DC monitor without having one present in the system, the “-V” option may be used4.

The virtual battery monitor will have the first charge controller connected as shunt “A”, and up to two inverters connected as shunts “B” and “C”.

You may enabled the virtual battery monitor feature by clicking the “DC Monitor” button in the “Connection Information” panel.

Warning: Although every effort has been made to insure that the data is accurate, various unavoidable errors can occur in the data.

Note: 3rd party software, such as WattPlot from Intallact, will need to be configured to recognize the new hardware. To determine the port that is being used for the virtual battery monitor, you may use the gmMate command to view the devices that are connected to the Hub4 or Hub10 that is part of your system. That is the port you will use when you reconfigure your 3rd party software. Failure to update your 3rd party software may result in errors or incorrect behavior, or complete failure of the 3rd party software.

Warning: WattPlot is incapable of automatically adding devices to its configuration without user intervention. You must configure the new logger device in WattPlot before you enable it in gmServer.

-W Weather Source

The greenMonitor software supports an optional weather station, or access to a remotely maintained weather station using Weather Underground (http://www.wunderground.com). When added to the system, the greenMonitor software is able to calculate more detailed information about the environmental conditions when the system is operating, improving the accuracy of the statistical data produced by the gmStatistics command.

A locally connected weather station, such as the La Crosse Technologies WS-23xx family of weather stations, produces data which is ready by the open2300 software (please request this software from support@greenhousepc.com if you have a weather station). When the weather source is a locally connected weather station, the parameter to the “-W” option is the name of the file containing the periodic weather updates. For example, “-W /opt/open2300/weather.xml”, if the data from your personal weather station were being written to that file.

A remote weather station is identified by an alphanumeric identifier, given in all upper case letters, with no punctuation or spacing. For example, the weather station identifier KAUS refers to the Austin-Bergstrom International airport and the weather station identifier KTXAUSTI87 refers to the weather station operated by greenHouse Computers, LLC on the Weather Underground network. If you live in the greater Austin area and wanted to use the airport weather service, you would use “-W KAUS”. You can find a list of weather station identifiers by visiting the Weather Underground website and searching for systems in your area. Care should be taken to insure that you select a weather station with an identical microclimate.

The weather station or weater data file may be specified by entering the appropriate value in the “Weather Station” field in the “Connection Information” panel.  The initialization file parameter is System.WeatherData.  The permitted values are weather station identifiers which are recognized by Weather Underground.

-Z WattPlot Compatibility Mode

The “-Z” option enables certain features which allow gmServer to perform as a data source to WattPlot Version 4.5 and newer clients. The greenMonitor clients are aware of this mode and can function seamlessly whether gmServer is operating in native (greenMonitor) mode or WattPlot Monitor compatibility mode.

Note: WattPlot compatibility mode is dependent on certain features of WattPlot Version 4.5 as of the writing of this manual. Continued compatibility depends on Intallact not changing the WattPlot program in a way that would break compatibility.

inputFileOrDevice Parameter

The source of Mate data is provided by the remaining parameters on the command line.  Each value will create a separate Mate data stream, all of which will be combined by gmServer. The permissible values are:

device:deviceName – The name of the serial port which is connected directly to the Mate display controller. Typical serial port names on Microsoft Windows systems are COM1: or COM2:. On Linux and Apple Mac OS X 10.5, a typical name might be /dev/ttyS0.

dialup:phoneNumber@deviceName – The name of the serial port which is connected to the modem and the phone number which is dialed to reach the remote Mate display controller.

file:inputFileName – The name of the file on the computer. A file name which ends with “.bin” or “.gmz” will be treated as a compressed data file and decompressed automatically as it is being read.

host:serverName:tcpPort – The name of the remote server or serial-to-IP conversion device. A dotted decimal IP address may be used in lieu of the server's name. The tcpPort value is the numerical value of the remote port.

null:null – Indicates that there is no direct Mate connection and the data will be coming from other sources.

Operation

The gmServer command may be executed from the command line on Windows operating systems, as well as Linux systems which do not use the /etc/init.d or /etc/rc.d directory to contain services and the /etc/conf.d or /etc/default directory to contain service configuration information. Executing the gmServer command from a window or shortcut results in gmServer being started without connection information. At present, the only supported Linux systems are Debian (and derivatives, such as Ubuntu) and Gentoo Linux for the gmserver service.

Once started in GUI mode, you may enter the connection information (“Host”, “Device”, “Dialup” or "File" connection types), or the name of a system (“System” connection type)5.

Advanced Operation

The simplest, functional command line is

gmServer -S 60 gmStatus.gms -s 9090 device:serialDevice

It stores the persistent status information in the file gmStatus.gms once a minute, creates an Internet server on port 9090, and opens the named serial device. Common Microsoft Windows operating system serial device names include COM1: and COM2:. Common Linux operating system serial device names include /dev/ttyS0 and /dev/ttyS1.  You may also use the gmLink command to automatically detect which serial port is connected to the Mate display controller. Refer to your hardware user's manual as well as your operating system documentation to determine the correct device name.

You may also start the gmServer command in graphical user interface (GUI) mode from a desktop shortcut or “Start Menu” option, depending on your operating system. Many of the most commonly used options will automatically be filled in for you, requiring only that you enter the information needed to connect to your Mate display controller. The gmConfigure command may also be used in GUI mode to greatly simplify the initial setup process.

The gmServer command is capable of automatically recognizing the devices which are attached through the Mate. This information is stored internally if a configuration file has not been provided, but is also made available to the gmConfigure command.

Once you have verified that the serial port connection is working by using the gmConnect command or gmTrace command, you may begin adding options to the command line or selecting additional features and options using the GUI. You will want to create a configuration file using the gmConfigure command. Once the configuration file has been created, and you have verified that it has the correct syntax, you may begin using it by adding the “-C System.gmc” options to the command line. For a Linux system, the gmserver file in the configuration directory (varies by Linux distribution) contains the default command line parameters used by the gmserver service.

When operated in GUI mode,the gmServer command has four areas. The top most area is for connection information and command options and is referred to as the “Connection Information” panel. The next area is the “System Summary” bar and displays up to date, real time data as well as historical data and analysis. The “System Summary” bar also includes the “Host” pull-down menu. The third panel is “System Status” and contains text information about the state of the system. The forth panel is “System Events” and includes all the events which have occurred since the gmServer command was started. The last panel provides information about any connected clients. This is useful for monitoring the hosts that may have access to your server.

Screen Shots

The gmServer command is made up of five separate sections. They are the “Connection Information” panel, the “System Summary” panel with the “Host” menu button, the “System Status” panel, the “System Events” panel and the “Clients” panel. Clicking on the bar containing the name of that section expands or collapses the section. Collapsing all four sections leaves only the “Status Bar” remaining, allowing you to view status and summary information at a glance.

Connection Information

This panel describes the actual connection to the Mate display controller as well as the location of various files and configuration information.

The “Type” menu is used to select one of five different ways of specifying a system, as well as adding a new data source.

Selecting “Host” allows you to define a system by entering the host name or IP address, as well as the TCP port number for the remote system. Pressing the “Connect” button will open a network connection to the system.

Selecting “Device” allows you to define a system by entering the device name (“COM1:”, “/dev/ttyS0”, etc) of the computer's serial port that is directly connected to the Mate display controller. Pressing the “Connect” button will open the serial port. Virtual “COM” ports, as well as USB-to-Serial converters are also supported, so long as they have a device name.

Selecting “Dialup” allows you to specify a system by entering the device name of a modem (“COM1:”, “/dev/ttyS0”, etc) of the computer's serial port, and the telephone number for the remotely connected system. Dialup access requires that the Mate display controller be accessible via a telephone connection. greenHouse Computers, LLC has the appropriate cables available (sold separately).

Selecting "File" allows you to specify a previously saved file as input.  The file may have been created with either gmServer or the gmTrace command.

Selecting “No Mate” allows you to specify that a system does not include a Mate display controller and will be receiving data from another source, such as a user-defined battery monitor.

Selecting “System” allows you to save the current settings using a name that you enter in the “System Name” field. Once you have verified that the settings in the rest of the “Connection Information” panel are correct you may press the “Save” button and the current settings will be written to the “System.gmi” file located in a subdirectory (folder) having the name you entered in the “System Name” field. Entering the system name at a later time and pressing “Connect” will load the file and automatically connect to the specified system.

System Summary

When the other four panels are collapsed, the "System Summary" panel displays the current state of the monitored system. Hovering over the data provides additional information, such as device state or projected production and consumption.

The “Charger Watts” field is the current total output of all charge controllers in the system. Hovering the mouse point over the value shows the individual charge controller states. The pop-up text includes the current state of the charge controllers, as well as the average charger power for the current hour. The value is color coded6 based on whether the current power is greater than or equal to (green), slightly less than (yellow) or significantly less than (red) the average value for this hour of the day.

The “Load Watts” field is the current total output of all inverters in the system, as well as any loads that are being supported by the inverter inputs, such as from a generator or electric utility. Battery charging by the inverters is included in the load field. Power exported to the electric utility is not included. The pop-up text includes the current state of the inverters, as well as the average power consumption for the current hour. The value is color coded based on whether the current consumption is less than or equal to (green), slightly greater than (yellow) or significantly greater than (red) the average value for this hour of the day.

The “Battery Charged” field is the amount of energy added to (positive values) or removed from (negative values) the batteries for the current day. The color coding indicates if the battery is being charged (green), neither charged nor discharged (yellow), or discharged (red).

The “Charger Total KWh” field is the daily total output of all charge controllers in the system. Hovering the mouse pointer over the value shows the expected total value for the current hour. (Note: This field is accurate only after gmServer has been running for a full 24 hour period.) The color coding indicates if the current total charge is greater than or equal to (green), slightly less than (yellow), or significantly less than (red) the daily total by this hour of the day.

The “Load Total KWh” field is the daily total output of all inverters in the system. Hovering the mouse pointer over the value shows the expected total value for the current hour. (Note: This field is accurate only after gmServer has been running for a full 24 hour period.) The color coding indicates if the current total consumption is less than or equal to (green), slightly greater than (yellow), or significantly greater than (red) the daily total by this hour of the day.

The “Battery SOC %” field is the current battery state of charge, as reported by an OutBack Power Technologies FLEXnet DC or other battery monitor. Hovering over the field reports the current battery capacity in amp-hours, as well as the total battery capacity.

The “Health” field is the overall health of the system, based on errors or warnings reported by the components in the system. Hovering over the field reports any errors or warnings which are currently active (yellow indicates a warning exists, red indicates an error exists), as well as any errors or warnings for the current day.

Additional fields can be selected by clicking on the "Host" button and selecting fields to add, as well as remove, from the System Summary bar.  The fields "Inverter Watts", "Inverter Total KWh" and "Battery Temp" are not displayed by default, but may be added if desired.

System Status

The System Status panel contains text information about the system. The entire state of the system is present in the System Status field in an easy to read text format.

System Events

All enabled system events are logged to the "System Events" panel. A scroll bar will appear when the event panel has filled.  Event management is performed with the gmEvents command.

Clients

The Clients panel lists connection information for each client. This information is particularly useful when gmServer is being used to provide information to users on other computers, or when gmServer is providing data to a web server.  User access is managed using the gmAccounts command.

Host Menu

Clicking on the name of the connection in the “System Summary” bar opens a pull-down menu which can be used to launch many of the most commonly used system commands. The commands will be launched with the correct parameters for the current renewable energy system.  The list of available commands may vary, depending on which version of the greenMonitor software is installed.

System Settings

The gmServer command is controlled by a number of settings which are defined in the System.gmi file.  These settings may be viewed and modified using the gmHosts command.  These settings may be used to replace the command line options given above.  A partial listing of available settings is given below.  The name before the "." is the section and the name after the "." is the name of the value.

NameDescriptionPermitted Values
Database.DirectoryLocation of the directory which contains the local files database.  Requires the Standard, Advanced or Commercial license levels.The named directory must be relative to the greenMonitor installation directory, or be an absolute path name.  The directory must be writable by the user who started the gmServer command.  You should refrain from using any punctuation or special characters in the directory name as this can cause problems with the greenMonitor software on a number of operating systems.
Database.UpdateDatabase update interval in seconds.The recommended value is 60 seconds for desktop and server systems and 180 seconds for greenMonitor Lite systems.  Note that a greenMonitor Lite system may have a limited amount of storage and use of local file databases is not recommended for 8GB systems.
System.AnnouncePortPort for UDP broadcast announcements.The recommended value is 9191.  This broadcast port will be listened to by gmConsole when monitoring systems using broadcast packets.
System.AnnounceTTLThe time-to-live value for UDP broadcast announcements.The recommended value is 2.  This is the maximum number of hops for a broadcast packet before it is discarded.
System.AuditLogLocation of the directory which contains daily command logs.  These logs are viewable using the "Command Log" menu option in the web server interface.The named directory must be relative to the greenMonitor installation directory, or be an absolute path name.  The directory must be writable by the user who started the gmServer command.  You should refrain from using any punctuation or special characters in the directory name as this can cause problems with the greenMonitor software on a number of operating systems.
System.EventLogLocation of the directory which contains daily event logs.  These logs are viewable using the "Events" menu option in the web server interface.The named directory must be relative to the greenMonitor installation directory, or be an absolute path name.  The directory must be writable by the user who started the gmServer command.  You should refrain from using any punctuation or special characters in the directory name as this can cause problems with the greenMonitor software on a number of operating systems.
System.HistoryEnable or disable the "History" mechanism.The value must be "Yes" or "No".  A value other than "Yes" will be interpreted as "No".
System.NameThe abbreviated name of the system.  The default value is the name of the directory containing the system files.The name must not contain any punctuation or other special characters.  For best results, the name should contain only the upper and lower case alphabetic characters and numbers 0 through 9.  This name will be used to distinguish between multiple instances of the software running on the same or different systems.
System.NotificationsEnable or disable event notification e-mail and SMS text.The value must be "Yes" or "No".  A value of "Enabled" is supported for backwards compatability.  Any other value will be interpreted as "No".
System.StatisticsThe name of the file which contains the statistical production and consumption data.The name of a file, either relative to the greenMonitor installation directory, or an absolute path name, which will contain the system's statistical performance data.  The recommended file name is Systems/mySystem/gmStatData.xml where "mySystem" is replaced with the name of the folder containing the system information.  Note that on Microsoft Windows systems the "/" character is replaced by the "\" character.
System.TimeZoneThe Java name for the system's timezone.  This name will be transmitted to any clients so that they may report data using the same timezone as the system.The name must be a valid Java timezone name.  Due to frequent changes in timezone rules and boundaries by governments around the world, there is no official list of timezone names on the Java  website.  The best location for timezone names and data appears to be the private web site http://twiki.org/cgi-bin/xtra/tzdatepick.html. Once you have identified the correct timezone for your location, click on the link for that timezone and the name and current local time in that timezone will be provided.
System.WebServerThe TCP port number for the web server interface.The value must be a number in the range 1 to 65535.  The recommend values are 80, 8080 and 8088.

Notes

The script which starts the Java command is named gmServer. The Linux service name is gmserver.

The default server password is set at installation time using a random number generator. This is to protect the system from unauthorized modifications. This should be changed to a four digit value which is easily remembered, while being hard to guess.

The system configuration file is used by many of the commands to determine the initial system configuration, component limitations, names and other data needed to more accurately report data. This file should be created shortly after the gmServer command has been verified to be communicating with the Mate. Remote clients, including network connected instances of the gmServer command, will request a copy of this file, so it is not required for remote users, only for the system which is connected directly to the Mate, or which is connected remotely to the Mate via the gmConnect command as the gmConnect command does not support configuration files. The gmServer command will automatically create a new System.gmc file if one does not exist. It may then be modified using the gmConfigure command, either from a shortcut or using the gmServer host menu.


1 Subject only to licensing restrictions.

2 Larger numbers of Mate display controllers may be viewed more conveniently by the gmConsole command in the the Site and Business Edition license versions of the greenMonitor software.

3 The software security profession considers it to be beneficial to expose the precise details of security flaws in the hope that software vendors will correct them. However, given the weaknesses of the operating systems that are involved, some of the flaws cannot be corrected without seriously impacting the functionality of the software. For Linux and Mac OS X based operating systems, the gmServer command should be executed in text mode, as an initial startup service for maximum password security. For Microsoft Windows, the gmServer command should be executed in text mode as a Windows service and started and stopped automatically when the operating system is started. In both cases, the gmServer command's environment must not be accessible by ordinary users.

4 It is strongly advised that you upgrade your system to include an actual FLEXnet DC if you are relying on the data from the virtual battery monitor.

5 Support for other source types may be added in future releases.

6 For our color vision impaired customers, the type face of each field is altered to reflect the color coding. A green field appears in a plain font, a yellow field in an italic font, and a red field in a bold font.