tube_gateways icon indicating copy to clipboard operation
tube_gateways copied to clipboard

Not accepting new connection from xxx

Open hasechris opened this issue 2 years ago • 16 comments

Hi @tube0013 ,

i just bought a ESP32 CC2652 Coordinator from you and it arrived today. Now i wanted to test it in Homeassistant (in my case it is HA OS in a VM in my DMZ vlan).

The coordinator is plugged into my home lan vlan where all the other computers are plugged in because it is placed squarely in the middle of my home, where i dont have the DMZ vlan available (kinda obvious).

So i added the ZHA integration into my HA. Bildschirmfoto vom 2022-10-14 21-08-14

Then i choose the Option "ZNP" because you use a CC2652P2. Bildschirmfoto vom 2022-10-14 21-09-04

And then i wanted to add the IP from the tubeszb-cc2652-eth_usb Bildschirmfoto vom 2022-10-14 21-12-33

The result is a "Unknown Error" Message in Red above the Serial Port Textbox. I therefore used a USB Connection and added the two needed jumpers to Debug over USB.

In the USB Log i see the following messages:

[20:59:33][D][serial_server:103]: New client connected from 10.253.42.15
[20:59:33][D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state ON
[20:59:34][D][serial_server:042]: Not accepting new connection from 10.253.42.15, only one client allowed
[20:59:34][D][serial_server:068]: Client 10.253.42.15 disconnected
[20:59:34][D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state OFF

I really dont know what i did wrong in these three steps. Can you help me?

Thanks in advance hasechris

hasechris avatar Oct 14 '22 19:10 hasechris

Wait a second... Now i did the exact steps again to get the needed Screenshots and the serial log. The first time it bailed again producing the serial log, but on the second attempt it just worked! I think i changed nothing, but im really not entirely shure. Kind of baffled now, because i tried it like 20 times to add it in trying to debug the problem.

hasechris avatar Oct 14 '22 19:10 hasechris

Hi, what version of HA are you using? the multiple connection thing was happening with 2022.9. setting up over USB then migrating to network was one of the work arounds.

But this should have all been fixed as of 2022.10.

tube0013 avatar Oct 14 '22 19:10 tube0013

Hi @tube0013,

im using the version 2022.10.2 of HA Core. "Home Assistant Operating System" is version 9.0

hasechris avatar Oct 14 '22 20:10 hasechris

can you set up debug logging for zigpy and zigpy-znp:

https://www.home-assistant.io/integrations/zha/#debug-logging

then try to add again (likely will need to restart HA)

that will give us some more insight.

tube0013 avatar Oct 14 '22 20:10 tube0013

ok, activated the logging and removed the existing ZHA integration completly. Trying to add it again, but now i get another error "Failed to connect" :-(

[00:52:27][D][serial_server:103]: New client connected from 10.253.42.15
[00:52:27][D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state ON
[00:52:32][D][serial_server:068]: Client 10.253.42.15 disconnected
[00:52:32][D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state OFF

How can i export the logs from HA?

hasechris avatar Oct 14 '22 22:10 hasechris

the logs are in /config/homeassistant.log if you don't want to post publically as it will have your full HA log you can email me at store @ tubeszb.com

tube0013 avatar Oct 14 '22 23:10 tube0013

Hi, I took a look at the log, and unfortunately it's not saying too much. Can you try moving the jumpers to zigbee 2 usb position, and attempt to set the device up over USB? If successful we can then try to migrate it over to the network connection.

tube0013 avatar Oct 16 '22 17:10 tube0013

I can confirm this is happening on my HomeAssistant installation. HAOS 2022.11.4.

twang817 avatar Nov 21 '22 04:11 twang817

I just updated ESP32 and CC2652 firmware. Did not make a difference. I connected it to my proxmox host and passed through the USB device, and can confirm that HASS now has it set up correctly. Will attempt to migrate the radio to Ethernet.

twang817 avatar Nov 21 '22 06:11 twang817

I have tried multiple times to migrate the radio to Wifi, but each time I go back to the "only one client allowed" error.

twang817 avatar Nov 21 '22 17:11 twang817

I will see if I can reproduce this with current HA tonight. Also try the ESP32 firmware from the beta folder.

tube0013 avatar Nov 21 '22 17:11 tube0013

running 2022.11.4 I am not able to re-produce this. using the esp32 firmware from the beta directories. under each model type.

tube0013 avatar Nov 22 '22 04:11 tube0013

I can confirm that with the newest beta firmware for esp, I was able to migrate my radio from usb to ethernet. I will be wiping my hass and will attempt a fresh install in a few weeks. My intention was to try out zha with my devices, but ultimately I plan on running z2m. Will report back.

twang817 avatar Nov 26 '22 18:11 twang817

I have just encountered this issue after rebuilding my HA setup and at the moment, I can't seem to get it to work. However, I haven't updated the firmware at all since receiving the unit.

Home Assistant 2023.1.2 Supervisor 2022.12.1 Operating System 9.4

Firmware: 2021.9.0 (Sep 17 2021, 19:58:30)

Basic logging shows that Home Assistant 'connects' after being restarted, yet it has not been setup yet.

[D][api.connection:153]: Home Assistant 2023.1.2 (10.0.0.12) requested disconnected
[D][api:095]: Accepted 10.0.0.12
[D][api.connection:735]: Home Assistant 2023.1.2 (10.0.0.12): Connected successfully
[D][serial_server:103]: New client connected from 10.0.0.12
[D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state ON
[D][serial_server:042]: Not accepting new connection from 10.0.0.12, only one client allowed
[D][serial_server:068]: Client 10.0.0.12 disconnected
[D][binary_sensor:036]: 'TubesZB Gateway Serial Connected': Sending state OFF

I have further debug logging available if it may help at all.

el1-x avatar Jan 12 '23 13:01 el1-x

@el1-x please try the lasted esphome fw in the Firmware directory under your model. You can flash the .bin via the web frontend by going to the coordinators ip address in a browser and using the OTA function there. this own't affect your zigbee network, just the esp32 handling the serial connection.

tube0013 avatar Jan 12 '23 13:01 tube0013

@tube0013 Thank you for the prompt reply. After posting, I jumped straight into updating firmware. I updated both the ESP32 and the CC2652.

After completing the ESP32 update, I can confirm that the issue I encountered was resolved and I was able to connect the device to Home Assistant and reconfigure everything.

Thanks again.

el1-x avatar Jan 12 '23 15:01 el1-x