Skip to main content

remoteio

A Raspberry Pi GPIO remote control based on gpiozero

https://github.com/gpiozero/gpiozero

new behavior of remoteio: simultaneous processing of remote pins

When remoteio proceeds 2 pins, the second pin must wait until the first one has made his work on the server. This may take time, if the first pin has a long timer and the second pin cannot start its work. A pin blocks itself in the same way. In this modification of remoteio, different pins can work simultaneously. If a pin has two tasks and the second one is asked to start before the first one has finished, the second one interrupts the first one. The main modifications are the use of

  1. a list of maps, that allows sending of tasks of several pins to the server
  2. an own thread for each pin for treating
  3. thread safe queues for each pin as input to the pin-specific threads
  4. a thread.Timer in handle_timer instead of time.sleep in order to make the interruption of a task with a time_ms>0 possible
  5. the getattr function to find led-funtions only by knowing the name of the function

Further, the internal pin numbering is 'b', by the aid of a conversion dictionary. This allows to suppress the establishing of the sam pin two times by different representations by 'b' and 'g' The syntax to operate the pins is the same as that of remoteio.

Server (remote Raspberry Pi)

Use this all-in-one command to install remoteio as deamon on port 8509. The server can be updated with this command.

bash -c "$(wget -qLO - https://github.com/schech1/remoteio/raw/master/install.sh)"

Using pip

pip install remoteio

When you want to create the server by yourself, you can install the library via pip and use the examples below, for server- and client usage.

Server usage

Start a remote server on port 1234. If no port is specified default port 8509 will be used

from remoteio import run_server

if __name__ == "__main__":
    run_server(port=1234)

Client usage

from remoteio import RemoteServer

if __name__ == "__main__":
    server_ip = "192.168.1.38"
    server_port = 1234

    remote_server = RemoteServer(server_ip, server_port)
    remote_pin = remote_server.pin(7, 'b')
    remote_pin.on(time_ms=2000) # (Optional) Time until switch off
    remote_pin.blink() # Blink LED
    remote_pin.pulse() # Pulse LED
    remote_pin.off()
    remote_server.close()

Use Board numbering

remote_pin = remote_server.pin(7, 'b') # Use physical board numbering

Use GPIO numbering

remote_pin = remote_server.pin(4, 'g') # Use GPIO numbering (e.g. GPIO4)

Metadata

Release files for remoteio 2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remoteio 2.1
File Size Uploaded Provenance Actions
remoteio-2.1.tar.gz 17.8 kB Without provenance Details for remoteio-2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for remoteio 2.1
File Interpreter ABI Platform Actions
remoteio-2.1-py3-none-any.whl Python 3 none any Details for remoteio-2.1-py3-none-any.whl

Total release size: 36.3 kB

Release files / remoteio-2.1.tar.gz

Download URL remoteio-2.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
70e7c0a53ff8b52c6b89413f8b27a7d1313bc7aaacbac07c9f814c5d522a2e7e
BLAKE2b-256 checksum
How to use checksums
7aa6186432bdb7a8830232923ade5a72614d3acf84832e0273412757c765d8c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Release files / remoteio-2.1-py3-none-any.whl

Download URL remoteio-2.1-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b977ada040adb98ca063d2625782a6830e839cdcd8e9377298a94b6a20f02ba9
BLAKE2b-256 checksum
How to use checksums
8f0a7db880518ea61eccec732e937ca3e2552cb73bd026166892d39ba8d2694c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Security for remoteio 2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page