Jump to content
  • 0

Variables giving trouble in scenes


Question

Hi there,

 

I got the next setting but it does not work properly can someone explane to me whats wrong?

 

I made a variable "timeOfDay" with 3 options "day" "evening" "night"

Then I made three scenes on time: 06h30 set variable to day, 18h30 set variable to evening, 23h30 set variable to night.

after this I made a scene to turn on the lights in my livingroom asfollow:

If sensor livingroom detects motion check variable equals to evening. and lux value < 35 then turn on lights

I only checked the triggering device "motion" so this scene will only run if motion is detected en then checks if all statements are true.

somehow this works if I manualy activates the "evening" variable I want this because when I go to the bathroom at night I walk though the livingroom and do not want the lights to turn on.

So I guess the problem is not in this scene but in de variable scene that sets the variable on time.

 

Or is this thought al wrong? Where can I see witch state the varibale has at this time and do i need to check the "start when home center 2 starts" box?

 

You can see the attach for more details (it's in Dutch)

 

Thanks in advance.

Maurice

 

***UPDATE***

 

I got it to work now. 2 things I have changed.

First I forgot to check the box "start when home center2 starts" and "do not allow alarm to stop scene while alarm is running"

Second I had 3 states the variable could be in, "day, evening, night" I brought this back to 2 states "day and night"

 

Now the scene works like a charm.

 

Good luck.

 

Scene.jpeg

Edited by Maurice
Update
Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi there,

 

I got the next setting but it does not work properly can someone explane to me whats wrong?

 

I made a variable "timeOfDay" with 3 options "day" "evening" "night"

Then I made three scenes on time: 06h30 set variable to day, 18h30 set variable to evening, 23h30 set variable to night.

after this I made a scene to turn on the lights in my livingroom asfollow:

If sensor livingroom detects motion check variable equals to evening. and lux value < 35 then turn on lights

I only checked the triggering device "motion" so this scene will only run if motion is detected en then checks if all statements are true.

somehow this works if I manualy activates the "evening" variable I want this because when I go to the bathroom at night I walk though the livingroom and do not want the lights to turn on.

So I guess the problem is not in this scene but in de variable scene that sets the variable on time.

 

Or is this thought al wrong? Where can I see witch state the varibale has at this time and do i need to check the "start when home center 2 starts" box?

 

You can see the attach for more details (it's in Dutch)

 

Thanks in advance.

Maurice

Hi
Try this.
In the bottom line, try to select device, instead of room.
See varible status in variable panel.
No checkmark in HC 2
Link to post
Share on other sites
  • 0

Since you're trying to turn ON  the lights in room, your devices (switches) must be defined as lighting control devices. It won't work if not.

see attachment

 

 

post-3670-0-09042600-1473721334_thumb.png

Link to post
Share on other sites
  • 0

Hai hTiger1 & cag014,

 

Thanks for the advice. took me awhile to figger out the status of a variable is the on you see when you open the variable panel. I tought it where just the options you put in. But it shows you the currect value. After knowing this it say the the timed trigger for the variable doen't work. I deleted the scenes and created new one's.

Now that the setDayTime scenes work the complete situation works.

 

And yes the switches where set as lighting control and also the setting with the room works nice.

 

Thanks guys (at least I think your guys :-P )

Link to post
Share on other sites
  • 0

Hai hTiger1 & cag014,

 

Thanks for the advice. took me awhile to figger out the status of a variable is the on you see when you open the variable panel. I tought it where just the options you put in. But it shows you the currect value. After knowing this it say the the timed trigger for the variable doen't work. I deleted the scenes and created new one's.

Now that the setDayTime scenes work the complete situation works.

 

And yes the switches where set as lighting control and also the setting with the room works nice.

 

Thanks guys (at least I think your guys :-P )

 

Hello,

 

Did you update the original post?

Link to post
Share on other sites
  • 0
On 14.10.2016 at 1:21 PM, Maurice said:

 

How do you mean?

Hello,

 

I encourage users to share their solutions with others:

1. First post in the topic have to contain a description of a shared scene (either block or LUA).
2. If your scene requires changes, implement changes and REMEMBER TO UPDATE THE FIRST POST.

 

If you update your first post showing your complete and working solutions then others may use it as well :)

That's why this subforum was created - to share your solutions. :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...