roblans / ZWave4Net

ZWave4Net is a .NET library that interfaces with the Aeotec / Aeon Labs Z-Stick.
MIT License
41 stars 34 forks source link

Invalid payload in SensorMultiLevelReport #78

Open RicoSuter opened 11 months ago

RicoSuter commented 11 months ago

Somehow my ZWave Stick reports wrong payloads - is there maybe some bug in this library (not according to specs) or is my ZWave controller not working as expected? Can we maybe fix this so that a 2-byte response is also allowed?

image

ZWave.Channel.Protocol.ReponseFormatException: The response was not in the expected format. SensorMultiLevelReport: Payload: 01-03
   at ZWave.CommandClasses.SensorMultiLevelReport..ctor(Node node, Byte[] payload) in /src/HomeBlaze.Zwave/ZWave/CommandClasses/SensorMultiLevelReport.cs:line 22
   at ZWave.CommandClasses.SensorMultiLevel.HandleEvent(Command command) in /src/HomeBlaze.Zwave/ZWave/CommandClasses/SensorMultiLevel.cs:line 103
   at ZWave.Node.HandleEvent(Command command) in /src/HomeBlaze.Zwave/ZWave/Node.cs:line 265
   at ZWave.ZWaveController.Channel_NodeEventReceived(Object sender, NodeEventArgs e) in /src/HomeBlaze.Zwave/ZWave/ZWaveController.cs:line 130
roblans commented 11 months ago

image

Payload should contain at least 3 bytes: Sensor Type | Size | Value

Payload: 01-03 Byte 1: Sensor Type: 01 = Temperature Byte 2: Size (3 bits): The size field indicates the number of bytes that used for the sensor value. This field can take values from 1 (001b), 2 (010b) or 4 (100b).

3 is an invalid value and the sensor value is missing