I am looking to create a timer for lights triggered by a D-LINK motion sensor. At the moment its easy to get the lights to turn on via ITTT natively but I am looking for the following.
- Lights / light turns off after x min of being triggered
- This rule only runs between set times - I can achieve this by limiting the dlink motion tracker active times but would be cleaner if can be achieved here.
- If lights are currently on then the rule should not run preventing them then turning off after x min
Was hoping there would be a way to use Maker from withing ITTT to trigger either a direct call the LIFX clould or maybe even run a script from a web server?
Open to suggestions if anyone has achieve this before.
If you are using the maker channel then I assume you’re sending http requests from your own webservice. Can you create a programmatic delay timer on your end before sending the request to IFTTT? What language are you using? If you are operating from a php server then you can use
Thanks for the response. No I am not using a webservice however open to the idea if required to achieve my goals as stated above. Is there any guide on setting this up? Bit of a noob in this department.
So glad you posted this. I have been looking for a solution for this exact scenario as well. I want the kitchen light to come on when I enter the room, and then shut off a few minutes later. I have been playing with Smartthings to try to get it to work, but no luck. I like @aberythenabry 's suggestion, but that would require a server, which is a bit much for me. I currently have an ubuntu server sitting around that I could use - but would rather not have to go that route.
Let me know if you find anything and I will do the same!
Do you have a website? I am just calling the API from a PHP script sitting on my website. No need for a dedicated server.
Hi I was wondering if you figured out a solution as I’m trying to do the exact same thing
I have been having exactly the same issue just trying to set up a delay to turn the light off after triggering with a d-link motion sensor.
I have tried using IFTTT with some of the ‘fade’ or ‘breathe’ actions and setting longer values in the advanced options but I can’t get anything to work.
I have tried having 2 recipes in IFTTT for turning it on and slowly off, but you can’t predict which recipe kicks off first.
On IFTTT also, you can call a REST endpoint exposed by Lifx, but it sensibly requires headers with tokens which the Maker channel on IFTTT doesn’t support.
I can’t see any way to natively process the d-link notifications locally, say on a PC, without using the Andorid app.
I’ve been trying to figure out this same issue for a while now. You’d think D-link motion detector would be much easier to integrate with other products (since it’s only job is to be a trigger). I’ve not been able to get stringify to work quick enough nor be consistent enough for this so I’ve come up with a solution with IFTTT.
D-LINK detects motion triggers lifx (make sure it’s at instant, there’s about a 2 second delay which is fast enough for me)
D-LINK detects motion triggers add row to spreadsheet in google drive (This takes up no room in your google drive with the added bonus of being able to see every time there’s movement!)
When adding new row to spreadsheet in google drive turn off lifx light with duration of 5 minutes