Here is my .yml file and the .log file
and the configuration of the relay 1 command in OpenHab
sensor_reporter.txt (1.9 KB)
sensorReporter.log (1.9 KB)

Here is my .yml file and the .log file
and the configuration of the relay 1 command in OpenHab
sensor_reporter.txt (1.9 KB)
sensorReporter.log (1.9 KB)

sensor_reporter/somename. You’ve configured your Thing to publish to a topic starting with /sensor_reporter/somename. These are not the same. MQTT standards recommend against using a leading / in topic names.2025-08-07 18:58:34,940 DEBUG - [ RpiGpioSensor] LargeGarageDoor will report to following connections:
MQTT:
Switch:
StateDest: powerless/state
2025-08-07 18:58:34,941 DEBUG - [ RpiGpioSensor] LargeGarageDoor configured values:
DEFAULT:
- OPEN
- CLOSED
Logging:
File: /var/log/sensor_reporter/sensorReporter.log
MaxSize: 67108864
NumFiles: 10
Syslog: no
Level: INFO
# MQTT config
Connection1:
Class: mqtt.mqtt_conn.MqttConnection
Name: MQTT
Client: cerberos # unigue id for the connection to the broker
User: openhabian # username to log into the broker
Password: openhabian # password to log into the broker
Host: localhost
Port: 1883
TLS: NO
Keepalive: 60
RootTopic: sensor_reporter/somename # root topic all the sensors and actuators will read/write to
Level: INFO
# Controls one of the relays
ActuatorRelay1:
Class: gpio.rpi_gpio.RpiGpioActuator
Connections:
MQTT:
CommandSrc: relay1/cmd # will subscribe to sensor_reporter/somename/relay1/cmd for ON/OFF and TOGGLE commands, There is an optional StateDest property you can supply to publish the state of the relay
GpioChip: 4 # if running RPi 5 use 4
Pin: 7 # control pin for the relay Rpi5 GPIO 4
InitialState: OFF # when sensorReporter comes up it will set the pin to ON or OFF
SimulateButton: True # when True toggles the pin as if someone pressed and released a momentary button
Level: DEBUG
# Controls the second relay
ActuatorRelay2:
Class: gpio.rpi_gpio.RpiGpioActuator
Connections:
MQTT:
CommandSrc: relay2/cmd
GpioChip: 4 # if running RPi 5 use 4
Pin: 12 # control pin for the relay Rpi5 GPIO 18
InitialState: OFF # when sensorReporter comes up it will set the pin to ON or OFF
SimulateButton: True # when True toggles the pin as if someone pressed and released a momentary button
Level: DEBUG
SensorLargeGarageDoor:
Class: gpio.rpi_gpio.RpiGpioSensor
Connections:
MQTT:
Switch:
StateDest: powerless/state
GpioChip: 4
Pin: 11 # Rpi5 GPIO 17
PUD: DOWN
Btn_Pressed_State: HIGH
EventDetection: BOTH
Level: DEBUG
Note, you should use meaningful names instead of the placeholders I put above. You’ve provided far too few details for me to come up with meaningful names.
I corrected the command in OpenHab and modified the yml file, but to no avail.
I also don’t see the commands I send in the log file. Is this normal?
And the new config file? And the new set of logs?
What log? openhab.log? events.log? sensorReporter.log?
It’s really not fun to have to drag every bit of information out of you on every post.
Sorry, but I’m not a developer and not familiar with the forum, so I don’t have the “codes”. My question concerns the sensor_reporter log file.
I need the config file you are using. Every time you change it, you need to post the new config file.
I need the contents of all the relevant logs, particularly sensorReporter.log.
If you have a question concerning anything, like sensorReporter.log, you need to post that thing you are asking about. I can’t answer what is supposed to be there until after I know what is in there. Is it simply not logging?
Is the sensor or actuator loading and connecting correctly?
Is there any evidence at all that a message is sent or received?
The answer to all of these questions and more are in the logs.
Otherwise it’s like asking a mechanic to describe to you how to fix your car over the phone without even telling them what kind of car it is or what’s wrong beyond “it doesn’t work”.
You cannot post too much information.
But given all these problems are the caused by an incompatibility with the RPi 5, maybe the best solution is to move your OH to an RPi 4 which does still work with that pygpio library.
As I said at the beginning of our exchange, I lack programming language skills. I’m also using a translator because I’m not fluent in English enough; it’s a lot. I’ll work around the problem by adding external contacts with an ESP, I know how to do that.
Thanks.
I’m not sure what that has to do with not posting the logs and files that are asked for. You don’t need to know programming and cut and paste from a file you already know where it is. But I hope you end up on a path where you can get this work.
Hello, I have the same problem.
I’m using GPIO Binding.
Will this be resolved?
This method worked. Thank you.
I don’t know if anyone opened an issue. I don’t use this binding nor do I have an RPi 5 so it’s not really appropriate for me to file an issue on this. I can’t test it. I can’t provide additional information.
I stumbled across the issue with GPIO now as well. Its a real pain if you set up a working environment with GPIO in use and see everything fall apart when upgrading your system.
raspi3b+ obviously wasn’t the latest model and openhab developing into the 5 stages also reached its limits an my setup. Now I moved to raspi5 and OH5 together with a backup of my old setup. No major struggles doing so except for my DS18b20’s and the relays in use for some control of the heating system. I do not plan on replacing everything with alternative technologies. So my way was trying out the software you mentioned above in this discussion which you apparently developed.
Question from my side. Since I used the backup including pigpio and the addons GPIO and OneWireGpio plus this minor change in config.txt ‘# Enable the 1-wire bus dtoverlay=w1-gpio,gpiopin=4’ would you think this setup would hinder your software when creating sensors and relays? I absolutely don’t get anything to work on raspi5 and OH5.
Thanks in advance for your feedback
If all you are using are the GPIO sensors and actuators I don’t think that will matter. sensorReporter only tries to load what you’ve configured so those settings shouldn’t impact anything.
Note, on Trixie there is a know issue with sensorReporter related to a specific library going away. But apparantly that library isn’t needed any more anyway and someone is working a PR to remove trying to install it as part of start up. In the mean time, I think you can just ignore that error when it tries to install that library and fails.
Thanks a lot for the ultrafast response. Gives me some hope that I won’t have to setup everything from scratch to get rid of any relics from pigpio and related stuff.
Just to be on the safe side. I definitely have more addons and equipment running than those GPIO things. This doesn’t have negative impact on your statement? I sure do hope so. Even though it leaves me with the challenge of identifying the root cause for the trouble I have. But that’s life.
Where should I find any of the new items(?), things(?)? As usual within all the other items? Do one need to create an item that relates to sensorReporter before starting the process?
No, but I think you need to disable your GPIO things to run sensorReporter on the same pins. I think Raspberry Pi OS enforces exclusive access to GPIO pins.
Ok, after trying several different ways I finally got through to openHAB. Might just be my misinterpretation of the documents. Might be….
Got an actuator which actually is an eight channel relays board connected to the raspi5 GPIO.
Took the example code from GitHub and adjusted the parameters to my needs. Took a number of trials before it did what it is supposed to.
One has to add the item which is called in the yaml script below to the openhab instance before start using the code. In my case it is a simple relays / switch which has the type STRING and is shown under semantic equipment as ControlDevice > WallSwitch.
DEFAULT:
PinNumbering: BOARD
Logging:
Syslog: yes
Level: INFO
Connection1:
Class: openhab_rest.rest_conn.OpenhabREST
Name: openHAB
URL: http://192.168.178.27:8080
RefreshItem: Test_Refresh
openHAB-Version: 5.0 #defaults to OH2 if not set
ActuatorGarageDoor:
Class: gpio.rpi_gpio.RpiGpioActuator
Connections:
openHAB:
Item: GarageDoorCmd
GpioChip: 4
Pin: 40 #raspi pin# for GPIO21
InitialState: ON
SimulateButton: True
Level: DEBUG
did the first tests with the following command: bin/python sensor_reporter.py sensor_reporter.yml
[18:57:13] root@openhabian:/srv/sensorReporter# bin/python sensor_reporter.py sensor_reporter.yml
2026-01-12 18:57:16,765 INFO - [sensor_reporter] Setting logging level to INFO
2026-01-12 18:57:16,765 INFO - [sensor_reporter] Creating connection openHAB
2026-01-12 18:57:16,839 INFO - [ OpenhabREST] Initializing openHAB REST Connection...
2026-01-12 18:57:16,839 INFO - [ OpenhabREST] No API-Token specified, connecting to openHAB without authentication
2026-01-12 18:57:16,839 INFO - [ OpenhabREST] Attempting to connect to openHAB REST at http://192.168.178.27:8080, TLS certificate True
2026-01-12 18:57:16,866 INFO - [ OpenhabREST] Connected to openHAB http://192.168.178.27:8080
2026-01-12 18:57:16,871 INFO - [sensor_reporter] Creating device for ActuatorGarageDoor
2026-01-12 18:57:17,008 INFO - [ OpenhabREST] Registering destination GarageDoorCmd
2026-01-12 18:57:17,008 INFO - [RpiGpioActuator] Configued RpiGpioActuator GarageDoor: pin 40 on with SimulateButton True
2026-01-12 18:57:17,008 DEBUG - [RpiGpioActuator] GarageDoor has following configured connections:
openHAB:
Item: GarageDoorCmd
2026-01-12 18:57:17,017 INFO - [ PollManager] Starting polling loop
Now the code for all eight relays need to get completed and the switches in the Habpanel have to somehow get connected to the code. We will see what happens.
A minor detail at the end. So far I wasn’t able to restore my backup from OH4.3.7 together with the sensorReporter in use. There must be more to the story than simply deleting pigpio and the things in use before.
There might be a way we can try again if the Item doesn’t exist. But I think right now it just fails to initialize the communicator. But for now indeed, the Item should exist first before starting sensorReporter. I mainly use MQTT so that part of the service probably hasn’t received as much testing.
Any command sent to the Item will be received by sensorReporter and based on how it’s configured above, it will turn ON or OFF the GPIO pin. To simulate a button press though, you probably want to configure the actuator in sensorReporter with SimulateButton: True. That will basically toggle the GPIO pin same as would happen when you press and release the dry connect button on the wall for the garage door opener.
Without details ![]()
Note: the problem on Trixie I identified above has been fixed.
Thanks for the feedback
on that restore issue with my still running OH4.3.7. I wouldn’t be sure where to start when asking for any help on that. So far I have installed openhabian-raspios64-latest-202511251430-crcd9ad50f0 on the raspi5 with 16gb. First attempts were with setting to install OH4 to allow for proper restore of my OH-backup. Restore works fine and everything start to work except for….you know what.
Tried to install sensorReporter with the original setup in place….no success. With deactivating the GPIO things….no success. With deleting the addons using GPIO….no success. Stopping and even deleting pigpio…no success.
Only when installing sensorReporter to a fresh install it starts to work. Current install is OH5.1.1.
Since I have made a full copy of the SD my next tests would be to reduce the active setup of OH4.3.7 to everything except GPIO functionality. Run a backup and try a restore on OH5. Since this might not work fully for all of the old setup I am prepared to do an install of above mentioned version to OH4, install sensorReporter and run the restore in that config.
Let’s see what happens.
There’s nothing about openHAB that should prevent sensorReporter from installing. OHmight prevent sensorReporter from accessing the GPIO pins if you have the GPIO binding installed. But I with the problem with the library that would be unexpected.
That’s likely to work but be sure to clear the cache and run upgradeTool before starting OH 5 with the restored backup.
yeah, would have been nice if it worked.
/srv/sensorReporter# bin/python sensor_reporter.py sensor_reporter.yml
bash: bin/python: No such file or directory
that’s what I get today. subfolder ‘bin’ is empty for sure. I suppose some python file is expected? Checked the logs. Nothing went wrong during installation. Any idea where to check or how to resolve?
Update: sensorReporter will start the regular way when using
sudo systemctl enable sensor_reporter.service
sudo systemctl start sensor_reporter.service