Hello everyone.
If for some reason the local installation (OpenHAB on a RPI3B+, build 3.0.1. or 3.1.0.M2) of GPIO Binding
does not work properly here is the installation procedure:
I will try to explain the procedure.
The installation consists of two steps.
- You need to install the PIGPIO daemon first (takes care of communication with GPIO):
-
ssh to OpenHAB and type
sudo apt-get install pigpiod
-
then type
sudo mkdir -p /etc/systemd/system/pigpiod.service.d/
-
then type
sudo nano /etc/systemd/system/pigpiod.service.d/public.conf
-
paste or write to a file
[Service]
ExecStart=
ExecStart=/usr/bin/pigpiod
-
Ctrl x
Y (Save file)
-
then type
sudo systemctl daemon-reload
-
then you can test if the local PIGPIO daemon is running (optional test)
sudo systemctl restart pigpiod
sudo systemctl status pigpiod
âŠanswer is something like:
â pigpiod.service - Daemon required to control GPIO pins via pigpio
Loaded: loaded (/lib/systemd/system/pigpiod.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/pigpiod.service.d
ââpublic.conf
Active: active (running) since Wed 2021-02-17 13:06:50 CET; 46min ago
Process: 375 ExecStart=/usr/bin/pigpiod (code=exited, status=0/SUCCESS)
Main PID: 396 (pigpiod)
Tasks: 6 (limit: 2181)
CGroup: /system.slice/pigpiod.service
ââ396 /usr/bin/pigpiod
⊠the normal way to start the pigpio library.
- Then type command
(to automate running the daemon at boot time)
sudo systemctl enable pigpiod
âŠanswer is something like:
Created symlink /etc/systemd/system/multi-user.target.wants/pigpiod.service â /lib/systemd/system/pigpiod.service
- If you want to be sure that the PIGPIO daemon will be active even after a reboot type (optional test)
sudo reboot
After restarting OpenHAB
- ssh to OpenHAB and type
sudo systemctl status pigpiod
âŠanswer is something like:
â pigpiod.service - Daemon required to control GPIO pins via pigpio
Loaded: loaded (/lib/systemd/system/pigpiod.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/pigpiod.service.d
ââpublic.conf
Active: active (running) since Wed 2021-02-17 13:06:50 CET; 46min ago
Process: 375 ExecStart=/usr/bin/pigpiod (code=exited, status=0/SUCCESS)
Main PID: 396 (pigpiod)
Tasks: 6 (limit: 2181)
CGroup: /system.slice/pigpiod.service
ââ396 /usr/bin/pigpiod
The normal way to start the pigpio library during boot.
Note:
The procedure is the same for both versions of OpenHAB (build 3.0.1. or 3.1.0.M2).
- The second step is installation GPIO Binding
(takes care of communication with the PIGPIO daemon which you installed in the first step),
you have three options:
a) manual installation:
- ssh to OpenHAB and type
openhab-cli console
Password: (default is âhabopenâ or âyour passwordâ)
the answerâŠ
|_| 3.0.1 - Release Build
⊠answer
Bundle ID: XXX
b) download file from
https://openhab.jfrog.io/artifactory/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.gpio/3.1.0-SNAPSHOT/org.openhab.binding.gpio-3.1.0-SNAPSHOT.jar
- and copy it to
\192.168.XXX.YYY\openHAB-addons
- wait a moment
and then you can configure GPIO via the OpenHAB Main UI:
Things
Add (+)
GPIO Binding
Add Manually (Pigpio Remote)
âŠ
Create Thing
c) normally install GPIO binding via OpenHAB Main UI
this option only applies to 3.1.x bundle users (not for 3.0.1)
Main UI:
Settings
Bindings
Add (+)
GPIO Binding
Install
I hope this helpsâŠ