mirror of
https://github.com/danieldemus/deconz_fw_downloader.git
synced 2025-01-10 07:02:03 +01:00
c9e97a8203
Lightify is rate limited and danfoss has apparently hidden it's content in a zip file and removed previous firmware versions
35 lines
1.3 KiB
Python
Executable File
35 lines
1.3 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Snipped to download current IKEA ZLL OTA files into ~/otau
|
|
compatible with python 3.
|
|
"""
|
|
import argparse
|
|
import datetime
|
|
|
|
from danfoss import Danfoss
|
|
from ikea import Ikea
|
|
from github_koenkk import GithubKoenkk
|
|
from ligthify import Lightify
|
|
|
|
parser = argparse.ArgumentParser(
|
|
prog = 'fw_downloads.py',
|
|
description = 'Downloads zigbee firmware update files from various sources for the Deconz OTA plugin')
|
|
parser.add_argument('-v', '--verbose', action='store_true', help='write each file operation to the console')
|
|
parser.add_argument('targets', help='Only download from the given targets. If none are specified, all will be tried', nargs='*', choices=['danfoss', 'ikea', 'lightify', 'koenkk'])
|
|
args = parser.parse_args()
|
|
|
|
print ('%s - Downloadscript started' % f"{datetime.datetime.now():%Y-%m-%d %H:%M:%S}")
|
|
|
|
fetch_all = not args.targets
|
|
|
|
if fetch_all or 'koenkk' in args.targets:
|
|
GithubKoenkk(args.verbose).perform_downloads()
|
|
if fetch_all or 'ikea' in args.targets:
|
|
Ikea(args.verbose).perform_downloads()
|
|
if fetch_all or 'lightify' in args.targets:
|
|
Lightify(args.verbose).perform_downloads()
|
|
if fetch_all or 'danfoss' in args.targets:
|
|
Danfoss(args.verbose).perform_downloads()
|
|
|
|
print ('%s - Downloadscript finished' % f"{datetime.datetime.now():%Y-%m-%d %H:%M:%S}")
|