Setting a zwave parameter

I’d check the manual of the device - it’ll tell you, hopefully. I’d expect that you don’t pass "Fur Elise" but a number indicating which “slot” is used.

It’s more about not passing 9 as 00010001 (8 bits) when the field takes 16 bits and needs to have 0000000000010001 (I suspect).

Have Tried just the number to no avail, The “words” work fine though.
I was pointed this way by a number of posts on this forum : -

Both use “words”
I found this following post interesting (it led to a manual) the manual says that you can send a music index (so I’m going to try that again) but the size is 1 even if you send “10” which lends credence to the multiples of 16 bits (it uses numbers, though I assume - not in quotes)

The manual I’ve got on my siren decribes setting the parameters manually via “your z-wave interface” and is generally a bit light on actual detail.

Yep just tested numbers on a copy of the working script, no change to the music index when passed a number with no quotes.

You must use the words in this case. OZW converts the words into the proper number. You don’t need to set the size, it isn’t used (OZW already knows it). This is all due to the definition of the config parameters in the device config file.

        <Value type="list" genre="config" instance="1" index="6" label="Door Bell Music Index" min="1" max="10" size="1" value="9">
            <Help>This parameter defines the door bell music index for siren play different music when alarm occurs.
                There are 10 different music for user selection.</Help>
            <Item label="Doorbell" value="1"/>
            <Item label="Fur Elise" value="2"/>
            <Item label="Doorbell Extended" value="3"/>
            <Item label="Alert" value="4"/>
            <Item label="William Tell" value="5"/>
            <Item label="Rondo Alla Turca" value="6"/>
            <Item label="Police Siren" value="7"/>
            <Item label="Evacuation" value="8"/>
            <Item label="Beep Beep" value="9"/>
            <Item label="Beep" value="10"/>
        </Value>

The XML defines this config parameter as a “list” type. When the parameter is a list, OZW (or perhaps the Python OZW API that Home Assistant is using) expects to be given the item label, not the raw value. It will do the job of converting the string “Fur Elise” to the appropriate native value, which would be the 1-byte integer value of 2. In this case, Home Assistant would not even use the size value in the service call if you set it, it will just be ignored.

I think the size is needed when a device does not have a config parameter defined in the XML file. It will pass the raw parameter value (which must be an integer) to the low level OZW API. The size parameter must match what the device is programmed to expect.

2 Likes

Brilliant, that’s just what the doctor ordered.
I now know what I’m using and why
Thanks to you both