Problems with states/events

Switch Esstisch "Esstisch" <light> (Wohnzimmer) ["Lighting"] {channel="zwave:device:0a8ccf87:node2:switch_binary1"}
Switch Wohnzimmer "Wohnzimmer" <light> (Wohnzimmer) ["Lighting"] {channel="zwave:device:0a8ccf87:node2:switch_binary2"}
Switch Kueche "Kueche" <light> (Kueche) ["Lighting"] {channel="zwave:device:0a8ccf87:node3:switch_binary1"}
Rollershutter Rollo "Rollo" <rollershutter> (Wohnzimmer) ["Switchable"] {channel="zwave:device:0a8ccf87:node4:blinds_control"}
Switch Schlafzimmer2 "Schlafzimmer2" <light> (Schlafzimmer) ["Lighting"] {channel="zwave:device:0a8ccf87:node5:switch_binary1"}
Switch Schlafzimmer1 "Schlafzimmer1" <light> (Schlafzimmer) ["Lighting"] {channel="zwave:device:0a8ccf87:node5:switch_binary2"}
Switch WohnzimmerAlle "Wohnzimmer Alle" <light> ["Lighting"] 
Switch UntenAlle "Unten Alle" <light> ["Lighting"] 
Switch ObenAlle "Oben Alle" <light> ["Lighting"]
String Receiver "Receiver" <light> (Receiver) ["Remote"] {channel="harmonyhub:device:HarmonyHub:53175508:buttonPress"}
Switch Tuer "Tuer" <Door> (Door) ["Door"] {channel="zwave:device:0a8ccf87:node9:lock_door"}
Number TuerBatterie "Tuer Batterie" <Door> (Door) ["Number"] {channel="zwave:device:0a8ccf87:node9:battery-level"}
Switch FlurUnten "Flur Unten" <light> (Flur) ["Lighting"] {channel="zwave:device:0a8ccf87:node7:switch_binary1"}
Switch FlurOben "Flur Oben" <light> (Flur) ["Lighting"] {channel="zwave:device:0a8ccf87:node8:switch_binary1"}
Switch Draussen "Draussen" <light> (Draussen) ["Lighting"] {channel="zwave:device:0a8ccf87:node8:switch_binary2"}
String Temp "Temp [%s]" <serial> {serial="COM8@115200"}
rule WohnzimmerAlleAn
when Item WohnzimmerAlle received command ON
then
	Wohnzimmer.sendCommand(ON)
	Esstisch.sendCommand(ON)
end

rule WohnzimmerAlleAus
when Item WohnzimmerAlle received command OFF
then
		Wohnzimmer.sendCommand(OFF)
		Esstisch.sendCommand(OFF)
end

rule UntenAlleAus
when Item UntenAlle received command OFF
then
	FlurUnten.sendCommand(OFF)
	createTimer(now.plusSeconds(1)) [|
		Kueche.sendCommand(OFF)
	]
	createTimer(now.plusSeconds(2)) [|
		Wohnzimmer.sendCommand(OFF)
	]
	createTimer(now.plusSeconds(3)) [|
		Esstisch.sendCommand(OFF)
	]
end
	
rule UntenAlleAn
when Item UntenAlle received command ON
then
	FlurUnten.sendCommand(ON)
	createTimer(now.plusSeconds(1)) [|
		Kueche.sendCommand(ON)
	]
	createTimer(now.plusSeconds(2)) [|
		Wohnzimmer.sendCommand(ON)
	]
	createTimer(now.plusSeconds(3)) [|
		Esstisch.sendCommand(ON)
	]
end

rule ObenAlleAn
when Item ObenAlle received command ON
then
	FlurOben.sendCommand(ON)	
	createTimer(now.plusSeconds(1)) [|
		Schlafzimmer1.sendCommand(ON)
	]
	createTimer(now.plusSeconds(2)) [|
		Schlafzimmer2.sendCommand(ON)
	]
end

rule ObenAlleAus
when Item ObenAlle received command OFF
then
	FlurOben.sendCommand(OFF)
	createTimer(now.plusSeconds(1)) [|
		Schlafzimmer1.sendCommand(OFF)
	]
	createTimer(now.plusSeconds(2)) [|	
		Schlafzimmer2.sendCommand(OFF)
	]	
end

What is the use of the items UntenAlle and ObenAlle?

All lights ground floor and first floor. I’m using toggle switch. I also had a look at parameter configuration which is standing on toggle switch like all others.

