Sonoff th10 and neo pir

Sonoff th10 and neo pir

I’m trying to get my hall lights to come on for 4 minutes when a person is detected after sunset. But do nothing during the day.

I have sonoff th10 connected to ewelink
Neo pir connected to smartlife

Can someone tell me exactly what to do in layman’s terms?



1 Like

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.


1 Like

For the delay part, you don’t need apilio or Ifttt, you can use the Inching setting in Ewelink.

1 Like