mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
147 stars 90 forks source link

A rule works only one time #366

Closed pgollor closed 7 years ago

pgollor commented 7 years ago

I created a rule to trigger an light switch node from a motion node to turn light on and light off. But it works only the first time. My current workaround is to activate Disable when trigger and reactivate after 1 minute, but it is not nice. If I deactivate Ignore duplicate it also works, but I don't want to switch it multiple times.

For that case a good enhancmend could be a resetable timer:

I hope anyone can understand me.

jkandasa commented 7 years ago

@pgollor I guess the problem with your motion sensor node. For example, your motion sensors sends 1 when there is a motion detected. and it should not send 0 at all. In this case, the first-time your rule satisfied and triggers operations. As you have enabled ignore duplicate rule needs 0 to reset. But your node never send 0. This is the problem. You have to send 0 immediately when you do not see a motion.

Hope this approach will help you.

pgollor commented 7 years ago

I want to independent of the high level time from the motion sensor and I disabled sending the off state. Because I want to use multiple motion sensors for one light node. But I tried it to send also the off state and it works. I didn't know the intention behind some functions from MyController. Sorry for that. Thank you for your help and sorry for this issue.

But without a resetting timer it would power off the light multiple times. For example a person would go throw the floor over 5 minutes, but the switch off time is 1 minute. Maybe this function could be en enhancement for the future? The solution could be, every new state will reset the rule.