Skip to content

Add new PID data from E1.20-2025 #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
208 changes: 194 additions & 14 deletions data/pid_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4193,8 +4193,16 @@
(0x1e, 'Items'),
(0x1f, 'Humidity'),
(0x20, '16 bit counter'),
(0x21, "CPU load"),
(0x22, "Bandwidth"),
(0x23, "Concentration"),
(0x24, "Sound pressure level"),
(0x25, "Solid angle"),
(0x26, "Log ratio"),
(0x27, "Log ratio volts"),
(0x28, "Log ratio watts"),
(0x7f, 'Other')],
'range': [(0, 0x20), (0x7f, 0xff)]},
'range': [(0, 0x28), (0x7f, 0xff)]},
{'name': 'unit', 'type': 'uint8',
'labels': [(0x00, 'None'),
(0x01, 'Centigrade'),
Expand Down Expand Up @@ -4224,8 +4232,16 @@
(0x19, 'Lumens'),
(0x1a, 'Lux'),
(0x1b, 'Ire'),
(0x1c, 'Bytes')],
'range': [(0, 0x1c), (0x80, 0xff)]},
(0x1c, 'Bytes'),
(0x1d, 'Decibel'),
(0x1e, 'Decibel Volt'),
(0x1f, 'Decibel Watt'),
(0x20, 'Decibel Meter'),
(0x21, 'Percent'),
(0x22, 'Moles per meter Cubed'),
(0x23, 'RPM'),
(0x24, 'Bytes per Second')],
'range': [(0, 0x24), (0x80, 0xff)]},
{'name': 'prefix', 'type': 'uint8',
'labels': [(0x00, 'None'),
(0x01, 'Deci'),
Expand Down Expand Up @@ -4409,6 +4425,26 @@
'set_sub_device_range': 1,
'value': 51},

# QUEUED_MESSAGE_SENSOR_SUBSCRIBE
{'get_request': {'items': []},
'get_response': {'items': [{'type': 'group',
'name': 'sensors',
'items': [{'name': 'sensor_number',
'type': 'uint8'}],
}]},
'get_sub_device_range': 2,
'name': 'QUEUED_MESSAGE_SENSOR_SUBSCRIBE',
'set_request': {'items': [{'name': 'action', 'type': 'uint8', 'labels': [
(0, 'Remove'), (1, 'Add')]},
{'type': 'group',
'name': 'sensors',
'items': [{'name': 'sensor_number',
'type': 'uint8'}]}
]},
'set_response': {'items': []},
'set_sub_device_range': 1,
'value': 52},

# SENSOR_VALUE
{'get_request': {'items': [{'name': 'sensor_number', 'type': 'uint8',
'range': [(0, 0xfe)],
Expand Down Expand Up @@ -4500,6 +4536,28 @@
'set_sub_device_range': 1,
'value': 4145},

# SELFTEST_ENHANCED
{'get_request': {'items': []},
'get_response': {'items': [{'name': 'result_code_pid', 'type': 'uint16',
'labels': [(0, 'Not supported')]},
{'type': 'group', 'name': 'self_tests',
'items': [{'name': 'test_number', 'type': 'uint8',
'labels': [(0xff, 'All')]},
{'name': 'test_status', 'type': 'uint8',
'labels': [(0x00, 'Status not supported'),
(0x01, 'Not run since last power cycle'),
(0x02, 'Aborted/reset'),
(0x03, 'Active/running'),
(0x04, 'Complete - Pass'),
(0x05, 'Complete - Fail'),
(0x06, 'Complete - No analysis'),
(0x07, 'Complete - Result code available'),
(0xff, 'Other - Manufacturer specific')
]}]}]},
'get_sub_device_range': 2,
'name': 'SELFTEST_ENHANCED',
'value': 4130},

# DMX_PERSONALITY_DESCRIPTION
{'get_request': {'items': [{'name': 'personality', 'type': 'uint8', 'range': [
(1, 0xff)]
Expand Down Expand Up @@ -4571,6 +4629,12 @@
(0x0207, 'Additive Color Mixer - Blue'),
(0x0208, 'Color Temperature Correction'),
(0x0209, 'Color Scroll'),
(0x020a, 'Additive Color Mixer - Lime'),
(0x020b, 'Additive Color Mixer - Indigo'),
(0x020c, 'Additive Color Mixer - Cyan'),
(0x020d, 'Additive Color Mixer - Deep Red'),
(0x020e, 'Additive Color Mixer - Deep Blue'),
(0x020f, 'Additive Color Mixer - Natural White'),
(0x0210, 'Color Semaphore'),
(0x0211, 'Additive Color Mixer - Amber'),
(0x0212, 'Additive Color Mixer - White'),
Expand All @@ -4579,6 +4643,7 @@
(0x0215, 'Subtractive Color Mixer - UV'),
(0x0216, 'Hue'),
(0x0217, 'Saturation'),
(0x0218, 'Additive Color Mixer - UV'),
(0x0301, 'Static gobo wheel'),
(0x0302, 'Rotating gobo wheel'),
(0x0303, 'Prism wheel'),
Expand Down Expand Up @@ -4624,14 +4689,24 @@
{'name': 'data_type', 'type': 'uint8',
'labels': [(0x00, 'Not defined'),
(0x01, 'Bit field'),
(0x02, 'ASCII'),
(0x02, 'String'),
(0x03, 'uint8'),
(0x04, 'int8'),
(0x05, 'uint16'),
(0x06, 'int16'),
(0x07, 'uint32'),
(0x08, 'int32')],
'range': [(0x00, 0x08), (0x80, 0xdf)]},
(0x08, 'int32'),
(0x09, 'uint64'),
(0x0a, 'int64'),
(0x0b, 'Group'),
(0x0c, 'UID'),
(0x0d, 'Boolean'),
(0x0e, 'URL'),
(0x0f, 'MAC'),
(0x10, 'IPv4'),
(0x11, 'IPv6'),
(0x12, 'Enumeration')],
'range': [(0x00, 0x12), (0x80, 0xdf)]},
{'name': 'command_class', 'type': 'uint8',
'labels': [(1, 'Get'), (2, 'Set'), (3, 'Get and Set')]},
{'name': 'type', 'type': 'uint8'},
Expand Down Expand Up @@ -4664,8 +4739,16 @@
(0x19, 'Lumens'),
(0x1a, 'Lux'),
(0x1b, 'Ire'),
(0x1c, 'Bytes')],
'range': [(0, 0x1c), (0x80, 0xff)]},
(0x1c, 'Bytes'),
(0x1d, 'Decibel'),
(0x1e, 'Decibel Volt'),
(0x1f, 'Decibel Watt'),
(0x20, 'Decibel Meter'),
(0x21, 'Percent'),
(0x22, 'Moles per meter Cubed'),
(0x23, 'RPM'),
(0x24, 'Bytes per Second')],
'range': [(0, 0x24), (0x80, 0xff)]},
{'name': 'prefix', 'type': 'uint8',
'labels': [(0x00, 'None'),
(0x01, 'Deci'),
Expand Down Expand Up @@ -4699,6 +4782,102 @@
'name': 'PARAMETER_DESCRIPTION',
'value': 81},

# ENUM_LABEL
# TODO(Peter): There's currently no PID value defined for this in the released E1.20-2025 standard so we can't implement it!
# {'get_request': {'items': [{'name': 'pid', 'type': 'uint16'}, {'name': 'enumeration_index', 'type': 'uint32'}]},
# 'get_response': {'items': [{'name': 'pid', 'type': 'uint16'}, {'name': 'enumeration_index', 'type': 'uint32'},
# {'name': 'max_enumeration_index', 'type': 'uint32'},
# {'name': 'description',
# 'max_size': 32,
# 'type': 'string'}]},
# 'get_sub_device_range': 2,
# 'name': 'ENUM_LABEL',
# 'value': },

# SUPPORTED_PARAMETERS_ENHANCED
{'get_request': {'items': []},
'get_response': {'items': [{'name': 'params',
'type': 'group',
'items': [{'name': 'param_id', 'type': 'uint16'},
{'name': 'param_id_support', 'type': 'uint16'}],
}]
},
'get_sub_device_range': 2,
'name': 'SUPPORTED_PARAMETERS_ENHANCED',
'value': 85},

# CONTROLLER_FLAG_SUPPORT
{'get_request': {'items': []},
'get_response': {'items': [{'name': 'controller_flags', 'type': 'uint8'}]},
'get_sub_device_range': 2,
'name': 'CONTROLLER_FLAG_SUPPORT',
'value': 86},

# NACK_DESCRIPTION
{'get_request': {'items': [{'name': 'nack_reason_code', 'type': 'uint16'}]},
'get_response': {'items': [{'name': 'nack_reason_code', 'type': 'uint16'},
{'name': 'description',
'max_size': 32,
'type': 'string'}]},
'get_sub_device_range': 2,
'name': 'NACK_DESCRIPTION',
'value': 87},

# PACKED_PID_SUB
{'get_request': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'index', 'type': 'uint16'},
{'name': 'first_device_requested', 'type': 'uint16'},
{'name': 'number_of_devices_requested', 'type': 'uint16'}]},
'get_response': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'index', 'type': 'uint16'},
{'name': 'packed_results',
'type': 'group',
'items': [{'name': 'device', 'type': 'uint16'},
{'name': 'pdl_size', 'type': 'uint8'},
{'name': 'param_data', 'type': 'group',
'items': [{'name': 'data', 'type': 'uint8'}]}]
}]},
'get_sub_device_range': 0,
'set_request': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'index', 'type': 'uint16'},
{'name': 'packed_request',
'type': 'group',
'items': [{'name': 'device', 'type': 'uint16'},
{'name': 'pdl_size', 'type': 'uint8'},
{'name': 'param_data', 'type': 'group',
'items': [{'name': 'data', 'type': 'uint8'}]}]
}]},
'set_response': {'items': []},
'set_sub_device_range': 0,
'name': 'PACKED_PID_SUB',
'value': 88},

