Control Devices: respect "resolution" when reading "inputValue" #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 either0x00
or0xff
, 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.