Ignore switch A when status switch B is off ?
Posted: Friday 01 January 2016 13:52
Hi,
Does anyone know whether it's possible to ignore a switch command for device A when device B has a certain status?
I've automated my curtains using an electric motor which rolls up or releases the curtain rope. A modified contact switch and a small magnet in the curtain tells me if the curtain is open or closed.
Now if the curtain is closed, but the switch 'close curtains' is pushed the motor will start running and end up opening the thing because the rope will be rolled up on a tube the wrong way.
To solve this, it would be nice if the switch 'Close curtains' could be ignored if the status of the curtain already is 'Closed' and for example print a warning.
I've looked into some lua examples, but haven't found anything similair other than ignoring multiple switch commands within a given time. Is there anyone who can help me get started?
Does anyone know whether it's possible to ignore a switch command for device A when device B has a certain status?
I've automated my curtains using an electric motor which rolls up or releases the curtain rope. A modified contact switch and a small magnet in the curtain tells me if the curtain is open or closed.
Now if the curtain is closed, but the switch 'close curtains' is pushed the motor will start running and end up opening the thing because the rope will be rolled up on a tube the wrong way.
To solve this, it would be nice if the switch 'Close curtains' could be ignored if the status of the curtain already is 'Closed' and for example print a warning.
I've looked into some lua examples, but haven't found anything similair other than ignoring multiple switch commands within a given time. Is there anyone who can help me get started?