Manually switching Fibaro Z-Wave-Switch

  • Platform information:
    • Hardware: Raspi 2
    • OS: Raspian
    • Java Runtime Environment:1.8.0_65
    • openHAB version: 2.3.0-1

My first trial with openhab: Installation on a Raspi with a Z-Wave-USB-Stick “ZStick” (ZMEEUZB1) and a Fibaro “Single Switch 2” (FGS213). Recognition of the device worked fine and also switching with the several GUIs of OpenHab works fine. But when I switch manually (so using the hardware switch connected to the Fibaro device) leading to a changing state of the connected device (lamp) this is not displayed in the OpenHab GUI. So when I manually switch the lamp off, this is not relected in the UI - according to the UI it is still on.
So my first question is: Is the updating of the GUI in case of manually switching supported at all?
And if so - my second question is, how this can be achieved. I already looked at the associations, but they are set to the controller.
By the way - the power consumption is also not displayed correctly in the GUi - always 0!

Here a part of the event log - only the actions of the GUI are recorded here, but the manual switching doesn’t lead to a log entry:

2018-07-22 16:39:31.751 [vent.ItemStateChangedEvent] - LampSwitch_Esszimmer changed from OFF to ON
2018-07-22 16:40:20.412 [ome.event.ItemCommandEvent] - Item ‘LampSwitch_Esszimmer’ received command OFF
2018-07-22 16:40:20.424 [vent.ItemStateChangedEvent] - LampSwitch_Esszimmer changed from ON to OFF
2018-07-22 16:45:37.246 [ome.event.ItemCommandEvent] - Item ‘LampSwitch_Esszimmer’ received command ON
2018-07-22 16:45:37.261 [vent.ItemStateChangedEvent] - LampSwitch_Esszimmer changed from OFF to ON
2018-07-22 16:45:38.111 [ome.event.ItemCommandEvent] - Item ‘LampSwitch_Esszimmer’ received command OFF
2018-07-22 16:45:38.125 [vent.ItemStateChangedEvent] - LampSwitch_Esszimmer changed from ON to OFF

So any comments will be welcome …

Yes (of course) :grinning:
Make sure you have set the correct Switch Type and make sure you have correct values for Periodic Power Reports and Periodic Energy Reports. Also make sure you have a format set in the label of the item definition.

Thanks a lot - its good to know that it should at least work.

Ok, what’s the correct switch type? The (default) type was “toggle switch” - which worked fine. I also tried the two other possibilities (“toggle switch stable” and “momentary switch”), but there I had to manually switch two times to change anything. So I think “toggle switch” is correct. And the behaviour didn’t change for the other switch types.

I set “active power reports” to “1W” and “periodic power/energy reports” to “10 s”. After this modification I suddenly saw the right watts value displayed - but it remains displayed also when I switched off the lamp again (even when switched off from the GUI). So at least a partial step forward.

For the switch item and for the “electric meter” item there is no format defined. Am I right that this format is only needed for displaying the watts of the electric meter - not for the switch? Evidently a default format is used when not defined.

So to conclude - the problem still remains.

By the way - I saw that it is possible to add items to the different channels - e.g. to the switch channel. But this seems to relate only to other items, not to the controller?

That one you are using :rofl:
Toggle Switch = “EIN/AUS Schalter”, Momentary Switch = “Taster”

Here is a working config for a FGS223 (with two relays):


Group:Number:SUM gEnergyW <energy> //group power consumption
Group:Number:SUM gEnergyKW <energy> //group energy consumption
Number FibFGS223_1_kwh1 "Wallplugs WZ [%.2f KWh]" <energy> (gEnergyKW) { channel="zwave:device:uzb:node30:meter_kwh1" }
Number FibFGS223_1_kwh2 "Wallplugs EZ [%.2f KWh]" <energy> (gEnergyKW) { channel="zwave:device:uzb:node30:meter_kwh2" }
Number FibFGS223_1_watt1 "Wallplugs WZ [%.2f W]" <energy> (gEnergyW) { channel="zwave:device:uzb:node30:meter_watts1" }
Number FibFGS223_1_watt2 "Wallplugs EZ [%.2f W]" <energy> (gEnergyW) { channel="zwave:device:uzb:node30:meter_watts2" }
Switch FibFGS223_1_Sw_1 (gRestore) { channel="zwave:device:uzb:node30:switch_binary1" }
Switch FibFGS223_1_Sw_2 (gRestore) { channel="zwave:device:uzb:node30:switch_binary2" }


