Smart light - Simplify motion triggered lights.

Posted on
Sun Feb 19, 2017 11:15 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Smart light - Simplify motion triggered lights.

I my house I have a motion sensor in almost every room. I have a setup with 4 triggers, a variable and a timer for each of these rooms to handle the logic.
I belive this could be simplified a lot (at least on the outside) if implemented as a plugin. The only problem is my lack of programming experience.
Is there anyone that would take on the task? Or point me in the right direction? Maybe there are som similar plugins out there that basically does the same thing?

The logic is more or less like this.

Code: Select all
If motion and day set light to 100% and set variable AutoOn to True.
If motion and night set light to 20% and set variable AutoOn to Ture.

If motion off and variable AutoOn is true then restart timer.
If motion on and variable AutoOn is true then stop timer.

 If timer expires then turn off light.


This is quite simple but has taken some time to work out. The concept that the timer only starts on motion off prevents the light to turn off if there is a lot of movement in front of the motion sensor.

If anyone has any tips just fire away :)

Håvard

Posted on
Sun Feb 19, 2017 6:31 pm
chobo offline
Posts: 126
Joined: Dec 08, 2013
Location: USA

Re: Smart light - Simplify motion triggered lights.

Subscribed! This could be a very useful plugin. Thanks for sharing your logic, haavarda.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests