Skip to main content

Remote GPIO access library

Project description

HTPIO : Remote I/O Access Library

PyPI PyPI - License PyPI - Python Version PyPI - Status

HTPIO allows users to use Raspberry Pi's GPIOs or similiar hardware remotely using various telecommunication protocols. The library also offers a simple locking mechanism in order to implement advanced testing scenarios using shared hardware.

image

HTPIO is a subset of the Hilscher Test Framework for products of the netX family. A brief overview of some netX products is given in the links below:

Requirements

  • Python >=2.7
  • Python >=3.4

Features

  • Remote GPIO access using various protocols
  • Pin locking to ensure shared use of hardware resources
  • Command line interface for shell scripting

Installation

First check if pip is installed on the your computer:

pip --version
pip 19.1.1 from c:\python\3.7.3\lib\site-packages\pip (python 3.7)

If the operating system doesn't recognize the command and your operating system is Linux or Windows 8+:

curl https://bootstrap.pypa.io/get-pip.py > get-pip.py
python get-pip.py

else visit https://bootstrap.pypa.io/get-pip.py and download the file. Then run the following command:

python get-pip.py

If pip is installed, we can proceed further to check for pipenv and eventually install it:

pipenv --version
pipenv, version 2018.11.26

If pipenv is not present on the system issue the following command :

pip install pipenv

To install htpio's latest stable release from PyPi use pipenv (or pip):

pipenv install htpio

or install the latest stable version from BitBucket:

pipenv install https://bitbucket.org/hilscherdtc/htpio/get/stable.tar.gz

Library interface

>>> from htpio import bridge, socketio, telnetio
>>> device = telnetio.RaspberryPi('192.168.199.31')
>>> gpio = bridge.RemoteAccess(device)
>>> gpio.lock(14)
>>> gpio.unlock(14)
>>> gpio.islocked(14)
>>> gpio.configure(14, gpio.OUTPUT)
>>> gpio.set(14, 1)
>>> gpio.get(14)
>>> gpio.deconfigure(14)
>>> gpio.logout()

Command line interface

$ htpio -p telnet set --host 192.168.199.31 --pin 14 --val 1
$ htpio -p socket get --host 192.168.199.31 --pin 14
$ htpio lock --host 192.168.199.31 --pin 14
$ htpio unlock --host 192.168.199.31 --pin 14

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htpio-1.1.0.1.tar.gz (182.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

htpio-1.1.0.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file htpio-1.1.0.1.tar.gz.

File metadata

  • Download URL: htpio-1.1.0.1.tar.gz
  • Upload date:
  • Size: 182.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for htpio-1.1.0.1.tar.gz
Algorithm Hash digest
SHA256 49bf13136b0fd3cd7afc9c465e7dbf2b200bfdbb7def41694b389bb38ec19516
MD5 15c70449c73fb7105ee3c0d1a813f1a2
BLAKE2b-256 6f045843e8764b9f6d1c7ce291583fa6f78e74f3864e79b6da2a9702fb08df8d

See more details on using hashes here.

File details

Details for the file htpio-1.1.0.1-py3-none-any.whl.

File metadata

  • Download URL: htpio-1.1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for htpio-1.1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e92a618aae1d5c13bf23bdb6b3b39559ee550fc176014705ec248208be83d5f0
MD5 5558ab19a725d4b10c85628ed6870844
BLAKE2b-256 46dd15cc0cfcbaf707459c3bfd7993a4286923f4944217793e59fd7a8be68a9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page