Linear MQTT Dashboard

The Linear MQTT Dashboard mobile application is useful for everyday use of the GreenSense projects, allowing devices to be both monitored and controlled from a mobile device such as a phone.

Prepare Networked Devices

Before you can use the Linear MQTT Dashboard you will need to follow the networking guide to set up networked GreenSense devices.

Install Linear MQTT Dashboard

Search Play Store for "linear mqtt" and select the "Linear MQTT Dashboard" app:

Tap the INSTALL button:

Tap the ACCEPT button:

Tap the OPEN button to open Linear MQTT Dashboard:

The Linear MQTT Dashboard default configuration should look something something like this:

Configure GreenSense User Interface

The GreenSense device user interface can be configured by either:

  • manually adding tabs and elements or automatically
  • importing the Linear MQTT Dashboard configuration file that was generated when setting up the device networking

The following guide explains how to import the Linear MQTT Dashboard configuration as it's the simplest approach.

Transfer Linear MQTT Dashboard Configuration File

Transfer the following file to the mobile device:

  • ~/workspace/GreenSense/Index/mobile/linearmqtt/output/config.linear

Local Computer

If the hardware is connected to a computer with a display, keyboard, and mouse, then the config.linear file can be copied to the device via a USB cable using the file manager, just like any other file.

Alternatively a service such as Google Drive can be used to transfer the file.

Headless/Remote Computer

If the hardware is connection to a computer that is headless (ie. has no display, keyboard, and mouse) or a computer that is remotely connected via the network then the Termux mobile application can be used.

Search for "termux" in the app store and select the "Termux" application:

Tap the ACCEPT button:

Tap the OPEN button:

Termux will open and should look something like this:

Use the following command in termux to transfer the config file to the mobile device:

Syntax:

  • scp [user]@[host]:~/workspace/GreenSense/Index/mobile/linearmqtt/output/config.linear config.linear

Example:

  • scp j@garden:~/workspace/GreenSense/Index/mobile/linearmqtt/output/config.linear config.linear

Enter the password of the garden computer and tap ENTER:

The config.linear file will be transferred and the output should look something like this:

Load the Linear MQTT Dashboard Configuration File

Open the config.linear file via termux to automatically configure the user interface in Linear MQTT Dashboard:

  • termux-open config.linear

When the Linear MQTT Dashboard loads with the following prompt, tap YES:

Note: This prompt may take some time to appear. If it doesn't appear try the following...

  • Close and restart Linear MQTT Dashboard
  • Return to Termux and run the "termux-open config.linear" command again

After tapping YES the user interface configuration settings should be imported and the Linear MQTT Dashboard should look something like this (depending on the combination devices that have been added):

Set MQTT Broker Connection Details

The MQTT indicator is red because it can't connect to the MQTT broker.

To fix this:

  • Tap the menu icond (3 dots) at the top right of the screen to open the menu below
  • Choose the "App settings" option

Update the following settings (if necessary) then tap SAVE:

  • Server: The hostname or IP address of the garden computer (example: garden)
  • Port: The port of the MQTT broker (default value is recommended)
  • Username: The username of the MQTT broker specified when running the "set-mqtt-credentials.sh" script
  • Password: The password of the MQTT broker specified when running the "set-mqtt-credentials.sh" script

The MQTT indicator should now be green indicating that it's connected to the server.

Switch Linear MQTT Dashboard to User Mode

If a triangular play button is visible on the Linear MQTT Dashboard like the screenshot below then tap it to switch from edit mode to user mode:

The Linear MQTT Dashboard should now look similar to the screenshots below:

Note: The user interface will vary based on

  • the number/type of devices that were configured previously in the walkthrough (including their label and device name)
  • the values being received from the devices
  • updates and improvements made to this user interface since these screenshots were taken

Summary Tab

Monitor Tab

Irrigator Tab

You can now view and control your GreenSense devices from your phone.

Note: There is a generally a delay in data transmission. Allow for this when viewing data or changing the configuration.

Configure and Control Your Devices

Follow the usage guides for more information on how to configure and control your GreenSense devices from the Linear MQTT Dashboard.