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

Issue : Conbee2 and ZHA not able to connect. #30682

Closed
N5A opened this issue Jan 11, 2020 · 29 comments
Closed

Issue : Conbee2 and ZHA not able to connect. #30682

N5A opened this issue Jan 11, 2020 · 29 comments
Assignees

Comments

@N5A
Copy link

N5A commented Jan 11, 2020

Issue : Conbee2 and ZHA not able to connect.
Error : Unable to connect to ZHA device.
Conbee2 radio.

Home Assistant 0.103.6

Hass.io supervisor
Version 195
Latest version 195

Host system
Hostname hassio
System HassOS 3.7
Deployment production

Hassio running as a VM on a windows 10 host minipc. VM Software is Oracle VirtualBox.
downloaded the prebuilt Vm from home assistant site links.

Adding of ZHA integration fails during the first step. device path used is /dev/ttyACM0 or the /dev/serial/by-id/usb-dresden_elektronik_... both result in the above error. Below is the log section related..

2020-01-11 13:57:50 INFO (MainThread) [zigpy_deconz.zigbee.application] Forming network
2020-01-11 13:57:52 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.write_parameter' command
2020-01-11 13:57:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 210, in _command
    return await asyncio.wait_for(fut, timeout=COMMAND_TIMEOUT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
2020-01-11 13:57:52 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.write_parameter' command
2020-01-11 13:57:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/zigbee/application.py", line 36, in _reset_watchdog
    await self._api.write_parameter(NetworkParameter.watchdog_ttl, 3600)
  File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 210, in _command
    return await asyncio.wait_for(fut, timeout=COMMAND_TIMEOUT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

Zwave system does work with this HA installation. so USB devices are being properly passed in. Removed Zwave stick and power cycled to test and results did not change. ZHA and Conbee2 still would not connect.

@probot-home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, mind taking a look at this issue as its been labeled with a integration (zha) you are listed as a codeowner for? Thanks!

@Adminiuga
Copy link
Contributor

Did you remove deConz plugin from hassio?
Are you using an USB extension cable for ConBee?
If you have available, could you use USB 2 port for ConBee?

@Adminiuga
Copy link
Contributor

However on the side note. I couldn't get ConBee II working with deConz on virtual box. Same vm works fine older conbee

@N5A
Copy link
Author

N5A commented Jan 14, 2020

Deconz was fully removed. Two separate USB ports have been used. PC only equipped with USB3s. Zwave Aeotec stick operates and is stable. Have tried with Conbee2 alone as well.

@Adminiuga
Copy link
Contributor

ZWave is not succeptible to 2.4GHz interference on USB3.0 ports.

Are you using an USB extension cable for ConBee?

are you ?
Configure ZHA integration manually, In your configuration.yaml put

zha:
    usb_path: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE1995634-if00
    radio_type: deconz

Replace the usb_path with the value matcning your serial id. Enable debug logging and restart HA. I'd like to see if ZHA fails on the 1st command or if any commands go through.

@N5A
Copy link
Author

N5A commented Jan 14, 2020

I forgot to address that, no I don't have it on a cable. I'll look for one in my collection in the morning and move it away from the PC.

@dmulcahey
Copy link
Contributor

As crazy as it sounds it’s actually a thing with the ConBee devices. https://phoscon.de/en/conbee2/install

From the main page:

47C9787A-4B6A-44C7-B9B3-AA09329DA30D

@Adminiuga
Copy link
Contributor

This is what I suspect. There were reports of ConbeeII boot looping dresden-elektronik/deconz-rest-plugin#1598

Per your log you get 2020-01-11 13:57:50 INFO (MainThread) [zigpy_deconz.zigbee.application] Forming network which implies the Conbee was responding to the commands until now and stopped responding, so I strongly suspect your conbee just resets on the watchdog because of all the noise. I can only recommend and USB extension cable (good one, not too short <1ft) and keeping Conbee away from the server and any other USB3 devices/cables.

@N5A
Copy link
Author

N5A commented Jan 14, 2020

Added USB extension cable. Found it does have a USB 2.0 port to use, Conbee2 plugged into that on a 8ft USB extender. Same issues. The pair on the back are usb2.0 Thought they were 3.0 It was initially there but was butted right up to the zwave one and they were pressing to hard at the port. moved conbee2 to the front to see if that fixed the issue. It made no change. Adding the cable also made no change.

Log file is 13 megs for one HA startup.

I do get a line on my VM's screen when I attempt to add ZHA integration.
"cdc_acm 2-2:1.0 failed to set dtr/rts"

This is the solitary line that is added to the log when attempting to add the ZHA integration
"2020-01-14 10:08:53 WARNING (MainThread) [zigpy_deconz.api] No response to 'Command.read_parameter' command"

Now after manually adding ZHA to config yaml and restarting HA
This is in the home-assistant.log (its 13 megs worth of stuff, snipped out what looks useful. if you need full let me know.)

2020-01-14 10:21:48 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=discovery>
2020-01-14 10:21:48 INFO (MainThread) [homeassistant.setup] Setting up group
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.setup] Setting up zha
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.setup] Setup of domain zha took 0.0 seconds.
2020-01-14 10:21:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=zha>
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.setup] Setting up scene
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.setup] Setting up ssdp
2020-01-14 10:21:49 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.0 seconds.
2020-01-14 10:21:49 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=ssdp>
--snipped--
2020-01-14 10:21:52 DEBUG (SyncWorker_1) [homeassistant.util.json] JSON file not found: /config/.storage/zha.storage
--snipped--
2020-01-14 10:21:56 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2131769-if00 for zha
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 192, in async_setup
hass, self
File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 106, in async_setup_entry
await zha_gateway.async_initialize()
File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 124, in async_initialize
await self.application_controller.startup(auto_form=True)
File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/zigbee/application.py", line 45, in startup
self.version = await self._api.version()
File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 310, in version
(self._proto_ver,) = await self[NetworkParameter.protocol_version]
File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 280, in read_parameter
r = await self._command(Command.read_parameter, 1 + len(data), param, data)
File "/usr/local/lib/python3.7/site-packages/zigpy_deconz/api.py", line 210, in _command
return await asyncio.wait_for(fut, timeout=COMMAND_TIMEOUT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
2020-01-14 10:21:56 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast.discovery] add_service _googlecast._tcp.local., Google-Cast-Group-1ad87d7dc92a4397935cfa3b89f94264-1._googlecast._tcp.local.

