Pigpiod not working on osmc?


so I would like to control volume of my Cambridge Audio amplifier via raspberry pi 3 b+ GPIO pins. There is a python script which just does that: GitHub - andrew-bolin/pi_hifi_ctrl: Raspberry Pi Hi-Fi Amplifier Control

It requires a use of pigpiod (GitHub - joan2937/pigpio: pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).) . This works fine on raspbian OS on same raspberry pi, but does nothing with OSMC.

Do I need some kernel drivers, configuration or anything else to make this work on OSMC ? I’ve tried comparing cmdline.txt and config.txt seems all ok there. Found that raspbian uses udev rules to manage permissions related to gpio, copied that to OSM but does not seem to help.

Any hints appreciated.

Ok, figured that out. Had to start pigpiod with -t 0 option:

-t value, clock peripheral, 0=PWM 1=PCM, default PCM

Hi @gerasalus - Did you make it work with pigpiod and OSMC? The service pigpiod.service wasn’t created on install and I can’t make pigpiod start up automatically on bootup? Anyone here maybe have a service file with configurations that works with OSMC?

sudo systemctl enable pigpiod.service

When enabling and starting the above - I get the following error, when viewing status for the service with sudo systemctl status pigpiod.service.

osmc@osmc : ~ $ sudo systemctl status pigpiod.service

â—Ź pigpiod.service - Pigpio daemon

Loaded: loaded (/etc/systemd/system/pigpiod.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Fri 2019-10-18 11:47:34 CEST; 9s ago

Process: 3564 ExecStart=/usr/bin/pigpiod (code=exited, status=203/EXEC)

Main PID: 3564 (code=exited, status=203/EXEC)

Oct 18 11:47:34 osmc systemd[1]: Started Pigpio daemon.

Oct 18 11:47:34 osmc systemd[1]:

When I write whereis pigpiod - I receive /usr/local/bin/pigpiod.

Maybe it’s because I have installed it manually through a zip-file? I couldn’t find pigpiod library with sudo apt-get install ? This could maybe do, that the pigpiod package wasn’t “fully installed” or maybe just installed the wrong place? I can write sudo pigpiod and start the service, but I would like to make the systemd service work…

Adapt the path in the service file you created

Hi there, also tried that. Gives me this error instead:

osmc@osmc : ~/ $ sudo systemctl status pigpiod

â—Ź pigpiod.service - Pigpio daemon

Loaded: loaded (/etc/systemd/system/pigpiod.service; enabled; vendor preset: enabled)

Active: inactive (dead) since Fri 2019-10-18 12:03:34 CEST; 4s ago

Process: 3649 ExecStart=/usr/local/bin/pigpiod (code=exited, status=0/SUCCESS)

Main PID: 3649 (code=exited, status=0/SUCCESS)

Oct 18 12:03:34 osmc systemd[1]: Started Pigpio daemon.

Oct 18 12:03:34 osmc pigpiod[3649]: 2019-10-18 12:03:34 sigHandler: Unhandled signal 18, terminating

Suggest you try type=forking instead of type=simple.

And don’t forget to add -t 0 to the start command.

Then reboot.

1 Like

-t 0?

Yay! This did the trick. Amazing. Now I will read about the “forking” option to understand it :smiley: Thanks.

Having the pigpiod daemon running makes my reboot really slow, since it is problematic for the reboot process to stop the pigpiod daemon? Any ideas why? :slight_smile:

Without logs, impossible to say. Did you add -t 0?

Nope - didn’t understood where to add -t 0? :slight_smile: Could you explain further?

As per post #2: /usr/local/bin/pigpiod -t 0

I will try this - in the service file right?