alengwenus / pypck

Asynchronous LCN-PCK library written in Python
MIT License
8 stars 4 forks source link

Variable configured to output and unit percent shows 0% to 200% #82

Open maximilianriemensberger opened 3 years ago

maximilianriemensberger commented 3 years ago

I have a variable (var12) configured to look at an output port (output4). LCN Pro shows native values for the variable from 0 to 200 (identical to the dim stepsof the output port). LCN Pro converts those to 0% to 100% same s for the output port.

In pypck, native 0 to 200 get mapped onto 0% to 200%. This seems odd. Shouldn't it be rather also 0% to 100%?

maximilianriemensberger commented 3 years ago

Apparently the Pro has two different '%' units. One for humidity and one for outputs. Those are mapped differently onto LCN native units. So pypck would need two distinct percent units similar to the the two distinct lux units.

alengwenus commented 3 years ago

What happens if we switch to 50 dimming steps? I think that the variable value range will be within 0..50? I guess everything will become a bit more complicated, especially the conversion routines?

maximilianriemensberger commented 3 years ago

I switched my LCN bus to 50 dimming steps mode. The variable in the Pro still showed 200 native and 100%. However, I can only test with relatively new modules. On the other hand I don't know if older modules actually supported assigning an output port to a variable.

Finally, I think that the dimming mode agreed upon between pypck and pchk should not affect how the variable status is communicated. This should always be native.

Am I missing anything?

maximilianriemensberger commented 3 years ago

The documentation in the Pro says that the flexibly assigned variables (and having 12 variables) is available starting with firmware 16... Similarly, the docs claim that this is the first firmware version that has the 200 dimming steps. So I understand that the variable will always represent the output in the range of 0 to 200 LCN native.