OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

Possible ZW100 Config File Errors #2477

Open idlezombie opened 3 years ago

idlezombie commented 3 years ago

Just an engineer not a programmer so hope I explain what I think the problem is correctly:

Using OZW 1.6 with Zwave2MQTT but I think this is a library problem not a Z2M interface thing.

I have a number of Aeotec Multisensor 6. They have all been updated to the latest firmware 1.13 and OZW config file revision is showing as 24. I've read a few of the closed issues regarding parameter byte size changes in firmware updates and some of the reports around issues with temperature settings etc. and I don't believe I could see any current open cases relating to this.

My main issue is that whilst the temp reading is showing correctly none of the temp threshold, upper/lower limit values work as expected.

After some playing around and looking through the Aeotec spec sheet I think the config file might by using the wrong data value type for those fields?

So for example:

On initial config param 41 shows as 20, any attempt to change it results in the value now showing 1310976. This seems to be the DEC version of the default value in Aeotecs docs which as an unshort HEX of 00140100. The actual temp threshold is just the second (or first?) byte of 14 which is of course 20 in DEC. The 01 is noting the C/F which is also stored in param 256 so can be added/removed to the param 41 value from there (so I won't be surprised if it is z2m interface bug...)

I was able to successfully set a value by converting 10 to HEX 0A then add second by of 01 for deg. C giving me 0x0A01 then expressed as unshort of 0x000A0100 and convert that back to DEC as 655616 and set that as the value which was accepted.

The reason I think it might be an OZW bug is that looking through the config file rev.24 for the ZW100 I can see that the various temp params are set differently, some are set as short some are set as int. Does all the above mean they should be unshort? Or is it that that the GUI should be converting those values and it is not?


Also just noticed something while I was looking at the config file (should I post this as a separate issue?). Param 101 is a bitmask, the last value is 241 for all on. According to the Aeotec spec sheet param 101 all on is actually value 240 when on USB power. Makes sense I guess 1 = battery. In z2m it is showing options for 101 as battery, reserved, reserved, ultraviolet. Looking at the bitmask setup in the config file the option IDs go 1, 5,6,7,8. ids 2,3,4 are skipped and Param 102 and 103 which are the same setting but for report group 2 and 3 are configured as int not bitmask. in z2m I only get access to 4 options for 101, battery, reserved, reserved and ultraviolt which would be bitmask ids 1, ?, ? and 5. So I guess some of that is z2m bug but surely param 101-103 should all be setup the same in the config file?


Again sorry if poorly explained, sys admin does not make for a good programmer.