openhab / org.openhab.binding.zwave

openHAB binding for Z-Wave
Eclipse Public License 2.0
170 stars 202 forks source link

Fibaro Relay FGS222 - add Channel for Device Configuration Paramters 4 and 5 #1935

Closed robbelt closed 1 month ago

robbelt commented 1 month ago

I need the Device Configuration Paramters 4 (Relay 1: OFF-delay time (100ms steps)) and 5 (Relay 2: OFF-delay time (100ms steps)) for the Fibaro Relay Switch FGS222 as Thing Channels.

That is important for me because I use the Auto Off Function of the relays and they have to toggle EXACTLY after the specific time. I need to change that time often - that is why I need it as a Channel. I tried to turn off the relay via rule after x milliseconds, but this is not acurate enough because of latencies.

Thank you!

cdjackson commented 1 month ago

I see you've registered on the database, so you can make the changes (thanks).

One point to note - I guess I'm a little surprised there's missing parameters on this device as it's been around a very long time. My concern is that you possibly have a newer version with these parameters, and if you add them to the existing database entry, it will cause problems for others if these parameters don't exist in older firmware...

So, please check the older docs to see if they existed, but just weren't in the database. If they don't exist in the older version, then we probably need to generate a new entry for the updated firmware version.

robbelt commented 1 month ago

Hi Chris, yes, I registered on the database, but then realized that this probably is the wrong place to solve my problem. The parameters are still existing in the database and I can change them via openHAB Paper UI. But what I need are addational channels for the openHAB thing so that I can link them to items and can work with them in rules.

At the moment there are only 3 channels to switch the relays on and off. I know that this is a very special use case...

cdjackson commented 1 month ago

Ah - ok, so you want to change some existing config parameters to make them into channels... That's easy - and is done in the database (pretty much everything to do with devices is done in the database).

See below from the database doc -:

Changing parameters in openHAB rules

To use a configuration parameter in a rule, or display it in the UI, a channel must be added. This should be added to the Configuration command class in the endpoints list. It should be given the type config_decimal and there should be an option parameter=XX where XX is the relevant parameter ID.

robbelt commented 1 month ago

Oh nice. I added it to the Database and requested a review - hopefully in the right way :) Thank you!

cdjackson commented 1 month ago

looks good - I'll push it through the system...

robbelt commented 1 month ago

Thanks! I am absolute newbie here... so what are the next steps? When/How will it be usable for me?

cdjackson commented 1 month ago

I'm doing a database export now. This will take maybe another 20 minutes or so (it's automated), then I'll need to merge that into the binding here on Github. Then at some point in the next 24 hours there will be a new snapshot built and you'll need to use that binding. You should be able to find out how to use the snapshot in the OH docs if I remember correctly.