similar reaction is for all other fibaro relays. but it seems that on the other switchs, the state is always like real - but it also changes sometime twice in a tenth second.

2018-03-22 13:45:03.211 [ome.event.ItemCommandEvent] - Item 'Esstisch' received command OFF
2018-03-22 13:45:03.212 [vent.ItemStateChangedEvent] - Esstisch changed from ON to OFF
2018-03-22 13:45:03.272 [vent.ItemStateChangedEvent] - Esstisch changed from OFF to ON
2018-03-22 13:45:03.304 [vent.ItemStateChangedEvent] - Esstisch changed from ON to OFF

Try using groups:

Group:Switch UntenAlle "Uten Alle" <light> ["Lighting"]
Group:Switch ObenAlle "Oben Alle" <light> ["Lighting"]
Switch FlurUnten "Flur Unten" <light> (Flur, UntenAlle) ["Lighting"] channel="zwave:device:0a8ccf87:node7:switch_binary1"}
Switch Kueche "Kueche" <light> (Kueche, UntenAlle) ["Lighting"] {channel="zwave:device:0a8ccf87:node3:switch_binary1"}
Switch Wohnzimmer "Wohnzimmer" <light> (Wohnzimmer, UntenAlle) ["Lighting"] {channel="zwave:device:0a8ccf87:node2:switch_binary2"}
Switch Esstisch "Esstisch" <light> (Wohnzimmer, UntenAlle) ["Lighting"] {channel="zwave:device:0a8ccf87:node2:switch_binary1"}

This should take care on the first two rules, you don’t need them anymore.
When the Group UntenAlle receives a command, all the items in that group will be sent that command. No more lists of items and timers… :smiley:

thx for this hint vzorglub! :slight_smile: I’m completely new in home automation, so this are useful tips for me how to make a better design :slight_smile:
but I believe this will not explain the problem I have isnt it?

Difficult to say but with things switching on and off complicated with timers… Not sure
Try the simple code with the groups. If it works keep it. If you have the same problem then we are looking at something specific for that particular switch.

grouping works pretty well. better than before. so I dont have any rule at the moment. but problem is still there

Is it only that switch?
Does the switch send an OFF event when you turn if off by hand?

mhh… I checked this and you are right. the kitchen switch is the only one who doesnt change the state when I press on the wall switch.

could this be because its the only fibaro double switch where only one light is connected? L2 and S2 isnt connected.

Could be but I don’t think so.
I think you have a bad contact in the switch

well, I checked the cables. connection is fine and correct. I switched from Q1 and S1 to Q2 and S2. but still same error. I believe that there is a hardware/firmware issue of this controller… hmm… I think I will contact fibaro

Try putting another switch in its place then you will know for sure. Bad switch!! Bad luck!!

so I installed for different testing purpose an openhabian and used my zwave uzb1 stick with it. just updated to latest zwave 2.3.0 binding snapshot and added my switch as thing.

on my openhabian installation, the switch get succesfully the event… moved the stick back to my windows server and its working there also again. I dont know what changed… but its working now again.

I had the same issue. It apparantly is a known issue and firmware updates are meant to fix it with varying results. I have 25 fibaro dimmers all of which are on firmware ver 3.5 with varying results. All of my lights are Led Dimmables with the 3 wire configuration and have the fibaro dimmer bypass installed. The issue still exists. There are a few things you can do. Unfortunately you have to tackle it on more than one front. The Auto caliberation seems to be an issue on the fibaro dimmers.

Parameter
1 - Min Brightness
2 - Max Brightness
6 - 3
8 - 12
23 - Disable Double Click
30 - Forced Leading edge control ( You may hear some faint buzzing if chosen and ensure your Bulbs are capable of Leading edge control)

The Next part is the definition on Items and Rules you may need if the above hasn’t consistently worked

Switch      MBed1             "MasterBed Reading"                          <switch>             (FiF_MBed, sFif)	{ channel="zwave:device:b215c72c:node27:switch_dimmer1" }
Dimmer      MBed1_dim         "MasterBed Reading [%d %%]"                  <dimmablelight>    	   	{ channel="zwave:device:b215c72c:node27:switch_dimmer1" }
Dimmer      MBed1_HB          "MasterBed Reading"                  <dimmablelight>    	(Homebridge,FiF_MBed,fDimm)	[ "Lighting" ]	    	{ channel="zwave:device:b215c72c:node27:switch_dimmer1" }

