Skip to content

Add: BACnet profile from issue #33 - #34

Closed
github-actions[bot] wants to merge 1 commit into
mainfrom
auto-profile-33
Closed

Add: BACnet profile from issue #33#34
github-actions[bot] wants to merge 1 commit into
mainfrom
auto-profile-33

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Automated Profile Evidence

Sources

Protocol field checks

Message Field Offset Length Endian Formula Citation
air_quality_status messageType 0 1 Official document: byte offset 0, length 1, message type unsigned integer; supported value is 0xA1.
air_quality_status co2 1 2 big raw Official document: bytes 1-2 are CO2 concentration as unsigned 16-bit big-endian integer in parts per million.
air_quality_status temperature 3 2 big raw / 100 Official document: bytes 3-4 are temperature as signed 16-bit big-endian integer; divide raw value by 100 to obtain degrees Celsius.
air_quality_status humidity 5 2 big raw / 100 Official document: bytes 5-6 are relative humidity as unsigned 16-bit big-endian integer; divide raw value by 100 to obtain percent.
air_quality_status batteryLevel 7 1 raw Official document: byte 7 is battery level as unsigned integer from 0 through 100 percent.
air_quality_status occupancy 8 1 (statusFlags & 0x01) ? 1 : 0 Official document: byte 8 status flags bit 0 is occupancy; value is 1 when bit is set, 0 otherwise.
air_quality_status sensorFault 8 1 (statusFlags & 0x02) ? 1 : 0 Official document: byte 8 status flags bit 1 is sensor fault; value is 1 when bit is set, 0 otherwise.

BACnet mapping requested by submitter

- CO2 → AnalogInputObject (partsPerMillion)
- Temperature → AnalogInputObject (degreesCelsius)
- Humidity → AnalogInputObject (percent)
- Battery Level → AnalogInputObject (percent)
- Occupancy → BinaryInputObject
- Sensor Fault → BinaryInputObject

Test coverage

Test fPort Payload Oracle
Example 1 12 A101F408FC11945C01 Known answer
Example 2 12 A104B0FF381B581402 Known answer
Example 3 12 A102EE0C800DAC5000 Known answer

Review findings

  • {"severity":"info","summary":"machinePreflight is present and valid.","details":"Preflight reports valid: true, codec contains required functions Decode and decodeUplink, root keys are present, and datatype has 6 channels matching the six decoded values.","location":"machinePreflight"}
  • {"severity":"info","summary":"Codec matches the documented payload format.","details":"The decoder requires fPort 12, exactly 9 bytes, and message type 0xA1. It parses CO2 as unsigned 16-bit big-endian at bytes 1-2, temperature as signed 16-bit big-endian at bytes 3-4 with correct two's-complement conversion, humidity as unsigned 16-bit big-endian at bytes 5-6, battery as byte 7, and status flags at byte 8. Scaling by /100 for temperature and humidity matches the documentation.","location":"profileYaml.codec"}
  • {"severity":"info","summary":"BACnet datatype mapping matches requested fields, names, units, and object types.","details":"Channels 1-4 are AnalogInputObject with units partsPerMillion, degreesCelsius, percent, and percent. Channels 5-6 are BinaryInputObject with no unit. Names correspond to CO2, Temperature, Humidity, Battery Level, Occupancy, and Sensor Fault.","location":"profileYaml.datatype"}
  • {"severity":"info","summary":"Known-answer examples are internally consistent with the decoder.","details":"Example 1 decodes to CO2 500, temperature 23, humidity 45, battery 92, occupancy 1, sensor fault 0. Example 2 decodes to CO2 1200, temperature -2, humidity 70, battery 20, occupancy 0, sensor fault 1. Example 3 decodes to CO2 750, temperature 32, humidity 35, battery 80, occupancy 0, sensor fault 0. These match the documented examples.","location":"fixture.testCases"}
  • {"severity":"low","summary":"Decode does not independently revalidate fPort, length, or message type when called directly.","details":"Decode returns [] for invalid fPort, non-array data, wrong length, or wrong message type, but decodeUplink performs explicit validation and returns errors. If a host calls Decode directly with undefined variables, it still safely returns an empty array for invalid inputs. This is not a high-risk issue because the exported wrapper validates input and the fallback behavior is safe.","location":"profileYaml.codec.Decode"}
  • {"severity":"info","summary":"No downlink behavior is present, consistent with the documentation.","details":"The document states uplink only and the codec contains only uplink decoding functions. No hidden downlink handling was found.","location":"profileYaml.codec"}

This profile remains verified: false until confirmed on real hardware.

Closes #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Profile Request] AutomationTest - AQ200

1 participant