From 2fe2d89cb73752a6494c486a5b058cf638b335d2 Mon Sep 17 00:00:00 2001 From: Matthias Hochgatterer Date: Thu, 14 Apr 2016 09:15:35 +0200 Subject: [PATCH] Remove unused characters from characteristic and service type UUIDs --- characteristic/accessory_identifier.go | 2 +- characteristic/administrator_only_access.go | 2 +- characteristic/air_particulate_density.go | 2 +- characteristic/air_particulate_size.go | 2 +- characteristic/air_quality.go | 2 +- characteristic/audio_feedback.go | 2 +- characteristic/battery_level.go | 2 +- characteristic/brightness.go | 2 +- characteristic/carbon_dioxide_detected.go | 2 +- characteristic/carbon_dioxide_level.go | 2 +- characteristic/carbon_dioxide_peak_level.go | 2 +- characteristic/carbon_monoxide_detected.go | 2 +- characteristic/carbon_monoxide_level.go | 2 +- characteristic/carbon_monoxide_peak_level.go | 2 +- characteristic/category.go | 2 +- characteristic/charging_state.go | 2 +- characteristic/configure_bridged_accessory.go | 2 +- .../configure_bridged_accessory_status.go | 2 +- characteristic/contact_sensor_state.go | 2 +- characteristic/cooling_threshold_temperature.go | 2 +- characteristic/current_ambient_light_level.go | 2 +- characteristic/current_door_state.go | 2 +- characteristic/current_heating_cooling_state.go | 2 +- characteristic/current_horizontal_tilt_angle.go | 2 +- characteristic/current_position.go | 2 +- characteristic/current_relative_humidity.go | 2 +- characteristic/current_temperature.go | 2 +- characteristic/current_time.go | 2 +- characteristic/current_vertical_tilt_angle.go | 2 +- characteristic/day_of_the_week.go | 2 +- characteristic/discover_bridged_accessories.go | 2 +- characteristic/discovered_bridged_accessories.go | 2 +- characteristic/firmware_revision.go | 2 +- characteristic/hardware_revision.go | 2 +- characteristic/heating_threshold_temperature.go | 2 +- characteristic/hold_position.go | 2 +- characteristic/hue.go | 2 +- characteristic/identify.go | 2 +- characteristic/leak_detected.go | 2 +- characteristic/link_quality.go | 2 +- characteristic/lock_control_point.go | 2 +- characteristic/lock_current_state.go | 2 +- characteristic/lock_last_known_action.go | 2 +- .../lock_management_auto_security_timeout.go | 2 +- characteristic/lock_target_state.go | 2 +- characteristic/logs.go | 2 +- characteristic/manufacturer.go | 2 +- characteristic/model.go | 2 +- characteristic/motion_detected.go | 2 +- characteristic/name.go | 2 +- characteristic/obstruction_detected.go | 2 +- characteristic/occupancy_detected.go | 2 +- characteristic/on.go | 2 +- characteristic/outlet_in_use.go | 2 +- characteristic/pair_setup.go | 2 +- characteristic/pair_verify.go | 2 +- characteristic/pairing_features.go | 2 +- characteristic/pairing_pairings.go | 2 +- characteristic/position_state.go | 2 +- characteristic/programmable_switch_event.go | 2 +- .../programmable_switch_output_state.go | 2 +- characteristic/reachable.go | 2 +- characteristic/rotation_direction.go | 2 +- characteristic/rotation_speed.go | 2 +- characteristic/saturation.go | 2 +- characteristic/security_system_alarm_type.go | 2 +- characteristic/security_system_current_state.go | 2 +- characteristic/security_system_target_state.go | 2 +- characteristic/serial_number.go | 2 +- characteristic/smoke_detected.go | 2 +- characteristic/software_revision.go | 2 +- characteristic/status_active.go | 2 +- characteristic/status_fault.go | 2 +- characteristic/status_jammed.go | 2 +- characteristic/status_low_battery.go | 2 +- characteristic/status_tampered.go | 2 +- characteristic/target_door_state.go | 2 +- characteristic/target_heating_cooling_state.go | 2 +- characteristic/target_horizontal_tilt_angle.go | 2 +- characteristic/target_position.go | 2 +- characteristic/target_relative_humidity.go | 2 +- characteristic/target_temperature.go | 2 +- characteristic/target_vertical_tilt_angle.go | 2 +- characteristic/temperature_display_units.go | 2 +- characteristic/time_update.go | 2 +- characteristic/tunnel_connection_timeout.go | 2 +- characteristic/tunneled_accessory_advertising.go | 2 +- characteristic/tunneled_accessory_connected.go | 2 +- characteristic/tunneled_accessory_state_number.go | 2 +- characteristic/version.go | 2 +- gen/characteristic.go | 15 ++++++++++++++- gen/service.go | 2 +- service/accessory_information.go | 2 +- service/air_quality_sensor.go | 2 +- service/battery_service.go | 2 +- service/bridge_configuration.go | 2 +- service/bridging_state.go | 2 +- service/carbon_dioxide_sensor.go | 2 +- service/carbon_monoxide_sensor.go | 2 +- service/contact_sensor.go | 2 +- service/door.go | 2 +- service/fan.go | 2 +- service/garage_door_opener.go | 2 +- service/humidity_sensor.go | 2 +- service/leak_sensor.go | 2 +- service/light_sensor.go | 2 +- service/lightbulb.go | 2 +- service/lock_management.go | 2 +- service/lock_mechanism.go | 2 +- service/motion_sensor.go | 2 +- service/occupancy_sensor.go | 2 +- service/outlet.go | 2 +- service/security_system.go | 2 +- service/smoke_sensor.go | 2 +- service/stateful_programmable_switch.go | 2 +- service/stateless_programmable_switch.go | 2 +- service/switch.go | 2 +- service/temperature_sensor.go | 2 +- service/thermostat.go | 2 +- service/time_information.go | 2 +- service/tunneled_btle_accessory_service.go | 2 +- service/window.go | 2 +- service/window_covering.go | 2 +- 123 files changed, 136 insertions(+), 123 deletions(-) diff --git a/characteristic/accessory_identifier.go b/characteristic/accessory_identifier.go index 22a31a92..a0634668 100644 --- a/characteristic/accessory_identifier.go +++ b/characteristic/accessory_identifier.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeAccessoryIdentifier = "00000057-0000-1000-8000-0026BB765291" +const TypeAccessoryIdentifier = "57" type AccessoryIdentifier struct { *String diff --git a/characteristic/administrator_only_access.go b/characteristic/administrator_only_access.go index 08499ed0..da02b660 100644 --- a/characteristic/administrator_only_access.go +++ b/characteristic/administrator_only_access.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeAdministratorOnlyAccess = "00000001-0000-1000-8000-0026BB765291" +const TypeAdministratorOnlyAccess = "1" type AdministratorOnlyAccess struct { *Bool diff --git a/characteristic/air_particulate_density.go b/characteristic/air_particulate_density.go index c85642f1..1a2c6b6c 100644 --- a/characteristic/air_particulate_density.go +++ b/characteristic/air_particulate_density.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeAirParticulateDensity = "00000064-0000-1000-8000-0026BB765291" +const TypeAirParticulateDensity = "64" type AirParticulateDensity struct { *Float diff --git a/characteristic/air_particulate_size.go b/characteristic/air_particulate_size.go index 6cc9844a..a3fb80fc 100644 --- a/characteristic/air_particulate_size.go +++ b/characteristic/air_particulate_size.go @@ -6,7 +6,7 @@ const ( AirParticulateSize10Μm int = 1 ) -const TypeAirParticulateSize = "00000065-0000-1000-8000-0026BB765291" +const TypeAirParticulateSize = "65" type AirParticulateSize struct { *Int diff --git a/characteristic/air_quality.go b/characteristic/air_quality.go index a5a8f3d0..86b4a0e0 100644 --- a/characteristic/air_quality.go +++ b/characteristic/air_quality.go @@ -10,7 +10,7 @@ const ( AirQualityPoor int = 5 ) -const TypeAirQuality = "00000095-0000-1000-8000-0026BB765291" +const TypeAirQuality = "95" type AirQuality struct { *Int diff --git a/characteristic/audio_feedback.go b/characteristic/audio_feedback.go index 14fc581e..4bd3adc5 100644 --- a/characteristic/audio_feedback.go +++ b/characteristic/audio_feedback.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeAudioFeedback = "00000005-0000-1000-8000-0026BB765291" +const TypeAudioFeedback = "5" type AudioFeedback struct { *Bool diff --git a/characteristic/battery_level.go b/characteristic/battery_level.go index a1b6c05a..3e86b121 100644 --- a/characteristic/battery_level.go +++ b/characteristic/battery_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeBatteryLevel = "00000068-0000-1000-8000-0026BB765291" +const TypeBatteryLevel = "68" type BatteryLevel struct { *Int diff --git a/characteristic/brightness.go b/characteristic/brightness.go index f373466e..626b016e 100644 --- a/characteristic/brightness.go +++ b/characteristic/brightness.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeBrightness = "00000008-0000-1000-8000-0026BB765291" +const TypeBrightness = "8" type Brightness struct { *Int diff --git a/characteristic/carbon_dioxide_detected.go b/characteristic/carbon_dioxide_detected.go index 463eea16..87faeac3 100644 --- a/characteristic/carbon_dioxide_detected.go +++ b/characteristic/carbon_dioxide_detected.go @@ -6,7 +6,7 @@ const ( CarbonDioxideDetectedCO2LevelsAbnormal int = 1 ) -const TypeCarbonDioxideDetected = "00000092-0000-1000-8000-0026BB765291" +const TypeCarbonDioxideDetected = "92" type CarbonDioxideDetected struct { *Int diff --git a/characteristic/carbon_dioxide_level.go b/characteristic/carbon_dioxide_level.go index dd14e14d..14493889 100644 --- a/characteristic/carbon_dioxide_level.go +++ b/characteristic/carbon_dioxide_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCarbonDioxideLevel = "00000093-0000-1000-8000-0026BB765291" +const TypeCarbonDioxideLevel = "93" type CarbonDioxideLevel struct { *Float diff --git a/characteristic/carbon_dioxide_peak_level.go b/characteristic/carbon_dioxide_peak_level.go index cc403748..8e39aa5c 100644 --- a/characteristic/carbon_dioxide_peak_level.go +++ b/characteristic/carbon_dioxide_peak_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCarbonDioxidePeakLevel = "00000094-0000-1000-8000-0026BB765291" +const TypeCarbonDioxidePeakLevel = "94" type CarbonDioxidePeakLevel struct { *Float diff --git a/characteristic/carbon_monoxide_detected.go b/characteristic/carbon_monoxide_detected.go index 78c8a0f9..e55698b4 100644 --- a/characteristic/carbon_monoxide_detected.go +++ b/characteristic/carbon_monoxide_detected.go @@ -6,7 +6,7 @@ const ( CarbonMonoxideDetectedCOLevelsAbnormal int = 1 ) -const TypeCarbonMonoxideDetected = "00000069-0000-1000-8000-0026BB765291" +const TypeCarbonMonoxideDetected = "69" type CarbonMonoxideDetected struct { *Int diff --git a/characteristic/carbon_monoxide_level.go b/characteristic/carbon_monoxide_level.go index 3588c868..7ad9f671 100644 --- a/characteristic/carbon_monoxide_level.go +++ b/characteristic/carbon_monoxide_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCarbonMonoxideLevel = "00000090-0000-1000-8000-0026BB765291" +const TypeCarbonMonoxideLevel = "90" type CarbonMonoxideLevel struct { *Float diff --git a/characteristic/carbon_monoxide_peak_level.go b/characteristic/carbon_monoxide_peak_level.go index 28209540..04f38c13 100644 --- a/characteristic/carbon_monoxide_peak_level.go +++ b/characteristic/carbon_monoxide_peak_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCarbonMonoxidePeakLevel = "00000091-0000-1000-8000-0026BB765291" +const TypeCarbonMonoxidePeakLevel = "91" type CarbonMonoxidePeakLevel struct { *Float diff --git a/characteristic/category.go b/characteristic/category.go index a1884a69..dfa03365 100644 --- a/characteristic/category.go +++ b/characteristic/category.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCategory = "000000A3-0000-1000-8000-0026BB765291" +const TypeCategory = "A3" type Category struct { *Int diff --git a/characteristic/charging_state.go b/characteristic/charging_state.go index ca0ed3c9..5c856a55 100644 --- a/characteristic/charging_state.go +++ b/characteristic/charging_state.go @@ -6,7 +6,7 @@ const ( ChargingStateCharging int = 1 ) -const TypeChargingState = "0000008F-0000-1000-8000-0026BB765291" +const TypeChargingState = "8F" type ChargingState struct { *Int diff --git a/characteristic/configure_bridged_accessory.go b/characteristic/configure_bridged_accessory.go index 75bf3543..a774cc65 100644 --- a/characteristic/configure_bridged_accessory.go +++ b/characteristic/configure_bridged_accessory.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeConfigureBridgedAccessory = "000000A0-0000-1000-8000-0026BB765291" +const TypeConfigureBridgedAccessory = "A0" type ConfigureBridgedAccessory struct { *Bytes diff --git a/characteristic/configure_bridged_accessory_status.go b/characteristic/configure_bridged_accessory_status.go index 90f6c70d..e047da2b 100644 --- a/characteristic/configure_bridged_accessory_status.go +++ b/characteristic/configure_bridged_accessory_status.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeConfigureBridgedAccessoryStatus = "0000009D-0000-1000-8000-0026BB765291" +const TypeConfigureBridgedAccessoryStatus = "9D" type ConfigureBridgedAccessoryStatus struct { *Bytes diff --git a/characteristic/contact_sensor_state.go b/characteristic/contact_sensor_state.go index 5cb7c42e..8c2cc0c8 100644 --- a/characteristic/contact_sensor_state.go +++ b/characteristic/contact_sensor_state.go @@ -6,7 +6,7 @@ const ( ContactSensorStateContactNotDetected int = 1 ) -const TypeContactSensorState = "0000006A-0000-1000-8000-0026BB765291" +const TypeContactSensorState = "6A" type ContactSensorState struct { *Int diff --git a/characteristic/cooling_threshold_temperature.go b/characteristic/cooling_threshold_temperature.go index c824f1a4..6f448379 100644 --- a/characteristic/cooling_threshold_temperature.go +++ b/characteristic/cooling_threshold_temperature.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCoolingThresholdTemperature = "0000000D-0000-1000-8000-0026BB765291" +const TypeCoolingThresholdTemperature = "D" type CoolingThresholdTemperature struct { *Float diff --git a/characteristic/current_ambient_light_level.go b/characteristic/current_ambient_light_level.go index 1a7333a1..a4e64c4d 100644 --- a/characteristic/current_ambient_light_level.go +++ b/characteristic/current_ambient_light_level.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentAmbientLightLevel = "0000006B-0000-1000-8000-0026BB765291" +const TypeCurrentAmbientLightLevel = "6B" type CurrentAmbientLightLevel struct { *Float diff --git a/characteristic/current_door_state.go b/characteristic/current_door_state.go index 9ef07401..1ecf74ef 100644 --- a/characteristic/current_door_state.go +++ b/characteristic/current_door_state.go @@ -9,7 +9,7 @@ const ( CurrentDoorStateStopped int = 4 ) -const TypeCurrentDoorState = "0000000E-0000-1000-8000-0026BB765291" +const TypeCurrentDoorState = "E" type CurrentDoorState struct { *Int diff --git a/characteristic/current_heating_cooling_state.go b/characteristic/current_heating_cooling_state.go index b8b55778..17f57802 100644 --- a/characteristic/current_heating_cooling_state.go +++ b/characteristic/current_heating_cooling_state.go @@ -7,7 +7,7 @@ const ( CurrentHeatingCoolingStateCool int = 2 ) -const TypeCurrentHeatingCoolingState = "0000000F-0000-1000-8000-0026BB765291" +const TypeCurrentHeatingCoolingState = "F" type CurrentHeatingCoolingState struct { *Int diff --git a/characteristic/current_horizontal_tilt_angle.go b/characteristic/current_horizontal_tilt_angle.go index e1e55adf..175babdb 100644 --- a/characteristic/current_horizontal_tilt_angle.go +++ b/characteristic/current_horizontal_tilt_angle.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentHorizontalTiltAngle = "0000006C-0000-1000-8000-0026BB765291" +const TypeCurrentHorizontalTiltAngle = "6C" type CurrentHorizontalTiltAngle struct { *Int diff --git a/characteristic/current_position.go b/characteristic/current_position.go index b77f1695..c256774a 100644 --- a/characteristic/current_position.go +++ b/characteristic/current_position.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentPosition = "0000006D-0000-1000-8000-0026BB765291" +const TypeCurrentPosition = "6D" type CurrentPosition struct { *Int diff --git a/characteristic/current_relative_humidity.go b/characteristic/current_relative_humidity.go index bfca9967..6e3eff76 100644 --- a/characteristic/current_relative_humidity.go +++ b/characteristic/current_relative_humidity.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentRelativeHumidity = "00000010-0000-1000-8000-0026BB765291" +const TypeCurrentRelativeHumidity = "10" type CurrentRelativeHumidity struct { *Float diff --git a/characteristic/current_temperature.go b/characteristic/current_temperature.go index b3da94c4..81e58594 100644 --- a/characteristic/current_temperature.go +++ b/characteristic/current_temperature.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentTemperature = "00000011-0000-1000-8000-0026BB765291" +const TypeCurrentTemperature = "11" type CurrentTemperature struct { *Float diff --git a/characteristic/current_time.go b/characteristic/current_time.go index c2c550bc..6dbb0949 100644 --- a/characteristic/current_time.go +++ b/characteristic/current_time.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentTime = "0000009B-0000-1000-8000-0026BB765291" +const TypeCurrentTime = "9B" type CurrentTime struct { *String diff --git a/characteristic/current_vertical_tilt_angle.go b/characteristic/current_vertical_tilt_angle.go index 41e312e6..12bc57fc 100644 --- a/characteristic/current_vertical_tilt_angle.go +++ b/characteristic/current_vertical_tilt_angle.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeCurrentVerticalTiltAngle = "0000006E-0000-1000-8000-0026BB765291" +const TypeCurrentVerticalTiltAngle = "6E" type CurrentVerticalTiltAngle struct { *Int diff --git a/characteristic/day_of_the_week.go b/characteristic/day_of_the_week.go index 92f0986e..5c778da8 100644 --- a/characteristic/day_of_the_week.go +++ b/characteristic/day_of_the_week.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeDayOfTheWeek = "00000098-0000-1000-8000-0026BB765291" +const TypeDayOfTheWeek = "98" type DayOfTheWeek struct { *Int diff --git a/characteristic/discover_bridged_accessories.go b/characteristic/discover_bridged_accessories.go index e6857d1c..491b66f3 100644 --- a/characteristic/discover_bridged_accessories.go +++ b/characteristic/discover_bridged_accessories.go @@ -6,7 +6,7 @@ const ( DiscoverBridgedAccessoriesStopDiscovery int = 1 ) -const TypeDiscoverBridgedAccessories = "0000009E-0000-1000-8000-0026BB765291" +const TypeDiscoverBridgedAccessories = "9E" type DiscoverBridgedAccessories struct { *Int diff --git a/characteristic/discovered_bridged_accessories.go b/characteristic/discovered_bridged_accessories.go index c3de6337..db96ac71 100644 --- a/characteristic/discovered_bridged_accessories.go +++ b/characteristic/discovered_bridged_accessories.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeDiscoveredBridgedAccessories = "0000009F-0000-1000-8000-0026BB765291" +const TypeDiscoveredBridgedAccessories = "9F" type DiscoveredBridgedAccessories struct { *Int diff --git a/characteristic/firmware_revision.go b/characteristic/firmware_revision.go index de7ad86b..dceeedbe 100644 --- a/characteristic/firmware_revision.go +++ b/characteristic/firmware_revision.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeFirmwareRevision = "00000052-0000-1000-8000-0026BB765291" +const TypeFirmwareRevision = "52" type FirmwareRevision struct { *String diff --git a/characteristic/hardware_revision.go b/characteristic/hardware_revision.go index 65abb4b0..f837c476 100644 --- a/characteristic/hardware_revision.go +++ b/characteristic/hardware_revision.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeHardwareRevision = "00000053-0000-1000-8000-0026BB765291" +const TypeHardwareRevision = "53" type HardwareRevision struct { *String diff --git a/characteristic/heating_threshold_temperature.go b/characteristic/heating_threshold_temperature.go index 28c2f09a..f01b6bd3 100644 --- a/characteristic/heating_threshold_temperature.go +++ b/characteristic/heating_threshold_temperature.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeHeatingThresholdTemperature = "00000012-0000-1000-8000-0026BB765291" +const TypeHeatingThresholdTemperature = "12" type HeatingThresholdTemperature struct { *Float diff --git a/characteristic/hold_position.go b/characteristic/hold_position.go index f98a6e35..c7f4190a 100644 --- a/characteristic/hold_position.go +++ b/characteristic/hold_position.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeHoldPosition = "0000006F-0000-1000-8000-0026BB765291" +const TypeHoldPosition = "6F" type HoldPosition struct { *Bool diff --git a/characteristic/hue.go b/characteristic/hue.go index 2034e301..0f312014 100644 --- a/characteristic/hue.go +++ b/characteristic/hue.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeHue = "00000013-0000-1000-8000-0026BB765291" +const TypeHue = "13" type Hue struct { *Float diff --git a/characteristic/identify.go b/characteristic/identify.go index b0b88bba..d2fe141f 100644 --- a/characteristic/identify.go +++ b/characteristic/identify.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeIdentify = "00000014-0000-1000-8000-0026BB765291" +const TypeIdentify = "14" type Identify struct { *Bool diff --git a/characteristic/leak_detected.go b/characteristic/leak_detected.go index cc7c8778..038151df 100644 --- a/characteristic/leak_detected.go +++ b/characteristic/leak_detected.go @@ -6,7 +6,7 @@ const ( LeakDetectedLeakDetected int = 1 ) -const TypeLeakDetected = "00000070-0000-1000-8000-0026BB765291" +const TypeLeakDetected = "70" type LeakDetected struct { *Int diff --git a/characteristic/link_quality.go b/characteristic/link_quality.go index c3a10e4c..d7501ac2 100644 --- a/characteristic/link_quality.go +++ b/characteristic/link_quality.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeLinkQuality = "0000009C-0000-1000-8000-0026BB765291" +const TypeLinkQuality = "9C" type LinkQuality struct { *Int diff --git a/characteristic/lock_control_point.go b/characteristic/lock_control_point.go index 3c3efe78..74f82390 100644 --- a/characteristic/lock_control_point.go +++ b/characteristic/lock_control_point.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeLockControlPoint = "00000019-0000-1000-8000-0026BB765291" +const TypeLockControlPoint = "19" type LockControlPoint struct { *Bytes diff --git a/characteristic/lock_current_state.go b/characteristic/lock_current_state.go index 6f13346c..dd4999f6 100644 --- a/characteristic/lock_current_state.go +++ b/characteristic/lock_current_state.go @@ -8,7 +8,7 @@ const ( LockCurrentStateUnknown int = 3 ) -const TypeLockCurrentState = "0000001D-0000-1000-8000-0026BB765291" +const TypeLockCurrentState = "1D" type LockCurrentState struct { *Int diff --git a/characteristic/lock_last_known_action.go b/characteristic/lock_last_known_action.go index b7d94620..4a91eefa 100644 --- a/characteristic/lock_last_known_action.go +++ b/characteristic/lock_last_known_action.go @@ -13,7 +13,7 @@ const ( LockLastKnownActionSecuredByAutoSecureTimeout int = 8 ) -const TypeLockLastKnownAction = "0000001C-0000-1000-8000-0026BB765291" +const TypeLockLastKnownAction = "1C" type LockLastKnownAction struct { *Int diff --git a/characteristic/lock_management_auto_security_timeout.go b/characteristic/lock_management_auto_security_timeout.go index 6bda7d08..867aee5c 100644 --- a/characteristic/lock_management_auto_security_timeout.go +++ b/characteristic/lock_management_auto_security_timeout.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeLockManagementAutoSecurityTimeout = "0000001A-0000-1000-8000-0026BB765291" +const TypeLockManagementAutoSecurityTimeout = "1A" type LockManagementAutoSecurityTimeout struct { *Int diff --git a/characteristic/lock_target_state.go b/characteristic/lock_target_state.go index 632b9adf..ec6ea81b 100644 --- a/characteristic/lock_target_state.go +++ b/characteristic/lock_target_state.go @@ -6,7 +6,7 @@ const ( LockTargetStateSecured int = 1 ) -const TypeLockTargetState = "0000001E-0000-1000-8000-0026BB765291" +const TypeLockTargetState = "1E" type LockTargetState struct { *Int diff --git a/characteristic/logs.go b/characteristic/logs.go index dab18a05..9e6d54b3 100644 --- a/characteristic/logs.go +++ b/characteristic/logs.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeLogs = "0000001F-0000-1000-8000-0026BB765291" +const TypeLogs = "1F" type Logs struct { *Bytes diff --git a/characteristic/manufacturer.go b/characteristic/manufacturer.go index 2c72aa3d..d6559238 100644 --- a/characteristic/manufacturer.go +++ b/characteristic/manufacturer.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeManufacturer = "00000020-0000-1000-8000-0026BB765291" +const TypeManufacturer = "20" type Manufacturer struct { *String diff --git a/characteristic/model.go b/characteristic/model.go index d0caa214..4ae7480f 100644 --- a/characteristic/model.go +++ b/characteristic/model.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeModel = "00000021-0000-1000-8000-0026BB765291" +const TypeModel = "21" type Model struct { *String diff --git a/characteristic/motion_detected.go b/characteristic/motion_detected.go index 65e18dff..bacb71bb 100644 --- a/characteristic/motion_detected.go +++ b/characteristic/motion_detected.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeMotionDetected = "00000022-0000-1000-8000-0026BB765291" +const TypeMotionDetected = "22" type MotionDetected struct { *Bool diff --git a/characteristic/name.go b/characteristic/name.go index f6c199fe..246861ef 100644 --- a/characteristic/name.go +++ b/characteristic/name.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeName = "00000023-0000-1000-8000-0026BB765291" +const TypeName = "23" type Name struct { *String diff --git a/characteristic/obstruction_detected.go b/characteristic/obstruction_detected.go index df25b22c..62ade958 100644 --- a/characteristic/obstruction_detected.go +++ b/characteristic/obstruction_detected.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeObstructionDetected = "00000024-0000-1000-8000-0026BB765291" +const TypeObstructionDetected = "24" type ObstructionDetected struct { *Bool diff --git a/characteristic/occupancy_detected.go b/characteristic/occupancy_detected.go index 72d79a49..b17c0149 100644 --- a/characteristic/occupancy_detected.go +++ b/characteristic/occupancy_detected.go @@ -6,7 +6,7 @@ const ( OccupancyDetectedOccupancyDetected int = 1 ) -const TypeOccupancyDetected = "00000071-0000-1000-8000-0026BB765291" +const TypeOccupancyDetected = "71" type OccupancyDetected struct { *Int diff --git a/characteristic/on.go b/characteristic/on.go index f11412ec..2f940486 100644 --- a/characteristic/on.go +++ b/characteristic/on.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeOn = "00000025-0000-1000-8000-0026BB765291" +const TypeOn = "25" type On struct { *Bool diff --git a/characteristic/outlet_in_use.go b/characteristic/outlet_in_use.go index 892f73dc..69a2da4d 100644 --- a/characteristic/outlet_in_use.go +++ b/characteristic/outlet_in_use.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeOutletInUse = "00000026-0000-1000-8000-0026BB765291" +const TypeOutletInUse = "26" type OutletInUse struct { *Bool diff --git a/characteristic/pair_setup.go b/characteristic/pair_setup.go index 0f48c795..f32c997b 100644 --- a/characteristic/pair_setup.go +++ b/characteristic/pair_setup.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypePairSetup = "0000004C-0000-1000-8000-0026BB765291" +const TypePairSetup = "4C" type PairSetup struct { *Bytes diff --git a/characteristic/pair_verify.go b/characteristic/pair_verify.go index 7d3d56e7..9ceb7477 100644 --- a/characteristic/pair_verify.go +++ b/characteristic/pair_verify.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypePairVerify = "0000004E-0000-1000-8000-0026BB765291" +const TypePairVerify = "4E" type PairVerify struct { *Bytes diff --git a/characteristic/pairing_features.go b/characteristic/pairing_features.go index 30410898..8846942b 100644 --- a/characteristic/pairing_features.go +++ b/characteristic/pairing_features.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypePairingFeatures = "0000004F-0000-1000-8000-0026BB765291" +const TypePairingFeatures = "4F" type PairingFeatures struct { *Int diff --git a/characteristic/pairing_pairings.go b/characteristic/pairing_pairings.go index a3e8f875..20f9b359 100644 --- a/characteristic/pairing_pairings.go +++ b/characteristic/pairing_pairings.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypePairingPairings = "00000050-0000-1000-8000-0026BB765291" +const TypePairingPairings = "50" type PairingPairings struct { *Bytes diff --git a/characteristic/position_state.go b/characteristic/position_state.go index deed5ee5..f2831917 100644 --- a/characteristic/position_state.go +++ b/characteristic/position_state.go @@ -7,7 +7,7 @@ const ( PositionStateStopped int = 2 ) -const TypePositionState = "00000072-0000-1000-8000-0026BB765291" +const TypePositionState = "72" type PositionState struct { *Int diff --git a/characteristic/programmable_switch_event.go b/characteristic/programmable_switch_event.go index c6903d38..aaf0dc2a 100644 --- a/characteristic/programmable_switch_event.go +++ b/characteristic/programmable_switch_event.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeProgrammableSwitchEvent = "00000073-0000-1000-8000-0026BB765291" +const TypeProgrammableSwitchEvent = "73" type ProgrammableSwitchEvent struct { *Int diff --git a/characteristic/programmable_switch_output_state.go b/characteristic/programmable_switch_output_state.go index ca3cbf41..54c95717 100644 --- a/characteristic/programmable_switch_output_state.go +++ b/characteristic/programmable_switch_output_state.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeProgrammableSwitchOutputState = "00000074-0000-1000-8000-0026BB765291" +const TypeProgrammableSwitchOutputState = "74" type ProgrammableSwitchOutputState struct { *Int diff --git a/characteristic/reachable.go b/characteristic/reachable.go index 545f5b47..c9732067 100644 --- a/characteristic/reachable.go +++ b/characteristic/reachable.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeReachable = "00000063-0000-1000-8000-0026BB765291" +const TypeReachable = "63" type Reachable struct { *Bool diff --git a/characteristic/rotation_direction.go b/characteristic/rotation_direction.go index 0f5ce2a5..285080e3 100644 --- a/characteristic/rotation_direction.go +++ b/characteristic/rotation_direction.go @@ -6,7 +6,7 @@ const ( RotationDirectionCounterclockwise int = 1 ) -const TypeRotationDirection = "00000028-0000-1000-8000-0026BB765291" +const TypeRotationDirection = "28" type RotationDirection struct { *Int diff --git a/characteristic/rotation_speed.go b/characteristic/rotation_speed.go index d5ca4136..07ef2894 100644 --- a/characteristic/rotation_speed.go +++ b/characteristic/rotation_speed.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeRotationSpeed = "00000029-0000-1000-8000-0026BB765291" +const TypeRotationSpeed = "29" type RotationSpeed struct { *Float diff --git a/characteristic/saturation.go b/characteristic/saturation.go index 78b3a7e3..6c06b68c 100644 --- a/characteristic/saturation.go +++ b/characteristic/saturation.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeSaturation = "0000002F-0000-1000-8000-0026BB765291" +const TypeSaturation = "2F" type Saturation struct { *Float diff --git a/characteristic/security_system_alarm_type.go b/characteristic/security_system_alarm_type.go index 2f53dfce..cff9fdfb 100644 --- a/characteristic/security_system_alarm_type.go +++ b/characteristic/security_system_alarm_type.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeSecuritySystemAlarmType = "0000008E-0000-1000-8000-0026BB765291" +const TypeSecuritySystemAlarmType = "8E" type SecuritySystemAlarmType struct { *Int diff --git a/characteristic/security_system_current_state.go b/characteristic/security_system_current_state.go index dbe87267..ec9cbf17 100644 --- a/characteristic/security_system_current_state.go +++ b/characteristic/security_system_current_state.go @@ -9,7 +9,7 @@ const ( SecuritySystemCurrentStateAlarmTriggered int = 4 ) -const TypeSecuritySystemCurrentState = "00000066-0000-1000-8000-0026BB765291" +const TypeSecuritySystemCurrentState = "66" type SecuritySystemCurrentState struct { *Int diff --git a/characteristic/security_system_target_state.go b/characteristic/security_system_target_state.go index 63f4fbde..ffd545a1 100644 --- a/characteristic/security_system_target_state.go +++ b/characteristic/security_system_target_state.go @@ -8,7 +8,7 @@ const ( SecuritySystemTargetStateDisarm int = 3 ) -const TypeSecuritySystemTargetState = "00000067-0000-1000-8000-0026BB765291" +const TypeSecuritySystemTargetState = "67" type SecuritySystemTargetState struct { *Int diff --git a/characteristic/serial_number.go b/characteristic/serial_number.go index 1511ff01..6be28837 100644 --- a/characteristic/serial_number.go +++ b/characteristic/serial_number.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeSerialNumber = "00000030-0000-1000-8000-0026BB765291" +const TypeSerialNumber = "30" type SerialNumber struct { *String diff --git a/characteristic/smoke_detected.go b/characteristic/smoke_detected.go index 04fb33da..442f5bf0 100644 --- a/characteristic/smoke_detected.go +++ b/characteristic/smoke_detected.go @@ -6,7 +6,7 @@ const ( SmokeDetectedSmokeDetected int = 1 ) -const TypeSmokeDetected = "00000076-0000-1000-8000-0026BB765291" +const TypeSmokeDetected = "76" type SmokeDetected struct { *Int diff --git a/characteristic/software_revision.go b/characteristic/software_revision.go index cac36834..e36a7b28 100644 --- a/characteristic/software_revision.go +++ b/characteristic/software_revision.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeSoftwareRevision = "00000054-0000-1000-8000-0026BB765291" +const TypeSoftwareRevision = "54" type SoftwareRevision struct { *String diff --git a/characteristic/status_active.go b/characteristic/status_active.go index a9345add..91703333 100644 --- a/characteristic/status_active.go +++ b/characteristic/status_active.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeStatusActive = "00000075-0000-1000-8000-0026BB765291" +const TypeStatusActive = "75" type StatusActive struct { *Bool diff --git a/characteristic/status_fault.go b/characteristic/status_fault.go index 2cd1c965..c5c98534 100644 --- a/characteristic/status_fault.go +++ b/characteristic/status_fault.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeStatusFault = "00000077-0000-1000-8000-0026BB765291" +const TypeStatusFault = "77" type StatusFault struct { *Int diff --git a/characteristic/status_jammed.go b/characteristic/status_jammed.go index 7c20bf13..22d5236d 100644 --- a/characteristic/status_jammed.go +++ b/characteristic/status_jammed.go @@ -6,7 +6,7 @@ const ( StatusJammedJammed int = 1 ) -const TypeStatusJammed = "00000078-0000-1000-8000-0026BB765291" +const TypeStatusJammed = "78" type StatusJammed struct { *Int diff --git a/characteristic/status_low_battery.go b/characteristic/status_low_battery.go index f463cb33..4ca4ad7e 100644 --- a/characteristic/status_low_battery.go +++ b/characteristic/status_low_battery.go @@ -6,7 +6,7 @@ const ( StatusLowBatteryBatteryLevelLow int = 1 ) -const TypeStatusLowBattery = "00000079-0000-1000-8000-0026BB765291" +const TypeStatusLowBattery = "79" type StatusLowBattery struct { *Int diff --git a/characteristic/status_tampered.go b/characteristic/status_tampered.go index c1e35bb8..e16330a6 100644 --- a/characteristic/status_tampered.go +++ b/characteristic/status_tampered.go @@ -6,7 +6,7 @@ const ( StatusTamperedTampered int = 1 ) -const TypeStatusTampered = "0000007A-0000-1000-8000-0026BB765291" +const TypeStatusTampered = "7A" type StatusTampered struct { *Int diff --git a/characteristic/target_door_state.go b/characteristic/target_door_state.go index e5539f9d..6d055bc6 100644 --- a/characteristic/target_door_state.go +++ b/characteristic/target_door_state.go @@ -6,7 +6,7 @@ const ( TargetDoorStateClosed int = 1 ) -const TypeTargetDoorState = "00000032-0000-1000-8000-0026BB765291" +const TypeTargetDoorState = "32" type TargetDoorState struct { *Int diff --git a/characteristic/target_heating_cooling_state.go b/characteristic/target_heating_cooling_state.go index 0347e1da..8ef95e33 100644 --- a/characteristic/target_heating_cooling_state.go +++ b/characteristic/target_heating_cooling_state.go @@ -8,7 +8,7 @@ const ( TargetHeatingCoolingStateAuto int = 3 ) -const TypeTargetHeatingCoolingState = "00000033-0000-1000-8000-0026BB765291" +const TypeTargetHeatingCoolingState = "33" type TargetHeatingCoolingState struct { *Int diff --git a/characteristic/target_horizontal_tilt_angle.go b/characteristic/target_horizontal_tilt_angle.go index efa6464c..2f9db7ee 100644 --- a/characteristic/target_horizontal_tilt_angle.go +++ b/characteristic/target_horizontal_tilt_angle.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTargetHorizontalTiltAngle = "0000007B-0000-1000-8000-0026BB765291" +const TypeTargetHorizontalTiltAngle = "7B" type TargetHorizontalTiltAngle struct { *Int diff --git a/characteristic/target_position.go b/characteristic/target_position.go index 523dfa83..c87d4e82 100644 --- a/characteristic/target_position.go +++ b/characteristic/target_position.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTargetPosition = "0000007C-0000-1000-8000-0026BB765291" +const TypeTargetPosition = "7C" type TargetPosition struct { *Int diff --git a/characteristic/target_relative_humidity.go b/characteristic/target_relative_humidity.go index 6e1d1b3e..b1d37a2d 100644 --- a/characteristic/target_relative_humidity.go +++ b/characteristic/target_relative_humidity.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTargetRelativeHumidity = "00000034-0000-1000-8000-0026BB765291" +const TypeTargetRelativeHumidity = "34" type TargetRelativeHumidity struct { *Float diff --git a/characteristic/target_temperature.go b/characteristic/target_temperature.go index e96a50cc..540374ed 100644 --- a/characteristic/target_temperature.go +++ b/characteristic/target_temperature.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTargetTemperature = "00000035-0000-1000-8000-0026BB765291" +const TypeTargetTemperature = "35" type TargetTemperature struct { *Float diff --git a/characteristic/target_vertical_tilt_angle.go b/characteristic/target_vertical_tilt_angle.go index 2ef95a5e..e76d7098 100644 --- a/characteristic/target_vertical_tilt_angle.go +++ b/characteristic/target_vertical_tilt_angle.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTargetVerticalTiltAngle = "0000007D-0000-1000-8000-0026BB765291" +const TypeTargetVerticalTiltAngle = "7D" type TargetVerticalTiltAngle struct { *Int diff --git a/characteristic/temperature_display_units.go b/characteristic/temperature_display_units.go index 01655f12..1ededc71 100644 --- a/characteristic/temperature_display_units.go +++ b/characteristic/temperature_display_units.go @@ -6,7 +6,7 @@ const ( TemperatureDisplayUnitsFahrenheit int = 1 ) -const TypeTemperatureDisplayUnits = "00000036-0000-1000-8000-0026BB765291" +const TypeTemperatureDisplayUnits = "36" type TemperatureDisplayUnits struct { *Int diff --git a/characteristic/time_update.go b/characteristic/time_update.go index 0c9a73a9..e1c0b88a 100644 --- a/characteristic/time_update.go +++ b/characteristic/time_update.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTimeUpdate = "0000009A-0000-1000-8000-0026BB765291" +const TypeTimeUpdate = "9A" type TimeUpdate struct { *Bool diff --git a/characteristic/tunnel_connection_timeout.go b/characteristic/tunnel_connection_timeout.go index 77ed1532..009c89f5 100644 --- a/characteristic/tunnel_connection_timeout.go +++ b/characteristic/tunnel_connection_timeout.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTunnelConnectionTimeout = "00000061-0000-1000-8000-0026BB765291" +const TypeTunnelConnectionTimeout = "61" type TunnelConnectionTimeout struct { *Int diff --git a/characteristic/tunneled_accessory_advertising.go b/characteristic/tunneled_accessory_advertising.go index 76fafe56..117bad41 100644 --- a/characteristic/tunneled_accessory_advertising.go +++ b/characteristic/tunneled_accessory_advertising.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTunneledAccessoryAdvertising = "00000060-0000-1000-8000-0026BB765291" +const TypeTunneledAccessoryAdvertising = "60" type TunneledAccessoryAdvertising struct { *Bool diff --git a/characteristic/tunneled_accessory_connected.go b/characteristic/tunneled_accessory_connected.go index d143f779..eb0180cf 100644 --- a/characteristic/tunneled_accessory_connected.go +++ b/characteristic/tunneled_accessory_connected.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTunneledAccessoryConnected = "00000059-0000-1000-8000-0026BB765291" +const TypeTunneledAccessoryConnected = "59" type TunneledAccessoryConnected struct { *Bool diff --git a/characteristic/tunneled_accessory_state_number.go b/characteristic/tunneled_accessory_state_number.go index e9241805..88bfe338 100644 --- a/characteristic/tunneled_accessory_state_number.go +++ b/characteristic/tunneled_accessory_state_number.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeTunneledAccessoryStateNumber = "00000058-0000-1000-8000-0026BB765291" +const TypeTunneledAccessoryStateNumber = "58" type TunneledAccessoryStateNumber struct { *Float diff --git a/characteristic/version.go b/characteristic/version.go index f73cc37d..a4cffd50 100644 --- a/characteristic/version.go +++ b/characteristic/version.go @@ -1,7 +1,7 @@ // THIS FILE IS AUTO-GENERATED package characteristic -const TypeVersion = "00000037-0000-1000-8000-0026BB765291" +const TypeVersion = "37" type Version struct { *String diff --git a/gen/characteristic.go b/gen/characteristic.go index b0b60ab6..e6b69f15 100644 --- a/gen/characteristic.go +++ b/gen/characteristic.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "reflect" + "regexp" "sort" "strings" "text/template" @@ -66,7 +67,7 @@ func NewCharacteristic(char *CharacteristicMetadata) *Characteristic { FileName: FileName(char), PermsDecl: permissionDecl(char), TypeName: typeName(char), - TypeValue: char.UUID, + TypeValue: minifyUUID(char.UUID), DefaultValue: defaultValue(char), MinValue: minValue(char), MaxValue: maxValue(char), @@ -230,6 +231,18 @@ func defaultValue(char *CharacteristicMetadata) interface{} { return nil } +// minifyUUID returns a minified version of s by removing unneeded characters. +// For example the UUID "0000008C-0000-1000-8000-0026BB765291" the Window Covering +// service will be minified to "8C". +func minifyUUID(s string) string { + authRegexp := regexp.MustCompile(`^([0-9a-fA-F]*)`) + if str := authRegexp.FindString(s); len(str) > 0 { + return strings.TrimLeft(str, "0") + } + + return s +} + // Return the name of the characteristic type name func typeName(char *CharacteristicMetadata) string { return "Type" + camelCased(char.Name) diff --git a/gen/service.go b/gen/service.go index 88eca59d..d15061f6 100644 --- a/gen/service.go +++ b/gen/service.go @@ -58,7 +58,7 @@ func ServiceGoCode(svc *ServiceMetadata, chars []*CharacteristicMetadata) ([]byt StructName: camelCased(svc.Name), FileName: ServiceFileName(svc), TypeName: serviceTypeName(svc), - TypeValue: svc.UUID, + TypeValue: minifyUUID(svc.UUID), Chars: requiredCharacteristics(svc, chars), } diff --git a/service/accessory_information.go b/service/accessory_information.go index 8b6056d6..7f6a6993 100644 --- a/service/accessory_information.go +++ b/service/accessory_information.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeAccessoryInformation = "0000003E-0000-1000-8000-0026BB765291" +const TypeAccessoryInformation = "3E" type AccessoryInformation struct { *Service diff --git a/service/air_quality_sensor.go b/service/air_quality_sensor.go index fd560b76..66184e26 100644 --- a/service/air_quality_sensor.go +++ b/service/air_quality_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeAirQualitySensor = "0000008D-0000-1000-8000-0026BB765291" +const TypeAirQualitySensor = "8D" type AirQualitySensor struct { *Service diff --git a/service/battery_service.go b/service/battery_service.go index 6610d112..89d4b5a8 100644 --- a/service/battery_service.go +++ b/service/battery_service.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeBatteryService = "00000096-0000-1000-8000-0026BB765291" +const TypeBatteryService = "96" type BatteryService struct { *Service diff --git a/service/bridge_configuration.go b/service/bridge_configuration.go index 636ba95b..35550c60 100644 --- a/service/bridge_configuration.go +++ b/service/bridge_configuration.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeBridgeConfiguration = "000000A1-0000-1000-8000-0026BB765291" +const TypeBridgeConfiguration = "A1" type BridgeConfiguration struct { *Service diff --git a/service/bridging_state.go b/service/bridging_state.go index 199d3929..861d32dd 100644 --- a/service/bridging_state.go +++ b/service/bridging_state.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeBridgingState = "00000062-0000-1000-8000-0026BB765291" +const TypeBridgingState = "62" type BridgingState struct { *Service diff --git a/service/carbon_dioxide_sensor.go b/service/carbon_dioxide_sensor.go index 108a9c6a..b1e8b2f6 100644 --- a/service/carbon_dioxide_sensor.go +++ b/service/carbon_dioxide_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeCarbonDioxideSensor = "00000097-0000-1000-8000-0026BB765291" +const TypeCarbonDioxideSensor = "97" type CarbonDioxideSensor struct { *Service diff --git a/service/carbon_monoxide_sensor.go b/service/carbon_monoxide_sensor.go index d9a5dcbc..be122e18 100644 --- a/service/carbon_monoxide_sensor.go +++ b/service/carbon_monoxide_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeCarbonMonoxideSensor = "0000007F-0000-1000-8000-0026BB765291" +const TypeCarbonMonoxideSensor = "7F" type CarbonMonoxideSensor struct { *Service diff --git a/service/contact_sensor.go b/service/contact_sensor.go index 6a9c251e..fcf8504a 100644 --- a/service/contact_sensor.go +++ b/service/contact_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeContactSensor = "00000080-0000-1000-8000-0026BB765291" +const TypeContactSensor = "80" type ContactSensor struct { *Service diff --git a/service/door.go b/service/door.go index 0f424064..43fb7b46 100644 --- a/service/door.go +++ b/service/door.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeDoor = "00000081-0000-1000-8000-0026BB765291" +const TypeDoor = "81" type Door struct { *Service diff --git a/service/fan.go b/service/fan.go index b0742085..3b03817d 100644 --- a/service/fan.go +++ b/service/fan.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeFan = "00000040-0000-1000-8000-0026BB765291" +const TypeFan = "40" type Fan struct { *Service diff --git a/service/garage_door_opener.go b/service/garage_door_opener.go index 6f40f53b..5e4aa25b 100644 --- a/service/garage_door_opener.go +++ b/service/garage_door_opener.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeGarageDoorOpener = "00000041-0000-1000-8000-0026BB765291" +const TypeGarageDoorOpener = "41" type GarageDoorOpener struct { *Service diff --git a/service/humidity_sensor.go b/service/humidity_sensor.go index b798f14c..ea08128c 100644 --- a/service/humidity_sensor.go +++ b/service/humidity_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeHumiditySensor = "00000082-0000-1000-8000-0026BB765291" +const TypeHumiditySensor = "82" type HumiditySensor struct { *Service diff --git a/service/leak_sensor.go b/service/leak_sensor.go index ea8875a8..fb8fc13a 100644 --- a/service/leak_sensor.go +++ b/service/leak_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeLeakSensor = "00000083-0000-1000-8000-0026BB765291" +const TypeLeakSensor = "83" type LeakSensor struct { *Service diff --git a/service/light_sensor.go b/service/light_sensor.go index 35f1c057..8cb4baa9 100644 --- a/service/light_sensor.go +++ b/service/light_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeLightSensor = "00000084-0000-1000-8000-0026BB765291" +const TypeLightSensor = "84" type LightSensor struct { *Service diff --git a/service/lightbulb.go b/service/lightbulb.go index 6f488817..e305c1c6 100644 --- a/service/lightbulb.go +++ b/service/lightbulb.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeLightbulb = "00000043-0000-1000-8000-0026BB765291" +const TypeLightbulb = "43" type Lightbulb struct { *Service diff --git a/service/lock_management.go b/service/lock_management.go index 0b047429..6c45bf96 100644 --- a/service/lock_management.go +++ b/service/lock_management.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeLockManagement = "00000044-0000-1000-8000-0026BB765291" +const TypeLockManagement = "44" type LockManagement struct { *Service diff --git a/service/lock_mechanism.go b/service/lock_mechanism.go index fe7381c5..c1ad41d9 100644 --- a/service/lock_mechanism.go +++ b/service/lock_mechanism.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeLockMechanism = "00000045-0000-1000-8000-0026BB765291" +const TypeLockMechanism = "45" type LockMechanism struct { *Service diff --git a/service/motion_sensor.go b/service/motion_sensor.go index d1975ee6..6ba78684 100644 --- a/service/motion_sensor.go +++ b/service/motion_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeMotionSensor = "00000085-0000-1000-8000-0026BB765291" +const TypeMotionSensor = "85" type MotionSensor struct { *Service diff --git a/service/occupancy_sensor.go b/service/occupancy_sensor.go index abc1ba82..6142f74f 100644 --- a/service/occupancy_sensor.go +++ b/service/occupancy_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeOccupancySensor = "00000086-0000-1000-8000-0026BB765291" +const TypeOccupancySensor = "86" type OccupancySensor struct { *Service diff --git a/service/outlet.go b/service/outlet.go index 4e13c99b..fff4f2ef 100644 --- a/service/outlet.go +++ b/service/outlet.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeOutlet = "00000047-0000-1000-8000-0026BB765291" +const TypeOutlet = "47" type Outlet struct { *Service diff --git a/service/security_system.go b/service/security_system.go index 2c8a0dce..a8a90d02 100644 --- a/service/security_system.go +++ b/service/security_system.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeSecuritySystem = "0000007E-0000-1000-8000-0026BB765291" +const TypeSecuritySystem = "7E" type SecuritySystem struct { *Service diff --git a/service/smoke_sensor.go b/service/smoke_sensor.go index 24d74906..962b4f7b 100644 --- a/service/smoke_sensor.go +++ b/service/smoke_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeSmokeSensor = "00000087-0000-1000-8000-0026BB765291" +const TypeSmokeSensor = "87" type SmokeSensor struct { *Service diff --git a/service/stateful_programmable_switch.go b/service/stateful_programmable_switch.go index 620b414d..6968f54b 100644 --- a/service/stateful_programmable_switch.go +++ b/service/stateful_programmable_switch.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeStatefulProgrammableSwitch = "00000088-0000-1000-8000-0026BB765291" +const TypeStatefulProgrammableSwitch = "88" type StatefulProgrammableSwitch struct { *Service diff --git a/service/stateless_programmable_switch.go b/service/stateless_programmable_switch.go index 765400fd..eb02da9c 100644 --- a/service/stateless_programmable_switch.go +++ b/service/stateless_programmable_switch.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeStatelessProgrammableSwitch = "00000089-0000-1000-8000-0026BB765291" +const TypeStatelessProgrammableSwitch = "89" type StatelessProgrammableSwitch struct { *Service diff --git a/service/switch.go b/service/switch.go index 840fe0eb..13b2ba88 100644 --- a/service/switch.go +++ b/service/switch.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeSwitch = "00000049-0000-1000-8000-0026BB765291" +const TypeSwitch = "49" type Switch struct { *Service diff --git a/service/temperature_sensor.go b/service/temperature_sensor.go index 0368eb58..d6cef405 100644 --- a/service/temperature_sensor.go +++ b/service/temperature_sensor.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeTemperatureSensor = "0000008A-0000-1000-8000-0026BB765291" +const TypeTemperatureSensor = "8A" type TemperatureSensor struct { *Service diff --git a/service/thermostat.go b/service/thermostat.go index da020d77..f9e7f302 100644 --- a/service/thermostat.go +++ b/service/thermostat.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeThermostat = "0000004A-0000-1000-8000-0026BB765291" +const TypeThermostat = "4A" type Thermostat struct { *Service diff --git a/service/time_information.go b/service/time_information.go index 07fbc087..cf9768a3 100644 --- a/service/time_information.go +++ b/service/time_information.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeTimeInformation = "00000099-0000-1000-8000-0026BB765291" +const TypeTimeInformation = "99" type TimeInformation struct { *Service diff --git a/service/tunneled_btle_accessory_service.go b/service/tunneled_btle_accessory_service.go index 492044e2..76b1f04c 100644 --- a/service/tunneled_btle_accessory_service.go +++ b/service/tunneled_btle_accessory_service.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeTunneledBTLEAccessoryService = "00000056-0000-1000-8000-0026BB765291" +const TypeTunneledBTLEAccessoryService = "56" type TunneledBTLEAccessoryService struct { *Service diff --git a/service/window.go b/service/window.go index a719fdd8..9754133c 100644 --- a/service/window.go +++ b/service/window.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeWindow = "0000008B-0000-1000-8000-0026BB765291" +const TypeWindow = "8B" type Window struct { *Service diff --git a/service/window_covering.go b/service/window_covering.go index 77ccc450..1d1a0810 100644 --- a/service/window_covering.go +++ b/service/window_covering.go @@ -5,7 +5,7 @@ import ( "github.com/brutella/hc/characteristic" ) -const TypeWindowCovering = "0000008C-0000-1000-8000-0026BB765291" +const TypeWindowCovering = "8C" type WindowCovering struct { *Service