#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
sudo /home/pi/scripts/sysfs-init.sh
exit 0
Did this, then reboot, then added hardware Generic sysfs GPIO with option autoconfigure devices
Followed the Domoticz GPIO wiki.
On newer RPI OS's the GPIO PIN number range has changed. So Sysfs should still work but you need different pin numbers.
See also https://github.com/domoticz/domoticz/issues/6040
I indeed had to change to GPIO pins to the high numbers when i did the upgrade from Bullseye to Bookworm
Didn't you had to change the GPIO numbers with the update?
Hi,
My config : RPi5 with trixie, Domoticz 2025.2
HardWare : Generic Sysfs GPIO
No way to make it work
* Can't echo :
sudo echo "6" > /sys/class/gpio/export
echo: write error: Invalid argument
* Can't gpio
gpio export 6 out
gpio: GPIO Sysfs Interface for Userspace is deprecated (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt).
Function is now useless and empty.
* Can't raspi-gpio
Doesn't exist any more
*Just can
sudo pinctrl set 6 op dl => Not seen by Domoticz
Hi All, same problem for me. Can't export GPIOS with regular pin numbering, but works when adding an offset of 512. Exported pins as output are visible in "Devices" with "Hardware Generic SysFS". I can create "Switches" which send commands On and Off, BUT header pins voltage never change. In the opposite way, when I toggle pins voltage from SSH terminal (which works fine) the "Switches icons" keep their status.
Raspberry3B V1.2 fresh Trixie 64b OS with Docker. Latest Domoticz version. Used to work fine with old Buster.
Any help welcome!
End part of the log
2026-03-08 21:59:55.093 Status: [web:8080] Incoming connection from: 192.168.xxx.xxx
2026-03-08 22:34:39.822 Status: [web:8080] Incoming connection from: 192.168.xxx.xxx
2026-03-08 22:34:59.055 Status: User: admin (IP: 192.168.xxx.xxx) initiated a switch command (3/Test36/Off)
2026-03-08 22:35:04.955 Status: User: admin (IP: 192.168.xxx.xxx) initiated a switch command (3/Test36/On)
Ok.
A few weeks ago i started to use a plugin insteat of sysfs, now i am on libgpiod, the plugin i use, and it's working for me is: https://github.com/Mibeus/Domoticz-GPIO-Debian-13
It can control 8 or less outputs.
Hi,
I have couple of problems with that plugin :
1- There is no plugins subdirectory in domoticz (fresh OS 64b from Imager), so I mkdir one and follow other instructions. At the end there was no Domoticz RPI GPIO Hardware.
2- By chance, I found the plugins dir in /domoticz/config/ So I reinstalled the plugins there. I got the Domoticz RPI GPIO Hardware, WONDERFUL!!! But unfortunately no device at all were created despite the 4 relays in the gpio_config.json file. log file says :
2026-03-09 18:32:34.301 Error: MesIO: gpiod module not found! Install it with:
2026-03-09 18:32:34.301 Error: MesIO: sudo apt install python3-libgpiod
2026-03-09 18:32:34.301 Error: MesIO: or: sudo pip3 install gpiod --break-system-packages
2026-03-09 18:32:34.307 Status: MesSorties: Initialized version 2.0.1, author 'Mibeus'
2026-03-09 18:32:34.310 MesSorties: Domoticz RPI GPIO plugin starting
2026-03-09 18:32:34.311 MesSorties: Plugin path: /opt/domoticz/userdata/plugins/DomoticzRPIGPIO
2026-03-09 18:32:34.311 MesSorties: Loading configuration from: /opt/domoticz/userdata/plugins/DomoticzRPIGPIO/gpio_config.json
2026-03-09 18:32:34.311 MesSorties: Configuration loaded successfully
2026-03-09 18:32:34.313 Error: MesSorties: gpiod module not found! Install it with:
2026-03-09 18:32:34.313 Error: MesSorties: sudo apt install python3-libgpiod
2026-03-09 18:32:34.313 Error: MesSorties: or: sudo pip3 install gpiod --break-system-packages
2026-03-09 18:32:34.377 Status: PluginSystem: 2 plugins started.
However, libgpiod is well installed, I can gpioinfo, gpioset... I guess there is a path conflict !
hours and hours lost for nothing.
What to do now ? Any help welcome
from the log file :
Plugin path: /opt/domoticz/userdata/plugins/DomoticzRPIGPIO
This path doesn't exist. In opt, I do have containerd and WidevineCdm directories. So I created the full path and placed gpio_config.json here. No improvment at all . I wish you a good night.
Hello,
I moved to docker on November (I did not have any time to move to bookworm and reinstall everything), since I use https://github.com/flyte/mqtt-io andI run it as service to expose gpio throught MQTT and use MQTTmapper plugin to update domoticz, It's working well since november even for input (pulse of flowmeter or gate push button) and for output (heating control via "fil pilote" sorry it is french, gate control)
I hope help...