tbottest.powercontrol¶
A module containing various additional connectors for controlling power. These are:
GpiopmControl- Power using a gpio pinPowerShellScriptControl- Power using a shell script.SispmControl- Power using sispmctl.TinkerforgeControl- Power using DH Electronic TM-021 4-fach Relaismodul dh.TM021Control- Power using ``_.
- class tbottest.powercontrol.GpiopmControl[source]¶
Bases:
PowerControlcontrol Power On/off through a Gpio pin
Example: (board config)
from tbot.machine import board from tbottest.powercontrol import GpiopmControl class MyControl(GpiopmControl, board.Board): gpiopmctl_pin = "17" gpiopmctl_state = "1"
- class tbottest.powercontrol.PowerShellScriptControl[source]¶
Bases:
PowerControlcontrol Power On/off with a shell script
The shell script needs to evaluate the first parameter passed to the script. Values are:
“on” for powering on the board
“off” for powering off the board
Example: (board config)
from tbot.machine import board from tbottest.powercontrol import PowerShellScriptControl class MyControl(PowerShellScriptControl, board.Board): shell_script = "<path to shell script"
- class tbottest.powercontrol.SispmControl[source]¶
Bases:
PowerControlcontrol Power On/off with sispmctl
http://sispmctl.sourceforge.net/
Example: (board config)
from tbot.machine import board from tbottest.powercontrol import SispmControl class MyControl(SispmControl, board.Board): sispmctl_device = "01:01:5c:29:39" sispmctl_port = "2"
- class tbottest.powercontrol.TinkerforgeControl[source]¶
Bases:
PowerControlcontrol Power On/off with Tinkerforge
Example: (board config)
from tbot.machine import board from tbottest.powercontrol import Tinkerforge class MyControl(Tinkerforge, board.Board): channel = "" uid = ""
- class tbottest.powercontrol.TM021Control[source]¶
Bases:
PowerControlcontrol Power On/off with DH Electronics TM-021 4-fach Relaismodul
https://www.dh-electronics.com
Example: (board config)
from tbot.machine import board from tbottest.powercontrol import TM021 class MyControl(TM021, board.Board): device = "/dev/relais" baudrate = "500000" timeout = "5" address = "0" port = "1" debug = False