Page 1 of 1

Tradfri Motion sensor with KAKU Christmas Tree

Posted: Monday 12 December 2022 12:27
by Hann1BaL
I have a Tradfri Motion sensor (PIR)
And I have the Christmas tree lights behind a KAKU controlled socket. Currently that is a manual on/off switch that works just fine.
What I am trying to achieve is to enable the PIR for the tree (since being in the room is hard to plan with just timers)

So the goal would be:
1. Master switch to force it switched off/on regardless of motion
2. Tradfri motion sensor to trigger the lights and switch it on.
3. Keep the lights on for X minutes (open for suggestions) after motion detection.
4. As long there is a motion detected within the X minutes we keep the lights on.
5. When the room has no activity anymore for more than X minutes - Switch tree off.

Would someone have an example script that I could use and amend? I am ok reading scripts, but building from scratch is a different story.
Thanks for any input/direction.

Re: Tradfri Motion sensor with KAKU Christmas Tree

Posted: Monday 12 December 2022 14:12
by waltervl
Search the forum for motion scripts and add the master switch functionality as that is the easy part.
For example blockly: viewtopic.php?t=27398
Dzvents example (inluding master switch): viewtopic.php?t=29834

Re: Tradfri Motion sensor with KAKU Christmas Tree

Posted: Wednesday 21 December 2022 20:03
by mikeathome
If you are using the Ikea Tradfri plugin it, according to https://github.com/moroen/IKEA-Tradfri- ... /README.md by moroen, explicitly state it does not support motion sensors. Just to save you some time ;-)

Re: Tradfri Motion sensor with KAKU Christmas Tree

Posted: Saturday 24 December 2022 9:03
by RedEarth
mikeathome wrote: Wednesday 21 December 2022 20:03 If you are using the Ikea Tradfri plugin it, according to https://github.com/moroen/IKEA-Tradfri- ... /README.md by moroen, explicitly state it does not support motion sensors. Just to save you some time ;-)
The Tradfri plugin doesn't work directly with motion sensors (i.e. if they're not paired with anything), but you could still use it for what you're trying to do if you pair it with an outlet device and then reference that device as the sensor in your automation.