Hi, I'm in a transition period moving away from X10 devices to all z-wave. I have mochad installed to control my x10 devices through a CM15Pro/CM19A bridge, and razberry to control all z-wave devices. I have a small key fob device for x10 that used to control my living room devices. The X10 switches on these living room devices have just been replaced by Z-Wave devices. I want the same lights respond to the X10 keyfob as they used to be, however the switches now no longer respond to the keyfob directly. I've still got the X10 switch configured in Domoticz, which still responds to the keyfob.
I have setup my new Z-Wave switches in Domoticz and the lights can be controlled from domoticz. Next I've configured the x10 switch to be a sub/slave device for these switches. Now what happens is that if I switch the lights on or off using the keyfob, in Domoticz the status of all switches is updated correctly, both the X10 switch changes and the status for the zwave switch follows. However the physical lights (on the z-wave switch) do not follow!
From this thread viewtopic.php?f=11&t=12816 I understand this behavior is by design. It is however not what I need. Can anyone please tell me how I can make the z-wave switch follow the X10 switch?
master switch not following slave switch
Moderator: leecollings
-
mrf68
Re: master switch not following slave switch
Hi,
this sub/slave scenario is not what you need. With Blockly or LUA you can get it working. Create a blockly like “If device A is On then set device B is On”. Create a second one but then when turning it off. You can create this in one blockly with the “elseif”, but it can be tricky when troubleshooting.
this sub/slave scenario is not what you need. With Blockly or LUA you can get it working. Create a blockly like “If device A is On then set device B is On”. Create a second one but then when turning it off. You can create this in one blockly with the “elseif”, but it can be tricky when troubleshooting.
-
rrozema
- Posts: 470
- Joined: Thursday 26 October 2017 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Delft
- Contact:
Re: master switch not following slave switch
I've done like you suggested, in a Lua device script:
Sometimes there's a small delay, but most of the times the response pretty direct. This always keeps both switches in sync: no matter which switch is operated, the other follows.
Code: Select all
commandArray = {}
sw1 = 'SW Keuken Aanrechtverlichting'
sw2 = 'Aanrechtverlichting'
-- loop through all the changed devices
for deviceName,deviceValue in pairs(devicechanged) do
if (deviceName == sw1) then
if (deviceValue ~= otherdevices[sw2]) then
commandArray[sw2] = deviceValue
end
elseif (deviceName == sw2) then
if (deviceValue ~= otherdevices[sw1]) then
commandArray[sw1] = deviceValue
end
end
end
return commandArray
Who is online
Users browsing this forum: No registered users and 1 guest