Zwave parameter configuration in OH2

Hi all,
I am planning to move to OH2 from OH1 and I am checking the compatibility of my setup for the new version. I will use only .txt files for my configuration, taking them from OH1.

I have a Fibaro RGBW controller that can activate predefined programs just setting a configuration parameter to a certain value.
See: Fibaro RGBW predefined Programs Activation.

In OH 1, I have set in .items file the following:
Number znRGBW_Programs "RGBW Programs" { zwave="7:command=configuration, parameter=72"}

And in .sitemap file:
Switch item=znRGBW_Programs mappings=[1="Standard",6="Fireplace", 7="Storm", 8="Rainbow", 9="Aurora", 10="Police"]

How can I achieve this in OH2?

Can someone help me?


Just to note that OH2 configuration is totally different to OH1, so you’ll have to completely rewrite the items…

Unfortunately channels with the configuration class are not supported at the moment.

Only for those Items which get bound to a native OH 2 binding. For example, all of my MQTT Items are working unchanged using the PaperUI installed MQTT 1.9 SNAPSHOT binding.

Until such time that the zwave 2 binding supports this, you can instead install and use the 1.9 SNAPSHOT zwave binding and use your Items files as is. Eventually you will want to move to the 2.0 binding, but OH 2 is flexible enough to let you get there in baby steps.

Sorry - I was answering in relation to the ZWave items.

Hi Rick,
that’s a good idea.
Will stick with OH1 binding then until OH2 version has the same features.


BTW, what are the differences of OH1 versus OH2 Zwave binding?
Is there any place where I can see those differences?

I don’t know but I suspect the differences are too many to simply list. I believe chris has completely rewritten the binding for OH 2. The new binding supports auto-discovery of Things and Channels, it is required to use Habmin 2 (which is really awesome). The device DB and bug fixes are still making their way into the 1.9 binding but all new development is focused on the OH 2 binding, so you will want to transition to it when you can.

Maybe Chris can answer.
It’s just to evaluate if it is worth to move to version 2 and loose the RGBW Predefined Program Feature (that I use), or if there is no such a difference that can justify it.


For me, I’d say the ability to use the latest Habmin is worth the upgrade by itself.

Yes - there are a lot of changes. Most notably are newer command classes (like the color and notification command class) are supported in OH2.

While HABmin does support some features especially for ZWave, for routine configuration, you can use PaperUI.

I’m not sure if I can answer since other than the scene support that you mention, I don’t know what else you use ;). As above, most development on newer classes, and updating even the older ones given we now have proper documentation is being done in OH2, so I suspect as time goes on you’ll likely find things aren’t supported in OH1 any more.

The config channels though has been on my todo list for a long time so I might try and implement this soon - just to tick it off -:

Thanks Chris for the clarification.
I subscribed to the Issue…

Actually I want to use only .txt files for my configuration, so I can easily backup and recreate a new environment easily. So I assume that I will not use PaperUI nor HABmin2. Is it correct?

Yes. Certainly configuration of devices will not work - you’ll need to use another software package for this (eg Open ZWave, or even using OH1 and HABmin1). I think that also features like the network neighbour diagram will also not work as properties will also not be stored, so it’s quite limiting.

Really, I wouldn’t recommend it, although I understand why you want to use text files. I wrote a text (json) database that allows the UI to work, but all the data is stored in a text file which can be backed up and edited - unfortunately this isn’t available although I did see something from Kai a couple of days ago that indicated he might be looking to make it available in OH2 one day.

I have come up with a solution in OH2 using the REST API :relaxed::


Number		node5_emb_scene


rule "Embedded RGBW modes" when
	Item node5_emb_scene changed
	if (node5_emb_scene.state == 6) { 
		sendHttpPutRequest("http://[OpenHAB IP]/rest/things/zwave:device:1565731f053:node5/config", "application/json", "{'config_72_1':6}")
	} else if (node5_emb_scene.state == 7) { 
		sendHttpPutRequest("http://[OpenHAB IP]/rest/things/zwave:device:1565731f053:node5/config", "application/json", "{'config_72_1':7}")
	} else if (node5_emb_scene.state == 8) { 
		sendHttpPutRequest("http://[OpenHAB IP]/rest/things/zwave:device:1565731f053:node5/config", "application/json", "{'config_72_1':8}")
	} else if (node5_emb_scene.state == 9) { 
		sendHttpPutRequest("http://[OpenHAB IP]/rest/things/zwave:device:1565731f053:node5/config", "application/json", "{'config_72_1':9}")
	} else if (node5_emb_scene.state == 10) {
		sendHttpPutRequest("http://[OpenHAB IP]/rest/things/zwave:device:1565731f053:node5/config", "application/json", "{'config_72_1':10}")

Rotini sitemap
(You will figure it out if you are using OpenHAB sitemap)

Frame label="Kontor scener {widget:scene}" {
	Selection item=node5_emb_scene mappings=[
		"6"="Fireplace {icon:fire}",
		"7"="Storm {icon:energy}",
		"8"="Rainbow {icon:umbrella}",
		"9"="Aurora {icon:wifi}",
		"10"="Police {icon:led}"

It works!

Thanks a lot for the tip!
Should be put in the wiki!

Interesting idea :slight_smile: .

Just in case it wasn’t obvious, the configuration converter was added last weekend - any feedback is welcome (oh, and the color channel was also added to the Fibaro RGB as well as I noticed that was missing).

Hi Chris,
Very good news.

Will test tonight.

Let me know how it goes. I’ve recently got one of these devices and realised the color class wasn’t in the database so I can confirm this works but haven’t checked the scene activation yet (and probably won’t for another week as I’m travelling again this week :frowning: ).

Hi Chris,

I’ve just tested the scene activation and it is working :smiley: Thanks for adding it. I also use the min / max brightness on the Fibaro FGD211 dimmers to stop my kids turning the hall lights on too brightly at night. I’ve added that manually to the binding and recompiled which works as well. Is there a way I can feed back this and some other changes to items that I have made?

Thanks for you hard work on this fantastic project.

Via the Rest api or did you do that?

I used the new configuration parameter in the updated Zwave binding. so in items:

Number	Light_EnSuite_Floor_Program	"Program"										<colorwheel>			(gMasterEnSuite)		{channel="zwave:device:1578870b:node12:scene_number" }

and in the sitemap:

Selection item=Light_EnSuite_Floor_Program label="Programs" mappings=[1=Off, 6=Fireplace, 7=Storm, 8=Rainbow, 9=Aurora, 10=LPD]