Skip to content
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

Configure attribute reporting for float attributes #6904

Open
ebaauw opened this issue Apr 17, 2023 · 2 comments
Open

Configure attribute reporting for float attributes #6904

ebaauw opened this issue Apr 17, 2023 · 2 comments

Comments

@ebaauw
Copy link
Collaborator

ebaauw commented Apr 17, 2023

Describe the bug

Neither the GUI nor DDF definitions handle correctly the configuration of attribute reporting for attributes of type float (0x39). The Reportable Change needs to be encoded as a iEEE-754 16-bits floating point number (see e.g. the online IEEE-754 Floating Point Converter), but both the GUI and DDF encode the value specified as 16-bit integer.

When entering a Reportable Change value of 1, the GUI sends a Configure Reporting command with value 10 00 00 00, which is 0x00000001 or 1 as integer, but 1.4013e-45 as floating point. When receiving a Read Reporting Configuration Response, Reportable Change remains empty.
When entering 1065353216, the GUI sends 00 00 80 3f, which is 0x3F800000 as integer, but 1 as as floating point. When reading back the configuration, Reportable Change still remains empty, but the Sniffer confirms that the correct value has been set.

In the DDF binding[]/report/change needs to be specified as hex string. The logic behind the DDF also encodes this as an integer value, instead of a floating point value. So for a value of 1, you need to specify 0x3F80000.

Steps to reproduce the behavior

See the Zigbee sniffer.

Expected behavior

The GUI should display and accept numeric float values.

The DDF should accept JavaScript number values.

Screenshots

n/a

Environment

  • Host system: all
  • Running method: all
  • Firmware version: n/a
  • deCONZ version: all
  • Device: all
  • Do you use an USB extension cable: (yes / no) n/a
  • Is there any other USB or serial devices connected to the host system? If so: Which? n/a

deCONZ Logs

n/a

Additional context

ZCL v8 defines several Concentration Measurement clusters with Measured Value (0x0000) as float and reportable. Notably PM2.5 Measurement (0x040B) and IKEA-specific TVOC Measurement (0xFC7E) on the IKEA VINDSTYRKA.

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label May 9, 2023
@ebaauw
Copy link
Collaborator Author

ebaauw commented May 9, 2023

Bump

@ebaauw ebaauw added Confirmed Bug and removed stale labels May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant