Skip to content

GreenSense/Index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrowSense Project Index

GrowSense provides garden/farm/agriculture related monitoring and automation solutions.

Automated Builds/Tests

Project lts master dev
Index
Travis CI Tests Build Status Build Status Build Status
Jenkins Software Tests Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
Soil Moisture Monitor
Travis CI Tests Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
WiFi Soil Moisture Monitor
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
Irrigator
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
WiFi Irrigator
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
Illuminator
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
Ventilator
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
MQTT Bridge
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Jenkins Hardware Tests Build Status Build Status Build Status
Serial Controller
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Serial Controller Client
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status
Plug and Play
Travis CI Build Build Status Build Status Build Status
Jenkins Software Build Build Status Build Status Build Status

Uptime Monitor

Monitors the GrowSense infrastructure and live test systems.

GrowSense Plug and Play

The recommended way to use the GrowSense devices is via plug and play.

Notes:

  • A branch is specified as an argument. By default you can use the "master" branch. Developers can use the "dev" branch.
  • An installation directory can be specified as an argument. Provide a question mark '?' as an argument to use the default location.

Install GrowSense and Plug and Play

Use either wget or curl to download and launch the setup process...

wget

# syntax
sudo wget --no-cache -O - https://raw.githubusercontent.com/GrowSense/Index/[BRANCH]/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir] [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] [MqttPort] [SmtpServer] [AdminEmail]
# lts
sudo wget --no-cache -O - https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- lts ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] 1883 [SmtpServer] [AdminEmail]
# master
sudo wget --no-cache -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- master ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] 1883 [SmtpServer] [AdminEmail]
# dev
sudo wget --no-cache -O - https://raw.githubusercontent.com/GrowSense/Index/dev/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- dev ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] 1883 [SmtpServer] [AdminEmail]

curl

# syntax
curl https://raw.githubusercontent.com/GrowSense/Index/[BRANCH]/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir] [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] [MqttPort] [SmtpServer] [AdminEmail]
# lts
curl https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- lts ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] [MqttPort] [SmtpServer] [AdminEmail]
# master
curl https://raw.githubusercontent.com/GrowSense/Index/master/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- master ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] [MqttPort] [SmtpServer] [AdminEmail]
# dev
curl https://raw.githubusercontent.com/GrowSense/Index/dev/scripts-web/install-plug-and-play-from-web.sh | sudo bash -s -- dev ? [WiFiName] [WiFiPassword] [MqttHost] [MqttUser] [MqttPass] [MqttPort] [SmtpServer] [AdminEmail]

Notes:

  • Specifying ? as the install path will install to the default locations.
  • The above script will take a long time to run to be patient.

Update GrowSense and Plug and Play

# Use either wget or curl to download and launch the update process...

# wget
sudo wget -O - https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/update-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir]

# curl
curl https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/update-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir]

Uninstall GrowSense and Plug and Play

# Use either wget or curl to download and launch the uninstall process...

# wget
sudo wget -O - https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/uninstall-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir]

# curl
curl https://raw.githubusercontent.com/GrowSense/Index/lts/scripts-web/uninstall-plug-and-play-from-web.sh | sudo bash -s -- [Branch] [InstallDir]

Setup Development Environment

Automatic Clone and Initialize

# Prepare the workspace
mkdir ~/workspace
cd ~/workspace

# Clone and Setup
# Use either wget or curl to download and launch the setup process...

# wget
wget -O - https://raw.githubusercontent.com/GrowSense/Index/dev/setup-from-github.sh | sh
cd GrowSense/Index

# curl
curl https://raw.githubusercontent.com/GrowSense/Index/dev/setup-from-github.sh | sh
cd GrowSense/Index

Note: The above script will automatically run the prepare.sh and init.sh scripts so they don't need to be run again. After it completes, skip past the "Manual Clone and Initialize" section down to the "Set Up Garden" section below.

Manual Clone and Initialize

Clone Index with Submodules

git clone --recursive https://github.com/GrowSense/Index.git GrowSense/Index

cd GrowSense/Index

Prepare Host Computer

bash prepare.sh

Initialize Libraries

bash init.sh

Manually Set Up Garden Computer

These script are for a manual GrowSense setup when not using plug nd play, such as for a custom setup or for a dev workspace. You shouldn't need to use these scripts if you've installed the plug and play system, unless you need to debug the system.

