Skip to content

Python command line tool to control Conrad 8-port relay cards.

License

Notifications You must be signed in to change notification settings

stephrdev/conrad-relaycard

Repository files navigation

Conrad Relaycard

Control Conrad relaycard via python

https://www.conrad.com/p/conrad-components-197720-relay-card-component-12-v-dc-24-v-dc-197720

Usage

from conrad_relaycard import Relaycard

rly = Relaycard()
rly.setup()
rly.get_port(1, 1)
rly.set_port(1, 1, True)

via CLI

usage: conrad-relaycard [-h] [-v] [-q] [-i INTERFACE] [-a ADDRESS] [-p PORT] [--scan] [--get-ports] [--set-ports STATE] [--toggle-ports]

options:
  -h, --help            show this help message and exit
  -v, --verbose         Output verbosity
  -q, --quiet           Minimized output (allow easier parsing)
  -i INTERFACE, --interface INTERFACE
                        Serial interface to use
  -a ADDRESS, --address ADDRESS
                        Relaycard address (not needed for --scan)
  -p PORT, --port PORT  Ports to get/set (only for some commands)
  --scan                Scan for relay cards
  --get-ports           Get port states on relay card
  --set-ports STATE     Set port states on relay card <on/off>
  --toggle-ports        Toggle port states on relay card

About

Python command line tool to control Conrad 8-port relay cards.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages