zigbeefordomoticz / Domoticz-Zigbee

Zigbee plugin for Domoticz. Allow to connect various zigbee controllers like Zigate but also Texas Instrument CC2531, CC13x2, CC26x2 ; Silicon-Labs; deConz based chipset to be connected to Domoticz
GNU General Public License v3.0
102 stars 43 forks source link

Use zigpy OTA instead of plugin OTA to update device firmwares #1774

Closed pipiche38 closed 1 month ago

pipiche38 commented 1 month ago
pipiche38 commented 1 month ago

https://github.com/zigpy/zigpy/discussions/1494

pipiche38 commented 1 month ago

first run seems encouraging

2024-10-29 13:40:45,677 DEBUG :Registering new OTA provider: Ledvance(url='https://api.update.ledvance.com/v1/zigbee/firmwares', manufacturer_ids=(4489, 4364)) 2024-10-29 13:40:45,678 DEBUG :Registering new OTA provider: Sonoff(url=None, manufacturer_ids=(4742,)) 2024-10-29 13:40:45,680 DEBUG :Registering new OTA provider: Inovelli(url=None, manufacturer_ids=(4655,)) 2024-10-29 13:40:45,682 DEBUG :Registering new OTA provider: ThirdReality(url=None, manufacturer_ids=(4659, 4877, 5127)) 2024-10-29 13:40:45,683 DEBUG :Registering new OTA provider: AdvancedFileProvider(path=PosixPath('/var/lib/domoticz/plugins/Domoticz-Zigbee/zigpyOTArepository'), manufacturer_ids=()) 2024-10-29 13:40:45,684 DEBUG :Registering new OTA provider: RemoteZ2MProvider(url='https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json', manufacturer_ids=()) 2024-10-29 13:40:45,685 DEBUG :Registering new OTA provider: Tradfri(url='https://fw.ota.homesmart.ikea.com/DIRIGERA/version_info.json', manufacturer_ids=(4476,)) 2024-10-29 13:40:45,686 DEBUG :Registering new OTA provider: Inovelli(url=None, manufacturer_ids=(4655,)) 2024-10-29 13:40:45,686 DEBUG :Registering new OTA provider: Ledvance(url='https://api.update.ledvance.com/v1/zigbee/firmwares', manufacturer_ids=(4489, 4364)) 2024-10-29 13:40:45,687 DEBUG :Registering new OTA provider: Salus(url=None, manufacturer_ids=(4216, 43981)) 2024-10-29 13:40:45,688 DEBUG :Registering new OTA provider: Sonoff(url=None, manufacturer_ids=(4742,)) 2024-10-29 13:40:45,689 DEBUG :Registering new OTA provider: ThirdReality(url=None, manufacturer_ids=(4659, 4877, 5127))

2024-10-29 13:45:31,935 DEBUG :Broadcasting OTA notification 2024-10-29 13:45:32,416 WARNING :Executing <Handle SerialTransport._read_ready() created at /usr/lib/python3.10/asyncio/selector_events.py:254> took 0.153 seconds 2024-10-29 13:45:32,509 DEBUG :Loaded 1 images from provider: AdvancedFileProvider(path=PosixPath('/var/lib/domoticz/plugins/Domoticz-Zigbee/zigpyOTArepository'), manufacturer_ids=()) 2024-10-29 13:45:32,690 WARNING :Executing <Task pending name='Task-34' coro=<OTA._load_provider_index() running at /usr/local/lib/python3.10/site-packages/zigpy/ota/init.py:377> wait_for=<Future pending cb=[shield.._outer_done_callback() at /usr/lib/python3.10/asyncio/tasks.py:864, Task.wakeup()] created at /usr/lib/python3.10/asyncio/base_events.py:429> cb=[Task.__wakeup()] created at /usr/lib/python3.10/asyncio/tasks.py:337> took 0.179 seconds 2024-10-29 13:45:32,692 DEBUG :Get address info raw.githubusercontent.com:443, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_ADDRCONFIG: 32> 2024-10-29 13:45:32,696 DEBUG :Getting address info raw.githubusercontent.com:443, type=<SocketKind.SOCK_STREAM: 1>, flags=<AddressInfo.AI_ADDRCONFIG: 32> took 3.313ms: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('185.199.110.133', 443)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('185.199.108.133', 443)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('185.199.109.133', 443)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('185.199.111.133', 443)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2606:50c0:8003::154', 443, 0, 0)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2606:50c0:8001::154', 443, 0, 0)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2606:50c0:8002::154', 443, 0, 0)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2606:50c0:8000::154', 443, 0, 0))] 2024-10-29 13:45:32,725 DEBUG :<asyncio.sslproto.SSLProtocol object at 0xa6f49a48> starts SSL handshake 2024-10-29 13:45:32,756 DEBUG :<asyncio.sslproto.SSLProtocol object at 0xa6f49a48>: SSL handshake took 29.8 ms 2024-10-29 13:45:32,758 DEBUG :<asyncio.TransportSocket fd=26, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('10.0.0.21', 56308), raddr=('185.199.110.133', 443)> connected to 185.199.110.133:443: (<asyncio.sslproto._SSLProtocolTransport object at 0xa817b2c8>, <aiohttp.client_proto.ResponseHandler object at 0xa6deb0e8>) 2024-10-29 13:45:32,804 DEBUG :<_SelectorSocketTransport fd=26 read=idle write=<idle, bufsize=0>> pauses reading 2024-10-29 13:45:32,820 DEBUG :<_SelectorSocketTransport fd=26 read=polling write=<idle, bufsize=0>> resumes reading 2024-10-29 13:45:33,455 WARNING :Executing <Task pending name='Task-34' coro=<OTA._load_provider_index() running at /usr/local/lib/python3.10/site-packages/zigpy/ota/init.py:377> cb=[Task.wakeup()] created at /usr/lib/python3.10/asyncio/tasks.py:337> took 0.636 seconds 2024-10-29 13:45:33,461 DEBUG :Loaded 624 images from provider: RemoteZ2MProvider(url='https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json', manufacturer_ids=())

pipiche38 commented 1 month ago

drop this PR, zigoy do not provide auto OTA, but this must be managed by above layer. In such there is no benefit of using zigpy OTA