node-zwave-js icon indicating copy to clipboard operation
node-zwave-js copied to clipboard

Handle reports with "reports to follow" that are partially in Transport Service CC, partially standalone

Open AlCalzone opened this issue 7 months ago • 1 comments

The Zooz ZSE11 Q Sensor has an odd implementation for long reports:

Requesting the name of a long config parameter results in the device responding with multiple Transport Service encapsulated commands. If the name is longer than 50 characters though, the remaining characters are sent in another ConfigurationCCNameReport that is not included in the Transport Service session:

2025-05-06T11:22:11.500Z DRIVER » [Node 002] [REQ] [SendDataBridge]
                                 │ source node id:   1
                                 │ transmit options: 0x25
                                 │ callback id:      137
                                 └─[Security2CCMessageEncapsulation]
                                   │ sequence number: 204
                                   └─[ConfigurationCCNameGet]
                                       parameter #: 22


2025-05-06T11:22:11.551Z DRIVER « [Node 002] [REQ] [BridgeApplicationCommand]                          [partial]
                                 │ RSSI: -72 dBm
                                 └─[TransportServiceCCFirstSegment]
                                     session ID:    11
                                     datagram size: 51
                                     byte range:    0...38
                                     payload:       0x9f03fa0074ccd865b6a21215ba3663d7636b9358cd93ffa2c2709556e
                                 fb3c7647b05ce35668620

2025-05-06T11:22:11.902Z DRIVER « [Node 002] [REQ] [BridgeApplicationCommand]                          [partial]
                                 │ RSSI: -72 dBm
                                 └─[TransportServiceCCSubsequentSegment]
                                     session ID:    11
                                     datagram size: 51
                                     byte range:    39...50
                                     payload:       0x982944390acfac38b5c45536

The Transport Service session translates to the following command:

2025-05-06T11:22:11.904Z DRIVER « [Node 002] [REQ] [BridgeApplicationCommand]
                                 │ RSSI: -72 dBm
                                 └─[Security2CCMessageEncapsulation]
                                   │ sequence number: 250
                                   │ security class:  S2_Authenticated
                                   └─[ConfigurationCCNameReport]
                                       parameter #:       22
                                       name:              Temperature sensor checking interv
                                       reports to follow: 1

Which is then followed by

2025-05-06T11:22:11.951Z DRIVER « [Node 002] [REQ] [BridgeApplicationCommand]
                                 │ RSSI: -72 dBm
                                 └─[Security2CCMessageEncapsulation]
                                   │ sequence number: 251
                                   │ security class:  S2_Authenticated
                                   └─[ConfigurationCCNameReport]
                                       parameter #:       22
                                       name:              al
                                       reports to follow: 0

to complete the parameter name. While this is not against the specification, this is a very odd implementation. The Transport Service session would have room for 28 more bytes in the 2nd frame (which is more than enough room for the two bytes needed for “al”), plus another 39 bytes in the optional third frame.

Nonetheless, we should handle this case.

AlCalzone avatar May 06 '25 12:05 AlCalzone