In Billy's example, there's one thing to note.
The placement of the sensor is very
important, or weird actions could result.
For example, using the light/dark code to
turn on and off porch light assumes that the
sensor is placed such that it triggers on
ambient light and not the porch light itself.
otherwise:
- M13 on (it's dark) triggers porch light to 50%
- when light goes on, unit send a M13 off
(it thinks it's daylight).
- If there's a trigger for M13 off that
turns the porch light off (normal sunrise
assumed), the porch light would go off, a M13
on would be sent and the cycle repeats.
It took me a couple of trys to find a spot
for the sensor (using a scenario like Billy's
to find a location where ligh/dark was sensed
for ambient light (not the porch light, a car
in the driveway or passing by, etc), yet
allow the motion sensor to trigger when
someone came up the walk.
For my specific application, I didn't want to
use the sunrise/sunset time labels in AHP,
as it had to work on a dark/stormy day.