- Manufacturer: Mycodo
- Interfaces: IP
- Output Types: On/Off
- Libraries: paho-mqtt
- Dependencies: paho-mqtt
- Additional URL: Link
Publish "on" or "off" (or any other strings of your choosing) to an MQTT server.
Option | Type | Description |
---|---|---|
Channel Options | ||
Hostname | Text - Default Value: localhost | The hostname of the MQTT server |
Port | Integer - Default Value: 1883 | The port of the MQTT server |
Topic | Text - Default Value: paho/test/single | The topic to publish with |
Keep Alive | Integer - Default Value: 60 | The keepalive timeout value for the client. Set to 0 to disable. |
Client ID | Text - Default Value: client_oB7zRaH6 | Unique client ID for connecting to the MQTT server |
On Payload | Text - Default Value: on | The payload to send when turned on |
Off Payload | Text - Default Value: off | The payload to send when turned off |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
Use Login | Boolean | Send login credentials |
Username | Text - Default Value: user | Username for connecting to the server |
Password | Text | Password for connecting to the server. Leave blank to disable. |
Use Websockets | Boolean | Use websockets to connect to the server. |
- Manufacturer: Mycodo
- Output Types: Value
- Libraries: paho-mqtt
- Dependencies: paho-mqtt
- Additional URL: Link
Publish a value to an MQTT server.
Option | Type | Description |
---|---|---|
Channel Options | ||
Hostname | Text - Default Value: localhost | The hostname of the MQTT server |
Port | Integer - Default Value: 1883 | The port of the MQTT server |
Topic | Text - Default Value: paho/test/single | The topic to publish with |
Keep Alive | Integer - Default Value: 60 | The keepalive timeout value for the client. Set to 0 to disable. |
Client ID | Text - Default Value: client_SzAr2l57 | Unique client ID for connecting to the MQTT server |
Off Value | Integer | The value to send when an Off command is given |
Use Login | Boolean | Send login credentials |
Username | Text - Default Value: user | Username for connecting to the server |
Password | Text | Password for connecting to the server. |
Use Websockets | Boolean | Use websockets to connect to the server. |
- Manufacturer: Maxim Integrated
- Interfaces: I2C
- Output Types: Value
- Dependencies: pyusb, Adafruit_Extended_Bus, adafruit-circuitpython-ds3502
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
The DS3502 can generate a 0 - 10k Ohm resistance with 7-bit precision. This equates to 128 possible steps. A value, in Ohms, is passed to this output controller and the step value is calculated and passed to the device. Select whether to round up or down to the nearest step.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Round Step | Select(Options: [Up | Down] (Default in bold) | Round direction to the nearest step value |
- Manufacturer: MICROCHIP
- Interfaces: I2C
- Output Types: Value
- Dependencies: pyusb, Adafruit-extended-bus, adafruit-circuitpython-mcp4728
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
VREF (volts) | Decimal - Default Value: 4.096 | Set the VREF voltage |
Channel Options | ||
Name | Text | A name to distinguish this from others |
VREF | Select(Options: [Internal | VDD] (Default in bold) | Select the channel VREF |
Gain | Select(Options: [1X | 2X] (Default in bold) | Select the channel Gain |
Start State | Select(Options: [Previously-Saved State | Specified Value] (Default in bold) | Select the channel start state |
Start Value (volts) | Decimal | If Specified Value is selected, set the start state value |
Shutdown State | Select(Options: [Previously-Saved Value | Specified Value] (Default in bold) | Select the channel shutdown state |
Shutdown Value (volts) | Decimal | If Specified Value is selected, set the shutdown state value |
- Interfaces: GPIO
- Output Types: Value
- Libraries: RPi.GPIO
- Dependencies: RPi.GPIO
- Manufacturer URLs: Link 1, Link 2
- Datasheet URLs: Link 1, Link 2
- Product URLs: Link 1, Link 2
This is a generic module for bipolar stepper motor drivers such as the DRV8825, A4988, and others. The value passed to the output is the number of steps. A positive value turns clockwise and a negative value turns counter-clockwise.
Option | Type | Description |
---|---|---|
Channel Options | ||
If the Direction or Enable pins are not used, make sure you pull the appropriate pins on your driver high or low to set the proper direction and enable the stepper motor to be energized. Note: For Enable Mode, always having the motor energized will use more energy and produce more heat. | ||
Step Pin | Integer | The Step pin of the controller (BCM numbering) |
Full Step Delay | Decimal - Default Value: 0.005 | The Full Step Delay of the controller |
Direction Pin | Integer | The Direction pin of the controller (BCM numbering). Set to None to disable. |
Enable Pin | Integer | The Enable pin of the controller (BCM numbering). Set to None to disable. |
Enable Mode | Select(Options: [Only When Turning | Always] (Default in bold) | Choose when to pull the enable pin high to energize the motor. |
Enable at Shutdown | Select(Options: [Enable | Disable] (Default in bold) | Choose whether the enable pin in pulled high (Enable) or low (Disable) when Mycodo shuts down. |
If using a Step Resolution other than Full, and all three Mode Pins are set, they will be set high (1) or how (0) according to the values in parentheses to the right of the selected Step Resolution, e.g. (Mode Pin 1, Mode Pin 2, Mode Pin 3). | ||
Step Resolution | Select(Options: [Full (modes 0, 0, 0) | Half (modes 1, 0, 0) | 1/4 (modes 0, 1, 0) | 1/8 (modes 1, 1, 0) | 1/16 (modes 0, 0, 1) | 1/32 (modes 1, 0, 1)] (Default in bold) | The Step Resolution of the controller |
Mode Pin 1 | Integer | The Mode Pin 1 of the controller (BCM numbering). Set to None to disable. |
Mode Pin 2 | Integer | The Mode Pin 2 of the controller (BCM numbering). Set to None to disable. |
Mode Pin 3 | Integer | The Mode Pin 3 of the controller (BCM numbering). Set to None to disable. |
- Manufacturer: STMicroelectronics
- Interfaces: GPIO
- Output Types: Value
- Libraries: RPi.GPIO, rpimotorlib
- Dependencies: RPi.GPIO, rpimotorlib
- Manufacturer URL: Link
- Datasheet URLs: Link 1, Link 2
This is a module for the ULN2003 driver.
Option | Type | Description |
---|---|---|
Channel Options | ||
Notes about connecting the ULN2003... | ||
Pin IN1 | Integer - Default Value: 18 | The pin (BCM numbering) connected to IN1 of the ULN2003 |
Pin IN2 | Integer - Default Value: 23 | The pin (BCM numbering) connected to IN2 of the ULN2003 |
Pin IN3 | Integer - Default Value: 24 | The pin (BCM numbering) connected to IN3 of the ULN2003 |
Pin IN4 | Integer - Default Value: 25 | The pin (BCM numbering) connected to IN4 of the ULN2003 |
Step Delay | Decimal - Default Value: 0.001 | The Step Delay of the controller |
Notes about step resolution... | ||
Step Resolution | Select(Options: [Full | Half | Wave] (Default in bold) | The Step Resolution of the controller |
- Interfaces: GPIO
- Output Types: On/Off
- Libraries: sysfs
The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option. This module uses the sysfs method to control GPIO pins.
Option | Type | Description |
---|---|---|
Channel Options | ||
GPIO Pin (BCM) | Integer | The pin to control the state of |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: Grove
- Interfaces: I2C
- Output Types: On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 4 or 8 channel Grove multichannel relay board.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Startup State | Select | Set the state of the relay when Mycodo starts |
Shutdown State | Select | Set the state of the relay when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa
- Manufacturer URL: Link
This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 192.168.0.50 | Host address or IP |
Status Update (Sec) | Integer - Default Value: 60 | The period (seconds) between checking if connected and output states. |
Channel Options | ||
Name | Text - Default Value: Outlet Name | A name to distinguish this from others |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa, aio_msgpack_rpc
- Manufacturer URL: Link
This output controls the 6 outlets of the Kasa HS300 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 0.0.0.0 | Host address or IP |
Status Update (seconds) | Integer - Default Value: 300 | The period (seconds) between checking if connected and output states. 0 disables. |
Asyncio RPC Port | Integer - Default Value: 18201 | The port to start the asyncio RPC server. Must be unique from other Kasa Outputs. |
Channel Options | ||
Name | Text - Default Value: Outlet Name | A name to distinguish this from others |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa
- Manufacturer URL: Link
This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This module uses an outdated python library and is deprecated. Do not use it. You will break the current Kasa modules if you do not delete this deprecated Output.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 192.168.0.50 | Host address or IP |
Status Update (Sec) | Integer - Default Value: 60 | The period (seconds) between checking if connected and output states. |
Channel Options | ||
Name | Text - Default Value: Outlet Name | A name to distinguish this from others |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa, aio_msgpack_rpc
- Manufacturer URL: Link
This output controls the 3 outlets of the Kasa KP303 Smart WiFi Power Strip. This is a variant that uses the latest python-kasa library. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 0.0.0.0 | Host address or IP |
Status Update (seconds) | Integer - Default Value: 300 | The period (seconds) between checking if connected and output states. 0 disables. |
Asyncio RPC Port | Integer - Default Value: 18726 | The port to start the asyncio RPC server. Must be unique from other Kasa Outputs. |
Channel Options | ||
Name | Text - Default Value: Outlet Name | A name to distinguish this from others |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa, aio_msgpack_rpc
- Manufacturer URL: Link
This output controls Kasa WiFi Power Plugs, including the KP105, KP115, KP125, KP401, HS100, HS103, HS105, HS107, and HS110. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 0.0.0.0 | Host address or IP |
Status Update (seconds) | Integer - Default Value: 300 | The period (seconds) between checking if connected and output states. 0 disables. |
Asyncio RPC Port | Integer - Default Value: 18010 | The port to start the asyncio RPC server. Must be unique from other Kasa Outputs. |
Channel Options | ||
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: TP-Link
- Interfaces: IP
- Output Types: On/Off
- Dependencies: python-kasa, aio_msgpack_rpc
- Manufacturer URL: Link
This output controls the the Kasa WiFi Light Bulbs, including the KL125, KL130, and KL135. Note: if you see errors in the daemon log about the server starting, try changing the Asyncio RPC Port to another port.
Option | Type | Description |
---|---|---|
Host | Text - Default Value: 0.0.0.0 | Host address or IP |
Status Update (seconds) | Integer - Default Value: 300 | The period (seconds) between checking if connected and output states. 0 disables. |
Asyncio RPC Port | Integer - Default Value: 18885 | The port to start the asyncio RPC server. Must be unique from other Kasa Outputs. |
Channel Options | ||
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
Commands | ||
Transition (milliseconds) | Integer - Default Value: 0 | The hsv transition period, in milliseconds |
Brightness (percent) | Integer | The brightness to set, in percent (0 - 100) |
Set | Button | |
Transition (milliseconds) | Integer - Default Value: 0 | The hsv transition period, in milliseconds |
Hue (degree) | Integer | The hue to set, in degrees (0 - 360) |
Set | Button | |
Transition (milliseconds) | Integer - Default Value: 0 | The hsv transition period, in milliseconds |
Saturation (percent) | Integer | The saturation to set, in percent (0 - 100) |
Set | Button | |
Transition (milliseconds) | Integer - Default Value: 0 | The hsv transition period, in milliseconds |
Color Temperature (Kelvin) | Integer | The color temperature to set, in degrees Kelvin |
Set | Button | |
Transition (milliseconds) | Integer - Default Value: 0 | The hsv transition period, in milliseconds |
HSV | Text - Default Value: 220, 20, 45 | The hue, saturation, brightness to set, e.g. "200, 20, 50" |
Set | Button | |
Transition (milliseconds) | Integer - Default Value: 1000 | The transition period, in milliseconds |
On | Button | |
Transition (milliseconds) | Integer - Default Value: 1000 | The transition period, in milliseconds |
Off | Button |
- Manufacturer: MICROCHIP
- Interfaces: I2C
- Output Types: On/Off
- Dependencies: pyusb, Adafruit-extended-bus, adafruit-circuitpython-mcp230xx
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 16 channels of the MCP23017.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Startup State | Select | Set the state of the GPIO when Mycodo starts |
Shutdown State | Select | Set the state of the GPIO when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: Worldsemi
- Interfaces: GPIO
- Output Types: On/Off
- Dependencies: Output Variant 1: adafruit-circuitpython-neopixel; Output Variant 2: adafruit-circuitpython-neopixel-spi
Control the LEDs of a neopixel light strip. USE WITH CAUTION: This library uses the Hardware-PWM0 bus. Only GPIO pins 12 or 18 will work. If you use one of these pins for a NeoPixel strip, you can not use the other for Hardware-PWM control of another output or there will be conflicts that can cause the Mycodo Daemon to crash and the Pi to become unresponsive. If you need to control another PWM output like a servo, fan, or dimmable grow lights, you will need to use the Software-PWM by setting the Output PWM: Raspberry Pi GPIO and set the "Library" field to "Any Pin, <=40kHz". If you select the "Hardware Pin, <=30MHz" option, it will cause conflicts. This output is best used with Actions to control individual LED color and brightness.
Option | Type | Description |
---|---|---|
Data Pin | Integer - Default Value: 18 | Enter the GPIO Pin connected to your device data wire (BCM numbering). |
Number of LEDs | Integer - Default Value: 1 | How many LEDs in the string? |
On Mode | Select(Options: [Single Color | Rainbow] (Default in bold) | The color mode when turned on |
Single Color | Text - Default Value: 30, 30, 30 | The Color when turning on in Single Color Mode, RGB format (red, green, blue), 0 - 255 each. |
Rainbow Speed (seconds) | Decimal - Default Value: 0.01 | The speed to change colors in Rainbow Mode |
Rainbow Brightness | Integer - Default Value: 20 | The maximum brightness of LEDs in Rainbow Mode (1 - 255) |
Rainbow Mode | Select(Options: [All LEDs change at once | One LED Changes at a time] (Default in bold) | How the rainbow is displayed |
Channel Options | ||
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Commands | ||
LED Position | Integer | Which LED in the strip to change |
RGB Color | Text - Default Value: 10, 0, 0 | The color (e.g 10, 0 0) |
Set | Button |
- Manufacturer: Texas Instruments
- Interfaces: I2C
- Output Types: On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 8 channels of the PCF8574.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Startup State | Select | Set the state of the GPIO when Mycodo starts |
Shutdown State | Select | Set the state of the GPIO when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: Texas Instruments
- Interfaces: I2C
- Output Types: On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 16 channels of the PCF8575.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Startup State | Select | Set the state of the GPIO when Mycodo starts |
Shutdown State | Select | Set the state of the GPIO when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Interfaces: Python
- Output Types: On/Off
- Dependencies: pylint
Python 3 code will be executed when this output is turned on or off.
Option | Type | Description |
---|---|---|
Channel Options | ||
On Command | Python code to execute when the output is instructed to turn on | |
Off Command | Python code to execute when the output is instructed to turn off | |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Interfaces: GPIO
- Output Types: On/Off
- Libraries: RPi.GPIO
- Dependencies: RPi.GPIO
The specified GPIO pin will be set HIGH (3.3 volts) or LOW (0 volts) when turned on or off, depending on the On State option.
Option | Type | Description |
---|---|---|
Channel Options | ||
GPIO Pin (BCM) | Integer | The pin to control the state of |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Output Types: On/Off
- Libraries: subprocess.Popen
Commands will be executed in the Linux shell by the specified user when this output is turned on or off.
Option | Type | Description |
---|---|---|
Channel Options | ||
On Command | Text - Default Value: /home/pi/script_on_off.sh on | Command to execute when the output is instructed to turn on |
Off Command | Text - Default Value: /home/pi/script_on_off.sh off | Command to execute when the output is instructed to turn off |
User | Text - Default Value: mycodo | The user to execute the command |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the command if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
This output uses a 315 or 433 MHz transmitter to turn wireless power outlets on or off. Run ~/Mycodo/mycodo/devices/wireless_rpi_rf.py with a receiver to discover the codes produced from your remote.
Option | Type | Description |
---|---|---|
Channel Options | ||
GPIO Pin (BCM) | Integer | The pin to control the state of |
On Command | Text - Default Value: 22559 | Command to execute when the output is instructed to turn on |
Off Command | Text - Default Value: 22558 | Command to execute when the output is instructed to turn off |
Protocol | Select(Options: [1 | 2 | 3 | 4 | 5] (Default in bold) | Wireless protocol |
Pulse Length | Integer - Default Value: 189 | Wireless pulse length |
Startup State | Select | Set the state when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the commad if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: NXP Semiconductors
- Interfaces: I2C
- Output Types: PWM
- Libraries: adafruit-pca9685
- Dependencies: adafruit-pca9685
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
The PCA9685 can output a PWM signal to 16 channels at a frequency between 40 and 1600 Hz.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Frequency (Hertz) | Integer - Default Value: 1600 | The Herts to output the PWM signal (40 - 1600) |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Startup State | Select | Set the state when Mycodo starts |
Startup Value | Decimal | The value when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Shutdown Value | Decimal | The value when Mycodo shuts down |
Invert Signal | Boolean | Invert the PWM signal |
Invert Stored Signal | Boolean | Invert the value that is saved to the measurement database |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Interfaces: Python
- Output Types: PWM
- Dependencies: pylint
Python 3 code will be executed when this output is turned on or off. The "duty_cycle" object is a float value that represents the duty cycle that has been set.
Channel OptionsPython 3 CodePython code to execute to set the PWM duty cycle (%)UserText - Default Value: mycodoThe user to execute the commandStartup StateSelectSet the state when Mycodo startsStartup ValueDecimalThe value when Mycodo startsShutdown StateSelectSet the state when Mycodo shuts downShutdown ValueDecimalThe value when Mycodo shuts downInvert SignalBooleanInvert the PWM signalInvert Stored SignalBooleanInvert the value that is saved to the measurement databaseTrigger Functions at StartupBooleanWhether to trigger functions when the output switches at startupForce CommandBooleanAlways send the command if instructed, regardless of the current stateCurrent (Amps)DecimalThe current draw of the device being controlledCommandsSet the Duty Cycle.Duty CycleDecimalThe duty cycle to setSet Duty CycleButton- Interfaces: GPIO
- Output Types: PWM
- Libraries: pigpio
- Dependencies: pigpio, pigpio
See the PWM section of the manual for PWM information and determining which pins may be used for each library option.
Channel OptionsGPIO Pin (BCM)IntegerThe pin to control the state ofStartup StateSelectSet the state when Mycodo startsStartup ValueDecimalThe value when Mycodo startsShutdown StateSelectSet the state when Mycodo shuts downShutdown ValueDecimalThe value when Mycodo shuts downLibrarySelect(Options: [Any Pin, <= 40 kHz | Hardware Pin, <= 30 MHz] (Default in bold)Which method to produce the PWM signal (hardware pins can produce higher frequencies)Frequency (Hertz)Integer - Default Value: 22000The Herts to output the PWM signal (0 - 70,000)Invert SignalBooleanInvert the PWM signalInvert Stored SignalBooleanInvert the value that is saved to the measurement databaseTrigger Functions at StartupBooleanWhether to trigger functions when the output switches at startupCurrent (Amps)DecimalThe current draw of the device being controlledCommandsSet the Duty Cycle.Duty CycleDecimalThe duty cycle to setSet Duty CycleButton- Interfaces: Shell
- Output Types: PWM
- Libraries: subprocess.Popen
Commands will be executed in the Linux shell by the specified user when the duty cycle is set for this output. The string "((duty_cycle))" in the command will be replaced with the duty cycle being set prior to execution.
Option | Type | Description |
---|---|---|
Channel Options | ||
Bash Command | Text - Default Value: /home/pi/script_pwm.sh ((duty_cycle)) | Command to execute to set the PWM duty cycle (%) |
User | Text - Default Value: mycodo | The user to execute the command |
Startup State | Select | Set the state when Mycodo starts |
Startup Value | Decimal | The value when Mycodo starts |
Shutdown State | Select | Set the state when Mycodo shuts down |
Shutdown Value | Decimal | The value when Mycodo shuts down |
Invert Signal | Boolean | Invert the PWM signal |
Invert Stored Signal | Boolean | Invert the value that is saved to the measurement database |
Trigger Functions at Startup | Boolean | Whether to trigger functions when the output switches at startup |
Force Command | Boolean | Always send the commad if instructed, regardless of the current state |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: Atlas Scientific
- Interfaces: I2C, UART, FTDI
- Output Types: Volume, On/Off
- Dependencies: pylibftdi
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Atlas Scientific peristaltic pumps can be set to dispense at their maximum rate or a rate can be specified. Their minimum flow rate is 0.5 ml/min and their maximum is 105 ml/min.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
FTDI Device | Text | The FTDI device connected to the input/output/etc. |
UART Device | Text | The UART device location (e.g. /dev/ttyUSB1) |
Channel Options | ||
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Current (Amps) | Decimal | The current draw of the device being controlled |
Commands | ||
Calibration: a calibration can be performed to increase the accuracy of the pump. It's a good idea to clear the calibration before calibrating. First, remove all air from the line by pumping the fluid you would like to calibrate to through the pump hose. Next, press Dispense Amount and the pump will be instructed to dispense 10 ml (unless you changed the default value). Measure how much fluid was actually dispensed, enter this value in the Actual Volume Dispensed (ml) field, and press Calibrate to Dispensed Amount. Now any further pump volumes dispensed should be accurate. | ||
Clear Calibration | Button | |
Volume to Dispense (ml) | Decimal - Default Value: 10.0 | The volume (ml) that is instructed to be dispensed |
Dispense Amount | Button | |
Actual Volume Dispensed (ml) | Decimal - Default Value: 10.0 | The actual volume (ml) that was dispensed |
Calibrate to Dispensed Amount | Button | |
The I2C address can be changed. Enter a new address in the 0xYY format (e.g. 0x22, 0x50), then press Set I2C Address. Remember to deactivate and change the I2C address option after setting the new address. | ||
New I2C Address | Text - Default Value: 0x67 | The new I2C to set the device to |
Set I2C Address | Button |
- Manufacturer: Grove
- Interfaces: I2C
- Output Types: Volume, On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Motor Speed (0 - 100) | Integer - Default Value: 100 | The motor output that determines the speed |
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Fastest Rate (ml/min) | Decimal - Default Value: 100.0 | The fastest rate that the pump can dispense (ml/min) |
- Manufacturer: Grove
- Interfaces: I2C
- Output Types: Volume, On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
Controls the Grove I2C Motor Driver Board (v1.3). Both motors will turn at the same time. This output can also dispense volumes of fluid if the motors are attached to peristaltic pumps.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Motor Speed (0 - 255) | Integer - Default Value: 255 | The motor output that determines the speed |
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Fastest Rate (ml/min) | Decimal - Default Value: 100.0 | The fastest rate that the pump can dispense (ml/min) |
Minimum On (sec/min) | Decimal - Default Value: 1.0 | The minimum duration (seconds) the pump turns on for every 60 second period (only used for Specify Flow Rate mode). |
Commands | ||
New I2C Address | Text - Default Value: 0x14 | The new I2C to set the sensor to |
Set I2C Address | Button |
- Manufacturer: STMicroelectronics
- Interfaces: GPIO
- Output Types: Volume, On/Off
- Libraries: RPi.GPIO
- Dependencies: RPi.GPIO
- Additional URL: Link
The L298N can control 2 DC motors, both speed and direction. If these motors control peristaltic pumps, set the Flow Rate and the output can can be instructed to dispense volumes accurately in addition to being turned on for durations.
Option | Type | Description |
---|---|---|
Channel Options | ||
Name | Text | A name to distinguish this from others |
Input Pin 1 | Integer | The Input Pin 1 of the controller (BCM numbering) |
Input Pin 2 | Integer | The Input Pin 2 of the controller (BCM numbering) |
Use Enable Pin | Boolean - Default Value: True | Enable the use of the Enable Pin |
Enable Pin | Integer | The Enable pin of the controller (BCM numbering) |
Enable Pin Duty Cycle | Integer - Default Value: 50 | The duty cycle to apply to the Enable Pin (percent, 1 - 100) |
Direction | Select(Options: [Forward | Backward] (Default in bold) | The direction to turn the motor |
Volume Rate (ml/min) | Decimal - Default Value: 150.0 | If a pump, the measured flow rate (ml/min) at the set Duty Cycle |
- Manufacturer: MICROCHIP
- Interfaces: I2C
- Output Types: Volume, On/Off
- Dependencies: pyusb, Adafruit-extended-bus, adafruit-circuitpython-mcp230xx
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 16 channels of the MCP23017 with a relay and peristaltic pump connected to each channel.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the output channel that corresponds to the pump being on |
Fastest Rate (ml/min) | Decimal - Default Value: 150.0 | The fastest rate that the pump can dispense (ml/min) |
Minimum On (sec/min) | Decimal - Default Value: 1.0 | The minimum duration (seconds) the pump should be turned on for every 60 second period |
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Manufacturer: NXP Semiconductors and STMicroelectronics
- Interfaces: I2C
- Output Types: Volume, On/Off
- Libraries: adafruit-pca9685
- Dependencies: adafruit-pca9685
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
- Additional URL: Link
The PCA9685 is a 16-channel PWM driver. When connected to three L298N DC motor controllers, 5 DC motors can be controlled (both speed and direction). If these motors control peristaltic pumps, set the Flow Rate and the output can can be instructed to dispense volumes accurately in addition to being turned on for durations. Each L298N needs to have Pin 1, Pin 2, and Enable Pin connected to any of the pins on the PCA9685, and those pins set in the channel options. Sending a negative duration (seconds) or volume (ml) will run the pump in the opposite direction of the set Direction.
Option | Type | Description |
---|---|---|
Frequency (Hertz) | Integer - Default Value: 1000 | The Herts to output the PWM signal (40 - 1600) |
Channel Options | ||
Name | Text | A name to distinguish this from others |
Input Pin 1 | Select(Options: [Disabled | PWM Out 0 | PWM Out 1 | PWM Out 2 | PWM Out 3 | PWM Out 4 | PWM Out 5 | PWM Out 6 | PWM Out 7 | PWM Out 8 | PWM Out 9 | PWM Out 10 | PWM Out 11 | PWM Out 12 | PWM Out 13 | PWM Out 14 | PWM Out 15] (Default in bold) | Set which PWM output is connected to this motor's Pin 1 |
Input Pin 2 | Select(Options: [Disabled | PWM Out 0 | PWM Out 1 | PWM Out 2 | PWM Out 3 | PWM Out 4 | PWM Out 5 | PWM Out 6 | PWM Out 7 | PWM Out 8 | PWM Out 9 | PWM Out 10 | PWM Out 11 | PWM Out 12 | PWM Out 13 | PWM Out 14 | PWM Out 15] (Default in bold) | Set which PWM output is connected to this motor's Pin 2 |
Enable Pin | Select(Options: [Disabled | PWM Out 0 | PWM Out 1 | PWM Out 2 | PWM Out 3 | PWM Out 4 | PWM Out 5 | PWM Out 6 | PWM Out 7 | PWM Out 8 | PWM Out 9 | PWM Out 10 | PWM Out 11 | PWM Out 12 | PWM Out 13 | PWM Out 14 | PWM Out 15] (Default in bold) | Set which PWM output is connected to this motor's Enable Pin |
Enable Pin Duty Cycle | Integer - Default Value: 100 | The duty cycle to apply to the Enable Pin (percent, 1 - 100) to set the pump speed |
Direction | Select(Options: [Forward | Backward] (Default in bold) | The direction to turn the motor |
Pump Rate (ml/min) | Decimal - Default Value: 100.0 | If a pump, the measured flow rate (ml/min) at the set Duty Cycle |
Commands | ||
To clear the total volume of a pump, select the pump and press Clear Total Volume. | ||
Pump To Clear Total Volume | Select | Select which pump to clear the total volume of |
Clear Total: Volume | Button |
- Manufacturer: Texas Instruments
- Interfaces: I2C
- Output Types: Volume, On/Off
- Libraries: smbus2
- Dependencies: smbus2
- Manufacturer URL: Link
- Datasheet URL: Link
- Product URL: Link
Controls the 8 channels of the PCF8574 with a relay and peristaltic pump connected to each channel.
Option | Type | Description |
---|---|---|
I2C Address | Text | The I2C address of the device |
I2C Bus | Integer | The I2C bus the device is connected to |
Channel Options | ||
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the output channel that corresponds to the pump being on |
Fastest Rate (ml/min) | Decimal - Default Value: 150.0 | The fastest rate that the pump can dispense (ml/min) |
Minimum On (sec/min) | Decimal - Default Value: 1.0 | The minimum duration (seconds) the pump should be turned on for every 60 second period |
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Current (Amps) | Decimal | The current draw of the device being controlled |
- Interfaces: GPIO
- Output Types: Volume, On/Off
- Libraries: RPi.GPIO
- Dependencies: RPi.GPIO
This output turns a GPIO pin HIGH and LOW to control power to a generic peristaltic pump. The peristaltic pump can then be turned on for a duration or, after determining the pump's maximum flow rate, instructed to dispense a specific volume at the maximum rate or at a specified rate.
Option | Type | Description |
---|---|---|
Channel Options | ||
GPIO Pin (BCM) | Integer | The pin to control the state of |
On State | Select(Options: [HIGH | LOW] (Default in bold) | The state of the GPIO that corresponds to an On state |
Fastest Rate (ml/min) | Decimal - Default Value: 150.0 | The fastest rate that the pump can dispense (ml/min) |
Minimum On (sec/min) | Decimal - Default Value: 1.0 | The minimum duration (seconds) the pump should be turned on for every 60 second period |
Flow Rate Method | Select(Options: [Fastest Flow Rate | Specify Flow Rate] (Default in bold) | The flow rate to use when pumping a volume |
Desired Flow Rate (ml/min) | Decimal - Default Value: 10.0 | Desired flow rate in ml/minute when Specify Flow Rate set |
Current (Amps) | Decimal | The current draw of the device being controlled |
A spacer to organize Outputs.
Option | Type | Description |
---|---|---|
Color | Text - Default Value: #000000 | The color of the name text |