Set MQTT Credentials

Set the username and password used by the MQTT broker and MQTT bridge.

bash set-mqtt-credentials.sh [Host] [Username] [Password] [Port]

bash set-mqtt-credentials.sh 10.0.0.20 myuser mypass

Note: The Port argument is optional and defaults to 1883.

Set Up Garden Services

To set up the GrowSense garden services. Note: Set the MQTT credentials above first.

bash create-garden.sh

Stop Garden Services

To stop the GrowSense garden services.

bash disable-garden.sh

Disable Garden Services

To disable the GrowSense garden services.

bash disable-garden.sh

Reset Garden Cache

Removes the GrowSense service cache and temporary files. This is useful if a service isn't running properly.

bash remove-cache.sh

Upload Garden Device Sketches

Upload system UI device sketch

Upload the GrowSense system UI sketch to a device. Note: Ensure the device is connected

Arduino Uno

bash upload-ui-uno-sketch.sh [Port]

bash upload-ui-uno-sketch.sh ttyUSB0

bash upload-ui-uno-sketch.sh

Upload soil moisture monitor device sketch

Upload the GrowSense soil moisture monitor sketch to a device. Note: Ensure the device is connected

Arduino Nano

bash upload-monitor-nano-sketch.sh [DeviceName] [Port]

bash upload-monitor-nano-sketch.sh monitor1 ttyUSB0

bash upload-monitor-nano-sketch.sh

Arduino Uno

bash upload-monitor-uno-sketch.sh [DeviceName] [Port]

bash upload-monitor-uno-sketch.sh monitor1 ttyUSB0

bash upload-monitor-uno-sketch.sh

ESP12 WiFi Board

bash upload-monitor-esp-sketch.sh [DeviceName] [Port]

bash upload-monitor-esp-sketch.sh monitor1 ttyUSB0

bash upload-monitor-esp-sketch.sh

Upload irrigator device sketch

Upload the GrowSense irrigator sketch to a device. Note: Ensure the device is connected

Arduino Nano

bash upload-irrigator-nano-sketch.sh [DeviceName] [Port]

bash upload-irrigator-nano-sketch.sh irrigator1 ttyUSB0

bash upload-irrigator-nano-sketch.sh

Arduino Uno

bash upload-irrigator-uno-sketch.sh [DeviceName] [Port]

bash upload-irrigator-uno-sketch.sh irrigator1 ttyUSB0

bash upload-irrigator-uno-sketch.sh

ESP12 WiFi Board

bash upload-irrigator-esp-sketch.sh [DeviceName] [Port]

bash upload-irrigator-esp-sketch.sh irrigator1 ttyUSB0

bash upload-irrigator-esp-sketch.sh

Create and Manage Garden Devices

The plug and play system will automatically take care of calling these scripts. You should only need to use them if you are setting up a custom installation without plug and play.

Create soil moisture monitor device

Set up a GrowSense soil moisture monitor device. Note: Ensure the device is connected

Arduino Nano

bash create-garden-monitor-nano.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-monitor-nano.sh Monitor1 monitor1 ttyUSB0

Arduino Uno

bash create-garden-monitor-uno.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-monitor-uno.sh Monitor1 monitor1 ttyUSB0

ESP12 WiFi Board

bash create-garden-monitor-esp.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-monitor-esp.sh Monitor1 monitor1 ttyUSB0

Create irrigator device

Set up a GrowSense irrigator device. Note: Ensure the device is connected

Arduino Nano

bash create-garden-irrigator-nano.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-irrigator-nano.sh Irrigator1 irrigator1 ttyUSB1

Arduino Uno

bash create-garden-irrigator-uno.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-irrigator-uno.sh Irrigator1 irrigator1 ttyUSB1

ESP12 WiFi Board

bash create-garden-irrigator-esp.sh [DeviceLabel] [DeviceName] [Port]

bash create-garden-irrigator-esp.sh Irrigator1 irrigator1 ttyUSB1

View MQTT bridge service status

Display the status of the MQTT bridge service for a device.

bash view-mqtt-bridge-status.sh [DeviceName]

bash view-mqtt-bridge-status.sh monitor1

bash view-mqtt-bridge-status.sh irrigator1

View MQTT bridge service log

Display the log from the MQTT bridge service for a device.

