Sync between a zwave object and an eib object.

Begonnen von petitpunch, 02 März 2015, 19:02:44

Vorheriges Thema - Nächstes Thema

petitpunch

Hello, i'm very happy to use fhem. Nice software.

here is my problem, i would like to synchronise status of an eib object with an zwave object.

example: 

I have created 2 objects (1 zwave & 1 eib) for the same device : a zwave wallplug. 
When I switch the zwave wallplug to on or off, i notify the eib object.  this is working BUT... impossible to notify in the other way because I create a loop...

Is if possible to "synchronise" the 2 objects ?


here is my fhem.cfg :

define KNX_prise1 EIB 15/0/1
attr KNX_prise1 IODev tul
attr KNX_prise1 room EIB

define zw_prise1 ZWave 0161f414 2
attr zw_prise1 IODev ZWDongle_0
attr zw_prise1 classes MANUFACTURER_SPECIFIC VERSION CONFIGURATION ASSOCIATION SWITCH_BINARY SENSOR_ALARM ALARM POWERLEVEL METER SENSOR_MULTILEVEL FIRMWARE_UPDATE_MD MARK SWITCH_BINARY
attr zw_prise1 room ZWave

define KNX_prise1_on_to_zw_prise1 notify KNX_prise1:on.* set zw_prise1 on
define KNX_prise1_off_to_zw_prise1 notify KNX_prise1:off.* set zw_prise1 off


Thank you very much in advance !

kind regards

Thierry



rudolfkoenig

Solution 1: define a second "fake" device with the same parameter for each of them (this works for ZWave, don't know about EIB), the second one will be the real one. Trigger on the second, but set the first one.

Solution 2: check, if you are already in the trigger (replace Z1 and Z2 with your devicenames).
define n1 notify Z1:on.* { fhem("set Z2 on") if(!$defs{Z2}{INTRIGGER}) }
define n2 notify Z2:on.* { fhem("set Z1 on") if(!$defs{Z1}{INTRIGGER}) }

petitpunch

You are my hero ! the solution 2 works perfectly !!  many thanks !

petitpunch

Hello,  i'm back.

i have try the same solution with FGRM-222-Rollladenaktor from FIBARO...
but...  with dim value, there is a loop problem.  if my shutter had "on" state, the reportedstate is DIM1, when the shutter had "off" state, the reportedstate is "DIM99".  On the controler, you can hear "tic tic tic...without ending (loop)"

I don't know if the problem is the reported value or another thing but... i can't leave like that.

here is my config:

#STORE1 --------------------------------------------

define zw_store1 ZWave 0161f414 6
attr zw_store1 IODev ZWDongle_0
attr zw_store1 classes MANUFACTURER_SPECIFIC VERSION CONFIGURATION ASSOCIATION SWITCH_BINARY POWERLEVEL METER SENSOR_MULTILEVEL FIRMWARE_UPDATE_MD SWITCH_BINARY MANUFACTURER_PROPRIETARY PROTECTION MARK METER SENSOR_MULTILEVEL MANUFACTURER_PROPRIETARY SCENE_ACTIVATION SWITCH_MULTILEVEL SWITCH_BINARY
attr zw_store1 room ZWave

define KNX_store1 EIB 15/0/2
attr KNX_store1 IODev tul
attr KNX_store1 room EIB


define notify_KNX_store1_on notify zw_store1:on.* { fhem("set KNX_store1 on") if(!$defs{KNX_store1}{INTRIGGER}) }
define notify_zw_store1_on notify KNX_store1:on.* { fhem("set zw_store1 on") if(!$defs{zw_store1}{INTRIGGER}) }

define notify_KNX_store1_off notify zw_store1:off.* { fhem("set KNX_store1 off") if(!$defs{KNX_store1}{INTRIGGER}) }
define notify_zw_store1_off notify KNX_store1:off.* { fhem("set zw_store1 off") if(!$defs{zw_store1}{INTRIGGER}) }

thank you.

rudolfkoenig

You dont have to thank: i dont understand the problem, and dont know what to do.