GPIO Binding "Connecion error"

Hi again!
I built an images, ran it and executed your setup.sh script.
It seems ok but no items update on OH…

May you have a look to my logs?

~/tmp/sensorreporter $ cat /opt/sensorreporter/sensor_reporter.log

/------------/ START the container
2026-07-31 19:34:27,139 INFO - [sensor_reporter] Setting logging level to INFO
2026-07-31 19:34:27,139 INFO - [sensor_reporter] Creating connection openHAB
2026-07-31 19:34:27,285 INFO - [ OpenhabREST] Initializing openHAB REST Connection…
2026-07-31 19:34:27,286 INFO - [ OpenhabREST] Attempting to connect to openHAB REST at http://192.168.1.33:8080, TLS certificate True
2026-07-31 19:34:27,314 INFO - [ OpenhabREST] Connected to openHAB http://192.168.1.33:8080
2026-07-31 19:34:27,320 INFO - [ PollManager] Starting polling loop

/------------/ STOP the container
2026-07-31 19:41:48,289 INFO - [sensor_reporter] (SIGTERM/SIGINT) terminating the process: 15 <frame at 0x7ffeff555f30, file ‘/app/core/poll_mgr.py’, line 78, code start>
2026-07-31 19:41:48,790 INFO - [ PollManager] Waiting for all the polling threads
2026-07-31 19:41:48,790 INFO - [ PollManager] Cleaning up the sensors
2026-07-31 19:41:48,790 INFO - [ PollManager] Cleaning up the actuators
2026-07-31 19:41:48,790 INFO - [ PollManager] Disconnecting from connections
2026-07-31 19:41:48,790 INFO - [ OpenhabREST] Disconnecting from openHAB SSE

/------------/ START the container

2026-07-31 19:43:08,516 INFO - [sensor_reporter] Setting logging level to INFO
2026-07-31 19:43:08,517 INFO - [sensor_reporter] Creating connection openHAB
2026-07-31 19:43:08,598 INFO - [ OpenhabREST] Initializing openHAB REST Connection…
2026-07-31 19:43:08,598 INFO - [ OpenhabREST] Attempting to connect to openHAB REST at http://192.168.1.33:8080, TLS certificate True
2026-07-31 19:43:08,621 INFO - [ OpenhabREST] Connected to openHAB http://192.168.1.33:8080
2026-07-31 19:43:08,627 INFO - [ PollManager] Starting polling loop

Nothing else happens…

Thanks

What’s the config? It looks like it loads the connection but no sensors nor actuators. Since there are none, when it gets to the polling loop there’s nothing to do.

$ cat  /opt/sensorreporter/sensor_reporter.yml
Logging:
  Syslog: no # ← importante!
  Level: ERROR
  File: /config/sensor_reporter.log   # opzionale

# Connessione diretta a openHAB 5 via REST API
Connection1:
  Class: openhab_rest.rest_conn.OpenhabREST
  Name: openHAB
  URL: http://192.168.1.33:8080          # cambia se openHAB non è in locale
  RefreshItem: GPIO_Refresh           # Item di tipo Switch (opzionale ma utile)
  openHAB-Version: 5.0
  API-Token: oh.OH5token._______my_token______   # OBBLIGATORIO se usi autenticazione
  Level: INFO

# ========== OUTPUT ==========
# Led verde sul pin 10
LED:
  Class: gpio.rpi_gpio.RpiGpioActuator
  Connections:
    openHAB:
      Item: LED
  GpioChip: 0                 # ← IMPORTANTE per Raspberry Pi 5
  Pin: 10
  InitialState: OFF
  InvertOut: false
  Level: INFO

# ========== INPUT ==========
# Sensore Luce al Terzo Piano (GPIO 4) - activelow=yes
DoorSensor:
  Class: gpio.rpi_gpio.RpiGpioSensor
  Connections:
    openHAB:
      Switch:
        Item: DoorSensor
  GpioChip: 0
  Pin: 4
  PUD: OFF                    # come pullupdown="OFF"
  EventDetection: BOTH
  Btn_Pressed_State: LOW      # activelow=yes → considera LOW come "attivo" (ON)
  Short_Press-Threshold: 0.002  # ~2 ms di debounce
  Values:
    openHAB:
      - 'ON'
      - 'OFF'
  Level: INFO

# Luce Scale (GPIO 11) - activelow=no, pull=DOWN
LuceScale:
  Class: gpio.rpi_gpio.RpiGpioSensor
  Connections:
    openHAB:
      Switch:
        Item: LuceScale
  GpioChip: 0
  Pin: 11
  PUD: DOWN
  EventDetection: BOTH
  Btn_Pressed_State: HIGH     # activelow=no → HIGH = attivo
  Short_Press-Threshold: 0.01 # 10 ms
  Values:
    openHAB:
      - 'ON'
      - 'OFF'
  Level: INFO

