Closed youngmit closed 4 years ago
Hi @youngmit
this looks like a bug coming from one of the last commits. Previously it was like that
// the message need to be exact 6 digits long
if msg.len() != 6 {
return Err(Error::new(ErrorKind::UnknownZWave, "Message is to short"));
}
now it's like: https://github.com/Roba1993/rzw/blob/a0b08c56aed0c10ce6c068f8b060e52b97d05681/src/cmds/switch_multilevel.rs#L49
So try to change it back that only 6 bytes are needed and it should work.
Thanks, Robert
Okay, thanks. I'll submit a PR tonight.
See #14
Closed with #14 - Thank you very much!
I am getting issues trying to poll the status of a multi-level switch. I am getting:
Some(Err(Error { kind: UnknownZWave, description: "Message is to short: [0, 4, 3, 32, 3, 50]" }))
(message contents added to the error value by me).I am just getting started with the z-wave protocol, so maybe I don't fully understand, but my interpretation of that message is:
[not really sure what the 0 is, but everything seems to have one] [nodeID] [length of rest of message] [command class] [command] [data]
. The length seems to agree with the rest of the data, and50
is indeed the level that the switch should be at. What is the 7th bit that rzw is expecting circa https://github.com/Roba1993/rzw/blob/a0b08c56aed0c10ce6c068f8b060e52b97d05681/src/cmds/switch_multilevel.rs#L49Am I missing something? Should it only be expecting 6 bytes?
Thanks for any guidance!