Skip to content

Commit

Permalink
zcl: Add missing enum tables for genBasic
Browse files Browse the repository at this point in the history
Enum tables are added for the following fields:

- genericDeviceType
- productCode type byte
- physicalEnv
  • Loading branch information
kennylevinsen committed Dec 30, 2024
1 parent c62e220 commit 93bd2fa
Showing 1 changed file with 146 additions and 0 deletions.
146 changes: 146 additions & 0 deletions src/zspec/zcl/definition/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,152 @@ export const POWER_SOURCES: Readonly<{[s: number]: string}> = {
6: 'Emergency mains and transfer switch',
};

export const GENERIC_DEVICE_TYPES: Readonly<{[s: number]: string}> = {
0x00: 'Incandescent',
0x01: 'Spotlight Halogen',
0x02: 'Halogen bulb',
0x03: 'CFL',
0x04: 'Linear Fluorescent',
0x05: 'LED bulb',
0x06: 'Spotlight LED',
0x07: 'LED strip',
0x08: 'LED tube',
0x09: 'Generic indoor luminaire/light fixture',
0x0a: 'Generic outdoor luminaire/light fixture',
0x0b: 'Pendant luminaire/light fixture',
0x0c: 'Floor standing luminaire/light fixture',
0xe0: 'Generic Controller (e.g. Remote controller)',
0xe1: 'Wall Switch',
0xe2: 'Portable remote controller',
0xe3: 'Motion sensor / light sensor',
0xf0: 'Generic actuator',
0xf1: 'Wall socket',
0xf2: 'Gateway/Bridge',
0xf3: 'Plug-in unit',
0xf4: 'Retrofit actuator',
0xff: 'Unspecified',
};

export const PRODUCT_CODE_TYPES: Readonly<{[s: number]: string}> = {
0x00: 'Manufacturer defined',
0x01: 'International article number (EAN)',
0x02: 'Global trade item number (GTIN)',
0x03: 'Universal product code (UPC)',
0x04: 'Stock keeping unit (SKU)',
};

export const PHYSICAL_ENVIRONMENTS: Readonly<{[s: number]: string}> = {
0x00: 'Unspecified environment',
0x01: 'Mirror/Atrium',
0x02: 'Bar',
0x03: 'Courtyard',
0x04: 'Bathroom',
0x05: 'Bedroom',
0x06: 'Billiard Room',
0x07: 'Utility Room',
0x08: 'Cellar',
0x09: 'Storage Closet',
0x0a: 'Theater',
0x0b: 'Office',
0x0c: 'Deck',
0x0d: 'Den',
0x0e: 'Dining Room',
0x0f: 'Electrical Room',
0x10: 'Elevator',
0x11: 'Entry',
0x12: 'Family Room',
0x13: 'Main Floor',
0x14: 'Upstairs',
0x15: 'Downstairs',
0x16: 'Basement/Lower Level',
0x17: 'Gallery',
0x18: 'Game Room',
0x19: 'Garage',
0x1a: 'Gym',
0x1b: 'Hallway',
0x1c: 'House',
0x1d: 'Kitchen',
0x1e: 'Laundry Room',
0x1f: 'Library',
0x20: 'Master Bedroom',
0x21: 'Mud Room (small room for coats and boots)',
0x22: 'Nursery',
0x23: 'Pantry',
0x24: 'Office',
0x25: 'Outside',
0x26: 'Pool',
0x27: 'Porch',
0x28: 'Sewing Room',
0x29: 'Sitting Room',
0x2a: 'Stairway',
0x2b: 'Yard',
0x2c: 'Attic',
0x2d: 'Hot Tub',
0x2e: 'Living Room',
0x2f: 'Sauna',
0x30: 'Shop/Workshop',
0x31: 'Guest Bedroom',
0x32: 'Guest Bath',
0x33: 'Powder Room (1/2 bath)',
0x34: 'Back Yard',
0x35: 'Front Yard',
0x36: 'Patio',
0x37: 'Driveway',
0x38: 'Sun Room',
0x39: 'Living Room',
0x3a: 'Spa',
0x3b: 'Whirlpool',
0x3c: 'Shed',
0x3d: 'Equipment Storage',
0x3e: 'Hobby/Craft Room',
0x3f: 'Fountain',
0x40: 'Pond',
0x41: 'Reception Room',
0x42: 'Breakfast Room',
0x43: 'Nook',
0x44: 'Garden',
0x45: 'Balcony',
0x46: 'Panic Room',
0x47: 'Terrace',
0x48: 'Roof',
0x49: 'Toilet',
0x4a: 'Toilet Main',
0x4b: 'Outside Toilet',
0x4c: 'Shower room',
0x4d: 'Study',
0x4e: 'Front Garden',
0x4f: 'Back Garden',
0x50: 'Kettle',
0x51: 'Television',
0x52: 'Stove',
0x53: 'Microwave',
0x54: 'Toaster',
0x55: 'Vacuum',
0x56: 'Appliance',
0x57: 'Front Door',
0x58: 'Back Door',
0x59: 'Fridge Door',
0x60: 'Medication Cabinet Door',
0x61: 'Wardrobe Door',
0x62: 'Front Cupboard Door',
0x63: 'Other Door',
0x64: 'Waiting Room',
0x65: 'Triage Room',
0x66: "Doctor's Office",
0x67: "Patient's Private Room",
0x68: 'Consultation Room',
0x69: 'Nurse Station',
0x6a: 'Ward',
0x6b: 'Corridor',
0x6c: 'Operating Theatre',
0x6d: 'Dental Surgery Room',
0x6e: 'Medical Imaging Room',
0x6f: 'Decontamination Room',
0x70: 'Atrium',
0x71: 'Mirror',
0xff: 'Unknown environment',
};

/** Mapping of device type to ID */
export const ENDPOINT_DEVICE_TYPE: Readonly<{[s: string]: number}> = {
ZLLOnOffLight: 0x0000,
Expand Down

0 comments on commit 93bd2fa

Please sign in to comment.