@N5A
Copy link
Author

N5A commented Jan 15, 2020

This is what I suspect. There were reports of ConbeeII boot looping dresden-elektronik/deconz-rest-plugin#1598

Per your log you get 2020-01-11 13:57:50 INFO (MainThread) [zigpy_deconz.zigbee.application] Forming network which implies the Conbee was responding to the commands until now and stopped responding, so I strongly suspect your conbee just resets on the watchdog because of all the noise. I can only recommend and USB extension cable (good one, not too short <1ft) and keeping Conbee away from the server and any other USB3 devices/cables.

See above. the added USB cable allows me to stick it far enough away to not be interfered with by the minipc, or other devices attached to it. I have about 4ft of physical separation between them.

@Adminiuga
Copy link
Contributor

Well, now it fails on the very 1st command, but apparently opens the port successfully. I don't know what to advise next. Remove zha from configuration.yaml and then remove ZHA integration from the config panel and try adding it again.

@Adminiuga
Copy link
Contributor

and I can't get HassOS in Virtualbox to connect to ConBeeII.
How have you configured your virtual box? What image, what settings etc?

@N5A
Copy link
Author

N5A commented Jan 15, 2020

Used the VDI from here - https://www.home-assistant.io/hassio/installation/
Configed in VBox...

Ubunt64
PIIX3 chipset
EFI
USBs.. Filters added for ConbeeII and Aeotec Sticks.

@Adminiuga
Copy link
Contributor

ok, what worked for me:

  1. In Virtual box, make sure the type is Linux is version is "Ubuntu 64-bit" for the VM general settings
  2. for USB I'm using USB 3.0 xHCI controller

This allowed me to successfully configure ZHA integration.

@Adminiuga
Copy link
Contributor

Hrm, pretty close to what I have. Dunno, try changing USB Controller for VM to USB2 EHCI?

@Adminiuga
Copy link
Contributor

here's my VM config

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-windows">
  <Machine uuid="{9289bfd2-da9c-450d-a0b1-87c23fa21cb8}" name="HassOS" OSType="Ubuntu_64" snapshotFolder="Snapshots" lastStateChange="2020-01-15T17:30:24Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{32a848af-c0f2-45f1-9367-1ebe2727b3b5}" location="V:/VMs/HassOS/hassos_ova-3.8.vmdk" format="VMDK" type="Normal"/>
      </HardDisks>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/LastCloseAction" value="PowerOff"/>
      <ExtraDataItem name="GUI/LastNormalWindowPosition" value="679,67,1024,810"/>
    </ExtraData>
    <Hardware>
      <CPU>
        <PAE enabled="true"/>
        <LongMode enabled="true"/>
        <X2APIC enabled="true"/>
        <HardwareVirtExLargePages enabled="true"/>
      </CPU>
      <Memory RAMSize="3172"/>
      <Firmware type="EFI"/>
      <HID Pointing="USBTablet"/>
      <Boot>
        <Order position="1" device="HardDisk"/>
        <Order position="2" device="None"/>
        <Order position="3" device="None"/>
        <Order position="4" device="None"/>
      </Boot>
      <Display VRAMSize="16"/>
      <VideoCapture fps="25" options="ac_enabled=false"/>
      <BIOS>
        <IOAPIC enabled="true"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="xHCI" type="XHCI"/>
        </Controllers>
        <DeviceFilters>
          <DeviceFilter name="dresden elektronik ingenieurtechnik GmbH ConBee II [0100]" active="true" vendorId="1cf1" productId="0030" revision="0100" manufacturer="dresden elektronik ingenieurtechnik GmbH" product="ConBee II" serialNumber="DE1995634" remote="0"/>
        </DeviceFilters>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027A77151" type="82540EM">
          <DisabledModes>
            <InternalNetwork name="intnet"/>
            <NATNetwork name="NatNetwork"/>
          </DisabledModes>
          <BridgedInterface name="Intel(R) Ethernet Connection (2) I219-V"/>
        </Adapter>
      </Network>
      <AudioAdapter driver="DirectSound" enabledIn="false"/>
      <RTC localOrUTC="UTC"/>
      <GuestProperties>
        <GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1579108698584978000" flags=""/>
      </GuestProperties>
    </Hardware>
    <StorageControllers>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
          <Image uuid="{32a848af-c0f2-45f1-9367-1ebe2727b3b5}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
    <Groups>
      <Group name="/New group"/>
    </Groups>
  </Machine>
