Switch on a scene using movement detector task

Avatar
  • updated

Hi, I tried to use the movement detector task to trigger a scene. The status of the scene updates to ON when the movement detector value is true, but not the actual brightness values of the lights implemented in the scene. Is there a feedback that needs to programmed?

Also I use a KNX switch to actuate the same scene, KNX switch sends a 1byte telegram to trigger the scene, the scene contains both 1byte ''brightness values'' and 1bit ''switching'' group adresses for lights. This works fine.


 What is the best way to integrate a movement detector? I want the scene to work both from the KNX switch and the KNX movement detector.


Regards

Simen 

Avatar
Ricardo Pinto

Hello,

I was a little bit confused about the issue, and had to test it out first, before answering.

So here's what's happening:

On the Movement Detector task, the output can't be a "scene". This output only accepts true/false values, and not run values.

If you notice, when you add a scene to the Output Value, when you select the scene it shows the value "State". That's why when the motion is triggered, you're faking and forcing the state to true, rather than running the scene.

Solution:

Create a Boolean value, call it something like "Scene x trigger" or whatever you want to call it;

Go to the scene you want to execute with the Motion Detector task;

Add the Boolean as Trigger of the scene, set it to Condition: Equals(=); Value: True; Select Allow retrigger;

Go to the Motion Detector task, add that Boolean as the Output Value;

This way, when the motion output is true after getting the motion detection input, it sets the Boolean to true, which in this case is a trigger to run the scene.

Just tested, and this workaround works perfectly.

Best regards

Avatar
Alexis STURM

Hello,

I was trying to address the same issue today on a customer system and implemented the same logic as you described here. The scene activation (run) works fine when motion is detected.

My problem is that the lights (involved in the scene) will not switch off when the timer expires (as per the Delay value configured in the Task via the UI), which is expected because the scene will only switch on the lights (there's no Scene toggle function available).

How can I toggle a scene using the Movement Detection Task ?

Using a scene is convenient for the customer, because they can customize also the desired brightness (e.g. a path light during the night at e.g. 20% brightness instead of 100% if the light is switched on manually).

[UPDATE] On second thought, I'm thinking of creating a "switch off" scene, which will be triggered when the boolean value is set to 0 (OFF). I'll test it.

[UPDATE2] Works great this way !

Avatar
Ricardo Pinto

Hello Alexis,

Perfect, you completely figured it out, that's the way :) I know it's not the most elegant way, but it works, period.

Thanks for sharing, it will help the next ones needing and reading this post.

Best regards