Page 1 of 1

Blocked at initial setup (totally new on this system)

Posted: Friday 31 October 2025 12:18
by happyuser
I know raspberry and have had projects with it. I wanted to build a domotic project with a Pi3 and decided to try Domoticz. Installation ran great and the firts screen appeared magically. All I wanted to do for test was to activate GPIO port and build some switch on it. I followed the advices given here and began writing the first command lines : using gpio2 I wrote "echo 2 > /sys/class/gpio/export" and no reaction, the command was accepted.
I tried the second one "echo out> /sys/class/gpio/gpio2/direction" and I got an error message telling that there was no such file or directory.
I tried to list the content of the directory gpio and obtained that :
pi@lambda:/sys/class/gpio $ ls
export gpiochip512 gpiochip566 unexport
No gpio2 directory!
I tried to see what was in export file by "cat export" but it was answered "permission denied".
I dont know what to do to add the hardware option of gpio . Have I forgot something essential.
Who could help me and give me advices to progress?
Thank you

Re: Blocked at initial setup (totally new on this system)

Posted: Friday 31 October 2025 17:23
by Rik60
happyuser wrote: Friday 31 October 2025 12:18 I know raspberry and have had projects with it. I wanted to build a domotic project with a Pi3 and decided to try Domoticz. Installation ran great and the firts screen appeared magically. All I wanted to do for test was to activate GPIO port and build some switch on it. I followed the advices given here and began writing the first command lines : using gpio2 I wrote "echo 2 > /sys/class/gpio/export" and no reaction, the command was accepted.
I tried the second one "echo out> /sys/class/gpio/gpio2/direction" and I got an error message telling that there was no such file or directory.
I tried to list the content of the directory gpio and obtained that :
pi@lambda:/sys/class/gpio $ ls
export gpiochip512 gpiochip566 unexport
No gpio2 directory!
I tried to see what was in export file by "cat export" but it was answered "permission denied".
I dont know what to do to add the hardware option of gpio . Have I forgot something essential.
Who could help me and give me advices to progress?
Thank you
What I did was put the next text in de file domoticz.sh in the /etc/inid.d directory at the end after esac:

Code: Select all

#relay pos1
echo 529 > /sys/class/gpio/export
sudo sh -c "echo '1' >> /sys/class/gpio/gpio529/active_low"  # gpio529 was gpio17
echo high > /sys/class/gpio/gpio529/direction

#relay pos2
echo 530 > /sys/class/gpio/export
sudo sh -c "echo '1' >> /sys/class/gpio/gpio530/active_low"  # gpio530 was gpio18
echo high > /sys/class/gpio/gpio530/direction
This worked for me after a clean install of Bullseye/ Trixie and domoticz 2025.1/ 2025.2 running on a Rpi3B+
You have to, or already have, created hardware: generic sysfs GPIO

Re: Blocked at initial setup (totally new on this system)

Posted: Sunday 02 November 2025 21:35
by happyuser
Thank you Rik60
I tried what you suggested without success.
I noticed that I could have actions on gpio through command line orders but not the ones that are suggested. I suppose I have a more recent gpio librairy something like gpiochipN and not sysfs gpio that is said to be deprecated.
For example rather than "echo 2 > /sys/gpio/export" I could use something like "gpioset gpiochip0 2=1" and the Led swithed on.
I imagined that my OS was too recent and I tried with another SD card on whitch raspbian bullseye was installed.
When I tried to install DOMOTICZ, I was told that openSSL 3 was required. I updated OpenSSL to version 3.0.1 and installed Domoticz. The installation ran well and finished saying :

dzVents/documentation/history.md
dzVents/documentation/dzvents-smoothing.png
::: Restarting services...
:::
::: Enabling domoticz.sh service to start on reboot... done.
:::
::: Starting domoticz.sh service... done.
::: done.
:::
::: Installation Complete! Configure your browser to use the Domoticz using:
::: 192.168.1.31:8085
::: 192.168.1.31:443
pi@Alter:/etc/domoticz $

I was convinced that I had succeded and that I was about to start Domoticz. Unfortunately, when I tried to connect to my Domoticz server, I got "la connexion a échoué" or "Unable to connect". The Domoticz server seemed not to be waiting a connexion.
Do you know what could be wrong in the installation? Where could I know if the installation went ok, in /etc/domoticz directory, I do not see any log file, just a file setupVars.conf.
Any idea of what I could do to get a responsive installation of domoticz?

Re: Blocked at initial setup (totally new on this system)

Posted: Tuesday 04 November 2025 17:46
by FlyingDomotic
Domoticz log is setup in domoticz service startup file (it can be on syslog, or on some dedicated files, like /var/log/domoticz.log or /tmp/domoticz.log)

Having a look to this startup file could help understanding where log is written (you may even modify it !)

Startup file is often in /etc/init.d/domoticz.sh

Re: Blocked at initial setup (totally new on this system)

Posted: Tuesday 04 November 2025 20:38
by Rik60
Is it possible for you to login in your Rpi? If yes, try to open a terminal session (on another computer using Putty, SSH connection). type the command ps -A. There should be a list with running processes. Domoticz should be one of them. If not, start de domoticz service by typing sudo service domoticz start. Wait a few seconds and type ps -A again. Check the list for Domoticz. Is domoticz in the list, try with a browser to make a connection with domoticz. If still not possible to connect to Domoticz, check again for the running processes. Is Domoticz not in the list, try to find the reasson, hopefully there is a domoticz crach log in the domoticz folder (/home/pi/domoticz)

Re: Blocked at initial setup (totally new on this system)

Posted: Monday 26 January 2026 20:35
by xavierm
Hi,
It was working on my Rpi3/Bookworm
I have to move to Rpi5/Trixie
None of the (connect as root or pi with sudo)
- gpio export 6
- echo 6 > /sys/class/gpio/export
...
are working anymore
I can do
/usr/bin/gpio -g mode 6 out
sudo pinctrl set 6 op

But for Domoticz 2025.2 / Generic sysfs GPIO no export seen

How do I export GPIO 6 out

Please help

Re: Blocked at initial setup (totally new on this system)

Posted: Monday 26 January 2026 20:42
by waltervl
When you read back in this thread you can learn that in newer OS the GPIO numbering has changed.

And also the old GPIO system is not working anymore.

Re: Blocked at initial setup (totally new on this system)

Posted: Tuesday 27 January 2026 8:05
by xavierm
Hi,
Thanks
How do I find the equivalent gpio number for echo command (I'v read gpio529 was gpio17) ?

I need new number for old gpio 6,21,26
I've set
sudo pinctrl set 6,21,26 op
sudo pinctrl | grep GPIO6 => 6: op dl pu | lo // GPIO6 = output
But not seen by Domoticz
BR

Re: Blocked at initial setup (totally new on this system)

Posted: Tuesday 27 January 2026 9:32
by Rik60
I think you will find the new GPIO numbers in the file /sys/kernel/debug/gpio. Also i think you can find the new gpio numbers by adding 512 to your old gpio number, gpio 6 will be gpio 518

Re: Blocked at initial setup (totally new on this system)

Posted: Tuesday 27 January 2026 12:08
by xavierm
Hi,
Thanks
I will try
At first look
cat /sys/kernel/debug/gpio | grep GPIO6 => gpio-575 (GPIO6
cat /sys/kernel/debug/gpio | grep GPIO21 => gpio-590 (GPIO21
cat /sys/kernel/debug/gpio | grep GPIO26 => gpio-595 (GPIO26
So seems that : NewGIPO=OldGPIO+569