Changing Configuration Parameters from Sitemap

I just purchased a Dome Wireless Z-Wave Plus Siren. Ultimately, I want to configure it to chime when my existing contact sensors detect an open door (so expect an upcoming question about creating rules, similar to this question). For now, I’m trying to create a sitemap where I can change the chime sound and volume on-demand. That configuration currently works via the “Configuration Parameters” available to the Thing in PaperUI.

I’ve created a sitemap with the following, which turns the siren on and off:
Frame label=“Siren Alarm” {
Switch item=DomeWirelessSirenDMS01_Switch label=“Alarm On/Off”
}
but I’m a bit lost as to how to modify the Configuration Parameters in order to configure which sound plays and at what volume.

I found this code, which supposedly does what I’m looking for, but it’s for SmartThings:

I can see the configuration options that I’d like to set in the above code, but I don’t know how to send the necessary commands to OpenHAB2.

I found this post, which asks essentially the same question, but the answer (if it works) is not clear enough for me to implement without additional follow-up questions (I’m very new to OpenHAB):

Ultimately, I gather that want to create new Selections in the Sitemap, which change the values of other Items that probably do not yet exist (something like “Siren_Sound” and “Siren_Volume”). To link “Siren_Sound” (for example) with the Configuration Parameter of the Dome Siren Thing, I need to know the Channel that “Siren_Sound” should use to change the Configuration Parameters.

As an additional reference, here is the database entry for the Dome Wireless Z-Wave Siren. It contains the Configuration Parameters under the comment “<!-- PARAMETER DEFINITIONS --”>:

I don’t know this device but the standard approach is:

Look at your Thing in PaperUI. At the bottom of the Thing’s page is listed one or more Channels.

Pick the Channel that provides the information you want or control point on the device you want. The following is an example Channel from an Astro Thing:

image

The first line is a name for the Channel. The second line is the channel ID. The little square icon to the right will copy the ID to your clipboard. The last line is the type of Item that Channel can be linked to, in this case a DateTime.

You can click on the blue circle icon and select an Item to link to this Channel or, if you are using .items files you can copy the Channel ID and paste it into the Item binding config.

DateTime SunRiseStart { channel="astro:sun:home:rise#start" }

What you need to do is find the channels for the sound and the volume on your Thing, create Items for those Channels and link them to the Items. Put those Items on your sitemap and you can control them from there.

If there are no Channels for those then you will not be able to change those parameters dynamically from your sitemap or Rules.

Thank you for the response!

You can see here the channels I have for this device:
image

I have successfully interacted with these channels from PaperUI, and I have a rule that turns the Switch channel on and off.

My challenge is that the Alarm channel is configured via “Configuration Parameters”:

I want to use the siren for 2 features:

  • a chime when a door opens and closes (I’ve already implemented a rule for this)
  • an alarm when a door was opened when I didn’t want it to be