bash view-mqtt-bridge-log.sh [DeviceName]

bash view-mqtt-bridge-log.sh monitor1

bash view-mqtt-bridge-log.sh irrigator1

Restart Garden Device

Restart MQTT bridge service or UI controller service for a device (depending on the device type).

bash restart-garden-device.sh [DeviceName]

bash restart-garden-device.sh monitor1

bash restart-garden-device.sh irrigator1

bash restart-garden-device.sh ui1

Disable Garden Device

Disable the MQTT bridge service or UI controller service for a device (depending on the device type). Note: This doesn't remove the device only temporarily disables it.

bash disable-garden-device.sh [DeviceName]

bash disable-garden-device.sh monitor1

bash disable-garden-device.sh irrigator1

bash disable-garden-device.sh ui1

Remove Garden Device

Remove the MQTT bridge service or UI controller service files for a device (depending on the device type). Note: This disables and completely removes the device service files.

bash remove-garden-device.sh [DeviceName]

bash remove-garden-device.sh monitor1

bash remove-garden-device.sh irrigator1

Remove All Garden Devices

Remove all services for all garden devices found.

bash remove-garden-devices.sh

Mosquitto MQTT Broker

Set up mosquitto MQTT broker without setting up the entire GrowSense index:

wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/mosquitto/install-mosquitto-docker-service-from-github.sh | sh -s mqttUsername mqttPassword

Note: Change mqttUsername and mqttPassword to the desired MQTT username and password.

Jenkins Continuous Integration

Set up jenkins continous integration server for GrowSense projects:

No Attached USB Devices

For use when no USB devices are attached. This is used for running GrowSense tests that aren't hardware related, or don't need hardware to be attached to the same machine, such as sanity tests.

wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/jenkins/install-jenkins-docker-service-from-github.sh | sh -s

2 Attached USB Devices

For use when 4 USB devices are attached. This is used on the GrowSense test server with the following attached:

  • A test monitor/irrigator (combined) device and corresponding test simulation device
wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/jenkins/install-jenkins-docker-service-2-from-github.sh | sh -s

4 Attached USB Devices

For use when 4 USB devices are attached. This is used on the GrowSense test server with the following attached:

  • A test monitor device and corresponding test simulation device
  • A test irrigator device and corresponding test simulation device
wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/jenkins/install-jenkins-docker-service-4-from-github.sh | sh -s

6 Attached USB Devices

For use when 6 USB devices are attached. This is used on the GrowSense test server with the following attached:

  • A test monitor device and corresponding test simulation device
  • A test irrigator device and corresponding test simulation device
  • A test illuminator device and corresponding test simulation device
wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/jenkins/install-jenkins-docker-service-6-from-github.sh | sh -s

8 Attached USB Devices

For use when 8 USB devices are attached. This is used on the GrowSense test server with the following attached:

  • A test monitor device and corresponding test simulation device
  • A test irrigator device and corresponding test simulation device
  • A test illuminator device and corresponding test simulation device
  • A test ventilator device and corresponding test simulation device
wget -O - https://raw.githubusercontent.com/GrowSense/Index/master/scripts/docker/jenkins/install-jenkins-docker-service-8-from-github.sh | sh -s

Mobile UI

Install Linear MQTT Dashboard

The Linear MQTT Dashboard application will be the user interface for the GrowSense projects.

  • Go to the play store
  • Search for "linear mqtt"
  • Install the "Linear MQTT Dashboard" application.

Install Termux

Termux is linux style terminal for mobile applications, and will be used to import the Linear MQTT Dashboard config file.

  • Go to the play store
  • Search for "termux"
  • Install the "Termux" application.

Import config.linear file

  • Open Termux
  • Install OpenSSH
pkg install -y openssh
  • Import the config.linear file (automatically generated when creating garden devices using the steps above).
# Format:
scp [user]@[host]:~/workspace/GrowSense/Index/mobile/linearmqtt/output/config.linear config.linear
# Example:
scp j@garden:~/workspace/GrowSense/Index/mobile/linearmqtt/output/config.linear config.linear
  • Open the config.linear file
termux-open config.linear
  • The Linear MQTT Dashboard should open and ask if you want to import the configuration.
  • Select YES
  • The GrowSense user interface should now be displayed.

About

An index of the GreenSense projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published