Page 1 of 1

RESOLVED: SCALE_LUX results in percentage display

Posted: 11 Oct 2016 12:58
by ftrueck
Hi,
I've setup a channel for luminance (BH1750):

Code: Select all

  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE,
                          SENSOR_MULTILEVEL_SCALE_LUX,  
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS, 
                          getterLight)
It results in a sensor device with percentage scale on razberry web ui:
bh1750.PNG
bh1750.PNG (22.58 KiB) Viewed 9168 times
What went wrong? I've used the example provided for BH1750 and this is what I get.

Could someone point me in the right direction?

Regards,
Florian

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 11 Oct 2016 20:51
by A.Harrenberg
Hi,

this seems to be an issue in the RazBerry system...

According the header file from the Z-Uno the scale is defined as 0x01

Code: Select all

#define SENSOR_MULTILEVEL_SCALE_LUX		0x01
And that is what is defined also in the ZWave-specification (SDS12657-12-Z-Wave-Command-Class-Specification-A-M.pdf, page 508). So if there is no very wierd bug in the zuno-code I would point that toward the RazBerry (Z-Way)...

Regards,
Andreas.

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 12 Oct 2016 12:54
by michap
With OpenZwave it is working fine.

Are you using latest Z-Uno firmware and Z-Way version?

Michael

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 13 Oct 2016 10:08
by PoltoS
I remeber we have fixed wrong scales in Z-Way recently. What version are you using?

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 16 Oct 2016 12:04
by ftrueck
My current razberry version is 2.2.3
Z-Uno version is 2.0.6

I was not sure if it is a bug in razberry, because I have fibaro multi sensor which reports also light in lux which is correctly displayed in UI.

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 16 Oct 2016 15:31
by PoltoS
Please show the log line with RECIEVED that comes from Z-Uno with the luminance settings

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 16 Oct 2016 20:19
by michap
Just have tested with Z-Way installation 2.2.3 and Z-Uno 2.0.6.

it is working as expected - I see the lux values.

Maybe you have used the Z-Uno before with other sketch - and forgot to exclude the Z-Uno before use new sketch / function?
If you overwrite the sketch without excluding the Z-Uno (if you are changing the device definition) - it can give similar effects.

Please try to exclude the device - and then include it again.

Michael

Re: SENSOR_MULTILEVEL_SCALE_LUX results in percentage displa

Posted: 17 Oct 2016 13:27
by ftrueck
WOW! Cool! Thanks for the hint with reincluding. That helped. :-)