-
Notifications
You must be signed in to change notification settings - Fork 0
plugins output
Magnus Lübeck edited this page May 6, 2018
·
2 revisions
This page will document the output plugin.
The output plugin is responsible to act on the data delivered by the control plugin, and physically control the integration with whatever you use to heat or cool your project.
Example devices:
- Electric grill element - used in a smoker to set the ambient temperature
- Freezer - used to cool beer to proper temperature
Inputs:
- The file $tmp/temperature (normally a symlink to metrics from a sensor)
- The file $tmp/setpoint (normally set by the web gui)
Output:
- The file $tmp/heaterDuty (integer value 0 - 100, representing the percentage of a PWM window the output device should be on)
- All available output scripts are located in bin/output-available.
- The enabled output script is a symlink, bin/output, to one of the scripts in bin/output-available
You change the output script by simply setting up a new symlink.
ln -sf bin/output-available/your-own-output-script bin/output
It is mandatory that an output script is able to perform the setup needed for the script to function when called with the "--setup" parameter. I.e if you use 1wire devices connected directly to the raspberry pi, you will need to enable the "dtoverylay=w1-gpio" in /boot/config.txt and reboot. It is also mandatory that an output script implement the "--info" command line parameter.
Required parameters:
- --setup => will set up the environment for the script, exiting with return code 0 if ok
- --info => one-liner, describing what the script is doing, exiting with return code 0 If you don't implement the "--info" parameter, the web gui might hang indefinitely in the /config page, since it will call all plugins with "--info".
- heaterOutput - a simple "sliding window" script, with a default control window of 10 seconds