# Portone (GPIO 2) - activelow=yes
Portone:
  Class: gpio.rpi_gpio.RpiGpioSensor
  Connections:
    openHAB:
      Switch:
        Item: Portone
  GpioChip: 0
  Pin: 2
  PUD: UP                     # tipico per input con activelow
  EventDetection: BOTH
  Btn_Pressed_State: LOW      # activelow=yes
  Short_Press-Threshold: 0.01
  Values:
    openHAB:
      - 'ON'
      - 'OFF'
  Level: INFO

# PortoneOK (GPIO 9) - activelow=yes
PortoneOK:
  Class: gpio.rpi_gpio.RpiGpioSensor
  Connections:
    openHAB:
      Switch:
        Item: PortoneOK
  GpioChip: 0
  Pin: 9
  PUD: UP
  EventDetection: BOTH
  Btn_Pressed_State: LOW
  Short_Press-Threshold: 0.01
  Values:
    openHAB:
      - 'ON'
      - 'OFF'
  Level: INFO



Follows my working setup on Rpi4 and Openhab4 with GPIO binding:

GPIO.things

/* OpenHab 4 !  */
/* ATTENZIONE; usare i pin BCM !!!   */
/* PIN di input: usare Contact */
/* PIN di output: usare Switch */
 
Thing gpio:pigpio-remote:raspiOH4 "RaspOH4" [host="127.0.0.1", port=8888] {
    Channels:
        /* Type pigpio-digital-input : sample-input-1 [ gpioId=10] */
        /* Type pigpio-digital-input : sample-input-2 [ gpioId=14, invert=true] */

        /* Sensore Luce al Terzo Piano !!! */
        Type pigpio-digital-input : sample-input-4 [ gpioId=4, invert=false, debouncingTime=2, activelow="yes", pullupdown="OFF"]

        /* Led verde sul pin 10 */
        Type pigpio-digital-output : sample-output-10 [ gpioId=10]

        /* LuceScale (condominiale)*/
        /* Contact LuceScale "Luce Scale [%s]" (DoorSensors) { gpio="pin:11 debounce:10 activelow:no" }  */
        Type pigpio-digital-input : sample-input-11 [ gpioId=11, debouncingTime=10, activelow="no", pullupdown="DOWN"]
        
        /* Contact Portone  "Portone [%s]" (DoorSensors) { gpio="pin:2 debounce:10 activelow:no" } */
        Type pigpio-digital-input : sample-input-2 [ gpioId=2, debouncingTime=10, activelow="yes"] //, pullupdown="UP"]
        
        /* Contact PortoneOK "Portone (Sic.) [%s]" (DoorSensors) { gpio="pin:9 debounce:10 activelow:yes" } */
        Type pigpio-digital-input : sample-input-9 [ gpioId=9, debouncingTime=10, activelow="yes"] // pullupdown="DOWN"]

}

GPIO.items

/* ATTENZIONE; usare i pin BCM !!!   */
/* PIN di input: usare Contact */
/* PIN di output: usare Switch */
Switch LED "LED verde" { gpio="pin:10" }
 
//Relays
//Switch channel1 "Channel 1" { gpio="pin:26 activelow:yes initialValue:high" }
//Switch channel2 "Channel 2" { gpio="pin:19 activelow:yes initialValue:low" }
//Switch channel3 "Channel 3" { gpio="pin:13 activelow:yes"}
//Switch channel4 "Channel 4" { gpio="pin:6 activelow:no"}

// Sensore Luce Piano 3 !!!
Contact DoorSensor "Door Sensor [%s]" (DoorSensors) { gpio="pin:4 debounce:10 activelow:no" }
//Contact Button "Button [%s]" { gpio="pin:24 activelow:yes" }

// 7/2/2021 
Contact LuceScale "Luce Scale [%s]" (DoorSensors) { gpio="pin:11 debounce:10 activelow:no" }
Contact Portone  "Portone [%s]" (DoorSensors) { gpio="pin:2 debounce:10 activelow:no" }
Contact PortoneOK "Portone (Sic.) [%s]" (DoorSensors) { gpio="pin:9 debounce:10 activelow:yes" }

Thanks for any help.

Continuing the discussion from GPIO Binding "Connecion error":

Hi there

sorry to bother you again. But none install is currently doing what it is supposed to. May be you have an idea.

My issue is once again with the /srv/sensorReporter/bin directory. It does not allow the installation to complete what it tries to do

