> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/water-insight/ims-and-gateways/ims-gateway/install-sensor-gateway.md).

# Install the IMS Sensor Gateway

Add the IMS Sensor Gateway to your IMS account, install it near your router, and check it connects. You need it before you add a Tank Level Monitor.

## LSG01 (current model)

The TLM connects to the IMS system by transmitting the water level to an internet gateway device on the site.

{% hint style="info" %}
**Applies to:** the sensor gateway LSG01, which will replace the now obsolete LG001 Lora Gateway. From the TLM User Guide V1.3.
{% endhint %}

### What you need

* Screwdriver or electric drill/driver (pozi-drive & 8mm hex socket)
* General purpose cable ties or other means of tying cables back
* An internet connected phone/tablet/PC running a web browser (Google Chrome, Microsoft edge, Apple Safari or similar).

### Add the gateway in IMS

If you already have a sensor gateway installed and operating, you can skip this section.

1. Open the Farm Settings menu. Select **Manage Assets > Gateways**. Select **New Gateway**.
2. Enter Details:

   * **Name** – (e.g.) Sensor Gateway
   * **Type** – Select LSG 01
   * **Serial Number** – Enter the serial number on the gateway label
   * **MAC Address** – Will be populated automatically
   * **Channel** – Enter a channel to match your TLM
   * **GPS Location** – Click on the map to define the location of the gateway

   Then select **Update**.

### Install the gateway

1. The gateway needs to be mounted:
   * Indoors within 10m of cable run to your Internet access point (router, modem or switch)
   * Near a mains power socket
   * Within a 5m cable run to external antenna mounting location
2. Mount the external antenna provided. The antenna should be mounted outside, as high as possible. All radio systems work most reliably when the path between the antennas is clear “line of sight”, i.e. free from obstructions such as trees, hills and buildings.
3. Plug one end of the LAN patch cable supplied into the socket on the gateway and the other end into an available socket on your internet access point.

{% hint style="warning" %}
If you are adding a second TLM sensor to an existing site you only need one gateway.
{% endhint %}

An available internet connection is required in order to view the Tank Level Monitor information.

Longer cable lengths (preferably under 30m) are acceptable to connect from the gateway to your Internet access point but are not supplied with the gateway.

