[OBSOLETE] Smart Porch Light

This is the goal for my outside lights. I am going to tweak an app that is already out there.

  • Lights come on at sunset at a dim level of 5%
  • If a motion sensor is detected the lights go to 100% for 5 minutes
  • Lights turn off at 1:00am
  • If a motion sensor is detected after 1:00am the lights go to 100% for 5 minutes
  • The lights turn on 30 minutes before sun rise
  • The lights turn off at sunrise

This app does all but the last 2. You could easily modify it to get the result you want.

Is anybody else having trouble with this app? It worked fine for me until recently. The last few days I have to re-run the app daily or it wonā€™t fire.

That sounds suspiciously like the symptoms of Sudden Scheduler Death Syndrome. Thereā€™s a lengthy topic on it here:

No fix or ETA on a fix exists.

1 Like

Itā€™s not the app. ST is having the regular schedule/sunrise/sunset problem. All my apps with schedule are having issues. Canā€™t wait for hub 2.

I am definitely thinking this is SSDS because if I restart the app it works for like a day. Anybody here a better coder than me that can add a watchdog function to this app? Similar to how pollster restarts itself?

I noticed the issue a few days ago too. Iā€™m going to try to fix it this weekend.

1 Like

And 2 weeks later itā€™s fixedā€¦probably.

Sorry it took so long. I think Iā€™ve got it all worked out. Iā€™ve changed the way that events are scheduled. Iā€™m no longer using the built in sunrise/sunset schedulers and Iā€™ve added a watch dog function as suggested by @ADamL. Iā€™ve even taken it a step further and added a method to check that the watchdog schedule is still running. The watchdog check is run on every trigger and itā€™s restarted if needed. Thereā€™s still room for improvement but this should be a good start.

Also in this update:

  • Now your light levels will be remembered until the next night when changed manually at the switch during standby. This is for the standby light levels. The trigger levels will not be effected.
  • Cleaned up the main settings screen. Unused triggers are now collapsed by default.

What devices are people using for outdoor motion sensors? For the driveway for example?

My understanding is that PIRs were really fickle when it pertains to outdoors.

I fixed a bug that was preventing the acceleration (door knock) trigger from working. If youā€™re using that feature you should update the app. The updated code is at github.

Love the way your light works, I thought of something Iā€™m not sure you can incorporate or not but since itā€™s Christmas time can when the light is in its ā€œdimā€ mode can we have the color of the light red, green, blue etc. considering we are using a rgbw bulb and then when someone arrives goes to the set brightness in white and then go back to the pre describes color in the dim mode in other words be able to select the color of the dim mode and go to white at the desire level when someone arrives.

Has anyone else had a problem with the light not shutting off at sunrise. Three days in a row Iā€™ve shut it off manually because it not automatically going off. It comes on fine and dims correctly or brightens with motion just fine. Just not shutting off at sunrise. Had been working perfectly for two weeks.

Well after I posted that it started working correctly on the 4 day. I guess I just have a gremlin in the works. I really do like this app.

@jdiben, I love this app and have been using this for my porch light. I have since got some motion and lux sensors inside my house and tried using it for my kitchen to turn up a light I normally keep on very dim and bring back down to that same dim level.

If possible, I would like to change the default sunset to sunrise (+/- an offset) to specific times of day instead of sunset to sunrise. How could I go about modifying this app or getting it modified to allow that choice?

@jdiben Great App !..thanks, any thoughts or tips to adjust code to configure seconds for dime instead minutes ? For a stairs light project, minutes could be too much time to dim stairs light. THANKS for your recommendations!

1 Like

Try changing line 522 from

runIn(60 * autoOffMinutes, autoOff)

to

runIn(autoOffMinutes, autoOff)

That should treat whatever value you set for minutes to be evaluated as seconds. You may also want to change the min and max values just above that line. As it is now, you will be limited to between 1 and 30 seconds.

2 Likes

Working !! Thanks a lot !

1 Like