From aeee127427830c9f228fa13fd716e048e5db80c9 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 15 Nov 2023 12:45:53 +0100 Subject: [PATCH] DM XML: Add device types to script and re-gen (#30387) * DM XML: Add device types to script and re-gen * Address review comments, use new scraper, add version * Use old scraper version --- data_model/device_types/Aggregator.xml | 73 +++++++ .../AirPurifier.xml} | 50 ++--- data_model/device_types/AirQualitySensor.xml | 108 ++++++++++ data_model/device_types/BaseDeviceType.xml | 65 ++++++ data_model/device_types/BasicVideoPlayer.xml | 98 +++++++++ data_model/device_types/BooleanSensor.xml | 72 +++++++ data_model/device_types/BridgedNode.xml | 84 ++++++++ .../device_types/CastingVideoClient.xml | 109 ++++++++++ .../device_types/CastingVideoPlayer.xml | 117 +++++++++++ data_model/device_types/ColorDimmerSwitch.xml | 92 +++++++++ .../device_types/ColorTemperatureLight.xml | 148 ++++++++++++++ data_model/device_types/ContactSensor.xml | 72 +++++++ data_model/device_types/ContentApp.xml | 96 +++++++++ data_model/device_types/ControlBridge.xml | 99 +++++++++ data_model/device_types/CookSurface.xml | 72 +++++++ data_model/device_types/Cooktop.xml | 80 ++++++++ data_model/device_types/DimmableLight.xml | 145 +++++++++++++ .../device_types/DimmablePlug-InUnit.xml | 142 +++++++++++++ data_model/device_types/DimmerSwitch.xml | 89 ++++++++ data_model/device_types/Dishwasher.xml | 99 +++++++++ data_model/device_types/DoorLock.xml | 190 ++++++++++++++++++ .../device_types/DoorLockController.xml | 99 +++++++++ data_model/device_types/EVSE.xml | 106 ++++++++++ data_model/device_types/EnergyTariff.xml | 64 ++++++ .../device_types/EnergyTariffCalendar.xml | 64 ++++++ .../device_types/ExtendedColorLight.xml | 160 +++++++++++++++ data_model/device_types/ExtractorHood.xml | 89 ++++++++ data_model/device_types/Fan.xml | 85 ++++++++ data_model/device_types/FlowSensor.xml | 79 ++++++++ data_model/device_types/GenericSwitch.xml | 74 +++++++ .../device_types/HeatingCoolingUnit.xml | 95 +++++++++ data_model/device_types/HumiditySensor.xml | 79 ++++++++ data_model/device_types/LaundryDryer.xml | 99 +++++++++ data_model/device_types/LaundryWasher.xml | 99 +++++++++ data_model/device_types/LightSensor.xml | 80 ++++++++ data_model/device_types/MicrowaveOven.xml | 92 +++++++++ .../device_types/ModeSelectDeviceType.xml | 70 +++++++ data_model/device_types/NetworkInfraIntro.xml | 58 ++++++ .../device_types/NetworkInfraManager.xml | 69 +++++++ data_model/device_types/OccupancySensor.xml | 80 ++++++++ data_model/device_types/OnOffLight.xml | 145 +++++++++++++ data_model/device_types/OnOffLightSwitch.xml | 86 ++++++++ data_model/device_types/OnOffPlug-inUnit.xml | 145 +++++++++++++ data_model/device_types/OnOffSensor.xml | 93 +++++++++ data_model/device_types/OtaProvider.xml | 72 +++++++ data_model/device_types/OtaRequestor.xml | 72 +++++++ data_model/device_types/Oven.xml | 69 +++++++ data_model/device_types/PowerSource.xml | 75 +++++++ data_model/device_types/PressureSensor.xml | 79 ++++++++ data_model/device_types/Pump.xml | 110 ++++++++++ data_model/device_types/PumpController.xml | 103 ++++++++++ data_model/device_types/Refrigerator.xml | 85 ++++++++ .../device_types/RoboticVacuumCleaner.xml | 107 ++++++++++ .../device_types/RoomAirConditioner.xml | 98 +++++++++ .../device_types/RootNodeDeviceType.xml | 164 +++++++++++++++ data_model/device_types/SmokeCOAlarm.xml | 84 ++++++++ data_model/device_types/Speaker.xml | 73 +++++++ .../TemperatureControlledCabinet.xml | 106 ++++++++++ data_model/device_types/TemperatureSensor.xml | 79 ++++++++ data_model/device_types/Thermostat.xml | 157 +++++++++++++++ .../device_types/ThreadBorderRouter.xml | 80 ++++++++ .../device_types/ThreePhasePowerSource.xml | 77 +++++++ data_model/device_types/Valve.xml | 72 +++++++ .../device_types/VideoRemoteControl.xml | 106 ++++++++++ data_model/device_types/WaterHeater.xml | 100 +++++++++ data_model/device_types/WaterLeakDetector.xml | 80 ++++++++ data_model/device_types/WindowCovering.xml | 124 ++++++++++++ .../device_types/WindowCoveringController.xml | 101 ++++++++++ data_model/scraper_version | 1 + scripts/spec_xml/generate_spec_xml.py | 50 ++++- 70 files changed, 6500 insertions(+), 34 deletions(-) create mode 100644 data_model/device_types/Aggregator.xml rename data_model/{clusters/Mode_LaundryWasher.xml => device_types/AirPurifier.xml} (75%) create mode 100644 data_model/device_types/AirQualitySensor.xml create mode 100644 data_model/device_types/BaseDeviceType.xml create mode 100644 data_model/device_types/BasicVideoPlayer.xml create mode 100644 data_model/device_types/BooleanSensor.xml create mode 100644 data_model/device_types/BridgedNode.xml create mode 100644 data_model/device_types/CastingVideoClient.xml create mode 100644 data_model/device_types/CastingVideoPlayer.xml create mode 100644 data_model/device_types/ColorDimmerSwitch.xml create mode 100644 data_model/device_types/ColorTemperatureLight.xml create mode 100644 data_model/device_types/ContactSensor.xml create mode 100644 data_model/device_types/ContentApp.xml create mode 100644 data_model/device_types/ControlBridge.xml create mode 100644 data_model/device_types/CookSurface.xml create mode 100644 data_model/device_types/Cooktop.xml create mode 100644 data_model/device_types/DimmableLight.xml create mode 100644 data_model/device_types/DimmablePlug-InUnit.xml create mode 100644 data_model/device_types/DimmerSwitch.xml create mode 100644 data_model/device_types/Dishwasher.xml create mode 100644 data_model/device_types/DoorLock.xml create mode 100644 data_model/device_types/DoorLockController.xml create mode 100644 data_model/device_types/EVSE.xml create mode 100644 data_model/device_types/EnergyTariff.xml create mode 100644 data_model/device_types/EnergyTariffCalendar.xml create mode 100644 data_model/device_types/ExtendedColorLight.xml create mode 100644 data_model/device_types/ExtractorHood.xml create mode 100644 data_model/device_types/Fan.xml create mode 100644 data_model/device_types/FlowSensor.xml create mode 100644 data_model/device_types/GenericSwitch.xml create mode 100644 data_model/device_types/HeatingCoolingUnit.xml create mode 100644 data_model/device_types/HumiditySensor.xml create mode 100644 data_model/device_types/LaundryDryer.xml create mode 100644 data_model/device_types/LaundryWasher.xml create mode 100644 data_model/device_types/LightSensor.xml create mode 100644 data_model/device_types/MicrowaveOven.xml create mode 100644 data_model/device_types/ModeSelectDeviceType.xml create mode 100644 data_model/device_types/NetworkInfraIntro.xml create mode 100644 data_model/device_types/NetworkInfraManager.xml create mode 100644 data_model/device_types/OccupancySensor.xml create mode 100644 data_model/device_types/OnOffLight.xml create mode 100644 data_model/device_types/OnOffLightSwitch.xml create mode 100644 data_model/device_types/OnOffPlug-inUnit.xml create mode 100644 data_model/device_types/OnOffSensor.xml create mode 100644 data_model/device_types/OtaProvider.xml create mode 100644 data_model/device_types/OtaRequestor.xml create mode 100644 data_model/device_types/Oven.xml create mode 100644 data_model/device_types/PowerSource.xml create mode 100644 data_model/device_types/PressureSensor.xml create mode 100644 data_model/device_types/Pump.xml create mode 100644 data_model/device_types/PumpController.xml create mode 100644 data_model/device_types/Refrigerator.xml create mode 100644 data_model/device_types/RoboticVacuumCleaner.xml create mode 100644 data_model/device_types/RoomAirConditioner.xml create mode 100644 data_model/device_types/RootNodeDeviceType.xml create mode 100644 data_model/device_types/SmokeCOAlarm.xml create mode 100644 data_model/device_types/Speaker.xml create mode 100644 data_model/device_types/TemperatureControlledCabinet.xml create mode 100644 data_model/device_types/TemperatureSensor.xml create mode 100644 data_model/device_types/Thermostat.xml create mode 100644 data_model/device_types/ThreadBorderRouter.xml create mode 100644 data_model/device_types/ThreePhasePowerSource.xml create mode 100644 data_model/device_types/Valve.xml create mode 100644 data_model/device_types/VideoRemoteControl.xml create mode 100644 data_model/device_types/WaterHeater.xml create mode 100644 data_model/device_types/WaterLeakDetector.xml create mode 100644 data_model/device_types/WindowCovering.xml create mode 100644 data_model/device_types/WindowCoveringController.xml create mode 100644 data_model/scraper_version diff --git a/data_model/device_types/Aggregator.xml b/data_model/device_types/Aggregator.xml new file mode 100644 index 00000000000000..3f70f3d78ccb4b --- /dev/null +++ b/data_model/device_types/Aggregator.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/clusters/Mode_LaundryWasher.xml b/data_model/device_types/AirPurifier.xml similarity index 75% rename from data_model/clusters/Mode_LaundryWasher.xml rename to data_model/device_types/AirPurifier.xml index 96190a4009850c..9793cd1d36b215 100644 --- a/data_model/clusters/Mode_LaundryWasher.xml +++ b/data_model/device_types/AirPurifier.xml @@ -55,37 +55,27 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + - - - - - - - - - - - - - - - - - + + + + - - + + + + + + + + + + + - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/data_model/device_types/AirQualitySensor.xml b/data_model/device_types/AirQualitySensor.xml new file mode 100644 index 00000000000000..0c96fbd60515b7 --- /dev/null +++ b/data_model/device_types/AirQualitySensor.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BaseDeviceType.xml b/data_model/device_types/BaseDeviceType.xml new file mode 100644 index 00000000000000..22cec956aa6061 --- /dev/null +++ b/data_model/device_types/BaseDeviceType.xml @@ -0,0 +1,65 @@ + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BasicVideoPlayer.xml b/data_model/device_types/BasicVideoPlayer.xml new file mode 100644 index 00000000000000..f6b86091004bfe --- /dev/null +++ b/data_model/device_types/BasicVideoPlayer.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BooleanSensor.xml b/data_model/device_types/BooleanSensor.xml new file mode 100644 index 00000000000000..185fdc47176813 --- /dev/null +++ b/data_model/device_types/BooleanSensor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BridgedNode.xml b/data_model/device_types/BridgedNode.xml new file mode 100644 index 00000000000000..a383ed2b541d6b --- /dev/null +++ b/data_model/device_types/BridgedNode.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CastingVideoClient.xml b/data_model/device_types/CastingVideoClient.xml new file mode 100644 index 00000000000000..06ef2b5492f337 --- /dev/null +++ b/data_model/device_types/CastingVideoClient.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CastingVideoPlayer.xml b/data_model/device_types/CastingVideoPlayer.xml new file mode 100644 index 00000000000000..fd26bb675cbdf6 --- /dev/null +++ b/data_model/device_types/CastingVideoPlayer.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ColorDimmerSwitch.xml b/data_model/device_types/ColorDimmerSwitch.xml new file mode 100644 index 00000000000000..dcd2ac18b1a912 --- /dev/null +++ b/data_model/device_types/ColorDimmerSwitch.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ColorTemperatureLight.xml b/data_model/device_types/ColorTemperatureLight.xml new file mode 100644 index 00000000000000..5897f0ee0b796a --- /dev/null +++ b/data_model/device_types/ColorTemperatureLight.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ContactSensor.xml b/data_model/device_types/ContactSensor.xml new file mode 100644 index 00000000000000..e8a7c3f343a9f4 --- /dev/null +++ b/data_model/device_types/ContactSensor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ContentApp.xml b/data_model/device_types/ContentApp.xml new file mode 100644 index 00000000000000..8f927c48f44a35 --- /dev/null +++ b/data_model/device_types/ContentApp.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ControlBridge.xml b/data_model/device_types/ControlBridge.xml new file mode 100644 index 00000000000000..6ed528c0122d96 --- /dev/null +++ b/data_model/device_types/ControlBridge.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CookSurface.xml b/data_model/device_types/CookSurface.xml new file mode 100644 index 00000000000000..34f5556234a6e5 --- /dev/null +++ b/data_model/device_types/CookSurface.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Cooktop.xml b/data_model/device_types/Cooktop.xml new file mode 100644 index 00000000000000..8288f38c8a87ba --- /dev/null +++ b/data_model/device_types/Cooktop.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmableLight.xml b/data_model/device_types/DimmableLight.xml new file mode 100644 index 00000000000000..39f193f53e7553 --- /dev/null +++ b/data_model/device_types/DimmableLight.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmablePlug-InUnit.xml b/data_model/device_types/DimmablePlug-InUnit.xml new file mode 100644 index 00000000000000..c262abf3741d7e --- /dev/null +++ b/data_model/device_types/DimmablePlug-InUnit.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmerSwitch.xml b/data_model/device_types/DimmerSwitch.xml new file mode 100644 index 00000000000000..a3bae868a2498b --- /dev/null +++ b/data_model/device_types/DimmerSwitch.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Dishwasher.xml b/data_model/device_types/Dishwasher.xml new file mode 100644 index 00000000000000..429e96c149abe9 --- /dev/null +++ b/data_model/device_types/Dishwasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DoorLock.xml b/data_model/device_types/DoorLock.xml new file mode 100644 index 00000000000000..d31aaad30d8d98 --- /dev/null +++ b/data_model/device_types/DoorLock.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DoorLockController.xml b/data_model/device_types/DoorLockController.xml new file mode 100644 index 00000000000000..4f4efb3ea90d1c --- /dev/null +++ b/data_model/device_types/DoorLockController.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EVSE.xml b/data_model/device_types/EVSE.xml new file mode 100644 index 00000000000000..b5e57c83aa3ac1 --- /dev/null +++ b/data_model/device_types/EVSE.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EnergyTariff.xml b/data_model/device_types/EnergyTariff.xml new file mode 100644 index 00000000000000..9e6e0b4c12ab36 --- /dev/null +++ b/data_model/device_types/EnergyTariff.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EnergyTariffCalendar.xml b/data_model/device_types/EnergyTariffCalendar.xml new file mode 100644 index 00000000000000..3dca889b777e66 --- /dev/null +++ b/data_model/device_types/EnergyTariffCalendar.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ExtendedColorLight.xml b/data_model/device_types/ExtendedColorLight.xml new file mode 100644 index 00000000000000..4120226176e7a1 --- /dev/null +++ b/data_model/device_types/ExtendedColorLight.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ExtractorHood.xml b/data_model/device_types/ExtractorHood.xml new file mode 100644 index 00000000000000..5fdbc7c84a1583 --- /dev/null +++ b/data_model/device_types/ExtractorHood.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Fan.xml b/data_model/device_types/Fan.xml new file mode 100644 index 00000000000000..49538ec32097b6 --- /dev/null +++ b/data_model/device_types/Fan.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/FlowSensor.xml b/data_model/device_types/FlowSensor.xml new file mode 100644 index 00000000000000..8c604586481536 --- /dev/null +++ b/data_model/device_types/FlowSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/GenericSwitch.xml b/data_model/device_types/GenericSwitch.xml new file mode 100644 index 00000000000000..7e13a7e18223ab --- /dev/null +++ b/data_model/device_types/GenericSwitch.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/HeatingCoolingUnit.xml b/data_model/device_types/HeatingCoolingUnit.xml new file mode 100644 index 00000000000000..244ff14b0a15fa --- /dev/null +++ b/data_model/device_types/HeatingCoolingUnit.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/HumiditySensor.xml b/data_model/device_types/HumiditySensor.xml new file mode 100644 index 00000000000000..d59ed7caf43abe --- /dev/null +++ b/data_model/device_types/HumiditySensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LaundryDryer.xml b/data_model/device_types/LaundryDryer.xml new file mode 100644 index 00000000000000..a7d365f22e14fe --- /dev/null +++ b/data_model/device_types/LaundryDryer.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LaundryWasher.xml b/data_model/device_types/LaundryWasher.xml new file mode 100644 index 00000000000000..07cd62a605fc9c --- /dev/null +++ b/data_model/device_types/LaundryWasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LightSensor.xml b/data_model/device_types/LightSensor.xml new file mode 100644 index 00000000000000..618901b398b5f8 --- /dev/null +++ b/data_model/device_types/LightSensor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/MicrowaveOven.xml b/data_model/device_types/MicrowaveOven.xml new file mode 100644 index 00000000000000..8e77925b4131fc --- /dev/null +++ b/data_model/device_types/MicrowaveOven.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ModeSelectDeviceType.xml b/data_model/device_types/ModeSelectDeviceType.xml new file mode 100644 index 00000000000000..748dc1bae2f0a3 --- /dev/null +++ b/data_model/device_types/ModeSelectDeviceType.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/NetworkInfraIntro.xml b/data_model/device_types/NetworkInfraIntro.xml new file mode 100644 index 00000000000000..22d91b6f459c6d --- /dev/null +++ b/data_model/device_types/NetworkInfraIntro.xml @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/data_model/device_types/NetworkInfraManager.xml b/data_model/device_types/NetworkInfraManager.xml new file mode 100644 index 00000000000000..750a97f22cad86 --- /dev/null +++ b/data_model/device_types/NetworkInfraManager.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OccupancySensor.xml b/data_model/device_types/OccupancySensor.xml new file mode 100644 index 00000000000000..bef470cc1c9ec6 --- /dev/null +++ b/data_model/device_types/OccupancySensor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffLight.xml b/data_model/device_types/OnOffLight.xml new file mode 100644 index 00000000000000..1ce39e8545c84a --- /dev/null +++ b/data_model/device_types/OnOffLight.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffLightSwitch.xml b/data_model/device_types/OnOffLightSwitch.xml new file mode 100644 index 00000000000000..c2c324c8ee5d2a --- /dev/null +++ b/data_model/device_types/OnOffLightSwitch.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffPlug-inUnit.xml b/data_model/device_types/OnOffPlug-inUnit.xml new file mode 100644 index 00000000000000..1847119e49426c --- /dev/null +++ b/data_model/device_types/OnOffPlug-inUnit.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffSensor.xml b/data_model/device_types/OnOffSensor.xml new file mode 100644 index 00000000000000..d2c6553fc1140c --- /dev/null +++ b/data_model/device_types/OnOffSensor.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OtaProvider.xml b/data_model/device_types/OtaProvider.xml new file mode 100644 index 00000000000000..28c4e3c70b88e9 --- /dev/null +++ b/data_model/device_types/OtaProvider.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OtaRequestor.xml b/data_model/device_types/OtaRequestor.xml new file mode 100644 index 00000000000000..7f5a8ca11c58c8 --- /dev/null +++ b/data_model/device_types/OtaRequestor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Oven.xml b/data_model/device_types/Oven.xml new file mode 100644 index 00000000000000..5a13b0ec9ba053 --- /dev/null +++ b/data_model/device_types/Oven.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PowerSource.xml b/data_model/device_types/PowerSource.xml new file mode 100644 index 00000000000000..05aaa56f88cf92 --- /dev/null +++ b/data_model/device_types/PowerSource.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PressureSensor.xml b/data_model/device_types/PressureSensor.xml new file mode 100644 index 00000000000000..f472daaf4e39ff --- /dev/null +++ b/data_model/device_types/PressureSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Pump.xml b/data_model/device_types/Pump.xml new file mode 100644 index 00000000000000..6f1b1f39aae53c --- /dev/null +++ b/data_model/device_types/Pump.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PumpController.xml b/data_model/device_types/PumpController.xml new file mode 100644 index 00000000000000..070e3a5912942b --- /dev/null +++ b/data_model/device_types/PumpController.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Refrigerator.xml b/data_model/device_types/Refrigerator.xml new file mode 100644 index 00000000000000..19a9b568872e4a --- /dev/null +++ b/data_model/device_types/Refrigerator.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RoboticVacuumCleaner.xml b/data_model/device_types/RoboticVacuumCleaner.xml new file mode 100644 index 00000000000000..4e02b17d772606 --- /dev/null +++ b/data_model/device_types/RoboticVacuumCleaner.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RoomAirConditioner.xml b/data_model/device_types/RoomAirConditioner.xml new file mode 100644 index 00000000000000..86240698da6789 --- /dev/null +++ b/data_model/device_types/RoomAirConditioner.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RootNodeDeviceType.xml b/data_model/device_types/RootNodeDeviceType.xml new file mode 100644 index 00000000000000..f4792a2e1f5a96 --- /dev/null +++ b/data_model/device_types/RootNodeDeviceType.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/SmokeCOAlarm.xml b/data_model/device_types/SmokeCOAlarm.xml new file mode 100644 index 00000000000000..5888e8148f0927 --- /dev/null +++ b/data_model/device_types/SmokeCOAlarm.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Speaker.xml b/data_model/device_types/Speaker.xml new file mode 100644 index 00000000000000..f8bc0ab150036e --- /dev/null +++ b/data_model/device_types/Speaker.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/TemperatureControlledCabinet.xml b/data_model/device_types/TemperatureControlledCabinet.xml new file mode 100644 index 00000000000000..93c09339a65a75 --- /dev/null +++ b/data_model/device_types/TemperatureControlledCabinet.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/TemperatureSensor.xml b/data_model/device_types/TemperatureSensor.xml new file mode 100644 index 00000000000000..19d3fef781c717 --- /dev/null +++ b/data_model/device_types/TemperatureSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Thermostat.xml b/data_model/device_types/Thermostat.xml new file mode 100644 index 00000000000000..ebc43e7dbf7203 --- /dev/null +++ b/data_model/device_types/Thermostat.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ThreadBorderRouter.xml b/data_model/device_types/ThreadBorderRouter.xml new file mode 100644 index 00000000000000..5a069e57e93243 --- /dev/null +++ b/data_model/device_types/ThreadBorderRouter.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ThreePhasePowerSource.xml b/data_model/device_types/ThreePhasePowerSource.xml new file mode 100644 index 00000000000000..3a3d5a018223b4 --- /dev/null +++ b/data_model/device_types/ThreePhasePowerSource.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Valve.xml b/data_model/device_types/Valve.xml new file mode 100644 index 00000000000000..4ce864b01ab246 --- /dev/null +++ b/data_model/device_types/Valve.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/VideoRemoteControl.xml b/data_model/device_types/VideoRemoteControl.xml new file mode 100644 index 00000000000000..c86fb3ba437a55 --- /dev/null +++ b/data_model/device_types/VideoRemoteControl.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WaterHeater.xml b/data_model/device_types/WaterHeater.xml new file mode 100644 index 00000000000000..2f2f7fae235e1b --- /dev/null +++ b/data_model/device_types/WaterHeater.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WaterLeakDetector.xml b/data_model/device_types/WaterLeakDetector.xml new file mode 100644 index 00000000000000..596a9cebb2ac04 --- /dev/null +++ b/data_model/device_types/WaterLeakDetector.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WindowCovering.xml b/data_model/device_types/WindowCovering.xml new file mode 100644 index 00000000000000..83f03a2a04e5ed --- /dev/null +++ b/data_model/device_types/WindowCovering.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WindowCoveringController.xml b/data_model/device_types/WindowCoveringController.xml new file mode 100644 index 00000000000000..c79d5a2279f6a8 --- /dev/null +++ b/data_model/device_types/WindowCoveringController.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/scraper_version b/data_model/scraper_version new file mode 100644 index 00000000000000..26aaba0e86632e --- /dev/null +++ b/data_model/scraper_version @@ -0,0 +1 @@ +1.2.0 diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index 1b3a767aa1c242..d0b2635bcf3398 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -16,6 +16,7 @@ import glob import os +import re import subprocess import click @@ -24,6 +25,11 @@ DEFAULT_OUTPUT_DIR = os.path.abspath(os.path.join(DEFAULT_CHIP_ROOT, 'data_model')) +def get_xml_path(filename, output_dir): + xml = os.path.basename(filename).replace('.adoc', '.xml') + return os.path.abspath(os.path.join(output_dir, xml)) + + @click.command() @click.option( '--scraper', @@ -45,8 +51,14 @@ is_flag=True, help='Flag for dry run') def main(scraper, spec_root, output_dir, dry_run): - # TODO: Add scrapers for device types + # Clusters need to be scraped first because the cluster directory is passed to the device type directory + scrape_clusters(scraper, spec_root, output_dir, dry_run) + scrape_device_types(scraper, spec_root, output_dir, dry_run) + if not dry_run: + dump_versions(scraper, spec_root, output_dir) + +def scrape_clusters(scraper, spec_root, output_dir, dry_run): src_dir = os.path.abspath(os.path.join(spec_root, 'src')) sdm_clusters_dir = os.path.abspath(os.path.join(src_dir, 'service_device_management')) app_clusters_dir = os.path.abspath(os.path.join(src_dir, 'app_clusters')) @@ -65,8 +77,7 @@ def main(scraper, spec_root, output_dir, dry_run): os.makedirs(clusters_output_dir) def scrape_cluster(filename: str) -> None: - xml = os.path.basename(filename).replace('.adoc', '.xml') - xml_path = os.path.abspath(os.path.join(clusters_output_dir, xml)) + xml_path = get_xml_path(filename, clusters_output_dir) cmd = [scraper, 'cluster', filename, xml_path, '-nd'] if dry_run: print(cmd) @@ -86,13 +97,44 @@ def scrape_all_clusters(dir: str, exclude_list: list[str] = []) -> None: filename = f'{dm_clusters_dir}/{f}' scrape_cluster(filename) - # Put the current spec sha into the cluster dir + +def scrape_device_types(scraper, spec_root, output_dir, dry_run): + device_type_dir = os.path.abspath(os.path.join(spec_root, 'src', 'device_types')) + device_types_output_dir = os.path.abspath(os.path.join(output_dir, 'device_types')) + clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters')) + + if not os.path.exists(device_types_output_dir): + os.makedirs(device_types_output_dir) + + def scrape_device_type(filename: str) -> None: + xml_path = get_xml_path(filename, device_types_output_dir) + cmd = [scraper, 'devicetype', '-c', clusters_output_dir, '-nd', filename, xml_path] + if dry_run: + print(cmd) + else: + print(' '.join(cmd)) + subprocess.run(cmd) + + exclude_list = [r"section_*"] + for filename in glob.glob(f'{device_type_dir}/*.adoc'): + for exclude in exclude_list: + if not re.match(exclude, os.path.basename(filename)): + scrape_device_type(filename) + + +def dump_versions(scraper, spec_root, output_dir): sha_file = os.path.abspath(os.path.join(output_dir, 'spec_sha')) out = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True, encoding="utf8", cwd=spec_root) sha = out.stdout with open(sha_file, 'wt', encoding='utf8') as output: output.write(sha) + scraper_file = os.path.abspath(os.path.join(output_dir, 'scraper_version')) + out = subprocess.run([scraper, '--version'], capture_output=True, encoding="utf8") + version = out.stdout + with open(scraper_file, "wt", encoding='utf8') as output: + output.write(version) + if __name__ == '__main__': main()