bobby500
Posts: 2
Joined: Thu Jun 23, 2016 3:19 pm

what is remote GPIO

Tue Sep 20, 2016 12:05 am

so i was playing with my raspberry pi preferences (latest version of raspbeian) What is remote GPIO? it is in the preferences or raspi-config. i would love to be able to control gpios over the internet!
i have a B+ as an octoprint server and a 3b to play with.

User avatar
rpdom
Posts: 14979
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: what is remote GPIO

Tue Sep 20, 2016 5:53 am

I believe it enables Joan's pigpio daemon, which (among meany other features) provides access to the GPIOs from another machine.

MarcScott
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 81
Joined: Sat Aug 08, 2015 11:30 am

Re: what is remote GPIO

Tue Sep 20, 2016 8:28 am

Yes, and it's all integrated into gpiozero.
You can check out the docs here - http://gpiozero.readthedocs.io/en/v1.3.1/api_pins.html

User avatar
ben_nuttall
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 230
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridge, UK
Contact: Website

Re: what is remote GPIO

Wed Sep 28, 2016 12:07 am

Both answers correct. It was added to allow remote access to gpio pins from another Pi on the network, using the pigpio daemon, as this is possible using the Python library gpiozero. See Marc's link above, and my blog post which covers it in more detail: http://bennuttall.com/whats-new-gpio-zero-v1-3/
Community Manager - Raspberry Pi Foundation
Author of GPIO Zero and creator of piwheels

Hcgrant
Posts: 19
Joined: Sun Oct 14, 2012 4:51 pm

Re: what is remote GPIO

Mon Mar 12, 2018 12:02 pm

Just to add to the above ...
Using the pigpiod daemon you can control a pi's GPIOs from any computer (mine is a PC running OpenSuse) that can use the pigpio python lib.
And further .. the pi can be using its GPIO via the pigpiod daemon and at the same you can remotely control and monitor (read) its GPIOs !

Jimray2300
Posts: 2
Joined: Fri Mar 16, 2018 1:58 pm

Re: what is remote GPIO

Sat Mar 24, 2018 12:54 am

MarcScott wrote:
Tue Sep 20, 2016 8:28 am
Yes, and it's all integrated into gpiozero.
You can check out the docs here - http://gpiozero.readthedocs.io/en/v1.3.1/api_pins.html
Is it possible to do it with rpi.gpio instead of gpiozero? Im about 300 lines into my first program and it would be a pain to start over using gpiozero.
Jim
An old dog tryin to learn new tricks

User avatar
joan
Posts: 14175
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: what is remote GPIO

Sat Mar 24, 2018 8:40 am

Jimray2300 wrote:
Sat Mar 24, 2018 12:54 am
MarcScott wrote:
Tue Sep 20, 2016 8:28 am
Yes, and it's all integrated into gpiozero.
You can check out the docs here - http://gpiozero.readthedocs.io/en/v1.3.1/api_pins.html
Is it possible to do it with rpi.gpio instead of gpiozero? Im about 300 lines into my first program and it would be a pain to start over using gpiozero.
A RPi.GPIO script has to run on the local Pi. If you explain what you want to do someone may be able to offer a solution.

mattmiller
Posts: 2096
Joined: Thu Feb 05, 2015 11:25 pm

Re: what is remote GPIO

Sat Mar 24, 2018 11:23 am

Is it possible to do it with rpi.gpio instead of gpiozero? Im about 300 lines into my first program and it would be a pain to start over using gpiozero.
In practice, No

BTW I don't think you have to switch to using gpiozero but you would have to replace RPi.GPIO calls with remote pigpio calls

http://abyz.me.uk/rpi/pigpio/python.html

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: what is remote GPIO

Sat Mar 24, 2018 1:11 pm

what port does it work on?

i know people will give me flag as its not secure etc to do

but i want to give it a try anyways controlling it over the internet..... but yes i know its not secure etc

mattmiller
Posts: 2096
Joined: Thu Feb 05, 2015 11:25 pm

Re: what is remote GPIO

Sat Mar 24, 2018 1:19 pm

8888
All the info is on that page
http://abyz.me.uk/rpi/pigpio/python.html#pigpio.pi

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: what is remote GPIO

Sat Mar 24, 2018 1:24 pm

i blame my google skills then

thanks

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: what is remote GPIO

Sat Mar 24, 2018 2:20 pm

i did a good look at the page

where is the conf file located?

my plas was to use raspi-config to turn it on, but i might want to change the default port its listning on

User avatar
B.Goode
Posts: 8225
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: what is remote GPIO

Sat Mar 24, 2018 3:57 pm

Maybe there is no configuration file?

Maybe configuration is accomplished by arguments passed to the pigpiod daemon when it is started?

At least, that's what the author's documentation appears to say:
http://abyz.me.uk/rpi/pigpio/pigpiod.html
pigpiod accepts the following configuration options

...

-p value Socket port 1024-32000 Default 8888

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: what is remote GPIO

Sat Mar 24, 2018 5:01 pm

so if i enable it via raspi-config it just knows what port number is should listen on?

that is odd, but oh well

User avatar
B.Goode
Posts: 8225
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: what is remote GPIO

Sat Mar 24, 2018 5:06 pm

Isn't that what "Default" means? The option that is selected for you if no other explicit choice is made?

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: what is remote GPIO

Sat Mar 24, 2018 5:12 pm

my plan was to just enable it in raspi-config and then change the port in a config file


i did not plan to have any scripts or other stuff running

User avatar
B.Goode
Posts: 8225
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: what is remote GPIO

Sat Mar 24, 2018 5:26 pm

I have nothing further to contribute.

RDPUser
Posts: 140
Joined: Tue Jan 30, 2018 12:18 pm

Re: what is remote GPIO

Tue Feb 26, 2019 11:13 pm

Can somebody give an example where this would be really useful? My imagination is to low to find a really useful case. I mean you need a RPI at the place where you want GPIO Pins so you can run your script as well on that PI.

mattmiller
Posts: 2096
Joined: Thu Feb 05, 2015 11:25 pm

Re: what is remote GPIO

Wed Feb 27, 2019 7:54 am

PiZero Robot vehicle
Instead of running control program on a slow PiZero, you could run/edit your program on a faster machine and just send the control signals to the PiZero

Return to “Beginners”