mirror of
https://github.com/danieldemus/deconz_fw_downloader.git
synced 2025-01-10 07:02:03 +01:00
Allow to only try certain targets
Lightify is rate limited and danfoss has apparently hidden it's content in a zip file and removed previous firmware versions
This commit is contained in:
parent
2e76cf82c9
commit
c9e97a8203
@ -15,13 +15,20 @@ 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}")
|
||||
|
||||
Danfoss(args.verbose).perform_downloads()
|
||||
Ikea(args.verbose).perform_downloads()
|
||||
GithubKoenkk(args.verbose).perform_downloads()
|
||||
Lightify(args.verbose).perform_downloads()
|
||||
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}")
|
||||
|
Loading…
Reference in New Issue
Block a user