New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote GPIO with factory fails on Debian Stretch #713
Comments
This is because at import time, no default pin factory could be found, even though you set it yourself in the script. It's a bug really, and will be addressed in a future release, but for now all you need to do is use an env var. You can set it to See #600. |
Until the bug is fixed, the documentation needs to reflect this reality, rather than giving an example that doesn't work! |
Ok |
If you wish (and do not think it presumptuous!) I would be happy to suggest appropriate changes to the documentation. |
I've added a note here: https://gpiozero.readthedocs.io/en/latest/remote_gpio.html#pin-factories Any thoughts? |
@bennuttall is this issue alread fixed? thnx in advance |
Operating system: Raspbian Stretch and Debian Stretch - latest releases
Pi model: Pi 3 Model B+
GPIO Zero version: 1.4.1
Pin factory used: pigpio
See http://rpf.io/gpzissue for information on how to find out these details
I am exploring GPIO programming on my Pi 3B+, and I am currently looking at remote GPIO. To (I hoped!) somewhat simplify things, I am using a regular Debian VM as the controller. The Pi has been set up to allow remote control of GPIO, and the controller has the appropriate libraries installed. My Python 3 test program is as follows:
This crashes spectacularly as follows:
However, if I specify the location of the remote Pi on the command line (and whether or not I remove the host argument from the 'factory=...' line):
peter@DebianVM:~/work$ GPIOZERO_PIN_FACTORY=pigpio PIGPIO_ADDR=[Pi IP Address] python3 testpig.py
the script runs correctly and the LED on the remote Pi turns on and off in the expected sequence. Running the original script on another Pi on my network works fine (controlling the LED on the specified remote Pi as programmed). The crash only occurs when I try to run it on a 'regular' Debian VM.
According to the documentation, these two ways of specifying the 'target' of remote GPIO commands are equivalent. Clearly they are not! It looks as if, when the remote setting are not specified on the command line, the library code is crashing when it tries to initialize itself. What am I missing?
Edited X 2 to correct typo and correct omission in script listing
The text was updated successfully, but these errors were encountered: