Garden Devices

Prepare Garden Computer

Prepare a network enabled headless garden computer using a single board computer.

Create Garden Devices

Create Garden Device

Follow the setup guides for the device you want to create:

Monitor:

Irrigator

Or use the following commands:

Arduino Monitor

  • sh create-garden-monitor.sh "[DeviceLabel]" [DeviceName] [SerialPort]
  • sh create-garden-monitor.sh "Monitor1" monitor1 ttyUSB0

ESP WiFi Monitor

  • sh create-garden-monitor-esp.sh "[DeviceLabel]" [DeviceName] [SerialPort]
  • sh create-garden-monitor-esp.sh "WiFiMonitor1" wifiMonitor1 ttyUSB0

Arduino Irrigator

  • sh create-garden-irrigator.sh "[DeviceLabel]" [DeviceName] [Port]
  • sh create-garden-irrigator.sh "Irrigator1" irrigator1 ttyUSB0

ESP WiFi Irrigator

  • sh create-garden-irrigator-esp.sh "[DeviceLabel]" [DeviceName] [Port]
  • sh create-garden-irrigator-esp.sh "WiFiIrrigator1" wifiIrrigator1 ttyUSB0

Notes:

  • The DeviceLabel is a user friendly label/title for the device which will be displayed on the mobile application as described in the networking walkthrough.
  • The DeviceName needs to be unique for each device.
  • The Port needs to match the port that the device is connected to. (Don't include the /dev/ section of the port)

Manage Devices

Check MQTT Bridge Log

The MQTT bridge log will show the latest output from the device.

View the the MQTT bridge output:

  • sh view-mqtt-bridge-log.sh [DeviceName]
  • sh view-mqtt-bridge-log.sh monitor1
  • sh view-mqtt-bridge-log.sh irrigator1

The output should look similar to this:

Or like this for the irrigator:

If the MQTT broker log shows data then your device should be able to send data and receive commands.

Restart a Device

If a device isn't working properly the updater and MQTT services can be restarted.

  • sh restart-garden-device.sh [DeviceName]
  • sh restart-garden-device.sh monitor1
  • sh restart-garden-device.sh irrigator1

Disable a Device

The updater and MQTT bridge services for a device can be disabled.

  • sh disable-garden-device.sh [DeviceName]
  • sh disable-garden-device.sh monitor1
  • sh disable-garden-device.sh irrigator1

Note: Disabled services will get re-enabled if another device is installed. Remove the device (below) to prevent it being re-enabled.

Remove a Device

The updater and MQTT bridge services can be completely removed.

  • sh remove-garden-device.sh [DeviceName]
  • sh remove-garden-device.sh monitor1
  • sh remove-garden-device.sh irrigator1

Note: Removed services won't get re-enabled unless re-added first.