Documentation

Node Configuration

Configure serial nodes such as Arduino and ESP microcontrollers attached to the main controller.

Overview

Nodes are slave units attached via serial to the main controller that run on microcontrollers (Arduino, ESP32, and ESP8266). The nodes wait for configuration and commands from the main controller.

Nodes have five main configurations: name, address, type, controls, and sensors. You can find the address of attached serial devices with: ls /dev

JSON
{
  "nodes": [
    {
      "name": "Node 1",
      "address": "/dev/ttyUSB0",
      "type": "arduino",
      "sensors": [
        {
          "pin": 1,
          "type": "Soil",
          "name": "Garden_soil_moisture"
        }
      ]
    }
  ]
}

Settings

Option Type Required Description
`name` String Yes Friendly display name of the node.
`address` String Yes Serial or IP address of the node connected to the Raspberry Pi.
`type` String Yes Type of node to load the proper worker. Options: `arduino`, `ADC-MCP3008`
`sensors` Array No Array of sensor configuration objects for sensors attached to the node.
`controls` Array No Array of control configuration objects for controls attached to the node.
`relays` Array No Array of relay configuration objects for relays attached to the node.
`use_wifi` Boolean No Set to `true` for wireless connections and change `address` to a local IP.

Sensor Settings (Arduino)

Read more about sensor configurations here.

Option Type Required Description
`type` String Yes Options: `Soil`, `Rain`, `Float`, `Humidity`, `Temperature`
`pin` Integer Yes GPIO pin number on the Arduino the sensor is connected to.
`name` String Yes Name of the sensor. Slugged and used as the Redis key if a key is not specified.
`key` String No Key to store value under in Redis. If not provided, the name is converted to lowercase with underscores.

Sensor Types (Arduino)

Arduinos have analog GPIO support providing access to a larger range of sensors.

Type Returns Description
Humidity Object DHT11/DHT22 temperature and humidity reading.
Rain Integer Analog reading of resistance across rain sensor to detect moisture level.
Soil Integer Analog reading of capacitive soil sensor to determine soil moisture.
Float Boolean 0 or 1 digital read of liquid level. Prevents pump from running if marked critical and returns 0.
Temperature Object Temperature sensor running on Onewire bus. Onewire can be buggy with other sensors running.

Control Settings (Arduino)

Read more about control configurations here.

Option Type Required Description
`type` String Yes Options: `button`, `switch`, `potentiometer`
`pin` Integer Yes GPIO pin number on the Arduino the control is connected to.
`name` String Yes Name of the control. Slugged and used as the Redis key if a key is not specified.
`key` String No Key to store value under in Redis. If not provided, the name is converted to lowercase with underscores.

Sensor Types (MCP3008)

The MCP3008 is an analog-to-digital converter chip that allows connecting analog signals to the Pi GPIO. This was a community-contributed feature.

Type Returns Description
Soil Integer Analog reading of capacitive soil sensor to determine soil moisture.

Relays (Arduino)

The relay configuration for nodes is identical to the general relay settings. See the relays page for more information.