How To - Convert a DLGW3 from LightRules Mode to SiteWorx Mode

Updated by Dan Buckley

This guide only applies to gateways of model DLGW3-LR.  DLGW3-LR's have serial numbers beginning in 0202XXXX and note "DLGW3-LR" on the serial number label. 

Necessary items

  • Micro USB cable
  • Computer
  • DLGW3-LR
  • gw3cli
    • Email SiteWorxOps@siteworx.io to receive gw3cli. Please note if using a Mac or Windows computer.

Before you start

Confirm the DLGW3-LR is in LightRules mode by powering the DLGW3-LR and viewing the Mode status indicator:

  • LightRules mode
    • Blinking yellow (OS 1.1.0+)
    • Solid yellow (OS 1.0.0)
  • SiteWorx mode
    • Solid green
If you are uncertain on the color or pattern of the Mode status indicator, the mode can be also checked using gw3cli (see Workflow section for details).

Workflow

Mac

  1. Download and unzip gw3cli-macos-1.2.4. Drag the unzipped file into your Desktop.
  2. Open Terminal and change directory to to your Desktop directory where the gw3cli tool is located.
    cd ~/Desktop/
  3. Enter command ./gw3cli this will show you the help menu with all commands and options
    1. If you see the "gw3cli cannot be opened.." message, the click Cancel
    1. Navigate to System Settings > Privacy & Security, then click Allow Anyway
  4. Connect the DLGW3-LR to your computer via Micro USB cable and wait a few minutes for the DLGW3-LR to complete booting.
  5. Enter command: ./gw3cli get-status
    1. This will display the serial number and versions of all software.
  6. Enter command: ./gw3cli get-config
    1. This will display the configuration of the DLGW3-LR.
    2. Look for mode in the setup section
      1. "gateway2.emulator" indicates the DLGW3-LR is in LightRules mode
      2. "gateway3.engine" indicates the DLGW3-LR is in SiteWorx mode
      Only proceed if mode is "gateway2.emulator"
  7. To switch from LightRules mode to SiteWorx mode, enter command:
    1. ./gw3cli set-config '{"setup":{"mode":"gateway3.engine"}}'
  8. Enter command: ./gw3cli restart-app
  9. After gateway reboots, verify the changes were completed by checking that mode is now "gateway3.engine"
  10. Email SiteWorxOps@siteworx.io the serial numbers of the DLGW3-LRs that were converted from LightRules mode to SiteWorx mode. The DLGW3-LRs will need to be registered to SiteWorx by SiteWorx Operations before the DLGW3-LRs will connect to SiteWorx.

Windows

  1. Download and unzip gw3cli-win32-1.2.4.zip Drag the unzipped file into your Desktop.
  2. Ensure the latest version of Commissioner is installed to ensure USB drivers are up to date: https://commissioner.lightrules.net/Content/English/Home.htm
  3. Click Start, and search for cmd to open CMD prompt.
  4. Enter command: cd Desktop
  5. Enter command: ./gw3cli.exe
    1. This will show you the help menu with all commands and options.
      The exact syntax of the below commands will depend on where the file is saved and the configuration of your computer. If you are not comfortable with Command Prompt, the easiest thing to do is drag and drop the gw3cli.exe file into Command Prompt to start each command and then manually type the portion of the command after gw3cli.exe

      For example to do the gw3cli.exe command, drag gw3cli.exe into the Command Prompt and then press the Return/Enter key.

      To do the gw3cli.exe get-status command, drag gw3cli.exe into the Command Prompt and then type get-status and then press the Return/Enter key.
  6. Connect the DLGW3-LR to your computer via Micro USB cable and wait a few minutes for the DLGW3-LR to complete booting.
  7. Enter command: ./gw3cli.exe get-status
    1. This will display the serial number and versions of all software.
    2. If this command fails to read the serial number from the gateway, please email SiteWorxOps@siteworx.io with a screenshot of Command Prompt as an additional driver may need to be installed.
  8. Enter command: ./gw3cli.exe get-config
    1. This will display the configuration of the DLGW3-LR.
    2. Look for mode in the setup section:
      1. "gateway2.emulator" indicates the DLGW3-LR is in LightRules mode
      2. "gateway3.engine" indicates the DLGW3-LR is in SiteWorx mode
      Only proceed if mode is "gateway2.emulator"
  9. To switch from LightRules mode to SiteWorx mode, enter command:
    1. gw3cli.exe set-config {\"setup\":{\"mode\":\"gateway3.engine\"}}
  10. Enter command: ./gw3cli restart-app
  11. After gateway reboots, verify the changes were completed by checking that mode is now "gateway3.engine"
  12. Email SiteWorxOps@siteworx.io the serial numbers of the DLGW3-LRs that were converted from LightRules mode to SiteWorx mode. The DLGW3-LRs will need to be registered to SiteWorx by SiteWorx Operations before the DLGW3-LRs will connect to SiteWorx.


How did we do?