Integration of Boundary alarm sensors

Hi @sipuncher

I see that the parameter table posted is missing a very important argument, the size in bytes of the value.

If the size you send doesn’t match the size the device expects, you won’t see an error in the CLI, but it won’t be accepted by the device.

To know the size of each parameter you can use the Z-Wave Device Config Mc driver and do a scan of all the parameters and it will give you the current value and the size.

Also, if for a parameter that has a value with a range of 0 to 255 (0x00 to 0xFF) and the size is 1 Byte, if you try to send a value greater than 127 the default libraries will give an overflow error and not send the value.

This is because for the default libraries the expected ranges are -127 to 127 instead of 0 to 255.

In the most modern devices the size has doubled:

  • to send values from -127 to 127 use a size of 1 bytes
  • to send values from -32767 to 32767 use a size of 2 bytes
  • to send values from -2147483647 to 2147483647 use a size of 4 bytes

If you see that the device uses sizes that are not in these ranges then you have to send the 2’s complement, for values greater than half plus one to have not the overflow error.

I use this code for the preferences of some old fibaro devices with this problem.

2 Likes