How to make rules with a dwell time

Hi,

I’m just starting off with the Webthings Gateway (version 0.10), so this may be a dumb question, but I want to check my understanding is correct.

Overall I want to get a set of rules so that a hallway light is triggered by a motion detector, and stays on for a period of a few minutes before shutting off again.

It appears that the rule system in Webthings is quite limited - very much a If This Then That without being able to build any intermediate stages. So the way I have found to build this is:-

  1. Rule 1 - Motion detector zigbee device triggers a pulse (addon) device with appropriate settings
  2. Rule 2 - The pulse device controls the lighting device

This has to be done in two stages…

If I wanted to make this so it ran at difference brightnesses (ie dimmer in the middle of the night), I would have to duplicate the whole thing with appropriate time of day restrictions? Actually I am not sure I can do arbitary time period restrictions.

Thanks

Nigel.

Yes, you’ve got the right idea. To do the time of day restrictions, you may want to look at the DateTime add-on.

The way I do this, and yes, more rules are required, but you don’t have to combine the dimming levels with the actualy on/off or motion detection functions. At 11:30pm I simply sent a brighness value and notifier and nothing else, and again at 6am without the notifier.

Once the brightness levels are in place, the motion detector simply turns them on or off without regard to the brightness, which is already preset.