I’m using a Smart Life pir motion detector that sends event each time he detects movement. Using ifttt to set a string variable with the device name from the smart life event. There are a lot of empty events and from time to time an event with the device name appears. My condition checks if the string variable contains the exact deceive name for at least 1800 seconds. The logic block negative result creates a Google calendar event to turn off the light. I wonder if my scenario is correct?
don’t see anything wrong in what you have written, but to fully understand your goal, can you share some real-life context?
Also, why the calendar entry? Is that to remind you to turn off the light manually?
The calendar entry is for several ifttt applets that shut off all connected light devices.
Real life context…
Lighting control for shabbat and holidays.
I guess you could also create a boolean variable for each sensor and track them individually, and when all have not been updated for 1800 seconds, you would know that the lights can be turned off, no?
- I have only one sensor.
- For each of the sonoff lights I have individual ifttt applet that acts upon Google calendar event “LightsOn” or “LightsOff”.
- I still struggle with the PIR sensor because it sends event for each person detection but IFTTT gets it each 90 seconds.
You can trigger many applets directly from Apilio, so you maybe you can save going through the Google Calendar.
The last point I do not get yet. Does the sensor also send an event after a certain timeout (when nobody is detected for some time) or does it only send event when somebody is detected?
The Tuya / Smart Life PIR sensors have caused me nothing but grief. I have now have three different ‘brands’, Neo, BrilliantSmart and Connect SmartHome. I can’t get any of them to communicate with IFTTT with any reliability. I don’t really understand what you are trying to achieve, but if you’d like to explain it a bit more, I’d be happy to try and replicate it? See if I can’t get it to work?