Skip to content

Commit

Permalink
Add the U32 Version payload to the 0x0D VERSION messages (#17)
Browse files Browse the repository at this point in the history
* Add the U32 Version payload to the 0x0D VERSION messages

Part 1 (of 2) of handling the latest deconz firmware

Original code from @frederic34 in WebThingsIO/serial-prober-node#11 (comment)

From reading the spec at page 9 of
https://deconz.dresden-elektronik.de/raspbian/deCONZ-Serial-Protocol-en_1.14.pdf
this should already have been present since at least 2019.
Apparently the newer firmware is more strict and checks message lengths,
rejecting messages for incorrect formats.

* correctness

Co-authored-by: Fabian Frey <mrsteakhouse1@googlemail.com>

Co-authored-by: Fabian Frey <mrsteakhouse1@googlemail.com>
  • Loading branch information
chas-iot and mrsteakhouse committed Jan 26, 2021
1 parent f99a0ff commit 449bd0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/frame-builder.js
Expand Up @@ -182,7 +182,8 @@ frame_builder[C.FRAME_TYPE.READ_PARAMETER] = function(frame, builder) {
}
};

frame_builder[C.FRAME_TYPE.VERSION] = function(_frame, _builder) {
frame_builder[C.FRAME_TYPE.VERSION] = function(_frame, builder) {
builder.appendUInt32LE(0);
};

frame_builder[C.FRAME_TYPE.WRITE_PARAMETER] = function(frame, builder) {
Expand Down

0 comments on commit 449bd0e

Please sign in to comment.