[SOLVED] Phoscon app not working with username different than pi

Hi all,

I have issues with deconz running on a Raspberry Pi 4. Hardware I use is the following:

  1. Osram smart+ switch
  2. Phoscon Conbee II (Firmware: 266F0700)
  3. Raspberry Pi 4


  1. Raspberry Pi OS (latest version)
  2. Deconz (version: 2.11.05 / 2021-05-09) installed according to official Phoscon webpage: ConBee II Installation

I have used the Conbee II and Osram switch mentioned above for more than one year on a Raspberry Pi 3B+ and everything has always worked fine. Deconz was installed on raspberry pi os as described in Phoscon website.

I have now moved the Conbee II dongle to a Raspberry Pi 4. I have done a fresh install of the OS and installed deconz as mentioned above. I have also enabled the systemd service by using the command: “sudo systemctl enable deconz”, exactly like I did in the Raspberry Pi 3B+.

If I run “lsudb” in the Pi 4 I get the following:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1cf1:0030 Dresden Elektronik
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In addition, the Phoscon app is reachable from the browser and I can see the proper firmware number in the menu Settings → Gateway. Thus, everything points out that the dongle is correctly recognized. However, if in the Phoscon app I search for the Osram switch it is never found. I have tried countless times but with no success. I have also tryied rebooting the Pi, unistalling and reinstalling deconz but nothing changed.

Interestingly I found that there are two situations where the Phoscon app works well:

  1. If I stop the systemd service deconz and manually run deconz gui, the Phoscon app behaves correctly and I can easily find and add the Osram switch.

  2. If I close deconz gui and run from terminal the command below, it also works well and I can add the Osram switch from the Phoscon app:
    “/usr/bin/./deCONZ -platform minimal --http-port=8082 --ws-port=20877”

Since I absolutely need that the deconz software runs automatically every time the Pi boots, the two options above are not ok for me. The workaround I have found so far is to start deconz at boot by adding the command below in /etc/rc.local:

“/usr/bin/./deCONZ -platform minimal --http-port=8082 --ws-port=20877 &”

However this is not great because if deconz crashes it will not self restart. Do any of you have any clue or hint on what could the problem be? I would really like to get deconz and Phoscon app properly working when running from systemd service.

Thanks in advance for the help!


Hello, remember you can’t have 2 deconz instance running.

sudo systemctl status deconz
sudo systemctl status deconz-gui

You need to have one running and an error for the second one.

If you use “-platform minimal” not possible you can have the GUI.


Thank you for your reply. Yes I know, I have always run only one at time, so when I was running deconz I stopped deconz-gui and vice versa.

I know also the purpose of “-platform minimal”. The point is exactly that I don’t need the gui, I need the deconz (non-gui) to be able to run automatically at startup from systemd. So far it works only if I run it manually in a terminal or at startup with rc.local. But if I run it using systemd the phoscon app runs but behaves oddly since it doesn’t find any zigbee device.

I know my post was very long and maybe not super clear, but I tried to add as much information as possible.

No don’t worry, I have a bad english, so I can have some problem to understand.

What happen if you try

sudo systemctl disable deconz-gui
sudo systemctl disable deconz
sudo systemctl stop deconz-gui
sudo systemctl stop deconz
sudo systemctl enable deconz

And you will perhaps have some usefull information on result on the last command.

IDK if running deconz in debug mode can be usefull for you, as all is working if you run it using command line.

Do you think that it make it working are the port used in the command line ?

I have run the commands you suggested, see below. But I did make sure before that deconz-gui was stopped and disabled.

To run it in debug mode you mean by parsing the following arguments?
“–dbg-error=2 --dbg-info=2 > debug.txt”
I have tried but I get a lot of text and is hard to follow what’s happening. I have tried this debugging when running manually on a terminal, but since in this case it works I guess it’s less useful. Maybe I should save the log when running from systemd?

Regarding the ports (different from default) I initially did not change them, I did not modify the deconz.service in systemd. However, since it wasn’t working properly I tried to change them as I have read in some forum that using port 80 can cause issues. But no improvements, the behavior is the same.

By the way, every time I disable the autorun of deconz from rc.local and enable the autorun of deconz with systemd, the Phoscon app asks me to choose a new password (see screenshot below). It looks like if it was a different deconz program running. I don’t get why, since it should be the same executable

This below is a screenshot of deconz’s status when running from systemd and saving the log in a file. Unfortunately it doesn’t save any file in the path I specified, not sure why.

And can you make the same command when phoscon is not able to add the osram bulb (to compare) ?

I have now managed to save the log to a file, see below. For those that like me didn’t know how to, I have used the command: “journalctl -e -u deconz.service > /home/pi4/debug.txt”

The log below was recorded while I tried to pair my zigbee osram switch. I don’t understand much of it, probably you understand a lot more than me. But what did catch my attention is that sometimes it is trying to access the “pi” user, for instance:

“Aug 03 08:29:11 raspberrypi deCONZ[2651]: 08:29:10:937 ZCLDB failed to create /home/pi/.local/share/dresden-elektronik/deCONZ/zcldb.txt: No such file or directory”

I have deleted the pi user well before to install deconz and created a pi4 user. So deconz has been installed from the pi4 user and when pi user did no longer exist. Maybe this is the issue? In my Raspberry Pi 3B+ I had the standard pi user and deconz was working properly.

How can I tell deconz to only use the pi4 user? Am I forced to recreate the pi user again?


The forum did not allow me to paste the whole log here as it was too long, so I have put it in my google drive:



Thanks Smanar, I have found the solutions thanks to your comments. Thanks a lot!!

The problem was that when I created the user pi4 (well before installing deconz) I thought that I managed to delete the user pi, but actually it wasn’t deleted. I also deleted the “/home/pi” folder however.

So from the log I could see that deconz was looking for a file in the pi home folder:

“Aug 03 08:29:11 raspberrypi deCONZ[2651]: 08:29:10:937 ZCLDB failed to create /home/pi/.local/share/dresden-elektronik/deCONZ/zcldb.txt: No such file or directory”


What I did is to add “User=pi4” in /lib/systemd/system/deconz.service

Now the phoscon app works properly using deconz running from systemd.

I hope this thread can be of help for other users that will make the same mistake I did to remove the pi home folder!

But something I don’t understand, from my memory the issue where you need to be “pi” is solved now.
You had the problem because the folder “pi” was not deleted ? USER=1000 is not enought to make it working ?

Yes, it works with a username different than “pi”, but you need to define your username in the deconz.service file.

If you don’t do that, deconz runs but it doesn’t have proper access to all the files it needs to work with. In my case it couldn’t access a database. This make sense with my experience that, every time I was rebooting the raspberry pi, the phoscon app was asking me to choose a password, like the first time you run the app.

1 Like