Skip to content

Commit

Permalink
Fix ID generation
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Jun 6, 2024
1 parent 2c8cf14 commit ce731b3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
17 changes: 15 additions & 2 deletions data_model/master/clusters/cluster_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"4": "Groups",
"6": "On/Off",
"8": "Level Control",
"28": "Pulse Width Modulation",
"29": "Descriptor",
"30": "Binding",
"31": "AccessControl",
Expand Down Expand Up @@ -59,23 +58,31 @@
"98": "Scenes Management",
"113": "HEPA Filter Monitoring",
"114": "Activated Carbon Filter Monitoring",
"121": "Water Tank Level Monitoring",
"128": "Boolean State Configuration",
"129": "Valve Configuration and Control",
"144": "Electrical Power Measurement",
"145": "Electrical Energy Measurement",
"148": "Water Heater Management",
"149": "Energy Price",
"150": "Demand Response Load Control",
"151": "Messages",
"152": "Device Energy Management",
"153": "Energy EVSE",
"154": "Energy Calendar",
"155": "Energy Preference",
"156": "Power Topology",
"157": "Energy EVSE Mode",
"158": "Water Heater Mode",
"159": "Device Energy Management Mode",
"257": "Door Lock",
"258": "Window Covering",
"336": "Service Area",
"512": "Pump Configuration and Control",
"513": "Thermostat",
"514": "Fan Control",
"516": "Thermostat User Interface Configuration",
"517": "Humidistat",
"768": "Color Control",
"769": "Ballast Configuration",
"1024": "Illuminance Measurement",
Expand All @@ -94,6 +101,10 @@
"1069": "PM10 Concentration Measurement",
"1070": "Total Volatile Organic Compounds Concentration Measurement",
"1071": "Radon Concentration Measurement",
"1104": "Network Identity Management",
"1105": "Wi",
"1106": "Thread Border Router Management",
"1107": "Thread Network Directory",
"1283": "Wake on LAN",
"1284": "Channel",
"1285": "Target Navigator",
Expand All @@ -107,5 +118,7 @@
"1293": "Application Basic",
"1294": "Account Login",
"1295": "Content Control",
"1296": "Content App Observer"
"1296": "Content App Observer",
"1872": "Ecosystem Information",
"1873": "Commissioner Control"
}
8 changes: 4 additions & 4 deletions scripts/spec_xml/generate_spec_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def main(scraper, spec_root, output_dir, dry_run, include_in_progress):
# Clusters need to be scraped first because the cluster directory is passed to the device type directory
if not output_dir:
output_dir = DEFAULT_OUTPUT_DIR_TOT if include_in_progress else DEFAULT_OUTPUT_DIR_1_3
scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress)
scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress)
# scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress)
# scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress)
if not dry_run:
dump_versions(scraper, spec_root, output_dir)
# dump_versions(scraper, spec_root, output_dir)
dump_cluster_ids(output_dir)


Expand Down Expand Up @@ -207,7 +207,7 @@ def dump_cluster_ids(output_dir):
header = '# List of currently defined spec clusters\n'
header += 'This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!\n\n'

clusters, problems = build_xml_clusters()
clusters, problems = build_xml_clusters(clusters_output_dir)
all_name_lens = [len(c.name) for c in clusters.values()]
name_len = max(all_name_lens)
title_id_decimal = ' ID (Decimal) '
Expand Down

0 comments on commit ce731b3

Please sign in to comment.