</VirtualBox>

@N5A
Copy link
Author

N5A commented Jan 15, 2020

last night I turned off debug logging as the log just kept growing. set it back to Info. I still get the same erros/messages. failed to set dtr/rts. that seems to indicate a comm problem to the conbee2?

@N5A
Copy link
Author

N5A commented Jan 15, 2020

Already set as 2.0

@N5A
Copy link
Author

N5A commented Jan 15, 2020

Note: Reinstalled Deconz and it works without an issue. So the issue is not the Conbee2 passing through to the VM. that link appears solid. so its inbetween Hassio and ZHA integration

@Adminiuga
Copy link
Contributor

The only difference I see, the HassOS is 3.8 which was released today and I'm on 3.8

I can't reproduce the issue (unless I change VM type to Other Linux 64), but it is hassio, on VM, with USB pass through. I'm not sure if anyone else is running similar setup.

@Adminiuga
Copy link
Contributor

Ok, so i've been using ConBee II with my dev VM on Virtualbox host on Win 10 and it was working fine and then just quit.

Conbee is not responding to any commands sent to it on UART nor deCONZ can connect it. I'm closing this issue as I don't believe the problem is related to ZHA itself.

@Adamados
Copy link

ZWave is not succeptible to 2.4GHz interference on USB3.0 ports.

Are you using an USB extension cable for ConBee?

are you ?
Configure ZHA integration manually, In your configuration.yaml put

zha:
    usb_path: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE1995634-if00
    radio_type: deconz

Replace the usb_path with the value matcning your serial id. Enable debug logging and restart HA. I'd like to see if ZHA fails on the 1st command or if any commands go through.

God bless you :)
Work for me this trick

My set-up

Windows 10
Virtual Box 6.1
Home Assistant OS

Now after every reboot ZHA work, moved from deConz add-on because i had a lot of problems and unstable operations

@soostdijck
Copy link

Very cool, my conbee II wasn't detecting my (first) device that I wanted to connect. Moved the stick to a usb1 port with a extension cable and it's working great now!

@scottda4270
Copy link

sorry i know this is an old thread but been using conbee II for about 9 months or so now. It works but its a bit of a faff and needs some care and attention on every restart of HA. Pretty much the same config as above but when HA boots (virtualbox install) i have to wait for HA to fully start, recognise that the conbee is not working (every time), then go back to virtual box and disconnect/reconnect the usb device from the task bar at the bottom of the virtual session. Literally right click on the usb, select conbee to disconnect, then reconnect. Give it a few seconds and it all works. Drives me mad everytime i restart the virtual machine and if i am not at home i cant resolve till i get come as i dont have remote access to the host right now. Any ideas would be more than appreciated. thank you

@Adminiuga
Copy link
Contributor

Virtual box does do that. Can only recommend running the ConBee on some RPi with a serial TCP server and connect ha instance via serial over TCP

@scottda4270
Copy link

Ah that’s a pain. Was trying to keep it all on the same box if possible. Do you know if I would have the same issue if I used an alternative usb stick for zigbee. My aoetec zwave is rock solid. Thanks

@N5A
Copy link
Author

N5A commented Sep 14, 2021

I separated the two. Zigbee is handled by a RPi, Deconz runs happy as can be there. 90% of my network is Zwave. the color lights a Zigbee, Zwave color lights just seem weaker in color reproduction.

@scottda4270
Copy link

thanks @N5A , i guess i could run the deconz on the host itself? (win 10 pc), any guides on how to do this simply? currently using zigbee home automation integration

@N5A
Copy link
Author

N5A commented Sep 15, 2021

You could but invest $60-$100 bucks into a RPI4, Case. And you can have it on its own device away from the Zwave device.

https://phoscon.de/en/conbee2/install (windows options exist)

I found ZHA unable to work and abandoned it for Deconz. I don't think it played well with VirtualBox. I moved it to a RPi so I could position it more centrally. My Zigbee network is far smaller than my Zwave. The RPi also handles PiHole so its not a single duty device.

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

No branches or pull requests

7 participants