If you need assistance installing the gateway, please [contact Water-Insight](https://www.waterinsight.co.nz/contact-us/).

### Check the gateway connects

1. Plug the mains power adaptor for the gateway into the power socket and power the gateway on.
   * The power indicator LED will light up
2. Click on the gateway name.

Once the gateway has connected with IMS (could take a few minutes):

* The dot will be green
* Last Contact will be a recent time

{% hint style="info" %}
If the gateway had been installed and powered before it was configured in IMS it must be rebooted to establish a connection.
{% endhint %}

Gateway connectivity is confirmed, you can now return to the home screen.

Next: [Install the TLM](https://help.qtech.co.nz/water-insight/tank-level-monitor/install.md)

### If the gateway won't connect

* Confirm the gateway is connected to a power supply and turned on. Initially at least the power LED should be lit.
* Confirm the LAN patch cable is connected to the socket of the gateway and the other end is connected to a LAN socket of your internet access point.
* Confirm your internet access point has an internet connection. Check that another device (laptop, phone, etc) connected to your internet access point can access the internet.

If you are still unsuccessful, please [contact Water-Insight](https://www.waterinsight.co.nz/contact-us/).

## LG001 (earlier model)

The TLM connects to the IMS system by transmitting the water level to an internet gateway device on the site. It is required that the sensor gateway be installed first in order to confirm the TLM makes a successful connection.

{% hint style="info" %}
**Applies to:** the IMS Sensor Gateway (LoRa gateway) that came packaged with your TLM, from application note AN50. If you are adding a second TLM sensor to an existing site you only need one gateway. If your site already has one, skip to adding the TLM in [Install the TLM](https://help.qtech.co.nz/water-insight/tank-level-monitor/install.md).
{% endhint %}

### What you need

* An internet connection on your premises, with an available socket on your internet access point (router, modem or switch).
* A mains power socket near where the gateway goes.
* An internet connected phone/tablet/PC running a web browser.
* Screw driver or electric drill/driver (pozi-drive & 8mm hex socket), and general purpose cable ties or other means of tying cables back.

### Add the gateway in IMS

Follow the TLM setup wizard to step through the process of account creation (if needed), adding & testing a new gateway (if needed) and adding and testing the Tank Level Monitor.

1. Open a web browser on your phone/tablet/PC and navigate to [www.ims.qtech.co.nz/tlm](http://www.ims.qtech.co.nz/tlm).
2. Select **START** to create an IMS account – if this is your first IMS device. Or login to your existing IMS account and select **START** (skip to step 5).
3. Enter required account details: name, e-mail, mobile phone number, password.
4. Enter “Farm” details: **Name**, **Access road** (address). Select **Change Location** and place the location on the map. Select **Update Boundaries** and draw the outline of the site boundaries.
5. **Do you already own a gateway?** **Yes, and I need to install it** (go to step 6): you have the gateway that came packaged with your TLM, but need to install it. **No, what do I do?**: a gateway is required, one must be purchased.
6. Adding a Gateway:
   * **Farm**: Choose the Farm/Site this gateway is for.
   * **Name**: Give the gateway a unique identifying name.
   * **Serial Number**: Printed on the gateway label.
   * **MAC address**: Automatically populated based on serial number.
   * **Channel**: must match the TLM (see TLM label).
   * **GPS Location**: Click on the map to identify the gateway location.
7. Click **Create**.

### Install the gateway

1. The gateway needs to be mounted:
   * Indoors within 10m of cable run to your Internet access point (router, modem or switch)
   * Near a mains power socket
   * Within a 5m cable run to external antenna mounting location
2. Mount the external antenna provided. The antenna should be mounted outside, as high as possible. All radio systems work most reliably when the path between the antennae is clear “line of sight”, i.e. free from obstructions such as trees, hills and buildings.
3. Plug one end of the LAN patch cable supplied into the **WAN** socket on the gateway and the other end into an available socket on your internet access point.

Longer cable lengths (preferably under 30m) are acceptable to connect from the gateway to your Internet access point but are not supplied with the gateway.

No internet socket near the gateway? See [Network equipment for the IMS Gateway](https://help.qtech.co.nz/water-insight/ims-and-gateways/ims-gateway/ims-gateway-network-equipment.md).

### Check the gateway connects

1. Plug the mains power adaptor for the gateway into the power socket and power the gateway on.
2. Select **Check Connectivity**. Expect a `Connected at <date><time>` message. This can take 3-4min.
3. Connection status can be confirmed from the LED behaviour:

| Light                     | When it's working                                      |
| ------------------------- | ------------------------------------------------------ |
| Power LED                 | ON                                                     |
| WAN LED (2nd from left)   | ON, may blink                                          |
| Globe LED (4th from left) | Internet connection: Flashes. Connection to IMS: Solid |
| WiFi LED (leftmost)       | Can be on or off                                       |

Next, add and install your TLM. [Install the TLM](https://help.qtech.co.nz/water-insight/tank-level-monitor/install.md) covers the TLM's part of this application note.

### If the gateway won't connect

1. Confirm the gateway is connected to a power supply and turned on. Initially at least the power LED should be lit.
2. Confirm the LAN patch cable is connected to the **WAN** socket of the gateway and the other end is connected to a **LAN** socket of your internet access point.
3. Confirm your internet access point has an internet connection. Check that another device (laptop, phone, etc) connected to your internet access point can access the internet.

Still not working? [Contact Water-Insight](https://www.waterinsight.co.nz/contact-us/) with the gateway's serial number, which lights are on, and what you've tried.