=== adding user 'sensorReporter' to groupe 'gpio' ===
=== installing lgpio ===
bash: line 1: bin/python: No such file or directory
=== installing adafruit-circuitpython-dht ===
bash: line 1: bin/python: No such file or directory
=== installing requests ===
bash: line 1: bin/python: No such file or directory
=== installing sseclient-py ===
bash: line 1: bin/python: No such file or directory

any idea or suggestion how to overcome this issue?

Thanks Volker

I haven’t forgotten this. I’m just on travel and time is tight. I haven’t had a chance to trace these through the logs. From what I know, this config should work as written. There shouldn’t be anything different about loading the config file in a container. Either it should all work or all fail, not load the connections but ignore everything else.

It seems python isn’t in your path. If you run python --version what’s the output? Also which python.

Everything runs off of Python so if Python isn’t installed or not in your path, neither the install nor the program is going to work.

Also, bash is your shell or something else?

For some reason, the last updates on me Raspberry Pi 5 have changed the GPIO device from gpiochip0 to gpiochip15. It wouldn’t be the first time it’s changed.

python --version → Python 3.13.5

which python → /usr/bin/python

but your hint to look for python made me aware of the python install with the setup script in sensorReporter. Everything seems to be fine except for ‘/srv/sensorReporter/.gitignore’.

Rights not set properly because no updates to python were necessary or something similar? Any idea how I could change this?

=== installing python3-venv ===
python3-venv is already the newest version (3.13.5-1).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 6
=== installing python3-pip ===
python3-pip is already the newest version (25.1.1+dfsg-1+rpt1).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 6
=== installing python3-setuptools ===
python3-setuptools is already the newest version (78.1.1-0.1).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 6
=== installing python3-yaml ===
python3-yaml is already the newest version (6.0.2-1+b2).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 6
=== creating sensorReporter user ===
=== installing service ===
=== creating logging directory ===
=== creating Python virtual environment ===
Error: [Errno 13] Permission denied: '/srv/sensorReporter/.gitignore'

During the install it creates a venv which is a local to sensorReporter copy of Python. Your first command tells me that you are not running in that venv. But that’s OK as Python just needs to be installed globally to set up the venv. So that part is working.

And the python libraries appear to be installed in the venv which is also good.

I’ve never seen the permission error. What is the ownership and permissions on that file? How are you launching the install script? With sudo?

I’ve tried running setup.sh with and without sudo. Since I am already running the command line tool aus su both should do to my understanding but tried anyways.

This .gitignore file doesn’t even exist. I assume that’s what you were looking for when asking for permissions etc. All the other permissions see below.

drwxr-xr-x 2 openhabian openhab  4096 Aug  4 14:57 bin
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 bt
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 core
-rw-r--r-- 1 root       root      260 Aug  4 14:56 dependencies.txt
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 energymeter
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 exec
drwxr-xr-x 3 root       root     4096 Aug  4 14:56 gpio
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 heartbeat
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 i2c
drwxr-xr-x 3 openhabian openhab  4096 Aug  4 14:57 include
-rwxr-xr-x 1 root       root     8506 Aug  4 14:56 install_dependencies.sh
drwxr-xr-x 3 openhabian openhab  4096 Aug  4 14:57 lib
lrwxrwxrwx 1 openhabian openhab     3 Aug  4 14:57 lib64 -> lib
-rw-r--r-- 1 root       root    11358 Aug  4 14:56 LICENSE
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 local
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 mqtt
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 network
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 one_wire
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 openhab_rest
-rw-r--r-- 1 root       root    16931 Aug  4 14:56 README.md
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 roku
-rw-r--r-- 1 root       root      417 Aug  4 14:57 sensor_reporter_edit.service
-rw-r--r-- 1 root       root    13552 Aug  4 14:56 sensor_reporter.py
-rw-r--r-- 1 root       root      413 Aug  4 14:56 sensor_reporter.service
-rwxr-xr-x 1 root       root     9899 Aug  4 14:56 setup.sh
drwxr-xr-x 2 root       root     4096 Aug  4 14:56 test_type-checker

use ls -la. Files that start with a . are “hidden” files. They only show up when you use the “a” option to ls.

ahhh there we have it again. Too little knowledge. But here it is->

-rw-r–r-- 1 root root 103 Aug 4 14:56 .gitignore

All the files are owned by root so definitely run the command as root. Beyond that, I see nothing obvious that would cause a permission problem

Thanks for the feedback. Did a try changing permission on .gitignore anyways. Set it to 777. Hopefully didn’t break anything but all of a sudden there is a mile long list of additions and downloads etc.

