Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial com disconnected, reason: 4 #227

Closed
abmantis opened this Issue Oct 14, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@abmantis
Copy link

abmantis commented Oct 14, 2017

For some reason, deCONZ cannot connect with ConBee anymore, giving me the "Serial com disconnected, reason: 4" error.
It was working correctly before I mistakenly ran it with sudo.

Any tips? Reason 4 is a little vague :(

@manup

This comment has been minimized.

Copy link
Contributor

manup commented Oct 15, 2017

Which platform are you using, Raspbian or Ubuntu?

The permissions of the USB device /dev/ttyUSB0 should be met by the user running deCONZ, therefore check that the user pi is in group dialout:

    # shows which groups current user is in
    $ groups 

    # if the user is not in group dialout, add it (reboot required)
    $ sudo gpasswd -a pi dialout
@sophof

This comment has been minimized.

Copy link

sophof commented Feb 25, 2018

I have the same problem and my user is in the dialout group and the permissions on /dev/ttyUSB0 are:
"crw-rw-rw- 1 root dialout"

So apparently this isn't the issue? Does anyone know what reason 4 actually is?

@manup

This comment has been minimized.

Copy link
Contributor

manup commented Feb 25, 2018

Can you provide more detail?
OS?
Also after adding the user to dialout, a reboot/relogin is needed before settings are valid.

@sophof

This comment has been minimized.

Copy link

sophof commented Feb 25, 2018

@manup

This comment has been minimized.

Copy link
Contributor

manup commented Feb 25, 2018

Hmm I don't know what it is.
Can you please start deCONZ with more verbose error logging, this will print more detail for this particular error.

$ deCONZ --dbg-error=2 --dbg-info=1 -platform minimal

Also make sure that only one instance is running (I've seen this issue often recently).

$ ps ax | grep deCONZ
@sophof

This comment has been minimized.

Copy link

sophof commented Feb 26, 2018

@manup

This comment has been minimized.

Copy link
Contributor

manup commented Feb 28, 2018

Hmm to be honest I don't know where the problem is.

Maybe $ sudo journalctl -xb -f provides more information when the error occurs?

@tumik

This comment has been minimized.

Copy link

tumik commented Oct 5, 2018

I had the same issue on my Debian 9 server, appeared after updating deCONZ and accidentally running it with a different user (after systemd files were overwritten).
First I got the error:
Serial com disconnected, reason: 4

When running with:
$ deCONZ --dbg-error=2 --dbg-info=1 -platform minimal
I got the following error:
COM failed to open /dev/ttyUSB0: Permission error while locking the device

The problem was a stale lock file at /run/lock/LCK..ttyUSB0 where only root had permissions to delete it.
I made sure no deCONZ instances are running, deleted the lock file and re-started deconz. This fixed the issue.

I believe this issue can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.