GrowSense provides garden/farm/agriculture related monitoring and automation solutions.
Monitors the GrowSense infrastructure and live test systems.
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.
Use either wget or curl to download and launch the setup process...
# 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]
# 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.
# 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]
# 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]
# 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.
git clone --recursive https://github.com/GrowSense/Index.git GrowSense/Index
cd GrowSense/Index
bash prepare.sh
bash init.sh
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 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.
To set up the GrowSense garden services. Note: Set the MQTT credentials above first.
bash create-garden.sh
To stop the GrowSense garden services.
bash disable-garden.sh
To disable the GrowSense garden services.
bash disable-garden.sh
Removes the GrowSense service cache and temporary files. This is useful if a service isn't running properly.
bash remove-cache.sh
Upload the GrowSense system UI sketch to a device. Note: Ensure the device is connected
bash upload-ui-uno-sketch.sh [Port]
bash upload-ui-uno-sketch.sh ttyUSB0
bash upload-ui-uno-sketch.sh
Upload the GrowSense soil moisture monitor sketch to a device. Note: Ensure the device is connected
bash upload-monitor-nano-sketch.sh [DeviceName] [Port]
bash upload-monitor-nano-sketch.sh monitor1 ttyUSB0
bash upload-monitor-nano-sketch.sh
bash upload-monitor-uno-sketch.sh [DeviceName] [Port]
bash upload-monitor-uno-sketch.sh monitor1 ttyUSB0
bash upload-monitor-uno-sketch.sh
bash upload-monitor-esp-sketch.sh [DeviceName] [Port]
bash upload-monitor-esp-sketch.sh monitor1 ttyUSB0
bash upload-monitor-esp-sketch.sh
Upload the GrowSense irrigator sketch to a device. Note: Ensure the device is connected
bash upload-irrigator-nano-sketch.sh [DeviceName] [Port]
bash upload-irrigator-nano-sketch.sh irrigator1 ttyUSB0
bash upload-irrigator-nano-sketch.sh
bash upload-irrigator-uno-sketch.sh [DeviceName] [Port]
bash upload-irrigator-uno-sketch.sh irrigator1 ttyUSB0
bash upload-irrigator-uno-sketch.sh
bash upload-irrigator-esp-sketch.sh [DeviceName] [Port]
bash upload-irrigator-esp-sketch.sh irrigator1 ttyUSB0
bash upload-irrigator-esp-sketch.sh
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.
Set up a GrowSense soil moisture monitor device. Note: Ensure the device is connected
bash create-garden-monitor-nano.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-monitor-nano.sh Monitor1 monitor1 ttyUSB0
bash create-garden-monitor-uno.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-monitor-uno.sh Monitor1 monitor1 ttyUSB0
bash create-garden-monitor-esp.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-monitor-esp.sh Monitor1 monitor1 ttyUSB0
Set up a GrowSense irrigator device. Note: Ensure the device is connected
bash create-garden-irrigator-nano.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-irrigator-nano.sh Irrigator1 irrigator1 ttyUSB1
bash create-garden-irrigator-uno.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-irrigator-uno.sh Irrigator1 irrigator1 ttyUSB1
bash create-garden-irrigator-esp.sh [DeviceLabel] [DeviceName] [Port]
bash create-garden-irrigator-esp.sh Irrigator1 irrigator1 ttyUSB1
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
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 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 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 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 services for all garden devices found.
bash remove-garden-devices.sh
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.
Set up jenkins continous integration server for GrowSense projects:
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
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
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
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
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
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.
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.
- 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.