tube0013 / tube_gateways

Information and Documentation on Tube's Zigbee Gateways
261 stars 51 forks source link

CC2652p2 POE Coordinator ZHA connection issue #32

Closed glamirand closed 2 years ago

glamirand commented 2 years ago

Hi,

I just purchased a CC2652P2 Based Zigbee to Power Over Ethernet Serial Coordinator V2 to replace a ConBeeII for my Profalux covers.

I deleted all zigbee devices via zha.remove and the ZHA integration itself. I then re set the ZHA integration according to the instructions (ZNP, socket://ip:6638, 115200, software flow control) and joined my devices to this new gateway.

All went fine except I'm having connection issues between my HA Virtual Machine (hypervised by VMM on a Synology RS1221+) & the gateway, resulting il osme lines in the Debug Log but more embarassing : my covers are slightly moving up and down on each reconnection as I guess the gateway enter permit join after a connection?

Gateway Log Capture d’écran 2021-09-04 100453

HA Log Capture d’écran 2021-09-04 100722

The coordinator is powered by a Unifi 8 POE switch and is set on the same VLAN as HA (so firewall shouldn't be cocnerned). I forced the switch port to 100mbits FDX as recommended but this didn't helped.

Disconnections happens variably from every minute to every half hour. This is quite annoying and can't stay as it. Any help is very welcome! :) Thanks!

tube0013 commented 2 years ago

Hi. This is for sure not the desired behavior for the device.

Let's look at the connection issues before getting into ZHA specific issues.

Could you try to reflash the PoE-ESP32.

You can do this OTA, but I'd rather do it over the usb connection on the board, so it does an erase of the current memory completely first.

The instructions are in this doc for the non-PoE coordinator, but the PoE-esp32 has an onboard serial you only need a micro usb cable (with data).

https://github.com/tube0013/tube_gateways/blob/main/Troubleshooting.md

the FW bin is here: https://github.com/tube0013/tube_gateways/tree/main/tube_poe_coordinator

The the USB port is inside the case on the side of the board. The powered Ethernet MUST be removed before using or you will kill the board or your computer.

If that helps great, if not we can try a build with a static IP - this ultimately helped another user with disconnection issues.

glamirand commented 2 years ago

Hi again,

I've just reflashed the module with the provided binary over USB and a connection issue just happened again :(

Let's try a static IP build then :/

tube0013 commented 2 years ago

Bummer, but lets keep rolling...

instructions to compile with a static IP are here: https://github.com/tube0013/tube_gateways/tree/main/esphome

if you want to give me the ip/gateway/mask IPs I can build and send you as well. just let me know.

glamirand commented 2 years ago

Just flashed with a static ip build, let's see in the near minutes/hours..

I've noticed the following in the logs : Capture d’écran 2021-09-04 144212 I've seen you recommend to set the switch port configuration to 100mbits/Full Duplex, is there something wrong related to the log entry?

tube0013 commented 2 years ago

I'm not aware of making any recommendations about full duplex or not. I usually do not make any changes on my switch when running the devices.

glamirand commented 2 years ago

That was actually not you, my bad! image https://github.com/Hedda/tube_gateways/commit/e7bdd9cf2a8cfd2684759faf1cc3e6a226e0de70

Anyway, I tried both a static IP and to replace "_" by "-" in the host name to solve esphome compilatio warnings but I'm still having the same disconnection issue :/

MattWestb commented 2 years ago

Sorry for jumping in :-(

If forcing speed / duplex in one end (of the "cable") the other must being sett to the same. If leaving one side in auto config it can being problems or if one side is half and the next full duplex and the same for the speed 10 / 100.

So auto on both "ends" or manual and the same in both "ends".

tube0013 commented 2 years ago

are you able to set your switch back to full auto for the port and see if that helps now with a static IP?

I'm a bit perplexed as it seems the ESP is actually staying on line, but the serial connection is closing. I have not heard of anyone with this issue, so it's either the hardware, or something specific with your network config. If hardware we can work that out, but want to fully rule out the network side.

glamirand commented 2 years ago

So auto on both "ends" or manual and the same in both "ends".

Thanks for the point, I set the switch back to auto then but no noticeable improvement :/

are you able to set your switch back to full auto for the port and see if that helps now with a static IP?

I tried, but no more improvement :/

I'm a bit perplexed as it seems the ESP is actually staying on line, but the serial connection is closing

I do agree! Is there any firmware upgrade of the "real" ZigBee stuff to try? Any way to troubleshot the zigbee network? Perhaps certain oversized data frames which may end up crashing the stream server part?

I also tried the following things with no success :/

I'm a bit perplexed as it seems the ESP is actually staying on line, but the serial connection is closing

I do agree! Is there any firmware upgrade of the "real" ZigBee stuff to try? Any way to troubleshot the zigbee network? Perhaps certain oversized data frames which may end up crashing the stream server part?

I also have a ZiGate I may use for sniffing the ZigBee network even if I may need guidance for this, if it can help...

tube0013 commented 2 years ago

the zigbee side really should not come into play with the serial connection.

Do you have the ability to try and connect it through another switch, even non-PoE (can be powered with the internal USB connection) just to see if it makes a difference. if not let me know, and I'll work something out with you over email..

glamirand commented 2 years ago

connect it through another switch, even non-PoE

I actually already tried to connect it to another POE/POE+ switch with the same results

I considered EMC based interferences last evening and I tried several things :

I'll keep you updated after a day of successful function. If not I'll try to power up the ESP with the internal USB and a non POE switch port before reporting.

Fingers crossed! :)

tube0013 commented 2 years ago

Awesome. Fingers crossed let us know.

tube0013 commented 2 years ago

Closing this as it sounds like it has been resolved

glamirand commented 2 years ago

Closing this as it sounds like it has been resolved

Hi,

Sorry for the delay.

I effectively had no disconnection issue since my last post and cable management which is really nice, thanks for helping! :)

This may be another topic but I still observe my shutters to slightly move up and down (like they do when I open the ZigBee network), once the connection is established with ZHA (basically after booting up homeassistant..)

I think it's more related th the ZHA/ZNP integration than to the router itself. It's not really big deal but I've never had this behavioir when I was using my ConBee2.

Any thoughts?