Milifax wrote:jvandenbroek wrote:Ah I understand what you mean. You should create a dummy device as master and add both RFLink devices as slaves to it. Now you should get the correct status on the dummy device..
Edit: Well I think I understand it, is it correct that you have 2 RFLink devices, one only triggers when door is open and the other when door is closed? And do they sent the correct On and Off status, or both the same (always On or Off)? If the latter is the case, you should use a script and not master/slave devices.
Nope no luck unfortunately,
the master swithes on once and stays on.
The dummy devices are always open if I log the states.
I guess your hardware send On or Off for both states, but as different devices.. Then you could do something like this:
Create 1 dummy device named 'Achterdeur'
Name your RFLink device as 'Achterdeur_Open' and 'Achterdeur_Dicht'
Code: Select all
return {
active = true,
on = {
devices = {
'Achterdeur_Open',
'Achterdeur_Dicht'
}
},
execute = function(domoticz, device)
if (device.name == 'Achterdeur_Open') then
domoticz.devices('Achterdeur').switchOn()
else
domoticz.devices('Achterdeur').switchOff()
end
end
}
Now you could use your scripting on dummy 'Achterdeur' for the correct status...?
And don't make any devices slaves, just keep them as stand-alone.
Don't depend on the nvalue, this is somewhat an 'illegal' way of obtaining the correct status.. Sure it may work for now, but might not in the future.