Rules

rule "MBed1 Dimmed Light"
	when
		Item MBed1_HB received command
		or
		Item MBed1 received command
	then
		logInfo("RULE", "--> Master Bed Reading Light Triggerred ")
	    if( receivedCommand == ON )
			{ 
				if ( MBed1.state != ON ) 
            	{
        		logInfo("RULE", "--> Master Bed Reading turned on")
		        MBed1_dim.sendCommand(MBedDim_lvl)
		        Thread::sleep(270)
		        MBed1_dim.sendCommand(MBedDim_lvl)
	        	Thread::sleep(270)
		        MBed1_dim.sendCommand(MBedDim_lvl)
				}
            }
		else if ( receivedCommand != OFF )
			{
				logInfo("RULE", "--> Master Bed Reading Light Dim Value Received")
				HomeDim = receivedCommand as DecimalType
	        	MBed1_dim.sendCommand(HomeDim)
		        Thread::sleep(270)
	        	MBed1_dim.sendCommand(HomeDim)
		        Thread::sleep(270)
	        	MBed1_dim.sendCommand(HomeDim)
			}
	end

The behaviour is that when the switch is turned on it always turns on at the preset dim level (MBedDim_lvl which is varied depending on the time). When the dim value is changed via the sitemap or HomeKit it hits the HomeDim rule and the value is sent 3 times with a delay of 270 milli seconds. This way it always works. I have been making a lot of changes recently trying to optimise my rule set and compensating for bugs in the dimmer modules. I may need to add another or command for a possible receive update from the switch to control Dim level when turned on from the switch. Will look to fine tune them today when i get home. Hope this helps in some way.

1 Like

well, after some weeks with learning of zwave and openhab I again dont know what to do.

Some days, it does work like it should, on some days it does not work. Sometimes it helps to set association groups new, sometimes it does not help. also I’m not sure if this only happen on fibaro double switch, because I also have some strange behavior with fibaro roller shutter double events or neo coolcam touchpanel switch.

for example… I opened my rollershutter from 94% to 100%. but the state moved it back to 94%…

2018-06-03 14:22:49.623 [vent.ItemStateChangedEvent] - Rollo changed from 94 to 100
2018-06-03 14:22:51.161 [vent.ItemStateChangedEvent] - Rollo changed from 100 to 94

I bought a new controller and switched from UZB1 to aeotec gen5, excluded and reincluded all devices in my house two times, updated from OH2.2 to OH2.3 using the zwave 2.3 security development binding and also updated since April to 5 different snapshot versions. It feels that something with openhab and the controller is not working correct.

when I open habmin and go to association group, 95% of my fibaro devices are empty in the field “lifeline” and I cant explain why it does not save openhab controller when I reopen that saved thing…

edit: now I have deleted all association group and set it new again. and all states got report back (also that lifeline field is still empty after refreshing the site)… in few hours/a day later I will have some same issues again



There is a bug in Habmin about the UI display of associations. You should be able to see them in PaperUI, but still best to do zwave configuration in Habmin…

Here is another post with a similar issue being reported…

It sounds like you may have switched zwave bindings a few times. Did you delete all of your zwave Things each time (different than exclude)?

no I didnt everytime. do I have to? what can happen if I dont do? I mean, it seems that it is needed otherwise you wouldnt mention and ask it. but what if I run e.g. 100 zwave devices and want to update to a new version? IMO this cant be really asked to do everytime.

in paperui for thing Kueche Lifeline is missing, in habmin not. so vice versa :s

I don’t know specifically what issues you would find if you didn’t, but you will need to when moving between the master and dev branches. The way Things are defined is different between master and dev, so it is more than just updating channels. @chris has posted about it in the forum somewhere. It really should be in bold at the top of the Zwave Refactoring thread, but I’m sure it is in there somewhere.

This is what I do (120 devices)…

There is an ESH PR (linked in my post) to correct this, but it has been on hold for a long time.

It’s possible this is a new bug, but it’s possible deleting your Things after changing zwave bindings could resolve this. I delete all my Things after even a binding update in case there was a change to one of the devices I use.

thx for your script. I’ll try it out later. Need to do some modification because I’m running Windows OS.

I just realized I hadn’t updated it… the temperature scale change is not longer needed after UoM was added into the dev binding. I’ll update it with my current version.