zigpy / zigpy-znp

TI CC2531, CC13x2, CC26x2 radio support for Zigpy and ZHA
GNU General Public License v3.0
144 stars 40 forks source link

Add tcp:// protocol to talk to ZNP radio via TCP/IP (using same code as bellows?) #179

Closed Hedda closed 1 year ago

Hedda commented 1 year ago

TCP protocol using Python's loop.create_connection() instead of pyserial been added to bellows by agners -> https://github.com/zigpy/bellows/pull/489

Add tcp:// protocol to talk to EZSP radio via TCP/IP. Compared to the existing socket:// protocol this uses Python's loop.create_connection() instead of pyserial. In tests this makes bellows info to complete about 50x faster (measured after reset, from 0.6s to 0.012s).

Could maybe add similar code be used to add tcp:// protocol support without pyserial to zigpy-znp (and other radio libraries) as well?

https://github.com/zigpy/bellows/pull/489/commits/971b4dbaada2b1e2777c8009e4e6dd9addd796cb

Thinking specifically for use "Zigbee LAN gateways" from tube0013 and mercenaruss and Gio-dot and codm as they (as well as a few other makers in the DIY home automation community) as they today primarily make Texas Instruments CC2652P based variants of Zigbee LAN gateway adapter, some like Tube also makes EFR32MG21 variants too:

PS: CC2652P variants are probably more common today because Zigbee2MQTT still only has experimental support for Silabs EZSP.

https://www.zigbee2mqtt.io/guide/adapters/#recommended

https://www.zigbee2mqtt.io/guide/adapters/#not-recommended

puddly commented 1 year ago

Implemented in https://github.com/zigpy/zigpy-znp/pull/171