Skip to content

--dev flag regression past 2.05.77 for deCONZ #5006

Closed

Description

@Red-M

Describe the bug

deCONZ no longer connects to the raspbee.
I'd like to update my deCONZ package due to the age of the package for new features and security reasons.

Steps to reproduce the behavior

Any deCONZ version above 2.05.77 fails to connect to the device over an SSH tunnelled virtual serial device

Expected behavior

No regression from 2.05.78 onward.

Screenshots

image
image

Environment

deCONZ/Phoscon versions as per above

  • Host system: x86 VM
  • Running method: Rpi 0W with a RaspBee II (I also have a RaspBee that I can test with as well)
  • Firmware version: 26690700
  • deCONZ version: 2.05.77 tested on 2.11.05-debian-buster-stable and 2.12.00-ubuntu-xenial-beta
  • Device: RaspBee I/RaspBee II
  • Do you use an USB extension cable: No
  • Is there any other USB or serial devices connected to the host system? If so: Which? No

deCONZ Logs

2.05.77 has:
15:52:21:724 COM: --dev: /home/redm/ttyAMA0 (RaspBee)
Where as any version onward does not have this line.
I am running deCONZ via /usr/bin/deCONZ --dev=/home/redm/ttyAMA0 --upnp=0 on any version I test.

Additional context

While the serial redirect may seem odd, it worked in the past and was the entire reason I wanted a deCONZ set up.
The reason for doing it this way is that it makes integration with my VM cluster much easier and deCONZ in its entirety is backed up nightly and I don't have to worry about the rpi dying or the SD card in the pi dying.

Activity

  1. changed the title [-]`--dev` feature regression past 2.05.77[/-] [+]`--dev` flag regression past 2.05.77 for `deCONZ`[/+] on Jun 13, 2021
  2. added this to the v2.12.2-beta milestone on Jun 15, 2021
  3. manup commented on Jul 2, 2021

    @manup
    Member

    Is /home/redm/ttyAMA0 a symlink to another file?

    I'm asking because the current code already handles ttyAMA* as long as it's in the system location.

  4. Red-M commented on Jul 2, 2021

    @Red-M
    Author

    its technically a serial device presented via remserial in this case.

  5. manup commented on Jul 2, 2021

    @manup
    Member

    Can you please provide the output of:

    ls -l /home/redm/ttyAMA0

    The early log output of starting deCONZ as follows would also help, there should be some "COM: ..." lines printed.

    deCONZ --dbg-info=1 --dev=/home/redm/ttyAMA0
    
  6. Red-M commented on Jul 2, 2021

    @Red-M
    Author

    That COM line never shows up on later versions.

    $ ls -l /home/redm/ttyAMA0
    lrwxrwxrwx 1 redm redm 10 Jul  2 21:01 /home/redm/ttyAMA0 -> /dev/pts/0
    
  7. manup commented on Jul 2, 2021

    @manup
    Member

    Sorry my bad wrong debug level, should be 2:

    deCONZ --dbg-info=2 --dev=/home/redm/ttyAMA0
    

    $ ls -l /home/redm/ttyAMA0
    lrwxrwxrwx 1 redm redm 10 Jul 2 21:01 /home/redm/ttyAMA0 -> /dev/pts/0

    Hm interesting so the real device is /dev/pts/0.

  8. Red-M commented on Jul 2, 2021

    @Red-M
    Author

    Yeah I know the line you're asking for, it doesn't show up on newer versions.

  9. manup commented on Jul 2, 2021

    @manup
    Member

    Even with debug level 2?

    COM: ... should always be printed for all serial com devices which are supported by Qt, there is no filter at this point where it is printed.

  10. Red-M commented on Jul 2, 2021

    @Red-M
    Author

    2.05.77

    $ /usr/bin/deCONZ -platform minimal --http-port=8125 --auto-connect=1 --dev=/home/redm/ttyAMA0 --dbg-info=2 | grep COM
    libpng warning: iCCP: known incorrect sRGB profile
    23:21:38:638 CTRL. 3.27.223:21:38:704 COM: --dev: /home/redm/ttyAMA0 (RaspBee)
    23:21:42:556 COM: --dev: /home/redm/ttyAMA0 (RaspBee)
    This plugin does not support propagateSizeHints()
    This plugin does not support propagateSizeHints()
    

    2.11.05

    $ /usr/bin/deCONZ -platform minimal --http-port=8125 --auto-connect=1 --dev=/home/redm/ttyAMA0 --dbg-info=2 | grep COM
    libpng warning: iCCP: known incorrect sRGB profile
    This plugin does not support propagateSizeHints()
    This plugin does not support propagateSizeHints()
    
  11. manup commented on Jul 2, 2021

    @manup
    Member

    Thanks, I compared the code between these versions, turns out the Qt device enumerator doesn't list this particular path as serial com (regardless of the version) as there would be a different debug print in both versions.
    https://doc.qt.io/qt-5/qserialportinfo.html#availablePorts

    The difference to the old version is that the given path was used anyway if not listed by Qt, I'll try to add this as fallback.

  12. Red-M commented on Jul 2, 2021

    @Red-M
    Author

    thanks, pts devices are actually for pseudo terminal slave devices so its understandable that Qt might remove them for "real" serial devices.

  13. manup commented on Jul 6, 2021

    @manup
    Member
  14. Red-M commented on Jul 6, 2021

    @Red-M
    Author

    This works!
    Sadly though there were too many timeouts (which was causing deconz to disconnect from the raspbee2 and try again after 15 seconds) so I had to switch from my pi0w to a pi3-somthing with an ethernet cable (it doesn't look as nice) but its working now.

  15. manup commented on Jul 6, 2021

    @manup
    Member

    Not sure if it can be configured for the tunnel, but for TCP connections the TCP_NODELAY option might help with timeouts.

  16. Red-M commented on Jul 7, 2021

    @Red-M
    Author

    I just added the feature to Red-M/RedSSH@895be69 which turned TCP_NODELAY on for the SSH session and the tunnel. Even on ethernet this is way faster than before and the zigbee network is much more responsive than before.

  17. Red-M commented on Jul 12, 2021

    @Red-M
    Author

    I've been running this for about a week now without any major issues, so if this will be brought into the next stable, I'd consider this resolved.

  18. manup commented on Jul 12, 2021

    @manup
    Member

    Cool, thanks for the feedback, it will also be part of the upcoming v2.12.2-beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions