Get openhab to associate with fibaro dimmer 2

HI, my first attempt with openhab and z wave and I am a bit stuck . Hoping some kind person can point me in the right direction.
I have the Z stick gen 5 from Aeotec and one other z wave device, a fibaro dimmer 2. I seem to have successfully wired the F dimmer 2 at the back of a switch to control my bathroom LED spots. Upon turning power on, the lights went on dimming to max and then down. Then I unplugged the z stick and pressed the button and it start blink blue. Then I click the switch three times, and after a while the z stick flashed blue for a short while, is this pairing OK?

The, back on my laptop I tried to go to http://127.0.0.1:8080/openhab.app?sitemap=demo

This page seems to show stuff according to a sitemap example file I used (not according my setup):

sitemap demo label=“Main Menu” {
Frame label=“Date” {
Text item=Date
}
Frame label=“Demo” {
Text label=“Group Demo” icon=“1stfloor” {
Switch item=Lights mappings=[OFF=“All Off”]
Group item=Heating
Text item=Temperature valuecolor=[>25=“orange”,>15=“green”,<=15=“blue”]
}
Text label=“Multimedia” icon=“video” {
Selection item=Radio_Station mappings=[0=off, 1=HR3, 2=SWR3, 3=FFH, 4=Charivari]
Slider item=Volume
}
}
}

In Items folder I have only fib.items with the contetns shown under. Now, from the z wave log, it seems that 2 nodes are found, so I suppose that is the USB stick and the lights. But it seems to me that openhab does not associate the Fibaro with the stuff in fib.items, or I need to change the sitemap to include the “Foo” unit? Please help!

Switch foo “Foo” { zwave=“42:command=SWITCH_MULTILEVEL” }
Dimmer foo_dim “Foo [%d %%]” { zwave=“42:command=SWITCH_MULTILEVEL” }
Number foo_power “Foo - current power consumption [%.2f W]” { zwave=“42:command=METER,meter_scale=E_W,refresh_interval=300” }
Number foo_energy “Foo - total energy use [%.2f KWh]” { zwave=“42:command=METER,meter_scale=E_KWh,refresh_interval=300” }

The z wave log is now 180kB. Heres the last few lines, its too much to include all I suppose.

2016-10-16 16:14:42.564 [DEBUG] [WaveController$ZWaveSendThread:1268]- NODE 2: Sending REQUEST Message = 01 08 00 13 02 01 00 25 19 DB 
2016-10-16 16:14:42.573 [DEBUG] [eController$ZWaveReceiveThread:1481]- Receive Message = 01 04 01 13 01 E8 
2016-10-16 16:14:42.574 [DEBUG] [eController$ZWaveReceiveThread:1405]- Receive queue ADD: Length=1
2016-10-16 16:14:42.574 [DEBUG] [b.z.i.protocol.ZWaveController:1163]- Receive queue TAKE: Length=0
2016-10-16 16:14:42.575 [DEBUG] [o.b.z.i.protocol.SerialMessage:233 ]- Assembled message buffer = 01 04 01 13 01 E8 
2016-10-16 16:14:42.576 [DEBUG] [b.z.i.protocol.ZWaveController:1164]- Process Message = 01 04 01 13 01 E8 
2016-10-16 16:14:42.577 [DEBUG] [b.z.i.protocol.ZWaveController:192 ]- Message: class = SendData (0x13), type = Response (0x01), payload = 01 
2016-10-16 16:14:42.577 [DEBUG] [b.z.i.p.s.SendDataMessageClass:38  ]- NODE 2: Sent Data successfully placed on stack.
2016-10-16 16:14:42.594 [DEBUG] [eController$ZWaveReceiveThread:1481]- Receive Message = 01 07 00 13 19 00 00 03 F1 
2016-10-16 16:14:42.595 [DEBUG] [eController$ZWaveReceiveThread:1405]- Receive queue ADD: Length=1
2016-10-16 16:14:42.595 [DEBUG] [b.z.i.protocol.ZWaveController:1163]- Receive queue TAKE: Length=0
2016-10-16 16:14:42.596 [DEBUG] [o.b.z.i.protocol.SerialMessage:233 ]- Assembled message buffer = 01 09 00 13 19 00 00 03 00 00 FF 
2016-10-16 16:14:42.597 [DEBUG] [b.z.i.protocol.ZWaveController:1164]- Process Message = 01 09 00 13 19 00 00 03 00 00 FF 
2016-10-16 16:14:42.597 [DEBUG] [b.z.i.protocol.ZWaveController:192 ]- Message: class = SendData (0x13), type = Request (0x00), payload = 19 00 00 03 
2016-10-16 16:14:42.598 [DEBUG] [b.z.i.p.s.SendDataMessageClass:74  ]- NODE 2: SendData Request. CallBack ID = 25, Status = Transmission complete and ACK received(0)
2016-10-16 16:14:42.599 [DEBUG] [.z.i.p.s.ZWaveCommandProcessor:63  ]- Sent message Message: class = SendData (0x13), type = Request (0x00), payload = 02 01 00 
2016-10-16 16:14:42.599 [DEBUG] [.z.i.p.s.ZWaveCommandProcessor:64  ]- Recv message Message: class = SendData (0x13), type = Request (0x00), payload = 19 00 00 03 
2016-10-16 16:14:42.600 [DEBUG] [.z.i.p.s.ZWaveCommandProcessor:65  ]- Checking transaction complete: class=SendData, expected=SendData, cancelled=false
2016-10-16 16:14:42.600 [DEBUG] [.z.i.p.s.ZWaveCommandProcessor:68  ]-          transaction complete!
2016-10-16 16:14:42.600 [DEBUG] [b.z.i.protocol.ZWaveController:635 ]- Notifying event listeners: ZWaveTransactionCompletedEvent
2016-10-16 16:14:42.601 [DEBUG] [.z.internal.ZWaveActiveBinding:433 ]- ZwaveIncomingEvent
2016-10-16 16:14:42.601 [DEBUG] [WaveController$ZWaveSendThread:1327]- NODE 2: Response processed after 36ms/106ms.

It looks like it is working ok from the short log you posted.

However, it looks like it’s not going to appear in your sitemap. Either you need to add the foo item into the lights group, or just add a new widget to your sitemap (which is probably easiest to understand to get running).

Adding the following to your sitemap will do for a quick test -:

 Slider item=foo_dim

Note that you don’t need foo and foo_dim since a dimmer will also allow a switch to be rendered.

 Switch item=foo_dim

Additionally, I would consider setting up associations so that the device reports the METER reports automatically, and not using refresh_interval.

Dear Sir thank you so much, that helped me configure the sitemap and items better. I can now switch the lights from my laptop - that is awesome!

I now have

sitemap MyHome label=“Main Menu” {
Frame label="Bathroom " {
Group item=CLEDS_group
}
}

and items:

Group CLEDS_group “Bathroom”
Switch CLEDS “Ceiling LEDs” (CLEDS_group) { zwave=“2:command=SWITCH_MULTILEVEL” }
Dimmer CLEDS_dim “Ceiling LEDs dimmer [%d %%]” (CLEDS_group) { zwave=“2:command=SWITCH_MULTILEVEL” }
Number CLEDS_power “Ceiling LEDs - current power consumption [%.2f W]” (CLEDS_group) { zwave=“2:command=METER,meter_scale=E_W,refresh_interval=300” }
Number CLEDS_energy “Ceiling LEDs - total energy use [%.2f KWh]” (CLEDS_group) { zwave=“2:command=METER,meter_scale=E_KWh,refresh_interval=300” }

.Right, so to set the associations you mentioned Chris, I got habmin 1.3. Now, openhab reports:
Attempted to register a second BindingConfigReader of type ‘zwave’. The primaraly reader will remain active!

, becuase in addons there was already
org.openhab.binding.zwave-1.8.3.jar, and now theres also
org.openhab.binding.zwave-1.5.0-SNAPSHOT.jar

Is this the correct way?

Then, in the habmin interface i navigate to Devices

Please see the picture, is this where the setting should be changed to Member? The interface doesnt allow me to change it it seems.

Also, I cannot dim the LEDs from the openhab control panel , only set to ON or OFF, why is that?

Oh well, cant expect everything to be working the first day!

Hi,
You should only use the new ZWave binding - not the one in the HABmin site as that’s really just there for people not using ZWave.

I would also recommend updating to the ZWave 1.9 binding from cloudbees since the 1.8.3 had a problem with the database.

Looking at the image, you probably only need the association in the Lifeline group (which is probably set as I can see 1 member). Normally the Lifeline reports all changes to the controller.

You should be able to reduce the items -:

Group	CLEDS_group	"Bathroom"	
Dimmer CLEDS_dim "Ceiling LEDs dimmer [%d %%]" (CLEDS_group) { zwave="2:command=SWITCH_MULTILEVEL" }
Number CLEDS_power "Ceiling LEDs - current power consumption [%.2f W]" (CLEDS_group) { zwave="2:command=METER,meter_scale=E_W,refresh_interval=300" }
Number CLEDS_energy "Ceiling LEDs - total energy use [%.2f KWh]" (CLEDS_group) { zwave="2:command=METER,meter_scale=E_KWh,refresh_interval=300" }

This uses only the dimmer, but as I mentioned earlier, you can still use a Switch widget in the sitemap (the other way around is not possible though - ie if you use a switch, then you can only use On/Off).

I would try using a separate widget - ie not a group widget in your sitemap to see if that solves your dimmer problem -:

Dimmer item=CDLES_dim

Great support here I have to say

Updated to zwave binding 1.9.0, seems ok so far, Removed the other ones. btw should one also include the two xml and the one pom file from there? If so where do they go?

So I stripped the sitemap and items files down to

sitemap MyHome label="Main Menu" {
	Dimmer item=CLEDS_dim     
    }	

and,

Dimmer      CLEDS_dim         "Ceiling LEDs dimmer [%d %%]"      <slider>         { zwave="2:command=SWITCH_MULTILEVEL" }

However, now, my control panel at http://127.0.0.1:8080/openhab.app?sitemap=MyHome, is only showing “My Menu”. If I click it, nothing happens?

No - just the JAR.

This probably means there’s something wrong with the item definition - I’m not 100% sure, but if the item isn’t displayed, then it’s possibly a good place to look. I forget it OH1 throws an error in the log if the item definition has a problem, but I would take a look there and see if it shows anything.

Updated configs.

MyHome.sitemap:

sitemap MyHome label="Main Menu" {
Frame label="Bathroom" icon="bath" {
			Slider item=CLEDS_dim            
    }	
}

MyHome.items :

Dimmer      CLEDS_dim        "Ceiling LEDs dimmer [%d %%]"  <slider>                	{ zwave="2:command=SWITCH_MULTILEVEL" }
Number      CLEDS_power       	"Ceiling LEDs - current power consumption [%.2f W]" <chart> { zwave="2:command=METER,meter_scale=E_W,refresh_interval=300" }
Number      CLEDS_energy      	"Ceiling LEDs - total energy use [%.2f KWh]" <chart>        { zwave="2:command=METER,meter_scale=E_KWh,refresh_interval=300" }a

Now, is this really how the slider suppose to look?

At least there was a change now in the sense that the value is not only 0 or 100%. It changed to 5%, although I cannot figure out how that happened. If I now left click and hold on the up arrow in the control panel, then nothing happens with the lights and openhab output is like :

2016-10-17 00:10:37.811 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:37.925 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:38.010 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:38.124 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:38.210 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:38.325 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:38.410 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:38.525 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:38.608 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:38.719 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:38.810 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:38.923 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:39.010 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:39.124 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:39.210 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:39.324 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:39.410 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:39.525 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:39.610 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:39.725 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5
2016-10-17 00:10:39.810 [INFO ] [runtime.busevents ] - CLEDS_dim received command INCREASE
2016-10-17 00:10:39.924 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 5

If I manually dim the lights then openhab inform about the dim level and it updates in the control panel also:
ntime.busevents ] - CLEDS_dim state updated to 15
2016-10-17 00:24:12.780 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 6
2016-10-17 00:24:16.420 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 56
2016-10-17 00:24:18.204 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 45
2016-10-17 00:24:20.028 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 56
2016-10-17 00:24:22.144 [INFO ] [runtime.busevents ] - CLEDS_dim state updated to 39

but if I click on the up arrow and hold from the laptop then it resets to 5% again. I can now go to 0% or 5%, thats it. No matter how long I press , just those values

I have a feeling that in OH1, the INCREASE/DECREASE commands don’t work well. This is because when this code was written, we didn’t know about such functionality in ZWave. I forget if the Basic UI provides a slider, or only the INCREASE/DECREASE buttons, but I think if you try a UI that does have a slider, it will work fine (eg the Android or iOS apps at least).

You are spot on again Mr, I tried controlling it from HABdroid and now its working flawlessly.
To set up HABdroid (or is that the name? In Play store I can only see “Openhab” when searching for HABdroid, kind of confusing)
Anyway, had to change the sitemap and items files again, seems the app is looking for a file “defaults.sitemap”, so I changed the name of the file and edited it…

sitemap default label="Main Menu" {
Frame label="Bathroom" icon="bath" {
			Slider item=CLEDS_dim            
    }	
}

Then, in the app I set

, and got this

this was a 2 pole wheel type breaker

the two wires coming in are on the right

since I think the dimmer cannot handle 2 pole connection I changed it to this type

connections