Supported Functions
Built-In Functions~
AoT Average (Last, Multiple)~
Reads the latest data from the selected measurements, computes the arithmetic mean, and stores the result with the specified measurement/unit. Register the input measurements to aggregate by adding the "AoT Average: Input Measurement" action in the [Actions] list below. Only the average is stored; the original source values are not stored separately.
| Option | Type | Description |
|---|---|---|
| Period (seconds) | Text - Default Value: 60 | The period (in seconds) between measurements and calculations |
| Start Offset (seconds) | Integer - Default Value: 10 | The wait time (in seconds) before the first measurement |
| Max Age (seconds) | Integer - Default Value: 360 | Default maximum age (in seconds). If set separately in an individual input action, that value takes precedence. |
| Enable Debug Logging | Boolean | Log the computed average value each cycle. Leave off in production. |
AoT VPD~
This function calculates the Vapor Pressure Deficit (VPD) based on leaf temperature and humidity. If leaf temperature is not provided, an offset is applied to the air temperature instead.
| Option | Type | Description |
|---|---|---|
| Period (seconds) | Text - Default Value: 60 | The period between measurements or actions |
| Start Offset (seconds) | Integer - Default Value: 10 | The wait time before the first action |
| Air Temperature | Select Measurement (Input, Function) | Air temperature measurement |
| Air Temperature: Max Age (seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Humidity | Select Measurement (Input, Function) | Humidity measurement |
| Humidity: Max Age (seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Leaf Temperature | Select Measurement (Input, Function) | Leaf temperature measurement |
| Leaf Temperature: Max Age (seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Leaf Temperature Offset (°C) | Decimal - Default Value: -1.5 | Offset (°C) to apply when leaf temperature is not provided |
Average (Last, Multiple)~
This function retrieves the last measurement of each selected measurement, averages them, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement | Measurement to replace "x" in the equation |
Average (Past, Single)~
This function retrieves past measurements (within Max Age) of the selected measurement, calculates the average, and stores the result with that measurement and unit. Note: InfluxDB 1.8.10 has a bug where the mean() function does not work correctly. Therefore, when using InfluxDB v1.x, the median() function is used instead. This issue does not occur in InfluxDB 2.x, where the mean() function can be used normally. To obtain an accurate average, upgrade to InfluxDB 2.x.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Measurement | Select Measurement (Input, Function) | Measurement to replace "x" in the equation |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
Bang-Bang Hysteretic (On/Off) (Raise/Lower)~
A simple Bang-Bang control method that uses a single input value to control one output. Select the input, enter the output, Setpoint, and Hysteresis, then choose the Direction. • Raise mode (e.g., heating): the output turns on when the input is at or below (setpoint - hysteresis), and turns off when the input is at or above (setpoint + hysteresis). • Lower mode (e.g., cooling): the opposite of the above, turning the output on to lower the input.
| Option | Type | Description |
|---|---|---|
| Measurement | Select Measurement (Input, Function) | Select a measurement the selected output will affect |
| Measurement: Max Age (Seconds) | Text - Default Value: 360 | The maximum age of the measurement to use |
| Output | Select Device, Measurement, and Channel (Output) | Select an output to control that will affect the measurement |
| Setpoint | Decimal - Default Value: 50 | The desired setpoint |
| Hysteresis | Decimal - Default Value: 1 | The amount above and below the setpoint that defines the control band |
| Direction | Select(Options: [Raise | Lower] (Default in bold) | Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling) |
| Period (Seconds) | Text - Default Value: 5 | The duration between measurements or actions |
Bang-Bang Hysteretic (On/Off) (Raise/Lower/Both)~
A simple Bang-Bang control method that uses a single input value to control one or two outputs. Select the input, configure the Raise and/or Lower outputs, then enter the **Setpoint and Hysteresis (operating range) and choose the Direction. • Raise mode (e.g., heating): the output turns on when the input is at or below (setpoint - hysteresis), and turns off when the input is at or above (setpoint + hysteresis). • Lower mode (e.g., cooling): the opposite of the above, turning the output on to lower the input. • Both: adjusts Raise and Lower to keep the input at the setpoint.
| Option | Type | Description |
|---|---|---|
| Measurement | Select Measurement (Input, Function) | Select a measurement the selected output will affect |
| Measurement: Max Age (Seconds) | Text - Default Value: 360 | The maximum age of the measurement to use |
| Output (Raise) | Select Device, Measurement, and Channel (Output) | Select an output to control that will raise the measurement |
| Output (Lower) | Select Device, Measurement, and Channel (Output) | Select an output to control that will lower the measurement |
| Setpoint | Decimal - Default Value: 50 | The desired setpoint |
| Hysteresis | Decimal - Default Value: 1 | The amount above and below the setpoint that defines the control band |
| Direction | Select(Options: [Raise | Lower | Both] (Default in bold) | Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling) |
| Period (Seconds) | Text - Default Value: 5 | The duration between measurements or actions |
Bang-Bang Hysteretic (PWM) (Raise/Lower/Both)~
A simple Bang-Bang control method that uses a single input value to control one PWM output. Select the input, enter the PWM output, Setpoint, and Hysteresis, then choose the Direction. • Raise mode (e.g., heating): the output turns on when the input is at or below (setpoint - hysteresis), and turns off when the input is at or above (setpoint + hysteresis). • Lower mode (e.g., cooling): the opposite of the above, turning the output on to lower the input. • Both mode: adjusts Raise and Lower to keep the input at the setpoint. Note: this output only works with a PWM (Pulse Width Modulation) output.
| Option | Type | Description |
|---|---|---|
| Measurement | Select Measurement (Input, Function) | Select a measurement the selected output will affect |
| Measurement: Max Age (Seconds) | Text - Default Value: 360 | The maximum age of the measurement to use |
| Output | Select Device, Measurement, and Channel (Output) | Select an output to control that will affect the measurement |
| Setpoint | Decimal - Default Value: 50 | The desired setpoint |
| Hysteresis | Decimal - Default Value: 1 | The amount above and below the setpoint that defines the control band |
| Direction | Select(Options: [Raise | Lower | Both] (Default in bold) | Raise means the measurement will increase when the control is on (heating). Lower means the measurement will decrease when the output is on (cooling) |
| Period (Seconds) | Text - Default Value: 5 | The duration between measurements or actions |
| Duty Cycle (increase) | Decimal - Default Value: 90 | The duty cycle to increase the measurement |
| Duty Cycle (maintain) | Decimal - Default Value: 55 | The duty cycle to maintain the measurement |
| Duty Cycle (decrease) | Decimal - Default Value: 20 | The duty cycle to decrease the measurement |
| Duty Cycle (shutdown) | Decimal | The duty cycle to set when the function shuts down |
Camera: libcamera: Image/Video~
- Dependencies: libcamera-apps, ffmpeg
Note: This function is currently experimental and should be used at your own risk until this notice is removed. Captures images and video from the camera using libcamera-still and libcamera-vid. This function must be enabled to take still images, capture time-lapses, and use the Camera Widget.
| Option | Type | Description |
|---|---|---|
| Status Period (seconds) | Integer - Default Value: 60 | The duration (seconds) to update the Function status on the UI |
| Image options. | ||
| Custom Image Path | Text | Set a non-default path for still images to be saved |
| Custom Timelapse Path | Text | Set a non-default path for timelapse images to be saved |
| Image Extension | Select(Options: [JPG | PNG | BMP | RGB | YUV420] (Default in bold) | The file type/format to save images |
| Image: Resolution: Width | Integer - Default Value: 720 | The width of still images |
| Image: Resolution: Height | Integer - Default Value: 480 | The height of still images |
| Brightness | Decimal | The brightness of still images (-1 to 1) |
| Image: Contrast | Decimal - Default Value: 1.0 | The contrast of still images. Larger values produce images with more contrast. |
| Saturation | Decimal - Default Value: 1.0 | The saturation of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image. |
| Sharpness | Decimal | The sharpness of still images. Larger values produce more saturated colours; 0.0 produces a greyscale image. |
| Shutter Speed (Microseconds) | Integer | The shutter speed, in microseconds. 0 disables and returns to auto exposure. |
| Gain | Decimal - Default Value: 1.0 | The gain of still images. |
| White Balance: Auto | Select(Options: [Auto | Incandescent | Tungsten | Fluorescent | Indoor | Daylight | Cloudy | Custom] (Default in bold) | The white balance of images |
| White Balance: Red Gain | Decimal | The red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0) |
| White Balance: Blue Gain | Decimal | The red gain of white balance for still images (disabled Auto White Balance if red and blue are not set to 0) |
| Flip Horizontally | Boolean | Flip the image horizontally. |
| Flip Vertically | Boolean | Flip the image vertically. |
| Rotate (Degrees) | Integer | Rotate the image. |
| Custom libcamera-still Options | Text | Pass custom options to the libcamera-still command. |
| Video options. | ||
| Custom Video Path | Text | Set a non-default path for videos to be saved |
| Video Extension | Select(Options: [H264 -> MP4 (with ffmpeg) | H264 | MJPEG | YUV420] (Default in bold) | The file type/format to save videos |
| Video: Resolution: Width | Integer - Default Value: 720 | The width of videos |
| Video: Resolution: Height | Integer - Default Value: 480 | The height of videos |
| Custom libcamera-vid Options | Text | Pass custom options to the libcamera-vid command. |
| Commands | ||
| Capture Image | Button | |
| To capture a video, enter the duration and press Capture Video. | ||
| Video Duration (Seconds) | Integer - Default Value: 5 | How long to record the video |
| Capture Video | Button | |
| To start a timelapse, enter the duration and period and press Start Timelapse. | ||
| Timelapse Duration (Seconds) | Integer - Default Value: 2592000 | How long the timelapse will run |
| Timelapse Period (Seconds) | Integer - Default Value: 600 | How often to take a timelapse photo |
| Start Timelapse | Button | |
| To stop an active timelapse, press Stop Timelapse. | ||
| Stop Timelapse | Button | |
| To pause or resume an active timelapse, press Pause Timelapse or Resume Timelapse. | ||
| Pause Timelapse | Button | |
| Resume Timelapse | Button | |
Data Verification~
This function acquires two measurements, calculates their difference, and stores Measurement A if the difference is not greater than the configured threshold. This lets you verify one sensor's measurement against another sensor's measurement. Since the measurement is only stored when the two sensors agree, you can use the stored measurement in Conditional Functions and similar to notify the user when no measurement is present, indicating a possible sensor problem.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Measurement A | Select Measurement (Input, Function) | Measurement A |
| Measurement A: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement B | Select Measurement (Input, Function) | Measurement B |
| Measurement B: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Maximum Difference | Decimal - Default Value: 10.0 | The maximum allowed difference between the measurements |
| Average Measurements | Boolean | Store the average of the measurements in the database |
Difference~
This function retrieves two measurements, calculates their difference, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Measurement: A | Select Measurement (Input, Function) | |
| Measurement A: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement: B | Select Measurement (Input, Function) | |
| Measurement B: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Reverse Order | Boolean | Reverse the order in the calculation |
| Absolute Difference | Boolean | Return the absolute value of the difference |
Display: Generic LCD 16x2 (I2C)~
- Dependencies: smbus2
This function provides output to a 16x2 LCD display over I2C. This display can show 2 lines at a time, so each change to the Number of Line Sets adds 2 channels. The LCD refreshes every configured Period, displaying the next set of lines. So the first 2 displayed lines are channels 0 and 1, then 2 and 3, then 4 and 5, and so on. After all channels have been displayed, it cycles back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x20 | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
| Commands | ||
| Backlight On | Button | |
| Backlight Off | Button | |
| Backlight Flashing On | Button | |
| Backlight Flashing Off | Button | |
Display: Generic LCD 20x4 (I2C)~
- Dependencies: smbus2
This function provides output to a 20x4 LCD display over I2C. This display can show 4 lines at a time, so each change to the Number of Line Sets adds 4 channels. The LCD refreshes every configured Period, displaying the next set of lines. So the first 4 displayed lines are channels 0, 1, 2, 3, then 4, 5, 6, 7, then 8, 9, 10, 11, and so on. After all channels have been displayed, it cycles back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x20 | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
| Commands | ||
| Backlight On | Button | |
| Backlight Off | Button | |
Display: Grove LCD 16x2 (I2C)~
- Dependencies: smbus2
This function provides output to a Grove 16x2 LCD display over I2C. This display can show 2 lines at a time, so each change to the Number of Line Sets adds 2 channels. The LCD refreshes every configured Period, displaying the next set of lines. So the first 2 displayed lines are channels 0 and 1, then channels 2 and 3, then channels 4 and 5, and so on. After all channels have been displayed, it cycles back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3e | |
| I2C Bus | Integer - Default Value: 1 | |
| Backlight I2C Address | Text - Default Value: 0x62 | I2C address to control the backlight |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Backlight Red (0 - 255) | Integer - Default Value: 255 | Set the red color value of the backlight on startup. |
| Backlight Green (0 - 255) | Integer - Default Value: 255 | Set the green color value of the backlight on startup. |
| Backlight Blue (0 - 255) | Integer - Default Value: 255 | Set the blue color value of the backlight on startup. |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
| Commands | ||
| Backlight On | Button | |
| Backlight Off | Button | |
| Color (RGB) | Text - Default Value: 255,0,0 | Color as R,G,B values (e.g. "255,0,0" without quotes) |
| Set Backlight Color | Button | |
Display: SSD1306 OLED 128x32 [2 Lines] (I2C)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This function provides output to a 128x32 SSD1306 OLED display over I2C. This display function can show 2 lines at a time, so each change to the Number of Line Sets adds 2 channels. The LCD refreshes every configured Period, displaying the next set of lines. So the first displayed line set is channels 0 - 1, then 2 - 3, then 4 - 5, and so on. After all channels have been displayed, it cycles back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3c | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Reset Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to RST of the display |
| Characters Per Line | Integer - Default Value: 17 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 12 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x32 [2 Lines] (SPI)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-GPIO, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 2 lines at a time, so channels are added in sets of 2 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 1, then 2 - 3, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| SPI Device | Integer | The SPI device |
| SPI Bus | Integer | The SPI bus |
| DC Pin | Integer - Default Value: 16 | The pin (BCM numbering) connected to DC of the display |
| Reset Pin | Integer - Default Value: 19 | The pin (BCM numbering) connected to RST of the display |
| CS Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to CS of the display |
| Characters Per Line | Integer - Default Value: 17 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 12 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x32 [4 Lines] (I2C)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This function provides output to a 128x32 SSD1306 OLED display over I2C. This display function can show 4 lines at a time, so each change to the Number of Line Sets adds 4 channels. The LCD refreshes every configured Period, displaying the next set of lines. So the first displayed line set is channels 0 - 3, then 4 - 7, then 8 - 11, and so on. After all channels have been displayed, it cycles back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3c | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Reset Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to RST of the display |
| Characters Per Line | Integer - Default Value: 21 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 10 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x32 [4 Lines] (SPI)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-GPIO, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x32 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| SPI Device | Integer | The SPI device |
| SPI Bus | Integer | The SPI bus |
| DC Pin | Integer - Default Value: 16 | The pin (BCM numbering) connected to DC of the display |
| Reset Pin | Integer - Default Value: 19 | The pin (BCM numbering) connected to RST of the display |
| CS Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to CS of the display |
| Characters Per Line | Integer - Default Value: 21 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 10 | The size of the font, in points |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x64 [4 Lines] (I2C)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3c | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Reset Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to RST of the display |
| Characters Per Line | Integer - Default Value: 17 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 12 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x64 [4 Lines] (SPI)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-GPIO, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 4 lines at a time, so channels are added in sets of 4 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 3, then 4 - 7, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| SPI Device | Integer | The SPI device |
| SPI Bus | Integer | The SPI bus |
| DC Pin | Integer - Default Value: 16 | The pin (BCM numbering) connected to DC of the display |
| Reset Pin | Integer - Default Value: 19 | The pin (BCM numbering) connected to RST of the display |
| CS Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to CS of the display |
| Characters Per Line | Integer - Default Value: 17 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 12 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x64 [8 Lines] (I2C)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x64 SSD1306 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3c | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Reset Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to RST of the display |
| Characters Per Line | Integer - Default Value: 21 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 10 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1306 OLED 128x64 [8 Lines] (SPI)~
- Dependencies: libjpeg-dev, Pillow, pyusb, Adafruit-GPIO, Adafruit-extended-bus, adafruit-circuitpython-framebuf, adafruit-circuitpython-ssd1306
This Function outputs to a 128x64 SSD1306 OLED display via SPI. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| SPI Device | Integer | The SPI device |
| SPI Bus | Integer | The SPI bus |
| DC Pin | Integer - Default Value: 16 | The pin (BCM numbering) connected to DC of the display |
| Reset Pin | Integer - Default Value: 19 | The pin (BCM numbering) connected to RST of the display |
| CS Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to CS of the display |
| Characters Per Line | Integer - Default Value: 21 | The maximum number of characters to display per line |
| Use Non-Default Font | Boolean | Don't use the default font. Enable to specify the path to a font to use. |
| Non-Default Font Path | Text - Default Value: /usr/share/fonts/truetype/dejavu//DejaVuSans.ttf | The path to the non-default font to use |
| Font Size (pt) | Integer - Default Value: 10 | The size of the font, in points |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Display: SSD1309 OLED 128x64 [8 Lines] (I2C)~
- Dependencies: pyusb, luma.oled, Pillow, libjpeg-dev, zlib1g-dev, libfreetype6-dev, liblcms2-dev, libopenjp2-7, libtiff5
This Function outputs to a 128x64 SSD1309 OLED display via I2C. This display Function will show 8 lines at a time, so channels are added in sets of 8 when Number of Line Sets is modified. Every Period, the LCD will refresh and display the next set of lines. Therefore, the first set of lines that are displayed are channels 0 - 7, then 8 - 15, and so on. After all channels have been displayed, it will cycle back to the beginning.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 10 | The duration between measurements or actions |
| I2C Address | Text - Default Value: 0x3c | |
| I2C Bus | Integer - Default Value: 1 | |
| Number of Line Sets | Integer - Default Value: 1 | How many sets of lines to cycle on the LCD |
| Reset Pin | Integer - Default Value: 17 | The pin (BCM numbering) connected to RST of the display |
| Channel Options | ||
| Line Display Type | Select | What to display on the line |
| Measurement | Select Measurement (Input, Function, Output, PID) | Measurement to display on the line |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement Label | Text | Set to overwrite the default measurement label |
| Measurement Decimal | Integer - Default Value: 1 | The number of digits after the decimal |
| Text | Text - Default Value: Text | Text to display |
| Display Unit | Boolean - Default Value: True | Display the measurement unit (if available) |
Equation (Multi-Measure)~
This function retrieves two measurements, applies them to a user-defined equation, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Measurement: A | Select Measurement (Input, Output, Function) | Measurement to replace a |
| Measurement A: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement: B | Select Measurement (Input, Output, Function) | Measurement to replace b |
| Measurement B: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Equation | Text - Default Value: a*(2+b) | Equation using measurements a and b |
Equation (Single-Measure)~
This function retrieves a measurement, applies it to a user-defined equation, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Measurement | Select Measurement (Input, Output, Function) | Measurement to replace "x" in the equation |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Equation | Text - Default Value: x*5+2 | Equation using the measurement |
Example: Generic~
- Dependencies: build-essential
This function module is an example demonstrating the various UI option types. It is intended only for learning how to develop new custom function modules and has no other practical use. This message is displayed above the function options. This function retrieves the last selected measurement, turns the selected output on for 15 seconds, and then deactivates it. Analyze the code to develop your own function module and configure it so it can be imported from the Function Import page.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| The following fields are for text, integers, and decimal inputs. This message will automatically create a new line for the options that come after it. Alternatively, a new line can be created instead without a message, which are what separates each of the following three inputs. | ||
| Text Input | Text - Default Value: Text_1 | Type in text |
| Integer Input | Integer - Default Value: 100 | Type in an Integer |
| Devimal Input | Decimal - Default Value: 50.2 | Type in a decimal value |
| A boolean value can be made using a checkbox. | ||
| Boolean Value | Boolean - Default Value: True | Set to either True (checked) or False (Unchecked) |
| A dropdown selection can be made of any user-defined options, with any of the options selected by default when the Function is added by the user. | ||
| Select Option | Select(Options: [First Option Selected | Second Option Selected | Third Option Selected] (Default in bold) | Select an option from the dropdown |
| A specific measurement from an Input, Function, or PID Controller can be selected. The following dropdown will be populated if at least one Input, Function, or PID Controller has been created (as long as the Function has measurements, e.g. Statistics Function). | ||
| Controller Measurement | Select Measurement (Input, Function, PID) | Select a controller Measurement |
| An output channel measurement can be selected that will return the Output ID, Channel ID, and Measurement ID. This is useful if you need more than just the Output and Channel IDs and require the user to select the specific Measurement of a channel. | ||
| Output Channel Measurement | Select Device, Measurement, and Channel (Output) | Select an output channel and measurement |
| An output can be selected that will return the Output ID if only the output ID is needed. | ||
| Output Device | Select Device | Select an Output device |
| An Input, Output, Function, PID, or Trigger can be selected that will return the ID if only the controller ID is needed (e.g. for activating/deactivating a controller) | ||
| Controller Device | Select Device | Select an Input/Output/Function/PID/Trigger controller |
| Commands | ||
| Button One will pass the Button One Value to the button_one() function of this module. This allows functions to be executed with user-specified inputs. These can be text, integers, decimals, or boolean values. | ||
| Button One Value | Integer - Default Value: 650 | Value for button one. |
| Button One | Button | |
| Here is another action with another user input that will be passed to the function. Note that Button One Value will also be passed to this second function, so be sure to use unique ids for each input. | ||
| Button Two Value | Integer - Default Value: 1500 | Value for button two. |
| Button Two | Button | |
External Environment Context Collector~
Collects external temperature, humidity, wind speed, rainfall, solar radiation, dew point, and CO2 from outside the facility. The integrated environment control Function uses this collector as its single source of truth. Select the external sensor for each item. Leave items blank to apply the fallback default value.
| Option | Type | Description |
|---|---|---|
| Update Period: (Seconds) | Text - Default Value: 60 | Collection period (seconds). Set it equal to or shorter than the integrated control Function's cycle. |
| External Temperature Sensor | Select Measurement (Input, Function) | Select the external air temperature measurement. |
| External Humidity Sensor | Select Measurement (Input, Function) | Select the external relative humidity measurement. |
| Wind Speed Sensor | Select Measurement (Input, Function) | Select the wind speed (m/s) measurement. |
| Rain Sensor | Select Measurement (Input, Function) | Select the rainfall amount or rain detection measurement. |
| Solar Radiation Sensor | Select Measurement (Input, Function) | Select the solar radiation (W/m²) or illuminance measurement. |
| Dew Point Sensor | Select Measurement (Input, Function) | Select the dew point (°C) measurement. If absent, it is calculated from temperature and humidity. |
| External CO₂ Sensor | Select Measurement (Input, Function) | Select the external CO₂ (ppm) measurement. If absent, the default is 400 ppm. |
| Sensor Maximum Allowed Age (seconds) | Text - Default Value: 120 | Measurements older than this are replaced with the fallback default value. |
| Fallback External Temperature (°C) | Decimal - Default Value: 20.0 | Default value to use when the sensor is absent or expired. |
| Fallback External Humidity (%) | Decimal - Default Value: 60.0 | |
| Fallback Wind Speed (m/s) | Decimal |
Humidity (Wet/Dry-Bulb)~
This function calculates humidity based on wet-bulb and dry-bulb temperature measurements.
| Option | Type | Description |
|---|---|---|
| Measurements Enabled | Multi-Select | The measurements to record |
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Dry Bulb Temperature | Select Measurement (Input, Function) | Dry Bulb temperature measurement |
| Dry Bulb: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Wet Bulb Temperature | Select Measurement (Input, Function) | Wet Bulb temperature measurement |
| Wet Bulb: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Pressure | Select Measurement (Input, Function) | Pressure measurement |
| Pressure: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
LoRaWAN Class Scheduler (per-site)~
Single per-site authority for LoRaWAN class. Decides Class C (active/wireless control) vs Class A (rest/low-power) from environmental data, toggles the shared ChirpStack device profile(s) and broadcasts the firmware HB mode to each device, stores per-device RSSI/SNR/battery, and offers a manual override. Replaces the per-device LoRaWAN Mode Manager.
| Option | Type | Description |
|---|---|---|
| Evaluation period (Seconds) | Text - Default Value: 600 | |
| Input max age (s) | Text - Default Value: 4000 | |
| ChirpStack | ||
| REST Port | Integer - Default Value: 8090 | Server/token from Settings -> ChirpStack; devices assigned there ("Managed by"). |
| Control Mode | ||
| Control mode | Select(Options: [AUTO - environment scoring | MANUAL - fixed daily C window] (Default in bold) | |
| Manual C start (HH:MM) | Text - Default Value: 05:00 | |
| Manual C expire (HH:MM) | Text - Default Value: 17:00 | |
| Environmental Inputs (AUTO fallback) | ||
| Solar radiation (W/m2) | Select Measurement (Input, Function) | Light drives photosynthesis. Pick the radiation measurement (leave empty to skip). |
| Soil moisture (%) | Select Measurement (Input, Function) | Wet soil = irrigation not needed. |
| Rainfall now (mm/h) | Select Measurement (Input, Function) | Currently raining. |
| Rainfall accumulated (mm) | Select Measurement (Input, Function) | Recent accumulated rain -> soil saturated. |
| Decision | ||
| Score >= -> ACTIVE | Decimal - Default Value: 0.55 | |
| Score < -> REST | Decimal - Default Value: 0.4 | |
| Minimum dwell (min) | Integer - Default Value: 15 | |
| Class / HB Periods | ||
| ACTIVE Class C HB (min) | Integer - Default Value: 10 | |
| REST Class A HB (min) | Integer - Default Value: 30 | |
| Winter Class A HB (min) | Integer - Default Value: 60 | |
| Winter (forced REST) | ||
| Winter start (MM-DD) | Text - Default Value: 12-01 | |
| Winter end (MM-DD) | Text - Default Value: 02-28 | |
| Battery Management | ||
| Battery Type | Select(Options: [Not configured (no battery gate) | Lead-acid (low < 11.7 V / critical < 11.4 V) | LiFePO4 (low < 12.8 V / critical < 12.0 V)] (Default in bold) | Reads battery_V from ChirpStack metrics (requires INA219 wired). Low: forces REST unless manual override is active. Critical: forces REST unconditionally; valve-open interlock still applies. |
| Low-battery HB (min) | Integer - Default Value: 60 | Heartbeat period (minutes) applied when battery is low or critical. Should be >= REST HB to maximise sleep time. |
| Commands | ||
| Manual override | ||
| Force-Active minutes (0 = until expire time) | Integer | |
| Force Active (Class C) now | Button | |
| Clear override | Button | |
LoRaWAN Mode/Period Manager (RAK3172E)~
Determines the Class/heartbeat period based on battery, time of day, valve activity, and link quality. Queues downlinks directly via ChirpStack gRPC (DeviceService.Enqueue).
| Option | Type | Description |
|---|---|---|
| Device Role | Select(Options: [Controller (valve/actuator) — Class C preferred | Sensor — Class A, low power (no gateway GPS required) | Hybrid — manual configuration] (Default in bold) | controller: Class C during operating hours, B at night. sensor: Class A always (no gateway GPS required), longer HB at night. hybrid: follow the settings below exactly. |
| Period (Seconds) | Text - Default Value: 60 | Evaluation and apply period (seconds) |
| Server Connection | ||
| ChirpStack gRPC Server | Text - Default Value: 127.0.0.1:8080 | host:port format (e.g. 127.0.0.1:8080) or http(s)://host:port |
| API Key | Text | Enter the JWT token value (without "Bearer") |
| DevEUI | Text | 16-digit hexadecimal DevEUI (separators allowed) |
| Measurement Inputs | ||
| ChirpStack REST Port | Integer - Default Value: 8090 | ChirpStack REST API port (default 8090) |
| Measurement: Max Age (Seconds) | Text - Default Value: 4000 | How far back (seconds) to look in ChirpStack metrics history |
| Retry Interval (min) | Decimal | Interval at which to re-apply the same mode when there is no ACK (0 disables retry) |
| LoRa Class Policy | Select(Options: [Auto | CLASS-A | CLASS-B | CLASS-C] (Default in bold) | Only in Auto mode is the Class switched according to the mode; selecting a specific class keeps that class. |
| Switch Mode Only When Inputs Are Valid | Boolean | Apply the mode only when the input conditions/measurements are valid |
| Operating Hours Sets the hours during which performance mode operates. Enter 0–24, or if the start and end times are equal it means 24 hours. | ||
| Operating Hours Basis | Select(Options: [Fixed hours — the start and end hours below | Sunrise to sunset — follows the season at this location] (Default in bold) | Fixed hours keep the same clock times all year. Sunrise to sunset follows the daylight at this device's location, so performance mode tracks the season without being re-entered each month. The location is inherited from the map; if it cannot be resolved, the fixed hours below are used instead. |
| Sunrise Offset (min) | Integer | Shifts the start of the operating window relative to sunrise. Negative starts earlier (-30 begins 30 minutes before sunrise). Only used when the basis is sunrise to sunset. |
| Sunset Offset (min) | Integer | Shifts the end of the operating window relative to sunset. Positive ends later (30 keeps performance mode for 30 minutes after sunset). Only used when the basis is sunrise to sunset. |
| Performance Mode Start (hour) | Integer - Default Value: 4 | Performance mode start time (0–23) |
| Performance Mode End (hour) | Integer - Default Value: 18 | Performance mode end time (0–23) |
| Performance Mode Lead (min) | Integer - Default Value: 10 | Specifies, in minutes, how far in advance of the daytime start to switch to performance (Class C) mode. |
| HB Period per Mode Sets the heartbeat period for each mode. | ||
| Performance Mode Class | Select(Options: [Class A | Class B | Class C] (Default in bold) | LoRa class to apply to the firmware under the performance (C) policy |
| Power-saving Mode Class | Select(Options: [Class A | Class B | Class C] (Default in bold) | LoRa class to apply to the firmware under the power-saving (B) policy |
| Ultra-saving Mode Class | Select(Options: [Class A | Class B | Class C] (Default in bold) | LoRa class to apply to the firmware under the ultra-saving (A) policy |
| Performance Heartbeat (min) | Integer - Default Value: 30 | Performance (C) mode heartbeat period (min) |
| Power-saving Heartbeat (min) | Integer - Default Value: 30 | Power-saving (B) mode heartbeat period (min) |
| Ultra-saving Heartbeat (min) | Integer - Default Value: 60 | Ultra-saving (A) mode heartbeat period (min) |
| Threshold Options Sets the mode-switching thresholds. Defaults assume a 4S LiFePO4 pack (12.8 V nominal). For a 12 V lead-acid pack use 12.00 / 11.70 / 11.40 instead — the two chemistries have completely different voltage curves. | ||
| Battery Management | Boolean | Automatically switches the mode according to the battery voltage. (Active only when the LoRa class policy is Auto.) |
| Performance Mode Threshold (V) | Decimal - Default Value: 13.2 | Voltage threshold at which stable operation is possible (4S LiFePO4: 13.20 V ≈ 70%; lead-acid 12 V: 12.00 V) |
| Power-saving Threshold (V) | Decimal - Default Value: 13.0 | Voltage threshold for switching to power-saving mode (4S LiFePO4: 13.00 V ≈ 25%; lead-acid 12 V: 11.70 V) |
| Ultra-saving Threshold (V) | Decimal - Default Value: 12.8 | Voltage threshold for switching to ultra-saving mode (4S LiFePO4: 12.80 V ≈ 10%, past the knee; lead-acid 12 V: 11.40 V) |
| Halt Mode Application When Battery Is Missing | Boolean - Default Value: True | Holds off on mode/period changes when the battery measurement is missing or too old. |
| Link RSSI Minimum (dBm) | Integer - Default Value: -110 | At or above this value, the link is considered good |
| Link SNR Minimum (dB) | Integer - Default Value: -10 | At or above this value, the link is considered good |
| Valve Active Threshold (mA) | Decimal - Default Value: 50.0 | If battery current exceeds this value, the valve is considered active and the device stays in performance mode. 0 disables this check. |
| Enable Debug Logging | Boolean | Log "no apply" notices when mode/period is unchanged. Leave off in production. |
Neokey 4x1 Neopixel Keyboard (Execute Actions)~
- Dependencies: pyusb, Adafruit-extended-bus, adafruit-circuitpython-neokey
This function executes specific actions when a key is pressed. After adding actions at the bottom of this module, enter one or more short action IDs for each key, separated by commas. The action ID can be found next to each action (for example, for "[Action 0559689e] Controller: Activate" the action ID is 0559689e). When entering action IDs, separate multiple IDs with commas (for example, "asdf1234" or "asdf1234,qwer5678,zxcv0987"). Actions are executed in the order of the entered text string. Enter the action IDs to execute when a key is pressed. If you enable the toggle action, the actions listed in the toggled action IDs are executed on alternate key presses. You can set the LED color before a key is pressed, after it is pressed, and while the last action is executing. The color is an RGB string with values in the range 0 to 255. For example, enter "255, 0, 0" for red and "0, 0, 255" for blue.
| Option | Type | Description |
|---|---|---|
| I2C Address | Text - Default Value: 0x30 | |
| I2C Bus | Integer - Default Value: 1 | |
| LED Brightness (0.0-1.0) | Decimal - Default Value: 0.2 | The brightness of the LEDs |
| LED Flash Period (Seconds) | Text - Default Value: 1.0 | Set the period if the LED begins flashing |
| Channel Options | ||
| Name | Text | A name to distinguish this from others |
| LED Delay (Seconds) | Text - Default Value: 1.5 | How long to leave the LED on after the last action executes. |
| Action ID(s) | Text | Set which action(s) execute when the key is pressed. Enter one or more Action IDs, separated by commas |
| Enable Toggling Actions | Boolean | Alternate between executing two sets of Actions |
| Toggled Action ID(s) | Text | Set which action(s) execute when the key is pressed on even presses. Enter one or more Action IDs, separated by commas |
| Resting LED Color (RGB) | Text - Default Value: 0, 0, 0 | The RGB color while no actions are running (e.g 10, 0, 0) |
| Actions Running LED Color: (RGB) | Text - Default Value: 0, 255, 0 | The RGB color while all but the last action is running (e.g 10, 0, 0) |
| Last Action LED Color (RGB) | Text - Default Value: 0, 0, 255 | The RGB color while the last action is running (e.g 10, 0, 0) |
| Shutdown LED Color (RGB) | Text - Default Value: 0, 0, 0 | The RGB color when the Function is disabled (e.g 10, 0, 0) |
PID Autotune~
This function attempts to automatically tune a PID controller. That is, it enables the output and measures the response from the sensor multiple times to calculate the P, I, and D gain values. Updates on the operating status are written to the daemon log, and when autotuning completes successfully a summary is also stored in the daemon log. Only raising the current measurement is supported; lowering the measurement may require some modification of the controller code. To monitor whether the output is normally raising the measurement above the setpoint, it is recommended to graph the measurement and output on the dashboard. The autotune feature is experimental and not fully developed. It is likely it will not generate proper PID gains, so it is recommended not to rely on this function for accurate PID controller tuning.
| Option | Type | Description |
|---|---|---|
| Measurement | Select Measurement (Input, Function) | Select a measurement the selected output will affect |
| Output | Select Device, Measurement, and Channel (Output) | Select an output to modulate that will affect the measurement |
| Period | Text - Default Value: 30 | The period between powering the output |
| Setpoint | Decimal - Default Value: 50 | A value sufficiently far from the current measured value that the output is capable of pushing the measurement toward |
| Noise Band | Decimal - Default Value: 0.5 | The amount above the setpoint the measurement must reach |
| Outstep | Decimal - Default Value: 10 | How many seconds the output will turn on every Period |
| Currently, only autotuning to raise a condition (measurement) is supported. | ||
| Direction | Select(Options: [Raise | Lower (Cooling/Humidifying)] (Default in bold) | The direction the Output will push the Measurement |
Redundant Sensor Data~
This function stores the first available measurement. It is useful when you want to configure multiple sensors for backup. If you order the sensors by priority, this function checks the first measurement for existence, and if absent, checks the next measurement, repeating the process. When a measurement is found, it is stored in the database with the custom measurement and unit. The output of this function can be used as an input throughout AoT. If you need to check three or more measurements, you can chain multiple redundancy functions by setting the output of the first function as the input of the second.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Measurement A | Select Measurement (Input, Function) | Measurement to replace a |
| Measurement A: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement B | Select Measurement (Input, Function) | Measurement to replace b |
| Measurement B: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement C | Select Measurement (Input, Function) | Measurement to replace C |
| Measurement C: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
Remote Backup (rsync)~
- Dependencies: rsync
This function backs up the current system data to a remote system using rsync. The remote system must be running an SSH server and have rsync installed. This system must also have rsync installed and be able to access the remote system without a password via an SSH key file.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 1296000 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 300 | The duration to wait before the first operation |
| Local User | Text - Default Value: pi | The user on this system that will run rsync |
| Remote User | Text - Default Value: pi | The user to log in to the remote host |
| Remote Host | Text - Default Value: 192.168.0.50 | The IP or host address to send the backup to |
| Remote Backup Path | Text - Default Value: /home/pi/backup_aot | The path to backup to on the remote host |
| Rsync Timeout (Seconds) | Integer - Default Value: 3600 | How long to allow rsync to complete |
| Local Backup Path | Text | A local path to backup (leave blank to disable) |
| Backup Settings Export File | Boolean - Default Value: True | Create and backup exported settings file |
| Remove Local Settings Backups | Boolean | Remove local settings backups after successful transfer to remote host |
| Backup Measurements | Boolean - Default Value: True | Backup all influxdb measurements |
| Remove Local Measurements Backups | Boolean | Remove local measurements backups after successful transfer to remote host |
| Backup Camera Directories | Boolean - Default Value: True | Backup all camera directories |
| Remove Local Camera Images | Boolean | Remove local camera images after successful transfer to remote host |
| SSH Port | Integer - Default Value: 22 | Specify a nonstandard SSH port |
| Commands | ||
| Backup of settings are only created if the AoT version or database versions change. This is due to this Function running periodically- if it created a new backup every Period, there would soon be many identical backups. Therefore, if you want to induce the backup of settings, measurements, or camera directories and sync them to your remote system, use the buttons below. | ||
| Backup Settings Now | Button | |
| Backup Measurements Now | Button | |
| Backup Camera Directories Now | Button | |
Spacer~
A spacer to organize Functions.
| Option | Type | Description |
|---|---|---|
| Color | Text - Default Value: #000000 | The color of the name text |
Statistics (Last, Multiple)~
This function retrieves multiple measurements, calculates statistics, and stores the results with the selected unit.
| Option | Type | Description |
|---|---|---|
| Measurements Enabled | Multi-Select | The measurements to record |
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement | Measurements to perform statistics on | |
| Halt on Missing Measurement | Boolean | Don't calculate statistics if >= 1 measurement is not found within Max Age |
Statistics (Past, Single)~
This function retrieves multiple values from a single measurement, calculates statistics, and stores the results with the selected unit.
| Option | Type | Description |
|---|---|---|
| Measurements Enabled | Multi-Select | The measurements to record |
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement | Select Measurement (Input, Function) | Measurement to perform statistics on |
Sum (Accumulate / Point)~
Sums a single measurement source over time. Interval mode sums every value between cycles (per-cycle usage). Point mode samples one value at a recurring time-of-day (every N hours, in the device timezone) and sums the most recent N snapshots. The result is stored with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Sum Mode | Select(Options: [Interval sum (between cycles) | Point sum (value at a recurring time)] (Default in bold) | Interval: sum all values in the [previous run, now] window. Point: sum the most recent N snapshot values. |
| Measurement | Select Measurement (Input, Function, Output) | The single measurement source to sum |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Period (Seconds) | Text - Default Value: 3600 | [Interval mode] The duration between sums |
| Snapshot Time (HH:MM) | Text - Default Value: 00:00 | [Point mode] Time-of-day anchor for snapshots in the device timezone (e.g. 00:00). Use 24:00 for midnight. |
| Snapshot Interval (Hours) | Text - Default Value: 24 | [Point mode] Hours between snapshots, starting from the anchor (e.g. 24 = once daily, 6 = four times daily) |
| Point Count (N) | Integer - Default Value: 1 | [Point mode] Number of most-recent snapshot values to sum |
| Measure Now | Button |
Sum (Last, Multiple)~
This function retrieves the last value of each selected measurement, sums them, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Measurement | Measurement to replace "x" in the equation |
Sum (Past, Single)~
This function retrieves past measurements (within Max Age) of the selected measurement, sums them, and stores the result with the selected measurement and unit.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Measurement | Select Measurement (Input, Function, Output) | Measurement to replace "x" in the equation |
| Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
Vapor Pressure Deficit (AVPD)~
This function calculates the Vapor Pressure Deficit (AVPD) using leaf temperature and humidity.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 60 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Temperature | Select Measurement (Input, Function) | Temperature measurement |
| Temperature: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Humidity | Select Measurement (Input, Function) | Humidity measurement |
| Humidity: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
pH, EC Regulation~
This function uses two pumps (acid and base solutions) to regulate pH, and can use up to four pumps (A, B, C, D nutrient solutions) to regulate electrical conductivity (EC). You only need to configure the nutrient solution outputs you intend to use. Outputs that are not configured are not activated during EC adjustment, and you can use from one to four pumps. Outputs can operate in units of duration (seconds) or volume (ml), and each output type must be matched to the selected output channel (an on/off output channel for duration control, a volume output channel for volume control). The mixing ratio of the nutrient solutions is determined by the duration or volume setting of each EC output. If you enter an email address (or multiple addresses separated by commas) in the email notification field, a notification email is sent in the following cases.
1) when the pH value goes outside the configured danger range, 2) when the EC value is too high and water must be added to the storage tank, 3) when no measurement can be found in the database within a given Max Age range.
Each email notification type has its own timer so that the same notification is not sent repeatedly, and the same notification is not sent for the duration of the configured email timer.
Once this duration elapses, the timer resets automatically, allowing a new notification to be sent. You can also manually reset the email timers using the Custom Commands below.
When the function is enabled, status text is displayed at the bottom of the screen showing the regulation information and the total duration/volume of each output.
| Option | Type | Description |
|---|---|---|
| Period (Seconds) | Text - Default Value: 300 | The duration between measurements or actions |
| Start Offset (Seconds) | Integer - Default Value: 10 | The duration to wait before the first operation |
| Status Period (seconds) | Integer - Default Value: 60 | The duration (seconds) to update the Function status on the UI |
| Measurement Options | ||
| pH Measurement | Select Measurement (Input, Function) | Measurement from the pH input |
| pH: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| EC Measurement | Select Measurement (Input, Function) | Measurement from the EC input |
| Electrical Conductivity: Max Age (Seconds) | Integer - Default Value: 360 | The maximum age of the measurement to use |
| Output Options | ||
| Output: pH Dose Raise (Base) | Select Channel (Output_Channels) | Select an output to raise the pH |
| Output: pH Dose Lower (Acid) | Select Channel (Output_Channels) | Select an output to lower the pH |
| pH Output Type | Select(Options: [Duration (seconds) | Volume (ml)] (Default in bold) | Select the output type for the selected Output Channel |
| pH Output Amount | Decimal - Default Value: 2.0 | The amount to send to the pH dosing pumps (duration or volume) |
| Output: EC Dose Nutrient A | Select Channel (Output_Channels) | Select an output to dose nutrient A |
| Nutrient A Output Type | Select(Options: [Duration (seconds) | Volume (ml)] (Default in bold) | Select the output type for the selected Output Channel |
| Nutrient A Output Amount | Decimal - Default Value: 2.0 | The amount to send to the Nutrient A dosing pump (duration or volume) |
| Output: EC Dose Nutrient B | Select Channel (Output_Channels) | Select an output to dose nutrient B |
| Nutrient B Output Type | Select(Options: [Duration (seconds) | Volume (ml)] (Default in bold) | Select the output type for the selected Output Channel |
| Nutrient B Output Amount | Decimal - Default Value: 2.0 | The amount to send to the Nutrient B dosing pump (duration or volume) |
| Output: EC Dose Nutrient C | Select Channel (Output_Channels) | Select an output to dose nutrient C |
| Nutrient C Output Type | Select(Options: [Duration (seconds) | Volume (ml)] (Default in bold) | Select the output type for the selected Output Channel |
| Nutrient C Output Amount | Decimal - Default Value: 2.0 | The amount to send to the Nutrient C dosing pump (duration or volume) |
| Output: EC Dose Nutrient D | Select Channel (Output_Channels) | Select an output to dose nutrient D |
| Nutrient D Output Type | Select(Options: [Duration (seconds) | Volume (ml)] (Default in bold) | Select the output type for the selected Output Channel |
| Nutrient D Output Amount | Decimal - Default Value: 2.0 | The amount to send to the Nutrient D dosing pump (duration or volume) |
| Setpoint Options | ||
| pH Setpoint | Decimal - Default Value: 5.85 | The desired pH setpoint |
| pH Hysteresis | Decimal - Default Value: 0.35 | The hysteresis to determine the pH range |
| EC Setpoint | Decimal - Default Value: 150.0 | The desired electrical conductivity setpoint |
| EC Hysteresis | Decimal - Default Value: 50.0 | The hysteresis to determine the EC range |
| pH Danger Range (High Value) | Decimal - Default Value: 7.0 | This high pH value for the danger range |
| pH Danger Range (Low Value) | Decimal - Default Value: 5.0 | This low pH value for the danger range |
| Alert Notification Options | ||
| Notification E-Mail | Text | E-mail to notify when there is an issue (blank to disable) |
| E-Mail Timer Duration (Hours) | Decimal - Default Value: 12.0 | How long to wait between sending e-mail notifications |
| Commands | ||
| Each e-mail notification timer can be manually reset before the expiration. | ||
| Reset EC E-mail Timer | Button | |
| Reset pH E-mail Timer | Button | |
| Reset Measurement Issue E-mail Timer | Button | |
| Reset All E-Mail Timers | Button | |
| Each total duration and volume can be manually reset. | ||
| Reset All Totals | Button | |
| Reset Total Raise pH Duration | Button | |
| Reset Total Lower pH Duration | Button | |
| Reset Total Raise pH Volume | Button | |
| Reset Total Lower pH Volume | Button | |
| Reset Total EC A Duration | Button | |
| Reset Total EC A Volume | Button | |
| Reset Total EC B Duration | Button | |
| Reset Total EC B Volume | Button | |
| Reset Total EC C Duration | Button | |
| Reset Total EC C Volume | Button | |
| Reset Total EC D Duration | Button | |
| Reset Total EC D Volume | Button | |