# PACKED_PID_INDEX
{'get_request': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'first_item_requested', 'type': 'uint16'},
{'name': 'number_of_items_requested', 'type': 'uint16'}]},
'get_response': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'packed_results',
'type': 'group',
'items': [{'name': 'item', 'type': 'uint16'},
{'name': 'pdl_size', 'type': 'uint8'},
{'name': 'param_data', 'type': 'group',
'items': [{'name': 'data', 'type': 'uint8'}]}]
}]},
'get_sub_device_range': 2,
'set_request': {'items': [{'name': 'pid', 'type': 'uint16'},
{'name': 'packed_request',
'type': 'group',
'items': [{'name': 'item', 'type': 'uint16'},
{'name': 'pdl_size', 'type': 'uint8'},
{'name': 'param_data', 'type': 'group',
'items': [{'name': 'data', 'type': 'uint8'}]}]
}]},
'set_response': {'items': []},
'set_sub_device_range': 2,
'name': 'PACKED_PID_INDEX',
'value': 89},

# TILT_INVERT
{'get_request': {'items': []},
'get_response': {'items': [{'name': 'invert', 'type': 'bool'}]},
Expand Down Expand Up @@ -4853,7 +5032,7 @@
'set_sub_device_range': 1,
'value': 4112},

# PERFORM_SELF_TEST
# PERFORM_SELFTEST
{'get_request': {'items': []},
'get_response': {'items': [{'name': 'tests_active', 'type': 'bool'}]},
'get_sub_device_range': 2,
Expand Down Expand Up @@ -4961,6 +5140,8 @@
(0x0a00, 'GFI / RCD Device'),
(0x0a01, 'Battery'),
(0x0a02, 'Controllable Breaker'),
(0x0b00, 'Input Device'),
(0x0b01, 'Sensor Input'),
(0x7fff, 'Other Device')],
'range': [(0x0000, 0x0009),
(0x0100, 0x0108),
Expand All @@ -4973,6 +5154,7 @@
(0x0800, 0x0802),
(0x0900, 0x0902),
(0x0a00, 0x0a02),
(0x0b00, 0x0b01),
(0x7fff, 0x7fff),
(0x8000, 0xdfff)]}],
}]},
Expand Down Expand Up @@ -5424,15 +5606,15 @@
{'name': 'shipping_lock_state', 'type': 'uint8',
'labels': [(0, 'Unlocked'),
(1, 'Locked'),
(2, 'Partially Locked'),]
(2, 'Partially Locked')]
},
]},
'get_sub_device_range': 0,
'name': 'SHIPPING_LOCK',
'set_request': {'items': [
{'name': 'shipping_lock_state', 'type': 'uint8',
'labels': [(0, 'Unlocked'),
(1, 'Locked'),]
(1, 'Locked')]
},
]},
'set_response': {'items': []},
Expand Down Expand Up @@ -5471,9 +5653,7 @@
'name': 'loopback_data',
'max_size': 231,
'min_size': 0,
'items': [
{'name': 'data', 'type': 'uint8'}
]},
'items': [{'name': 'data', 'type': 'uint8'}]}
]},
'set_response': {'items': [
{'type': 'group', 'name': 'loopback_data', 'items': [
Expand Down
8 changes: 8 additions & 0 deletions data/sensor_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,13 @@
0x1e: "Items",
0x1f: "Humidity",
0x20: "16 bit counter",
0x21: "CPU load",
0x22: "Bandwidth",
0x23: "Concentration",
0x24: "Sound pressure level",
0x25: "Solid angle",
0x26: "Log ratio",
0x27: "Log ratio volts",
0x28: "Log ratio watts",
0x7f: "Other",
}
Loading
Loading