Sonoff th10 and neo pir

Thanks for the great question!

You might want to start by setting up a variable - maybe called “it_is_dark” - that is set to TRUE at sunset and set to false at sunrise. You can use WeatherUnderground on IFTTT to update this variable in Apilio.

You then want to use the person detected event to trigger an evaluation of the Logicblock from IFTTT. The Logicblock evaluation should check if the “it_is_dark” variable is TRUE and then, if so, to run an action to turn on the lights. Most people would also include an additional action, with say a 300s delay, to turn off the lights after.

Hope that helps - have a look at Turn lights on at sunset, off at 23:00hrs if you need more detail.

DanT

1 Like