Other Hardware Documentation WiFi, Cellular, and other Networking TP-Link Access Point Setup (TL-WA801ND) The TP-Link TL-WA801ND is a multi-function access point. This document is intended to assist with configuring the TL-WA801ND to allow the EG3000 to communicate on an existing WiFi network. This guide is designed only for use with a TP-WA801ND purchased through eGauge Systems For full documentation and other support issues, please visit the TP-Link website at http://www.tp-link.com/. The full TP-Link manual as of the writing of this article is available here. Please visit TP-Links website for the most up to date information. Configuration instructions Attach the included two antennas to the back of the access point. Ensure the connections are not loose. Power the TP-Link TL-WA801ND using the barrel jack or PoE (Power-over-Ethernet) injector, and connect a computer to the access point using an Ethernet cable (if using the PoE injector, connect the LAN port to your computer, and the POE port to the access point). Ensure all wireless interfaces are disabled on the computer (such as WiFi and Bluetooth) and that DHCP is enabled on the Ethernet interface. Open a web browser and access the TL-801ND by visitinghttp://tplinkap.net/ Log in using username admin and password admin and choose Login. Click Quick Setup from the left side, then Next. Change the admin password if desired and choose Next. Choose Client as the operation mode and press Next. Find your wireless network, and choose Connect. Enter the wireless network password and choose Next. If DHCP service is on the wireless network, leave the Type as Smart IP (DHCP) and choose Next. Verify the settings that are chosen, and choose Finish. The access point has been configured and the eGauge may be connected via Ethernet for network communication. Troubleshooting I cannot reach the eGauge on the proxy server or locally. Verify the TP-Link access point is powered up and configured. Connect a laptop to the Ethernet port on the TP-Link access point, disable WiFi, bluetooth and any other wireless network interfaces and try reaching the internet. I don't see my network listed in the quick setup network list, or the signal is weak or inconsistent. Ensure the two antennas are secured on the back of the unit and that the wireless network is within range of the access point. I do not have network access through the TP-Link access point, or the network information has changed and I cannot access the configuration interface. Perform a factory reset on the TP-Link access point by using a paperclip or pin and holding down the recessed reset button on the back of the unit, release the button when all the LEDs turn off or flash. Then, re-configure the unit using the steps in this article.Multitech Cell Modem Setup (MTE-LAT6-B07) Starting May 2022, cellular plans using the fast.t-mobile.com APN must have a new SIM card and new APN configured for continued service. The new APN is iot.tmowholesale and requires a new SIM card to be installed. Please follow the SIM card installation and Initial Configuration instructions below. Old SIM cards will not function after May 2022 and can be identified by having a pink T-Mobile logo on it. The new/current SIM cards are white and do not have any branding on them. eGauge offers limited support for the Multitech cellular modem. This hardware is typically used in locations where local Internet access is not available or secured. The Multitech can accept a variety of SIM cards from various providers. However, eGauge only offers support for T-Mobile data plans purchased through eGauge. If a third party data plan is used, it may be necessary to contact the cellular service provider to obtain the correct information for modem configuration. This document is to be used with the Multitech MTE-LAT2-B07 and MTE-LAT6-B07. Model Default username / password Notes MTE-LAT2-B07 admin / admin MTE-LAT6-B07 (newer, sold starting around May 2019) admin / admin123 eGauge configures the password as admin123 before shipping. Factory resetting will cause the default password to be admin, and upon first setup a new password is required to be set. MTE-LAT6-B07 (newer firmware, mid 2020) admin / Admin123 Note password has Admin123 capitalized per password requirement from Multitech firmware. Factory resetting will cause the default password to be admin, and upon first setup a new password is required to be set. SIM card installation: To remove the SIM card, push in on the SIM card and it will spring it out from the locked position. Ensure the SIM card notch lines up with the notch on the SIM card slot image (circled in green below). The modem uses a full sized SIM card, do not remove outer plastic holders of it. When correctly inserted, pushing the SIM card in (may need to use a fingernail) will lock it in place. A rapid flashing SIM LED indicates there is a problem physically reading the SIM card. Initial Configuration for T-Mobile data plans from eGauge Systems: 1. Connect a computer to the modem using an Ethernet cable. Disable any wireless adapters (WiFi, Bluetooth, etc). Open the web browser of your choice and navigate to 192.168.2.1 (assuming the modem still has the default configuration in place). The default username is "admin" and password is either "admin", "admin123", or "Admin123". If credentials have been changed, a factory reset may be performed to regain access with username "admin" and password "admin". 2. The Network Setup may load automatically. If it does not, select Wizard and then Network Setup Wizard from the menu on the left side of the screen. Network Setup Wizard - first page 3. Set your user credentials and time zone as desired. On the "WAN Interface" page (step 4), choose "Manual-configuration". Select "USA" as the Country, and "T-Mobile (LTE)". The following settings must be configured: APN (this must be changed from default): iot.tmowholesale Dialed Number (this should remain default): *99***1# These values will not work with other cellular providers. If using a different cell plan, it will be necessary to contact the cellular service provider to get the information needed to properly configure this page. eGauge Systems cannot assist with this process, even if the Multitech cellular modem was purchased directly through eGauge. WAN interface page - page 4 4. Apply the settings on the final page, after verifying that they are correct. Verifying Connectivity Once the modem is properly configured, it's time to verify that the installation location and antenna position are viable. The Network Status page is useful for this process. This page can be found by selecting Status and then Network Status from the menu on the left side. Cellular connectivity and signal strength can be verified under the "3G/4G Modem Status". Ensure that the Link Status is "Connected" and the Signal Strength is reasonable. Anything lower than about 50 percent may lead to communication issues. Network Status page If working with an external antenna, it's possible to use this page to locate the best antenna positioning. To do this: 1. Move the antenna to the desired location 2. reload the Network Status page (F5 key in most browsers) 3. make a note of the Signal Strength 4. move the antenna to the next test location and repeat Connecting Multiple eGauges The Multitech is set up to handle one eGauge by default. However, it is possible to connect multiple eGauge meters to a single Multitech cell modem using a powered switch. Some additional configuration changes will need to be made. Navigate to Basic Network then WAN. Near the bottom of the page, make sure "NAT" is checked. NAT option (shown checked) Once NAT has been enabled, you can check to see whether devices are obtaining DHCP leases by navigating to Basic Network and then Client / Server. Select "DHCP Server" from the list of options at the top. Next, select "DHCP Client List". A list of devices with active DHCP leases should be shown. Note that this assumes the computer is connected to the switch alongside the eGauges. Changing the default credentials It is highly recommended to change the default credentials on the Multitech hardware for security purposes. Navigate to System and then System Related. Select "Change Password" at the top of the page. Enter the old password (admin) and your new password twice. Change Password page Factory Reset To perform a factory reset, power the modem on and allow it to fully boot (2-3 minutes). While the modem is powered up, using a paperclip or other object press and hold in the "Reset" button located on the side of the multitech next to the Ethernet port for 10 to 30 seconds. Release and the Power LED should rapidly blink indicating a factory reset is occurring.TP-Link powered USB WiFi Bridge Setup (TL-WR802n) The TP-Link TL-WR802N is a WiFi bridge that can be used to connect the eGauge to a wireless network. The bridge is powered by USB, so it may be powered directly from an EG41xx device's USB port for convenience. Ethernet is connected from the bridge to the eGauge to provide WiFi network access. TP-Link TL-WR802N USB poweredWiFi bridge When the TP-Link TL-WR802N is configured in client mode as per instructions, any devices connected to the Ethernet port of the bridge will obtain their own unique IP address from the LAN. The TP-Link bridge itself will obtain a separate IP address from the LAN. Tips for Troubleshooting: A factory reset may be performed by holding the recessed Reset pin in the bridge for 5-10 seconds while the bridge is powered on. A scheduled reboot may be configured by accessing the TP-Link admin interface and navigating to System Tools -> Reboot. to access the admin interface of a configured TP-Link bridge, disable all wireless adapters on a computer, connect directly to the TP-Link Ethernet port and access http://tplinkwifi.net/. Alternatively, enter the IP address of the TP-Link WiFi bridge from a computer connected to the same WiFi network the bridge is on. You may need to view the main router's DHCP table to find the IP address for this method. Setup instructions Do not connect Ethernet to the TP-Link bridge before the setup via WiFi is complete. If an eGauge meter or other device is connected via Ethernet to the TP-Link bridge, the initial setup will not work. 1) Power the TP-Link bridge via USB. The bridge should be within WiFi range of the network it will connect to. You may connect it via Ethernet and power it from an EG41xx device at this time. 2) Using a laptop with WiFi, connect to the wireless network broadcasted by the TP-Link bridge. The SSID and password are located on a card that comes with the wireless bridge. This information is also printed on the bottom of the bridge itself. 3) When connected to the wireless bridge's network, open a web browser to http://tplinkwifi.net/. Log in using the default login printed on the card that comes with the wireless bridge. 4) Choose "Next" to begin the Quick Setup. 5) You may choose to change the admin password in this step. Choose Next when done. 6) Choose "Client" as the operation mode and press Next. 7) A list of in-range WiFi networks are displayed. Choose "Connect" next to the network you will connect the eGauge to. 8) Enter the password for the WiFi network and choose Next. 9) Choose "Smart IP" for the LAN type. This will automatically assign the admin interface an IP address from the main network, and any eGauges connected to the Ethernet port will obtain an IP address from the main network. Press Next to continue. 7) You can review the configuration and press Finish to save and reboot. Below shows the setup of an eGauge connected to a TP-Link TL-WR802N bridge connected in client mode on a WiFi network. The network uses the 172.17.2.* network. The WiFi bridge was assigned 172.17.2.180 while the eGauge was assigned 172.17.2.182: Third party Environmental Sensors Information on third party environmental sensors Comet T4411 Temperature Sensor (Modbus RTU) Overview This product is not fully supported by eGauge Systems. Information here is provided as-is. The T4411 Temperature Sensor from Comet can be used to read temperature in outdoor installations or where a sensor meeting IP65 requirements must be used. The T4411 uses an RS485 interface, and as such requires either a BF430 serial to Ethernet adapter (when using the EG30xx or EG4xxx model lines) or an eGauge serial to USB adapter (EG4xxx with USB ports only). Both pieces of hardware can be purchased directly through eGauge Systems. Steps highlighted in green apply only to the BF430, while steps highlighted in blue apply only to the USB485 adapter. Any other steps are required regardless of which adapter type or eGauge model is used. The information below is intended to provide an overview of the correct wiring, communication settings, and eGauge configuration. Additional steps may be required if the BF430 is not purchased directly through eGauge. eGauge systems can only provide limited support for the T4411 and BF430. Advanced questions may need to be addressed directly to Comet (for the T4411) or Chiyu (if using a BF430). While these instructions are for the Comet T4411, most other Comet sensors should work with the eGauge. However, there may be differences in configuration, installation, required input power, etc. eGauge Systems cannot guarantee that every Comet sensor will work as expected. Please contact eGauge support if using a different sensor at support@egauge.net. Installation and wiring Serial to Ethernet adapter (BF430) - EG30xx and EG4xxx The BF430 can power the T4411 directly using the included 12V 1A power supply. No additional power supply is needed in this configuration. Connect the BF430 to power using the supplied DC adapter. Connect the wiring between the T4411 and BF430 as follows: T4411 BF430 B (-) 485- A (+) 485+ GND 9~30V- U+ 9~30V+ Make sure the toggle switch on the BF430 is set to "485". The BF430 needs to be connected via Ethernet to the same network used by the eGauge. We recommend connecting the eGauge to the network via Ethernet as well - PLC or WiFi can cause issues with latency. Serial to USB adapter (USB485) - EG4xxx with USB port only With a serial to USB adapter (USB485), the T4411 will require an external power supply (check the T4411 documentation for acceptable voltage ranges; as of the time this article was written 9-30VDC is the standard). The 12Vdc power supply sold by eGauge systems will work in most cases. Connect the USB485 to the eGauge using the provided USB cable (untested cables may cause problems or may not work at all). Connect the wiring between the T4411 and USB485 as follows: T4411 USB485 B (-) D- A (+) D+ GND ⏚ terminal (ground) The T4411 will need an external power supply with this configuration. The 12Vdc power supply sold by eGauge Systems will work, or a suitable power supply rated to provide 9-30VDC can be used. Connect the power supply as follows: T4411 9-30VDC Power Supply GND negative side of power supply U+ positive side of power supply Make sure the termination switch on the USB485 is set to "ON" Connect the USB485 to the USB port on the eGauge. Make a note of whether USB1 or USB2 is used. Sample wiring for the Comet T4411. T4411 shown with faceplate removed. Third party device configuration Verify T4411 settings The Comet sensor default serial settings are as follows: Baud: 9600Data Bits: 8Parity: NoneStop Bits: 2Modbus ID/slave address: 1 These settings can be changed using the free TSensor software available through Comet. eGauge Systems does not support or distribute this software. For assistance with the TSensor software, contact Comet directly. If using multiple Modbus devices on a single RS485 chain, each device must have a unique Modbus slave address. Verify BF430 settings The settings provided on the BF430 should be fine if purchased through eGauge. If configuring manually or if in doubt about the settings, connect the BF430 to the local network and use a computer to access the BF430 configuration page. The default credentials are user: admin pass: admin.  Make sure the physical toggle switch on the BF430 is set to "485". Click "Serial Type" from the menu on the left. Make sure the following settings are in place: Serial Type = RS485Baud Rate = 9600 (selected in the dropdown, leave the user defined baudrate as "0")Data Bits = 8Parity Check = NoneStop Bits = 1Flow Control = NoneAll other settings should be "0" Verify USB485 Settings The USB485 is not user-configurable, and has no settings to adjust. However, the termination switch should be set to "ON". eGauge configuration Create a Modbus map (Firmware 4.1 or later) For instructions on creating an inline definition, see this section. Note that inline definitions are no longer recommended for use from firmware 4.1 onward. Open the eGauge UI using the web browser of your choice. Navigate to Settings -> Installation. Under Remote Devices click "Modbus Map" - a new page will load. Click the  icon in the top right corner of the page to create a new map. Name the map appropriately (in this example, we'll use T4411 as the map name - shorter is generally better). Next, click the options button. Add the following options: "Default unit number" should be set to 1 (assuming the default Modbus ID is set on the Comet sensor)"Default serial-port parameters" should be set to 9600/8n1 (assuming default serial settings are set on the Comet sensor) Click "Save" in the bottom right corner of the page. Next, click the "Add Register" button. Enter the following settings (note that "Scale" and "Offset" should be blank): Click OK, then click Save in the bottom right corner of the page. The final result should look like this: For more information on the Modbus Map tool, see this article. Add remote device Navigate to Settings -> Installation. Under "Remote Devices", click "Add Device". Give the device a suitable name (this is arbitrary), then select "Serial" for the protocol (older meters may use "RS485" instead). In the device address field, enter: BF430modbus://T4411@MAC (where MAC is the MAC address of the BF430 adapter) USB485modbus://T4411@USBx (where x is either 1 or 2 depending on which USB port is in use) After adding the appropriate address, click the grey "?" to the right of the remote device address. After a few seconds, this should turn into a green check mark. Add registers Before starting, make sure to fetch available registers by clicking the grey "?" to the right of the remote device address. Under Registers (X of Y in use): Click "Add Register". Name the register as appropriate. Using the dropdown menu, change the "P" to the remote device name. A second dropdown menu will appear. Select the register of interest (for example, Humidity). Repeat as necessary to add a register for each data point of interest. Click "Save" at the bottom of the page to save settings. The eGauge will reboot. Verify readings Verify that the values on the main graph of the eGauge match those shown on the front of the T4411 (the external display on the T4411 can be used for this purpose). Note that a second or two of transmission delay may occur - this is normal. After rebooting, the eGauge may take up to five minutes to start reading data from the T4411 (particularly if a BF430 is used). (Deprecated) Add remote device using inline definitions Once finished adding an inline definition, continue from the "Add remote device" section When using a BF430 Device name = whatever is appropriate Protocol = RS485  (firmware 4.0 and newer, select "Serial") Device address = modbus://tempF=48,u16.1@ where  is the MAC Address of the BF430, for example modbus://tempF=48,u16.1@000ee3056940 Note that the T4411 (and all Comet sensors) have several Modbus registers in addition to temperature (and/or humidity and pressure, depending on model). These registers are not listed in this example for the sake of simplicity. For a full list of registers for a given device, contact Comet or visit https://www.cometsystem.com. By default, the T4411 provides temperature readings in F (this may not be true for meters purchased outside of the US). This can be changed using the TSensor software. Click the grey "?" mark next to the remote device address and wait for a green check to appear. A red "X" typically indicates a configuration or wiring issue. Click "Save" at the bottom of the page to save settings. The eGauge will reboot. When using a USB485 Device name = whatever is appropriate Protocol = RS485  (firmware 4.0 and newer, select "Serial") Device address =  modbus://tempF=48,u16.1@USBX:9600/8n2 where X is the number of the USB port, for example modbus://tempF=48,u16.1@USB1:9600/8n2 Note that the T4411 (and all Comet sensors) have several Modbus registers in addition to temperature (and/or humidity and pressure, depending on model). These registers are not listed in this example for the sake of simplicity. For a full list of registers for a given device, contact Comet or visit https://www.cometsystem.com. By default, the T4411 provides temperature readings in F (this may not be true for meters purchased outside of the US). This can be changed using the TSensor software. Click the grey "?" mark next to the remote device address and wait for a green check to appear. A red "X" typically indicates a configuration or wiring issue. Click "Save" at the bottom of the page to save settings. The eGauge will reboot. ACI TSense Environmental Sensor This product is not fully supported by eGauge Systems. Information here is provided as-is. The TSense Environmental Sensor from ACI can be used to read CO2 concentrations, relative humidity, and temperature. The TSense uses an RS485 interface, and as such requires either a BF430 serial to Ethernet adapter (when using the EG30xx or EG4xxx model lines) or an eGauge serial to USB adapter (EG4xxx with USB ports only). Both pieces of hardware can be purchased directly through eGauge Systems. Steps highlighted in green apply only to the BF430, while steps highlighted in blue apply only to the USB485 adapter. Any other steps are required regardless of which adapter type or eGauge model is used. The information below is intended to provide an overview of the correct wiring, communication settings, and eGauge configuration. Additional steps may be required if the BF430 is not purchased directly through eGauge. eGauge systems can only provide limited support for the TSense and BF430. Advanced questions may need to be addressed directly to ACI (for the TSense) or Chiyu (if using a BF430). Installation and wiring Serial to Ethernet adapter (BF430) - EG30xx and EG4xxx The BF430 can power the T-Sense directly using the included 12V 1A power supply. No additional power supply is needed in this configuration. Connect the BF430 to power using the supplied DC adapter. Connect the wiring between the T-Sense and BF430 as follows: TSense BF430 485_B 485- 485_A 485+ Agnd 9~30V- G+_Pin1 9~30V+ Make sure the toggle switch on the BF430 is set to "485". The BF430 needs to be connected via Ethernet to the same network used by the eGauge. We recommend connecting the eGauge to the network via Ethernet as well - PLC or WiFi can cause issues with latency. Serial to USB adapter (USB485) - EG4xxx with USB port only With a serial to USB adapter (USB485), the T-Sense will require an external power supply (check the T-Sense documentation for acceptable voltage ranges; as of the time this article was written 12V-24VDC works fine). Connect the USB485 to the eGauge using the provided USB to micro USB cable (untested cables may cause problems or may not work at all). Connect the wiring between the T-Sense and USB485 as follows: TSense USB485 485_B D- 485_A D+ 485_Gnd ⏚ terminal (ground) The TSense will need an external power supply with this configuration. The power supply sold by eGauge Systems will work, or a suitable power supply rated to provide 12-24VDC can be used. Connect the power supply as follows: TSense 12-24VDC Power Supply Agnd negative side of power supply G+_Pin1 positive side of power supply Make sure the termination switch on the USB485 is set to "ON" Connect the USB485 to the USB port on the eGauge. Make a note of whether USB1 or USB2 is used. Third party device configuration Verify TSense settings Verify the serial address settings and baud rate using the touchscreen on the front of the unit. There are two PIN numbers, PIN1 (1111) and PIN2 (2001). Depending on whether the hardware has been accessed in the past, there may not be a prompt for PIN1. If the PIN numbers have been changed, contact ACI for additional support. Tap on the "SenseAir" logo -> enter PIN1 -> Settings -> enter PIN2 -> Meter -> RS485 Ensure the following settings are in place: Protocol = Auto Address = 10 Baudrate = 9600 Parity,Stopbits = None,1 Verify BF430 settings The settings provided on the BF430 should be fine if purchased through eGauge. If configuring manually or if in doubt about the settings, connect the BF430 to the local network and use a computer to access the BF430 configuration page. The default credentials are user: admin pass: admin. Make sure the physical toggle switch on the BF430 is set to "485". Click "Serial Type" from the menu on the left. Ensure the following settings are in place: Serial Type = RS485 Baud Rate = 9600 (selected in the dropdown, leave the user defined baudrate as "0") Data Bits = 8 Parity Check = None Stop Bits = 1 Flow Control = None All other settings should be "0" Verify USB485 Settings The USB485 is not user-configurable, and has no settings to adjust. However, the termination switch should be set to "ON". eGauge Configuration Add remote device Open the eGauge UI using the web browser of your choice. Navigate to Settings -> Installation. Under Remote Devices click "Add Device" When using a BF430 Device name = whatever is appropriate Protocol = RS485 (firmware 4.0 and newer, select "Serial") Device address = modbus://tsense.10@ where  is the MAC Address of the BF430, for example modbus://tsense.10@000ee3056940 Click the grey "?" mark next to the remote device address and wait for a green check to appear. A red "X" typically indicates a configuration or wiring issue. Click "Save" at the bottom of the page to save settings. The eGauge will reboot. When using a USB485 Device name = whatever is appropriate Protocol = RS485 (firmware 4.0 and newer, select "Serial") Device address = modbus://tsense.10@USBX:9600/8n1 where X is the number of the USB port, for example modbus://tsense.10@USB1:9600/8n1 Click the grey "?" mark next to the remote device address and wait for a green check to appear. A red "X" typically indicates a configuration or wiring issue. Click "Save" at the bottom of the page to save settings. The eGauge will reboot. Add registers Before starting, make sure to fetch available registers by clicking the grey "?" to the right of the remote device address. Under Registers (X of Y in use): Click "Add Register" Name the register as appropriate Using the dropdown menu, change the "P" to the remote device name A second dropdown menu will appear. Select the register of interest (for example, Humidity) Repeat as necessary to add a register for each data point of interest Click "Save" at the bottom of the page to save settings. The eGauge will reboot. Verify readings Verify that the values on the main graph of the eGauge match those shown on the front of the TSense. Note that a second or two of transmission delay may occur - this is normal. After rebooting, the eGauge may take up to five minutes to start reading data from the TSense (particularly if a BF430 is used).IMT Weather Station (Si-RS485TC-2T-v-MB) Overview The IMT Weather Station model Si-RS485TC-2T-v-MB (referred to as the IMT sensor for the remainder of this article) is a high accuracy irradiance and cell temperature sensor. Optional attachments can be connected to monitor windspeed and ambient temperature. The IMT sensor is resold (not manufactured) and supported by eGauge Systems for use in applications where measuring irradiance may prove useful. The most common application would be to estimate solar production for an array of a given size using the irradiance and temperature data from the IMT sensor. The IMT sensor communicates via Modbus RTU (RS485). A RS485 to USB adapter is required for use with the EG4xxx meter line, and a serial to Ethernet adapter is required for use with EG30xx meters. Instructions for using both adapters are included in this document. If using multiple IMT weather stations on the same serial bus, the Modbus address must be changed. See the manufacturer's information at https://www.imt-solar.com/downloads/ under "Software Si-Series" for more information. If splicing into a "wall wart" style DC power supply wires, verify the polarity of the DC output is correct with a voltmeter. Typically, the wire with a white stripe or dash is the positive line. OEM Data Sheets Visit https://www.imt-solar.com/ . Additional or newer version documents may be found in the "Downloads" section. Irradiance Sensor Main Unit Reference Guide (required for accessories) Irradiance Sensor Main Unit Data Sheet Wind Speed Sensor Data Sheet Ambient Temperature Sensor Data Sheet Hardware Included IMT Weather Station (Si-RS485TC-2T-v-MB) Barrel connector to screw terminal block set 12Vdc power supply (120V American outlet wall-wart style) Installation and Wiring For best results, the IMT sensor must be installed in the same plane as the solar array. The sensor window should be clean and clear of any obstructions. Follow the mounting instructions included with the IMT sensor, and contact IMT directly with any questions regarding unique installation environments. The IMT sensor has four wires and a heavier gauge wire shield connector. Depending on the application, the wire shield may or may not be used, and it is not shown in the following diagrams. If required, the wire shield should be connected to earth ground, not the RS485 ground or signal ground. Note that proper wiring is essential. Failure to wire the IMT sensor correctly will prevent the sensor from functioning and may cause damage. Wiring for EG4xxx with RS485-USB adapter The following diagram shows the IMT sensor connected to a 12Vdc power supply and RS485-USB adapter. The eGauge is not shown. If splicing into a "wall wart" style DC power supply wires, verify the polarity of the DC output is correct with a voltmeter. Typically, the wire with a white stripe or dash is the positive line. The wire assignments are as follows: Black: Negative side of 12Vdc power supplyRed: Positive side of 12Vdc power supplyOrange: D- terminal on RS485-USB adapterBrown: D+ terminal on RS485-USB adapter The larger, thick black wire is a grounded shield and must not be connected to the eGauge, power supply or USB485 converter. Only connect this wire if you know what you are doing as improper grounding conditions can cause damage or communication issues. Additionally, it is necessary to connect the ground (⏚) terminal on the RS485-USB adapter to the negative terminal of the 12Vdc power supply.  A barrel connector with terminal blocks is included with the IMT sensor. Use the female side to quickly connect the IMT sensor to the 12Vdc power supply without splicing any wires. The male side can be discarded or saved for use in another project.  Use the included USB cable to connect the RS485-USB adapter to the eGauge, and make a note of which port is used (USB1 or USB2). Also ensure the termination switch on the RS485-USB adapter is set to "ON". Wiring for EG30xx using BF430 serial to Ethernet adapter The following diagram shows the IMT sensor connected to a BF430 serial to Ethernet adapter. The eGauge is not shown. The wire assignments are as follows: Black: 9-30V-Red: 9-30V+Orange: RS485- terminal on BF430 adapterBrown: RS485+ terminal on BF430 adapter A note on power: The BF430 obtains power through a 9-30Vdc power supply, and can optionally share that power source with a connected device. As such, all four wires on the IMT sensor are connected to the BF430. However, note that the 12Vdc power supply provided by eGauge (or a similar 12Vdc power supply) should be used, as 9Vdc is too low for the IMT sensor. A barrel connector with terminal blocks is included with the IMT sensor, but it is not needed for this application. Discard this piece, or save it for another project. Connect the BF430 to the same local area network as the eGauge, and ensure the external switch is set to "485". Configuration As a supported device, the IMT sensor has a predefined map built into the eGauge meter. This makes addressing and configuration very simple when using a RS485-USB adapter. Configuration with a BF430 is significantly more complex. Valid credentials are required for the eGauge meter in order to make changes. See this article for more information. Configuration for EG4xxx using RS485-USB adapter The RS485-USB adapter does not require any configuration on the adapter side. However, it's important to note which USB port is in use by the adapter. It's also necessary to ensure the termination switch is set to "on" when used with the IMT sensor. 1. Navigate to Settings -> Installation. 2. Under the "Remote Devices" section, click "Add Device" to add a new remote device.3. Enter a suitable device name. This field is arbitrary, but should make sense to the end user.4. Click the "Edit" button, and set the protocol to "Serial"5. Enter the device address. This will be modbus://imt_si.1@USBX where X is the USB port (1 or 2). 6. Click the grey "?" next to the device address field. After a few seconds, this should turn into a green check mark.7. To save these settings, click the "Save" button at the bottom of the page. If a red X appears instead of a green check mark, ensure the wiring is correct, the USB port is identified correctly, the address is entered correctly, and that the IMT sensor has power. Assuming a green check mark is displayed, the next step is to configure the eGauge to store data from the IMT sensor. To do this, at least one register will need to be created. 1. Ensure a green check mark is shown next to the remote device address. If a grey "?" is shown, click it and wait for it to turn into a green check mark.2. On the Installation page, navigate to the "Registers" section and click "Add Register".3. Enter a suitable register name. This field is arbitrary, but should make sense to the end user.4. The default register type will be set to "P". Click the dropdown menu and select the remote device name for the IMT sensor.5. A second dropdown menu will appear. Select the remote register to record. 6. Repeat steps 2-5 for each remote register. 7. To save these settings, click the "Save" button at the bottom of the page. The meter will reboot.8. Once the meter reboots, the RX and TX LEDs on the RS485-USB adapter should be blinking. The IMT sensor has add-on hardware to measure ambient temperature and windspeed. These registers will be listed even if that hardware is not connected, but they will return invalid values if selected Configuration for EG30xx with BF430 serial to Ethernet adapter The BF430 requires additional configuration through its internal web interface. A computer with an Ethernet port and an Ethernet cable are required for configuration. The two primary areas of concern are applying the correct serial settings (listed below) and setting the BF430 to use either a dynamic IP address (obtained with DHCP) or a static IP address. Refer to the BF430 manual for additional information. Support for the BF430 is limited. Using a RS485 to USB adapter is strongly recommended. 1. Ensure the BF430 is configured to use the following serial settings for RS485 communication: 9600 baud, 8 data bits, no parity, 1 stop bit.2. Ensure the BF430 is set to obtain an IP address via DHCP or use an appropriate static IP address depending on the network requirements (generally, DHCP is preferred). Once the BF430 has been configured and wired: 1. Navigate to Settings -> Installation.2. Under the "Remote Devices" section, click "Add Deice" to add a new remote device.3. Enter a suitable device name. This field is arbitrary, but should make sense to the end user.4. Click the "Edit" button, and set the protocol to "Serial"5. Enter the device address. This will be modbus://imt_si.1@MAC where MAC is the MAC address of the BF430. If the BF-430 has been configured with a static IP, the IP may be used instead. 6. Click the grey "?" next to the device address field. After a few seconds, this should turn into a green check mark.7. To save these settings, click the "Save" button at the bottom of the page. If a red X appears instead of a green check mark, ensure the wiring is correct, the USB port is identified correctly, the address is entered correctly, and that the IMT sensor has power. Assuming a green check mark is displayed, the next step is to configure the eGauge to store data from the IMT sensor. To do this, at least one register will need to be created. 1. Ensure a green check mark is shown next to the remote device address. If a grey "?" is shown, click it and wait for it to turn into a green check mark.2. On the Installation page, navigate to the "Registers" section and click "Add Register".3. Enter a suitable register name. This field is arbitrary, but should make sense to the end user.4. The default register type will be set to "P". Click the dropdown menu and select the remote device name for the IMT sensor.5. A second dropdown menu will appear. Select the remote register to record. 6. Repeat steps 2-5 for each remote register. 7. To save these settings, click the "Save" button at the bottom of the page. The meter will reboot.8. Once the meter reboots, the RX and TX LEDs on the BF430 adapter should be blinking. Viewing Data The data recorded from the IMT sensor can be viewed like any other data point recorded by the meter. To see this data, navigate to the main graph page and select the appropriate register(s) from the list under the main graph. In the following example, the graph is set to display irradiance data (with temperature and windspeed data as options under the main graph. Data from the IMT sensor can also be used in formula registers to calculate the estimated solar production at a site. The formula for this calculation requires real time irradiance and temperature data (obtained from the IMT sensor), the array's rating in watts, and the panel temperature coefficient (usually a small negative number). The following example shows this formula based on a 10kW array and a temperature coefficient of -.12%. The formula field contains: P_PV($"Irradiance",$"Cell Temperature",10000,-.12) Additional Sensors The IMT sensor supports two additional sensors: a wind speed sensor and an ambient temperature sensor. These sensors connect directly to the IMT sensor body. To connect these sensors, remove the appropriate threaded cap from the sensor body (the wind speed sensor uses the two pin connector, and the ambient temperature sensor uses the three pin connector). In the image below, one cap has been removed (left). When using an add-on sensor, the configuration is exactly the same except additional registers will need to be created to record data from the add-on sensors.  Do not connect anything besides official IMT add-on sensors to these ports. Doing so will cause damage and void the warranty on the IMT sensor. Suggested Reading RS485-USB adapter General information on connecting remote devices via RS485-USB adapter RS485-Ethernet adapter (BF430) Remote devices and third party devices Powered enclosure kit (PEK) assembly tutorial Legacy Hardware Documentation For hardware which is no longer available, but may still be in use at existing sites. (Legacy) Multitech Cell Modem Troubleshooting The MultiTech cell modem is used with some eGauge installations to provide cellular Internet access in locations where wired Internet is not a viable option. The troubleshooting guide covers aspects of the modem configuration as they pertain to usage with an eGauge. eGauge does not directly support all aspects of the MultiTech cell modem - queries above and beyond what are covered in the document below should be addressed to MultiTech directly. WARNING: This article covers the older Multitech MTR-H5 3G-only modem. eGauge now uses the 4G LTE MTE-LAT2-B07. Instructions in this article should not be used with the newer Multitech MTE-LAT2-B07 modems. Please see the new MTE-LAT2-B07 troubleshooting information if using the MTE-LAT2-B07 cellular modem. MULTITECH CELL MODEM TROUBLESHOOTING (Legacy): Maestro E206XT cell router configuration The Maestro E206XT is a powerful and highly configurable cellular modem and router. This article details configuring the Maestro E206XT to provide Internet access to an eGauge meter using a direct Ethernet connection, as well as other general information. Any advanced configuration questions should be directed to Maestro Wireless Solutions directly. Additional resources: Manufacturers product page SIM Card Installation The SIM card should come pre-installed if the E206XT is purchased directly from eGauge.  However, if this is not the case the SIM card can be installed or replaced as needed. Using a paperclip or similar instrument, gently push in the small yellow button to the right of the SIM tray.  This will cause the tray to partially eject from the E206XT, at which point it can be removed the rest of the way by hand. To reinstall the SIM tray, gently press it back into the E206XT.  The SIM card should have the contact points facing upward.  DO NOT force the SIM tray into the E206XT, as damage may result. Configuration When purchased from eGauge Systems, the Maestro E206XT is pre-configured for the T-Mobile network, along with both Ethernet ports configured for LAN access. In the event the Maestro is re-configured or factory reset and must have the eGauge configuration applied, follow these instructions. Reset and connect to Maestro unit Perform a factory reset, if not already done. Power up the E206XT using the included power supply. Using an Ethernet cable, connect a computer to port LAN1 on the E206XT.  Make sure all forms of wireless communication are disabled on the computer. Open a web browser and navigate to 192.168.1.1. Log in using "admin" for both username and password.Verify and update firmware Navigate to Status -> Overview. Look at Firmware Version under the System section. If at 2.0.1 RC7, skip to Install Configuration File. (Warning: firmware 2.1.1 RC6 is unstable and must not be used). Download maestro-e206-v201RC7-15122015.bin which is found attached to this article. Alternatively, download from Maestro's website. Navigate to System -> Backup/Flash firmware. In Flash new firmware image, choose maestro-e206-v201RC7-15122015.bin and press Flash image. The checksum should validate to fc06331a0057750b716044757ed470ab. When finished the device will reboot. Restart at step 4 to ensure new firmware took effect.Install configuration file Download backup-Maestro-2017-02-24.tar.gz from this article. Navigate to System -> Backup/Flash firmware. In the Backup / Restore section, choose backup-Maestro-2017-02-24.tar.gz and press Upload archive. The unit will reboot after installing the configuration. You can ensure the settings took affect by logging into the Maestro, clicking Next on the Quick Setup wizard, and ensuring under the Cellular section that APN is set to fast.t-mobile.com Factory Reset If settings are entered incorrectly or if the device password is changed and lost, a factory reset can be performed.  To do this, use a paperclip to hold down the reset button (located on the opposite side of the E206XT from the SIM card slot) for at least five seconds. Testing Connection Login to the Maestro as described in step 2 to step 4 of the Configuration section. Highlight the “Status” tab at the top of the page and select “Overview” from the dropdown menu. Check to ensure that the “Network Status”, “Operator Name", “Operator Number”, and “SIM Status” fields all display values. Next, open a new tab or window in your browser.  Navigate to a website of your choice to check Internet functionality.  At this point in time you may wish to run a speed test to verify speed and connectivity. Basic Troubleshooting When it is functioning properly, the E206XT should have a minimum of four LEDs lit.  The Power LED should be lit solid green, the Signal and Network LEDs should be lit solid yellow, and the Activity LED should be blinking yellow if a network device is connected. If the WiFi interface was left enabled, the WiFi LED will be lit solid blue. The WiFi interface is disabled by default by eGauge. If the exclamation LED (!) is lit red for over 5 minutes, it indicates a configuration or hardware problem.  Contact Maestro Wireless Solutions for assistance resolving this issue. It may take the E206XT up to five minutes to obtain a connection after the last configuration setting has been applied.  If the E206XT has been configured as described but cannot find a connection after five minutes, there are some common hardware issues that need to be checked. First, make sure the SIM is correctly seated and oriented properly (contact points facing up).  Mini and Micro SIMs will not work with the X206XT. Second, ensure that the external cell antenna is properly connected.  It should be connected to the "Cell. Main" port and all connections should be finger tight. If settings are entered incorrectly or if the device password is changed and lost, a factory reset can be performed.  To do this, follow instructions detailed in the Factory Reset section. (Legacy) TP-Link access point setup (TL-WA701ND) NOTICE: The TP-Link TL-WA701ND has been discontinued and replaced with the TP-Link TL-WA801ND. If using the TL-WA801ND, please refer to this article. eGauge offers limited support for the TP-Link TL-WA701ND when configured for use as a WiFi bridge. This allows the eGauge to connect to the WiFi network at a location where wired Ethernet or PLC options are not practical. Other usage scenarios are possible, but not officially supported. Support queries above and beyond those covered in the documentation below should be directly to TP-Link technical support. The TL-WA701ND is ideal for use with the EG30xx eGauge hardware - the eGauge2 does not have an Ethernet port, and the EG4xxx hardware supports USB WiFi dongles which don't require an external power source. TP-LINK ACCESS POINT SETUP Power Relay Module (PRM3) Software Documentation Software documentation for the Power Relay Module PRM3 Mask control Back to Main Power Relay Module (PRM3) Product Page. The eGauge PRM3 has 3 independently controlled relay contacts. When controlling polyphase loads such as single or three-phase loads, the multiple relay contacts used should be open and closed simultaneously to avoid damaging the equipment. Neutral conductors always remain connected and are not switched by a relay. To control relay contact simultaneously, the PRM3 interface provides commands to be used with masks. The command used will vary based on the interface used. Command Description Mask Any relay bit set (1) will be CLOSED, any bit unset (0) will be OPENED Set Any relay bit set (1) will be CLOSED, any bit unset (0) will be UNAFFECTED Clear Any relay bit set (1) will be OPENED, any bit unset (0) will be UNAFFECTED List of Masks Mask (Decimal) Mask (Binary) Relays SET 0 000 None 1 001 1 2 010 2 4 100 3 3 011 1 and 2 5 101 1 and 3 6 110 2 and 3 7 111 1,  2, and 3 Understanding the mask The mask value is a set of 3 bits. The lowest bit (position 0) is for the lowest numbered relay (#1). The middle bit (position 1) is for the middle numbered relay (#2), and the highest bit (position 2) is for the highest numbered relay (#3). The decimal value is simply the binary value, which can be determined by adding the set bits (1) values. Depending on the command used, the set and unset bits will affect their respective relays differently. MASK is the binary mask value sent or receivedRELAY is the relay for the respective column valuesVALUE is the decimal value for that bitBIT POS is the bit position  Decimal Value: 0 Decimal Value: 1 Decimal Value: 2 Decimal Value: 4 Decimal Value: 3 Decimal Value: 5 Decimal Value: 6 Decimal Value: 7 Dashboard control of PRM3 eGauge meter Dashboard Control Back to Main Power Relay Module (PRM3) Product Page. A "Switch" can be toggled to control the relay when connected to the eGauge via USB by using the Mobile-Friendly dashboard interface. From the classic interface, click View -> Mobile Friendly. Use the 3-dot menu, click View -> Dashboard to load the Dashboard interface. Edit the dashboard to add a new dashlet. Choose "Switch": Exit the editing mode on the dashboard and click the newly added dashlet to configure it. Click the drop-down for "Relay to control" and choose the PRM3, which relays the switch should control and the icon. Split-phase loads with a single hot and neutral will use 1 relay inputs, single-phase loads with 2 hots will use 2 relay inputs, and three-phase loads will use all 3 relay inputs. The selected relay(s) can now be toggled by clicking the slider button under the icon: Modbus Control of PRM3 Back to Main Power Relay Module (PRM3) Product Page. The Power Relay Module acts as a Modbus server. As such, it responds to requests sent by a client. It never initiates a request on its own. Connection and Power Power The eGauge PRM3 may be powered using the USB-A or the 4-pin port with a 5V/500mA power supply. Only power the PRM3 with one of these methods. Communication The PRM3 uses the 4-pin port for Modbus RTU RS-485 serial communication. Modbus Registers All registers are holding registers. They can be read with "Read Holding Registers" (function code 0x03) and written with "Write Single Register" (function code 0x06). The PRM3 uses base-0 addressing. Address Size Name Type Description 0 1 RS-485 param Unsigned 16-bit integer Baud Rate code (bits 0..7) and parity (bits 8..15)* 1 1 Unit number Unsigned 16-bit integer Modbus unit number (1–247) 2 1 Relay Mask Unsigned 16-bit integer Relay status. On write, if bit (n-1) is set, relay n is closed, opened otherwise. On read, if bit (n-1) is set, relay n is closed, open otherwise. 3 1 Relay Set Unsigned 16-bit integer Close relays. On write, if bit (n-1) is set, relay n will be closed, unchanged otherwise. On read, if bit (n-1) is set, relay n is closed, open otherwise. 4 1 Relay Clear Unsigned 16-bit integer Open relays. On write, if bit (n-1) is set, relay n will be opened, unchanged otherwise. On read, if bit (n-1) is set, relay n is closed, open otherwise. 100 2 EEPROM writes Unsigned 32-bit integer Number of times EEPROM has been written. 102 2 Relay 1 Count Unsigned 32-bit integer Relay 1 switch count. 104 2 Relay 2 Count Unsigned 32-bit integer Relay 2 switch count. 106 2 Relay 3 Count Unsigned 32-bit integer Relay 3 switch count. 108 1 Min. open duration Unsigned 16-bit integer Minimum duration (in seconds) for which a relay stays open. 109 1 Min. close duration Unsigned 16-bit integer Minimum duration (in seconds) for which a relay stays closed. RS-485 parameter register* The “RS-485 param” register provides access to the RS-485 baud rate and parity. The upper eight bits define the parity as shown below. Note the numerical value is the decimal value of the ASCII code, not a binary value. ASCII code Value (decimal) Parity Mode n 110 no parity e 101 even parity o 111 odd parity The lower eight bits define the baud rate as shown below: Value (decimal) Baud Rate 1 9600 bps 2 19200 bps 4 38400 bps 6 57600 bps 12 115200 bps For example, a value of 0x6506 would indicate 57600 bps and even parity. Unit Number The “Unit number” register defines the Modbus unit number under which the device responds. By default, this value is 1 but it can be set to any number in the range from 1 to 247. Relay Commands For more information about using masks to control relays see this article. The “Relay mask", “Relay set", and “Relay clear" registers provide access to the relays. They all return the same value when read: in the returned value, if bit (n − 1) is set, it means that relay n is closed and if it is cleared, it means that the relay is open. When written, the three registers have different behavior: “Relay mask" sets all the relays as indicated by the written value. That is, if bit (n − 1) is set, relay n will be closed and otherwise it will be opened. In contrast, writing “Relay set" will only close the relays for which the corresponding bit is set. Similarly, writing “Relay clear” will only open the relays for which the corresponding bit is set. SunSpec block The Power Relay Module also provides an address block to enable device identification according to the SunSpec standard. Since SunSpec does not have a standardized model for relay controllers, the only model block provided is the Common Model (SunSpec DID 0x0001) as shown below. This block allows identifying the device by manufacturer and model name. Address Size Name Type Description 40000 2 SunSpec_ID Unsigned 32-bit integer Value = 0x53756e53 ("SunS”). 40002 1 SunSpec_DID Unsigned 16-bit integer Value = 0x0001 (Common Model Block) 40003 1 SunSpec_Length Unsigned 16-bit integer Value = 65 (Length of block). 40004 16 Manufacturer 32-bit string Manufacturer "eGauge". 40020 16 Model 32-bit string Model name (e.g., “PRM3"). 40036 8 Options 16-bit string Installed options. 40044 8 Version 16-bit string Product version (e.g., "1.00"). 40052 16 SerialNumber 32-bit string Serial number (e.g., "3N013453”). 40068 1 DeviceAddress Unsigned 16-bit integer Modbus unit number. 40069 1 SunSpec_DID Unsigned 16-bit integer Value = 0xffff (End Marker). 40070 1 SunSpec_Length Unsigned 16-bit integer Value = 0x0000. Accessing the PRM3 from a Windows PC eGauge Systems does not test or guarantee safety or accuracy of third party software. Locate the COM port of the PRM3 Open the Device Manager, which can be done by opening the Start Menu and typing "Device Manager" and clicking "Open": Expand the "Ports (COM & LPT)" section:If you have multiple "USB Serial Device" entries, you may unplug the eGauge PRM3, and plug it back in to see which COM port appears when it is connected. Using QModMaster to communicate with relay Install and open the QModMaster Modbus master simulator. Click Options and "Modbus RTU..." to configure the Modbus connection Change the COM port number and other parameters if necessary and press OK. The defaults RS-485 settings for the eGauge PRM 3 are 19200 baud, 8 data bits, 1 stop bit, no parity: Open the Options menu again and go to Settings, and change Base Addr to the number 0: Using an incorrect "Base Address" will result in reading or writing to a register one address lower or higher than the intended register address! Ensure Modbus Mode is set to RTU and click the "connect" button in the toolbar below the "Options" and "Commands" menus: First, we will set the mask of the relay to 6 (110) to open relay 1, and close relays 2 and 3.- Ensure the Slave Address (Unit Number) is set correctly. The PRM3 by default is set to 1- Choose "Write Single Register (0x06)"- Set Start Address 2 (decimal format)- Choose "Bin" (binary) for Data Format, this is easier to work with masks- In the box enter "110" and click outside the number entry box to save it there- Click the "Read/Write" button next to the connect buttonAfter sending, the "Packets" (blue text at bottom) number should increment. Read back the register to confirm the mask was set. Change Function Code to "Read Holding Registers (0x03)", and ensure "Number of Registers" is set to 1 (as it is a 16-bit value) and Data Format as "Bin". Click the Read/Write button again and the Packets should increment. The box should still show "110", meaning relay 1 is open, and relays 2 and 3 are closed. Let's turn relay 1 on and leave 2 and 3 alone, we will use the "Relay Set" register for this (address 3). Change the "Start Address" to 3, the Function Code back to Write Single Register, and the 110 in the text box to 001 (leading zeros are not necessary). This tells the PRM3 to close relay 1, and leave 2 and 3 in their current state. Press Read/Write and note the packet increment: Finally, we'll read current the mask state of the relay. Change the Function Code to Read Holding Registers and click the Read/Write button. We can read from any of the Relay registers to get the current mask from the relay. Note the packet increase. The text area below shows the data received, which is 111 to indicate all 3 relays are closed. Lua Scripting with PRM3 Back to Main Power Relay Module (PRM3) Product Page. The eGauge meter provides a Lua scripting environment for interaction and control of the eGauge PRM3 Power Relay Module when connected to the eGauge via USB. Navigating to the Lua Scripting interface If using the classic interface, click on View -> Mobile-Friendly: Next, navigate to Setup -> Lua and choose the appropriate script type: Control script See the main Lua Scripting Overview Control Scripts section for additional Lua Control environment information. There is high risk of damaging external equipment using control scripts. Only skilled Lua developers familiar with the eGauge meter and software should attempt to use Lua control scripts. Control scripts can be used to confrol supported equipment such as the eGauge Power Relay Module (PRM3). For example, the following script reads the instantaneous value of a register called "Temperature" and controls a PRM3 relay contact. If the temperature is lower than 21 C, relay number 0 of the PRM3 is closed (activated), otherwise it opens (turns off) relay number 0. It then sleeps for 15 minutes before checking again. In the real world, the control script should be more advanced dev = ctrl:dev({interface='relay'}) relay = dev:interface('relay') while true do print("Temperature is currently: " .. __r("Temperature")) if __r("Temperature") < 21 then relay:close(0) else relay:open(0) end sleep(60*15) end SCPI Control of PRM3 Back to Main Power Relay Module (PRM3) Product Page. SCPI introduction SCPI (pronounced "skippy") stands for "Standard Commands for Programmable Instruments" and uses ASCII encoded strings. Com mands are entered one line at a time. Each line must end with a carriage-return (ASCII code 13) and/or line-feed character (ASCII code 10). Line length (including line terminators) is limited to at most 64 characters. Commands are caseinsensitive, so RELAY has the same meaning as relay, for example. Most SCPI commands may be abbreviated to the first four characters. Required command characters are shown in upper case, optional ones in lower case. For example, MODBus indicates that the command may be abbreviated to just MODB. Each SCPI command returns a single response-line which is terminated by a carriage-return line-feed sequence. The response is INVALID COMMAND if there was an error processing the command. If the command was processed successfully the response is OK or a command-specific response. While SCPI convention normally would allow specifying multiple commands in a single line by separating the commands with a semicolon, the Power Relay Module does not support this convention and always expects a single command per line. Connection and Power The eGauge PRM3 unit communicates SCPI and gets power over the USB-A connection. The USB connection provides a CDC ACM virtual serial port for the host to communicate with using serial. Serial Settings The SCPI interface uses the following serial parameters: 19200 baud 1 start bit 8 data bits, LSB first no parity 1 stop bit SCPI commands he SCPI commands supported by the Power Relay Module are shown below. The first column shows the syntax of the command, the second column the response type, and the third is a description of the command. For response type devid, the return value consists of a string containing the manufacturer name, model name, product serial-number, and the product version, separated by commas. For example, the returned devid might be eGauge,PRM3,3N013453,1.00. For response type status, the return value consists of either OK or INVALID COMMAND. For response type decimal, the return value consists of either INVALID COMMAND or a decimal integer number string. For response type parity, the return value consists of either INVALID COMMAND or a single character, where the character n indicates no parity, e indicates even parity, and o indicates odd parity. When controlling polyphase loads, the mask commands should be used for simultaneous opening and closing of the multiple relay inputs. Command Response Description *IDN? devid Return device identifier EPRom? decimal Return number of times the EEPROM has been written. RELAy:n? decimal Query status of relay n. Returns string 0 if relay is open, 1 if it is closed. RELAy:n cv status Open or close relay n. If cv is 0 or OFF, the relay is opened, if 1 or ON, the relay is closed. RELAy:n:COUNt? decimal Return number of times relay n has been switched (opened or closed). RELAy:MASK? decimal Query status of all relays. The returned number has bit (n-1) set if relay n is closed, cleared otherwise. For example, return value 6 would indicate that relay 1 is open and relays 2 and 3 are closed. RELAy:MASK m status Open or close relays as indicated by mask m. If bit (n-1) is set, relay n is closed, otherwise it will be opened. RELAy:MASK:SET m status Close relays as indicated by mask m. If bit (n-1) is set, relay n is closed, otherwise relay n will remain in its current state. RELAy:MASK:CLR m status Open relays as indicated by mask m. If bit (n-1) is set, relay n is opened, otherwise relay n will remain in its current state. RELAy:MIN:OFF? decimal Query the minimum duration for which a relay remains open. The returned number is the duration in seconds. RELAy:MIN:OFF d status Set the minimum duration for which a relay remains open to d seconds. The duration must be an integer in the range from 0..255. RELAy:MIN:ON? decimal Query the minimum duration for which a relay remains closed. The returned number is the duration in seconds RELAy:MIN:ON d status Set the minimum duration for which a relay remains open to d seconds. The duration must be an integer in the range from 0..255. MODBus:BAUD? decimal Returns the baud rate of the RS-485 port. MODBus:BAUD n status Sets the RS-485 baud rate to n baud. The value of n may be one of 9600, 19200, 38400, 57600, or 115200. MODBus:PARIty? decimal Returns the parity used for the RS-485 port. MODBus:PARIty p status Sets the RS-485 parity. If p is n, no parity is selected, if e, even parity is selected, and if o, odd parity is selected. MODBus:UNIT? decimal Returns the MODBUS unit number of the device. MODBus:UNIT n status Sets MODBUS unit number of the device to n. The value of n may be in the range from 1 through 247. Accessing the PRM3 from a Windows PC eGauge Systems does not test or guarantee safety or accuracy of third party software. Locate the COM port of the PRM3 Open the Device Manager, which can be done by opening the Start Menu and typing "Device Manager" and clicking "Open": Expand the "Ports (COM & LPT)" section: If you have multiple "USB Serial Device" entries, you may unplug the eGauge PRM3, and plug it back in to see which COM port appears when it is connected. Connect to the COM port using PuTTY Install and open the PuTTY terminal emulator. Change "Serial line" to the COM port found in the device manager, the "Speed" to 19200 and "Connection type" to "Serial" and press Open: You may now enter SCPI commands followed by the "Enter" key. Back-spaces may not work correctly and result in an invalid command error. Commands entered using copy and paste may also not work correctly and result in an invalid command error. JSON WebAPI relay control Back to Main Power Relay Module (PRM3) Product Page. WebAPI documentation may be found at https://egauge.net/support/webapi. The /ctrl endpoint is used for controlling the PRM3. The eGauge Python Library contains helper functions for authentication and requests and is available via Bitbucket and PyPi. Demonstration code provided by eGauge Systems typically requires this library. To interact with the WebAPI control service, the authenticated user must have permission "Allowed to view all data, change settings, and control devices from anywhere" Starting in firmware v4.4, the PRM3 may be controlled with EG4xxx series meters by using the eGauge JSON-based WebAPI /ctrl endpoint. The following is a Python script showing some possible miscellaneous interactions with an eGauge PRM3. #!/usr/bin/env python3 # Example script interacting with an eGauge PRM3 power relay module through a # meter's WebAPI. The PRM3 must be connected to the eGauge via USB. # # This script uses the eGauge Python library, available from bitbucket or pip: # https://bitbucket.org/egauge/python/src/master/egauge/ # https://pypi.org/project/egauge-python/ # WebAPI documentation: https://egauge.net/support/webapi # Requires firmware version 4.4 or greater from egauge import webapi URI = "https://device-url" USR = "my_meter_username" PWD = "my_meter_password" dev = webapi.device.Device(URI, webapi.JWTAuth(USR, PWD)) USB_PORT = "USB1" # what USB port the relay is connected to # get the connected relay(s) information relays = dev.get("/ctrl/device") """e.g., { 'result': [ { 'path': ['net.egauge.slowd', 'USB1'], 'mfg': 'eGauge', 'model': 'PRM3', 'sn': '00000004', 'prot': 'SCPI', 'link': 'serial', 'quality': '1', 'interface': ['relay', 'scpi'] } ] } """ # get the serial number of the PRM3 connected to port USB_PORT # we use the SN to identify which relay to send commands to for relay in relays["result"]: if USB_PORT in relay["path"]: relay_sn = relay["sn"] # get the control interfaces and available methods for the PRM3 relay # e.g., open_mask, set_mask, get_mask methods = dev.get("/ctrl/interface")["result"] # get the relay mask # https://egauge.net/support/m/prm3/mask payload = { "attrs": {"sn": relay_sn}, "method": "relay.get_mask", "args": [] } # store the transaction ID of the request # e.g., {'result': {'tid': 897412938}} tid = dev.post("/ctrl/call", payload)["result"]["tid"] # get the response. e.g., {'result': 3} means relays 0 and 1 are closed, and # 2 is open https://egauge.net/support/m/prm3/mask print(dev.get(f"/ctrl/call/{tid}")["result"]) # set the mask to 5 (close relay 0 and 2, open relay 1). # Use relay.open_mask and relay.close_mask to only open OR close relays payload = { "attrs": {"sn": relay_sn}, "method": "relay.set_mask", "args": [5] } # make the request, store the transaction ID tid = dev.post("/ctrl/call", payload)["result"]["tid"] # check the transaction response. This should generally be {'result': False} print(dev.get(f"/ctrl/call/{tid}")["result"]) # we can also send arbitrary SCPI commands, such as configurations. # here we set the Modbus baud rate to 9600: payload = { "attrs": {"sn": relay_sn}, "method": "scpi.exec", "args": ["MODBus:BAUD 9600"] } tid = dev.post("/ctrl/call", payload)["result"]["tid"] # should be "OK" print(dev.get(f"/ctrl/call/{tid}")["result"]) # verify the baud payload = { "attrs": {"sn": relay_sn}, "method": "scpi.exec", "args": ["MODBus:BAUD?"] } tid = dev.post("/ctrl/call", payload)["result"]["tid"] # {'result': '9600\r\n'} print(dev.get(f"/ctrl/call/{tid}")["result"])