rooneybuk
Posts: 1
Joined: Fri Aug 26, 2016 4:14 pm

Remote GPIO

Fri Aug 26, 2016 4:17 pm

Hi, i just noticed this option but couldn't find any info on it, does anyone known what its used for?
Attachments
Capture.PNG
Capture.PNG (42.46 KiB) Viewed 3037 times

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

Re: Remote GPIO

Fri Aug 26, 2016 5:12 pm

I'm not sure as I don't have a screen attached to my Pi.

I think it enables my pigpio daemon so that you can access the Pi's GPIO from a remote machine.

User avatar
DougieLawson
Posts: 37472
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Remote GPIO

Fri Aug 26, 2016 11:07 pm

It does enable pigpiod.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ChristophK
Posts: 15
Joined: Thu Oct 06, 2016 1:34 pm

Re: Remote GPIO

Wed Oct 19, 2016 9:37 am

I tried it twice, but it did not enable pigpiod.
To install it automatically, I use the way proposed in the big german Raspi manual ISBN 9783836237956 on page 875.
in /etc/rc.local insert a line "sudo pigpiod" before the last line "exit 0"
that works (try "ps -e sort -k4")

http://bennuttall.com/whats-new-gpio-zero-v1-3/
"To set this up, you need the pigpio Python library installed on the device you’re running the code, and the pigpio daemon running on the remote Pi (and remote GPIO enabled in raspi-config)."

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: Remote GPIO

Wed Oct 19, 2016 9:52 am

ChristophK wrote:I tried it twice, but it did not enable pigpiod.
To install it automatically, I use the way proposed in the big german Raspi manual ISBN 9783836237956 on page 875.
in /etc/rc.local insert a line "sudo pigpiod" before the last line "exit 0"
that works (try "ps -e sort -k4")

http://bennuttall.com/whats-new-gpio-zero-v1-3/
"To set this up, you need the pigpio Python library installed on the device you’re running the code, and the pigpio daemon running on the remote Pi (and remote GPIO enabled in raspi-config)."
if you "sudo apt-get install pipgio" it installs pigpiod and the daemon
maybe you need to "sudo systemctl enable pigpiod" (something like that..)
the menu options changes how pipgiod is run: with or without the -l option
here is NO need to edit the rc.local file

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

Re: Remote GPIO

Wed Oct 19, 2016 10:39 am

Massi wrote: ...
if you "sudo apt-get install pipgio" it installs pigpiod and the daemon
maybe you need to "sudo systemctl enable pigpiod" (something like that..)
the menu options changes how pipgiod is run: with or without the -l option
here is NO need to edit the rc.local file
Ah, that explains that. I didn't know that.

It's confusing because if you use the raspi-config option to use the remote server it does actually launch the daemon for that session. When you reboot the daemon is no longer running though.

Your sudo systemctl enable pigpiod command does launch the daemon on reboot.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: Remote GPIO

Wed Oct 19, 2016 10:42 am

joan wrote:It's confusing because if you use the raspi-config option to use the remote server it does actually launch the daemon for that session. When you reboot the daemon is no longer running though.
Your sudo systemctl enable pigpiod command does launch the daemon on reboot.
i enabled it by hand modifying the service file (removing the -l option), didn't know the menu item was a "per session" entry.. seems stupid to me, isn't it?

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

Re: Remote GPIO

Wed Oct 19, 2016 10:48 am

Massi wrote:
joan wrote:It's confusing because if you use the raspi-config option to use the remote server it does actually launch the daemon for that session. When you reboot the daemon is no longer running though.
Your sudo systemctl enable pigpiod command does launch the daemon on reboot.
i enabled it by hand modifying the service file (removing the -l option), didn't know the menu item was a "per session" entry.. seems stupid to me, isn't it?
I guess it permanently sets or removes the -l option. But it would be less confusing if the daemon was not launched just for that session (i.e. either don't launch it, or if it is launched also do the systemctl enable command).

ChristophK
Posts: 15
Joined: Thu Oct 06, 2016 1:34 pm

Re: Remote GPIO

Wed Oct 19, 2016 12:33 pm

Massi wrote ..."sudo apt-get install pipgio"...
Which version is actually installed? The latest (Sept.23) Rasbian image still contains V50 without bit-banging modes.
I had to use the zip file http://abyz.co.uk/rpi/pigpio/download.html to install V56.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: Remote GPIO

Wed Oct 19, 2016 12:42 pm

ChristophK wrote:Massi wrote ..."sudo apt-get install pipgio"...
Which version is actually installed? The latest (Sept.23) Rasbian image still contains V50 without bit-banging modes.
I had to use the zip file http://abyz.co.uk/rpi/pigpio/download.html to install V56.
even with manual install, editing the rc.local file is not the best choiche.
Much better is creating a proper service (so you can check its status) like this:

creating a service file

Code: Select all

sudo nano /etc/systemd/system/pigpio.service
with this content

Code: Select all

[Unit]
Description=PIGPIO service
[Service]
Type=forking
ExecStart=/usr/local/bin/pigpiod
[Install]
WantedBy=multi-user.target
and enabling it

Code: Select all

sudo systemctl enable pigpio
and rebooting (or sudo systemctl start pigpio)

n.b.: i haven't checked if the content is the same of automatically installed pigpio :)

Kalman
Posts: 34
Joined: Mon Apr 22, 2013 3:38 pm
Location: Sweden

Re: Remote GPIO

Mon Oct 31, 2016 2:59 pm

ChristophK wrote:Massi wrote ..."sudo apt-get install pipgio"...
Which version is actually installed? The latest (Sept.23) Rasbian image still contains V50 without bit-banging modes.
I had to use the zip file http://abyz.co.uk/rpi/pigpio/download.html to install V56.
Maybee not the right thread , sorry, but I tried to install/update the Pigpio today with bad result.
First I wrote this:
sudo apt-get install pigpio python-pigpio python3-pigpio
After I got the message 2016-10-31-: Can´t lock /var//run/pigpio.pid
Can´t initialise pigpio library

So I made a new try after suggestion from Joans site (Thank You Joan!)
http://abyz.co.uk/rpi/pigpio/download.html
Method 1
rm pigpio.zip
sudo rm -rf PIGPIO
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make -j4
sudo make install

and I get the same result.
I think I make some elementary /basic wrong thing here. Someone who can clear out this for me please?
The install itselv seems to be succeded.

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

Re: Remote GPIO

Mon Oct 31, 2016 3:06 pm

You haven't made a mistake.

You get that message if the pigpio daemon is already running.

You can check with the command

ps aux | grep pigpiod

To kill that daemon to start an updated one do

sudo killall pigpiod

If that doesn't work do sudo rm /var//run/pigpio.pid and try again.

Kalman
Posts: 34
Joined: Mon Apr 22, 2013 3:38 pm
Location: Sweden

Re: Remote GPIO

Mon Oct 31, 2016 3:14 pm

Thank You Joan! :)
You was right, an old version was running.
Now I learned something new, I shall save this "commands"
Kalman

Return to “General discussion”