Blocked at initial setup (totally new on this system)

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
happyuser
Posts: 3
Joined: Friday 31 October 2025 12:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blocked at initial setup (totally new on this system)

Post 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
Rik60
Posts: 141
Joined: Sunday 25 June 2023 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: The Netherlands
Contact:

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

Post 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
happyuser
Posts: 3
Joined: Friday 31 October 2025 12:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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?
FlyingDomotic
Posts: 463
Joined: Saturday 27 February 2016 0:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

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

Post 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
Rik60
Posts: 141
Joined: Sunday 25 June 2023 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: The Netherlands
Contact:

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

Post 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)
xavierm
Posts: 4
Joined: Sunday 25 January 2026 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

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

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
xavierm
Posts: 4
Joined: Sunday 25 January 2026 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
Rik60
Posts: 141
Joined: Sunday 25 June 2023 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: The Netherlands
Contact:

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

Post 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
Attachments
Domoticz_Bookworm_GPIO.jpg
Domoticz_Bookworm_GPIO.jpg (75.23 KiB) Viewed 55 times
xavierm
Posts: 4
Joined: Sunday 25 January 2026 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest