openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 91 forks source link

Updating z-wave configuration parameters - issue #86

Closed xsnrg closed 9 years ago

xsnrg commented 9 years ago

A while back I mentioned having some trouble with not being able to update z-wave device configuration parameters. I never did get this fixed, but instead found a work-around by changing the XML entry from list to short, and then I was able to make my change. This came up for me again, so I want to spend the time on it to fix it or help in any case.

My scenario with specific examples:

This is the existing XML for a device. This renders in Habmin2 v.15 as dropdown with no selectable elements in it, and the entry area cannot be edited.

                <Parameter>
                    <Index>101</Index>
                    <Type>list</Type>
                    <Default>0</Default>
                    <Size>1</Size>
                    <Item>
                            <Value>0</Value>
                            <Label lang="en">Disable</Label>
                    </Item>
                    <Item>
                            <Value>1</Value>
                            <Label lang="en">Enable</Label>
                    </Item>
                    <Label lang="en">Low battery voltage check</Label>
                    <Help lang="en">parameter defines, if battery check function is possible, when battery is below warning voltage</Help>
            </Parameter>

This is what I put in place that works and I was able to change the value. It is not ideal though because this is a boolean (does that type exist?) and should only be set to 0 or 1. The below xml allows the value to be set above the Maximum specified.

        <Parameter>
        <Index>101</Index>
        <Type>short</Type>
        <Minimum>0</Minimum>
        <Maximum>1</Maximum>
        <Default>0</Default>
        <Size>1</Size>
        <Label lang="en">Low battery notification enable</Label>
        <Help lang="en">Set to 1 to enable low battery reports</Help>
        </Parameter>

I guess if it works better than what is there, maybe it is not a hack, but it seems the first XML should work. I hope it is just an XML issue and I am missing something.

What do you say @cdjackson ? it is the aeon\dsb54-gen5.xml for reference

Jim

cdjackson commented 9 years ago

If this is 'just' a Habmin2 issue, then I won't (can't!) fix it... This code is all gone in the new(er) version which is focussed on the new binding.

xsnrg commented 9 years ago

As far as I know, it is a habmin2 issue. Fair enough.