Hi Zed,
thanks for helping with this. I was just wondering if a value of 280 it's correct for luminance. Usually it's given as percentage value (0-100). Pheraps it's 28.0%?
Did you try putting a light near the sensor simulating lights changes and seeing how the bytes are changing too?
...
SPI > 01 0C 00 04 00 04 06 31 05 03
0A 00 12 DA
2014-02-10T16:16:23.2094403+01:00 HomeAutomation.ZWave 4 ZWave Node Sensor.Luminance 0.0
....
expecially those "bold" bytes.
To wake up the sensor manually, and make it send report, press the button on it.
Once we ensure that the bytes decoding is correct, I'll be including this fix on a separate handler brand-specific file (Sensor.cs is a generic one).
Btw there must be a byte (0A?) that tells how the value is to be interpreted, but I'm missing this z-wave spec info at the moment.
Cheers,
g.
I was able to obtain a correct value by changing code in ZWaveLib.dll (generic handler in Sensor.cs) and rebuilding.
else if (key == (byte)ZWaveSensorParameter.LUMINANCE)
{
// From this...
//luminance = val;
// To this...
luminance = BitConverter.ToUInt16(new byte[2] { message[12], message[11] }, 0);
//
_nodehost._raiseUpdateParameterEvent(_nodehost, 0, ParameterType.PARAMETER_LUMINANCE, luminance);
//
handled = true;
}
Obviously this fix is make/model specific and I suppose the MultiSensor needs a dedicated handler section if this is not the typical format for Z-Wave luminance values but it quickly corrects the interpretation of the reading for my Aeotec MultiSensor. Typical values reported are now ~280 for good daylight.