Switch item=FibFGS223_1_Sw_1 label="Living Wallplugs" 
Switch item=FibFGS223_1_Sw_2 label="Dining Wallplugs" 
Group item=gEnergyW label="Momentanverbrauch [%.1f W]" icon="energy"
Group item=gEnergyKW label="Gesamtverbrauch [%.2f KWh]" icon="energy"

Thanks a lot for diving into my problem again. So I added your items (reduced to one switch and adapted to my channels) to my default.items file (left my “original” item in):

Switch LampSwitch_Esszimmer "Lampe Esszimmer" <lighbulb> { channel="zwave:device:0b535824:node2:switch_binary" }
Group:Number:SUM gEnergyW <energy> //group power consumption
Group:Number:SUM gEnergyKW <energy> //group energy consumption
Number FibFGS223_1_kwh1 "Wallplugs WZ [%.2f KWh]" <energy> (gEnergyKW) { channel="zwave:device:0b535824:node2:meter_kwh" }
Number FibFGS223_1_watt1 "Wallplugs WZ [%.2f W]" <energy> (gEnergyW) { channel="zwave:device:0b535824:node2:meter_watts" }
Switch FibFGS223_1_Sw_1 (gRestore) { channel="zwave:device:0b535824:node2:switch_binary" }

… and to my default.sitemap:

sitemap default label="Test Ingo"
  Switch item=LampSwitch_Esszimmer label="Lampe Esszimmer"
  Switch item=FibFGS223_1_Sw_1 label="Living Wallplugs" 
  Group item=gEnergyW label="Momentanverbrauch [%.1f W]" icon="energy"
  Group item=gEnergyKW label="Gesamtverbrauch [%.2f KWh]" icon="energy"

Unfortunately the behaviour is still the same: With “Basic-UI” I see the following:


So although the lamp is switched on, the energy consumption is still 0 and again (even more problematic for me) the manual switching is not reflected by the GUI.

So I fear the “evil” must be somewhere else …
Maybe there should be any log entries when events are received by the “Z-Wave Serial Controller” or by the OpenHab-Software. So the existence or absence of these messages in my system might give us a hint to the problem?

Try the channels with the number behind it:

{ channel="zwave:device:0b535824:node2:switch_binary1" }
{ channel="zwave:device:0b535824:node2:switch_binary2" }

I guess switch_binary1 should do it.


Thank you for coming back to my problem again. So first of all - yes, there are channels defined without and with added numbers:

So I enabled the “…1” channels and changed the definition accordingly.
And now it really works!!! Including the Watts measurement.
Thanks a lot! I would never have found this solution by myself. And I can’t imagine that others don’t have the same problem …
Nevertheless I’m wondering - what’s the idea behind the “channels without the numbers”? They are creating confusion - so why do they exist? A related information would be the perfect brick to finish this discussion.

There is a thread about this with explanation, you may find it through the search button (I think it is for the FGS223)

I have removed it from the database (similar to the FGS223), in the next snapshot or development version of the zwave binding the channel should not been shown again.

Thanks - that’s great and will hopefully lead to less confusion in the future - especially for beginners like me …

By the way - as “FGS213” is a one channel switch, I believe that the channels for the second switch (ending with “2”) should also be removed. I assume that you simply use the same driver for “FGS213” and “FGS223” and therefore display the same channels for both devices, but I hope that adapting the channels to the really existing switches isn’t too difficult - as this would again lead to a more clean solution.

I don’t think that the second switch should be removed. You can attach a second switch to the FGS223 for controlling another device or to start a rule.

Don’t worry, the switch_binary channel was only removed from endpoint 0, not from endpoint 1 and 2.
You can even add a second switch to the FGS213, which then does not switch any actual load, but can be used to control other devices.