The alarm and chime will use different sounds (in the screenshot above, the chime is configured as the “Secondary Notification Sound” and the alarm will be configured as the “Primary Notification Sound”. My current rule, as well as the Switch on my sitemap, play the “Secondary Notification Sound” since “7. Toggle secondary chime” is set to that option. I don’t know how to play the “Primary Notification Sound” from a sitemap or rule though, except by manually changing the configuration within PaperUI, which does not meet my use case.

It seems like not many people are using this device - are configuration parameters uncommon in devices? Surely there must be other devices people use that have configuration options people want to adjust dynamically at runtime via sitemap or rule. In fact, it looks like this was implemented in OpenHAB (https://github.com/openhab/openhab1-addons/issues/2082) - I just can’t find how to do it in OpenHAB2.

Like I said, as far as I know, there is no way to dynamically change a parameter. You can still use the 1.x binding if that was possible for that version.

I suspect that might be something that will get implement in the future if it used to be possible. But typically, on every device I’ve seen, parameters are intended to be pretty static. If they weren’t, they would be exposed using a command class in which case the parameter would show up as a Channel.

If you want to change a configuration parameter then this can be done for selected parameters if we add a channel to the database. Please list the parameters that need to be added and e can take a look at it.

Thanks Chris!

Hoping I’m giving you what you need here - if not, please let me know. Also, if I can help, please let me know - I’ve never updated the database or created new channels, but I’m happy to learn and contribute where I can.

I took the configuration information from here: https://github.com/openhab/org.openhab.binding.zwave/blob/master/ESH-INF/thing/elexa_dms01_0_0.xml
The only thing I changed was the label for #7, since I do not think the label in the XML is clear.

Note that all of the configurations take integers as input.

Configuration Parameters:

  1. Primary Notification Volume Level
  • Value: 1, Label: Low Volume
  • Value: 2, Label: Medium Volume
  • Value: 3, Label: High Volume
  1. Primary Notification Length
  • Value: 1, Label: 30 Seconds
  • Value: 2, Label: 1 Minute
  • Value: 3, Label: 5 Minutes
  • Value: 255, Label: Plays Until Battery Is Depleted
  1. Secondary Notification Length // Note - it’s weird to me that the values for this are different from #2, but that’s how it’s defined in the XML…
  • Value: 0, Label: Does Not Stop
  • Value: 1, Label: 1 Minute
  • Value: 5, Label: 5 Minutes
  • Value: 255, Label: Chime Will Not Play
  1. Secondary Notification Volume Level
  • Value: 1, Label: Low Volume
  • Value: 2, Label: Medium Volume
  • Value: 3, Label: High Volume
  1. Primary Notification Sound
  • Value: 1, Label: Dong dong
  • Value: 2, Label: Fur Elise
  • Value: 3, Label: Westminster Chime
  • Value: 4, Label: Dingdongdingdongdingdong
  • Value: 5, Label: William Tell Overture
  • Value: 6, Label: Classical
  • Value: 7, Label: Weeooeeooeeooeeoo
  • Value: 8, Label: Err-err-err-err-err
  • Value: 9, Label: Beepbeepbeepbeep (Default)
  • Value: 10, Label: beeeep-beeeep-beeeep
  1. Secondary Notification Sound
  • Value: 1, Label: Dong dong
  • Value: 2, Label: Fur Elise
  • Value: 3, Label: Westminster Chime
  • Value: 4, Label: Dingdongdingdongdingdong
  • Value: 5, Label: William Tell Overture
  • Value: 6, Label: Classical
  • Value: 7, Label: Weeooeeooeeooeeoo
  • Value: 8, Label: Err-err-err-err-err
  • Value: 9, Label: Beepbeepbeepbeep (Default)
  • Value: 10, Label: beeeep-beeeep-beeeep
  1. Notification to Play
  • Value: 1, Label: Primary
  • Value: 2, Label: Secondary

The most important parameter to be able to set dynamically is #7, since without it, I can only trigger one notification sound. Of course, it’d be nice to be able to set all of them if possible.

Again, thank you for your help!

I’m sure you have a lot going on @chris , so I’m happy to try to resolve this on my own, but I need a little help.

I can see that I can create new channels like this:

<channel id="switch_binary" typeId="switch_binary">
        <label>Switch</label>
        <properties>
          <property name="binding:*:OnOffType">SWITCH_BINARY</property>
        </properties>
</channel>

and I know how to link channels to Items to dynamically modify their values. What I don’t know is - how do I link a channel to an existing configuration parameter (or a function of a device)?

I can see that configuration parameters are configured like this:

      <parameter name="config_1_2" type="integer" groupName="configuration">
        <label>1: Primary Notification Volume Level</label>
        <default>2</default>
        <options>
          <option value="1">Low Volume</option>
          <option value="2">Medium Volume</option>
          <option value="3">High Volume</option>
        </options>
      </parameter>

so the link has to be the name, right? Do I just create a new channel whose id is the name of the configuration parameter? I’m assuming the parameter names (e.g. config_1_2) must come from the device’s documentation. This all seems too simple though.

Is there any documentation I can use to better understand the linkage so I can set this up myself?

Thanks!

You can’t directly link a configuration parameter to a channel - we need to add a new channel into the database to provide this functionality.

Take a look at this entry -:

http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/16

In the CONFIGURATION class, it has a channel called config_decimal, and this has a configuration of parameter=7. So, this will provide you a channel linked to parameter 7 that is a decimal type.

You will need to add the same sort of thing to the database for your device.

I hope this helps - apologies for the slow/limited response as I’m currently on holiday with limited time and access to internet…

Cheers
Chris

Thanks @chris! I noticed you updated the URL, and I really appreciate it. I don’t see the channel called config_decimal for that Thing, but in searching the OpenHAB GitHub, I came across what I think you’re referring to. Pasting the examples here for my reference and for anyone else who might search in the future::

From: https://github.com/openhab/org.openhab.binding.zwave/blob/6a131775e6e5f56226f3375fe4d5463a1eb2204b/ESH-INF/thing/aeon_zw056_0_0.xml

    <channel id="config_decimal_param8" typeId="config_decimal">
       <label>Volume</label>
       <properties>
         <property name="binding:*:DecimalType">CONFIGURATION;parameter=8</property>
       </properties>
     </channel>

From: https://github.com/openhab/org.openhab.binding.zwave/blob/0fa1ae92109ee90d940ba6fa1527e90b889fdde5/ESH-INF/thing/fibaro_fgd211_1_9.xml

      <channel id="config_decimal_param40" typeId="config_decimal">
        <label>Updating the dimming level without switch</label>
        <properties>
          <property name="binding:*:DecimalType">CONFIGURATION;parameter=40</property>
        </properties>
      </channel>

From: https://github.com/openhab/org.openhab.binding.zwave/blob/0fa1ae92109ee90d940ba6fa1527e90b889fdde5/ESH-INF/thing/fibaro_fgd211_2_1.xml

      <channel id="config_decimal_param40" typeId="config_decimal">
        <label>Updating the dimming level without switch</label>
        <properties>
          <property name="binding:*:DecimalType">CONFIGURATION;parameter=40</property>
        </properties>
      </channel>

I was expecting I’d be able to follow the above pattern to update https://github.com/openhab/org.openhab.binding.zwave/blob/master/ESH-INF/thing/elexa_dms01_0_0.xml then upload a new version via PR, but when I went to find that file locally to figure out how to perform local testing, I got a bit confused. Now I see (per http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-database-guide) that the database is updated via node.xml files. When I look at the node.xml file for this device from my local installation, it does not contain any channel definitions. So I’m not sure how to proceed – do I update the elexa_dms01_0_0.xml file and submit a PR or somehow modify the node.xml file to contain the channels?

I’ll continue to look into this tomorrow, but any guidance would be appreciated.

Thanks!

Maybe you need to log in to the database to see the channels - it is there.
You need to update the database to get this working - I don’t generally accept PRs for database changes without the database being updated as it will just get deleted next time the database is exported.