=== adding user 'sensorReporter' to groupe 'gpio' ===
warn: The user `sensorReporter' is already a member of `gpio'.
=== installing lgpio ===
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: lgpio in /usr/lib/python3/dist-packages (0.2.2.0)
=== installing adafruit-circuitpython-dht ===
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting adafruit-circuitpython-dht
  Downloading https://www.piwheels.org/simple/adafruit-circuitpython-dht/adafruit_circuitpython_dht-4.0.12-py3-none-any.whl.metadata (5.7 kB)
Collecting Adafruit-Blinka (from adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-blinka/adafruit_blinka-9.2.0-py3-none-any.whl.metadata (5.9 kB)
Collecting Adafruit-PlatformDetect>=3.89.1 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-platformdetect/adafruit_platformdetect-3.89.1-py3-none-any.whl.metadata (3.8 kB)
Collecting Adafruit-PureIO>=1.1.7 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-pureio/Adafruit_PureIO-1.1.11-py3-none-any.whl.metadata (3.0 kB)
Collecting binho-host-adapter>=0.1.6 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/binho-host-adapter/binho_host_adapter-0.1.6-py3-none-any.whl.metadata (2.0 kB)
Collecting pyftdi>=0.40.0 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading pyftdi-0.57.2-py3-none-any.whl.metadata (3.4 kB)
Collecting adafruit-circuitpython-typing (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-circuitpython-typing/adafruit_circuitpython_typing-1.12.3-py3-none-any.whl.metadata (3.3 kB)
Collecting sysv_ipc>=1.1.0 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading sysv_ipc-1.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.metadata (2.4 kB)
Collecting rpi_ws281x>=4.0.0 (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading rpi_ws281x-5.0.0.tar.gz (64 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: lgpio>=0.2.2.0 in /usr/lib/python3/dist-packages (from Adafruit-Blinka->adafruit-circuitpython-dht) (0.2.2.0)
Collecting RPi.GPIO (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading RPi.GPIO-0.7.1.tar.gz (29 kB)
  Preparing metadata (setup.py) ... done
Collecting Adafruit-Blinka-Raspberry-Pi5-Neopixel (from Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading Adafruit_Blinka_Raspberry_Pi5_Neopixel-1.0.0rc2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.metadata (547 bytes)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from binho-host-adapter>=0.1.6->Adafruit-Blinka->adafruit-circuitpython-dht) (3.5)
Collecting pyusb!=1.2.0,>=1.0.0 (from pyftdi>=0.40.0->Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/pyusb/pyusb-1.3.1-py3-none-any.whl.metadata (2.6 kB)
Collecting adafruit-circuitpython-busdevice (from adafruit-circuitpython-typing->Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-circuitpython-busdevice/adafruit_circuitpython_busdevice-5.2.17-py3-none-any.whl.metadata (4.1 kB)
Collecting adafruit-circuitpython-requests (from adafruit-circuitpython-typing->Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-circuitpython-requests/adafruit_circuitpython_requests-4.1.17-py3-none-any.whl.metadata (3.6 kB)
Requirement already satisfied: typing_extensions~=4.0 in /usr/lib/python3/dist-packages (from adafruit-circuitpython-typing->Adafruit-Blinka->adafruit-circuitpython-dht) (4.13.2)
Collecting Adafruit-Circuitpython-ConnectionManager (from adafruit-circuitpython-requests->adafruit-circuitpython-typing->Adafruit-Blinka->adafruit-circuitpython-dht)
  Downloading https://www.piwheels.org/simple/adafruit-circuitpython-connectionmanager/adafruit_circuitpython_connectionmanager-3.1.8-py3-none-any.whl.metadata (4.5 kB)
Downloading https://www.piwheels.org/simple/adafruit-circuitpython-dht/adafruit_circuitpython_dht-4.0.12-py3-none-any.whl (7.9 kB)
Downloading https://www.piwheels.org/simple/adafruit-blinka/adafruit_blinka-9.2.0-py3-none-any.whl (1.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 8.0 MB/s eta 0:00:00
Downloading https://www.piwheels.org/simple/adafruit-platformdetect/adafruit_platformdetect-3.89.1-py3-none-any.whl (27 kB)
Downloading https://www.piwheels.org/simple/adafruit-pureio/Adafruit_PureIO-1.1.11-py3-none-any.whl (10 kB)
Downloading https://www.piwheels.org/simple/binho-host-adapter/binho_host_adapter-0.1.6-py3-none-any.whl (10 kB)
Downloading pyftdi-0.57.2-py3-none-any.whl (146 kB)
Downloading https://www.piwheels.org/simple/pyusb/pyusb-1.3.1-py3-none-any.whl (58 kB)
Downloading sysv_ipc-1.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (72 kB)
Downloading Adafruit_Blinka_Raspberry_Pi5_Neopixel-1.0.0rc2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (80 kB)
Downloading https://www.piwheels.org/simple/adafruit-circuitpython-typing/adafruit_circuitpython_typing-1.12.3-py3-none-any.whl (11 kB)
Downloading https://www.piwheels.org/simple/adafruit-circuitpython-busdevice/adafruit_circuitpython_busdevice-5.2.17-py3-none-any.whl (7.5 kB)
Downloading https://www.piwheels.org/simple/adafruit-circuitpython-requests/adafruit_circuitpython_requests-4.1.17-py3-none-any.whl (10 kB)
Downloading https://www.piwheels.org/simple/adafruit-circuitpython-connectionmanager/adafruit_circuitpython_connectionmanager-3.1.8-py3-none-any.whl (7.8 kB)
Building wheels for collected packages: rpi_ws281x, RPi.GPIO
  DEPRECATION: Building 'rpi_ws281x' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'rpi_ws281x'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for rpi_ws281x (setup.py) ... done
  Created wheel for rpi_ws281x: filename=rpi_ws281x-5.0.0-cp313-cp313-linux_aarch64.whl size=124982 sha256=b5296e7a3d551760a5263d4bb731b6a760a80e2aea152d7fe830a3719fe82dfc
  Stored in directory: /home/openhabian/.cache/pip/wheels/29/2a/12/da24aea32d3801e27e82b5c87945725b9954185b725545f3eb
  DEPRECATION: Building 'RPi.GPIO' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'RPi.GPIO'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for RPi.GPIO (setup.py) ... done
  Created wheel for RPi.GPIO: filename=rpi_gpio-0.7.1-cp313-cp313-linux_aarch64.whl size=69285 sha256=47599da7404a987f8257306987367e684b4e4c510ced2087cd1f331f2faad85e
  Stored in directory: /home/openhabian/.cache/pip/wheels/fe/f1/d8/b4cf15eedd221009444483ab72646dee0b203f4aa2c185ec1c
Successfully built rpi_ws281x RPi.GPIO
Installing collected packages: sysv_ipc, RPi.GPIO, Adafruit-PlatformDetect, rpi_ws281x, pyusb, binho-host-adapter, Adafruit-PureIO, Adafruit-Blinka-Raspberry-Pi5-Neopixel, pyftdi, Adafruit-Circuitpython-ConnectionManager, adafruit-circuitpython-requests, adafruit-circuitpython-busdevice, adafruit-circuitpython-typing, Adafruit-Blinka, adafruit-circuitpython-dht
Successfully installed Adafruit-Blinka-9.2.0 Adafruit-Blinka-Raspberry-Pi5-Neopixel-1.0.0rc2 Adafruit-Circuitpython-ConnectionManager-3.1.8 Adafruit-PlatformDetect-3.89.1 Adafruit-PureIO-1.1.11 RPi.GPIO-0.7.1 adafruit-circuitpython-busdevice-5.2.17 adafruit-circuitpython-dht-4.0.12 adafruit-circuitpython-requests-4.1.17 adafruit-circuitpython-typing-1.12.3 binho-host-adapter-0.1.6 pyftdi-0.57.2 pyusb-1.3.1 rpi_ws281x-5.0.0 sysv_ipc-1.2.0
=== installing requests ===
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.32.3)
Requirement already satisfied: charset_normalizer<4,>=2 in /usr/lib/python3/dist-packages (from requests) (3.4.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests) (2025.1.31)
=== installing sseclient-py ===
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting sseclient-py
  Downloading sseclient_py-1.9.0-py3-none-any.whl.metadata (1.9 kB)
Downloading sseclient_py-1.9.0-py3-none-any.whl (8.4 kB)
Installing collected packages: sseclient-py
Successfully installed sseclient-py-1.9.0

Setup done! Now create a configuration yml-file and start sensorReporter with:
cd /srv/sensorReporter 
bin/python sensor_reporter.py sensor_reporter.yml

To use the service, enter:
sudo systemctl enable sensor_reporter.service 
sudo systemctl start sensor_reporter.service

I don’t know why it would need to write to .gitignore to begin with so the error is still a mystery. And even if the permissions were wrong, if the script were run as root it would have had permission to do anything regardless of the permissions.

The output you see is a successful install. sensorReporter needs to download a bunch of libraries.

Do what it says in the last lines of the output. Create your config file and use systemctl to enable and start the service.