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

Control Devices: respect "resolution" when reading "inputValue" #128

Merged
merged 1 commit into from
May 3, 2024

Conversation

jktjkt
Copy link
Contributor

@jktjkt jktjkt commented Aug 20, 2023

The standard (62386-103:2014, chapter 9.7) states that the "resolution" of an instance is not always 8-bits. If it's any longer, a proper read involves a transaction and a sequence of commands. If the number is not divisible by 8, extra trailing bits have to be truncated.

Tested on Lunatone DALI-2 MC (86459532-2) and Lunatone CS-2 (86458670). The push button coupler is a part-301 device where the standard says that the on-the-wire values are either 0x00 or 0xff, but the actual resolution (and therefore the correct numeric value) is either 0 or 1. The other device, a combined movement sensor with a light meter, supports 11 bits of resolution for the lux meter and therefore it requires a "QUERY INPUT VALUE" followed by a "QUERY INPUT VALUE LATCH" and dropping the extra 5 bits.

@sde1000
Copy link
Owner

sde1000 commented Aug 22, 2023

Looks good, thank you.

Ideally there would be a test for this new sequence in test_device_sequences.py

@jktjkt jktjkt force-pushed the multibyte-inputvalue branch 2 times, most recently from 2931995 to 8fbf79f Compare April 26, 2024 00:34
The standard (62386-103:2014, chapter 9.7) states that the "resolution"
of an instance is not always 8-bits. If it's any longer, a proper read
involves a transaction and a sequence of commands. If the number is not
divisible by 8, extra trailing bits have to be truncated.

Tested on Lunatone DALI-2 MC (86459532-2) and Lunatone CS-2 (86458670).
The push button coupler is a part-301 device where the standard says
that the on-the-wire values are either 0x00 or 0xff, but the actual
resolution (and therefore the correct numeric value) is either 0 or 1.
The other device, a combined movement sensor with a light meter,
supports 11 bits of resolution for the lux meter and therefore it
requires a "QUERY INPUT VALUE" followed by a "QUERY INPUT VALUE LATCH"
and dropping the extra 5 bits.

The test case comes from Lunatone's doc "DALI-2 Devices for
Integration, DALI-2 Instances, DALI-2 Instance Mode".
@jktjkt
Copy link
Contributor Author

jktjkt commented Apr 26, 2024

Ideally there would be a test for this new sequence in test_device_sequences.py

Done -- and sorry for a "slight" delay :).

@sde1000 sde1000 merged commit 73ba41f into sde1000:master May 3, 2024
5 checks passed
@jktjkt jktjkt deleted the multibyte-inputvalue branch July 26, 2024 15:30
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.

None yet

2 participants