Page 1 of 1

blockly: user variable set for time, don't work?

Posted: Tuesday 05 January 2016 22:34
by Evelen
Ok, i want to set my user varibale to "timer_on" for 3 minutes when a lamp is on, than back, but it don't work, the variable don't change to "timer_on".

why?
støvsuger.png
støvsuger.png (25.69 KiB) Viewed 2811 times

Re: blockly: user variable set for time, don't work?

Posted: Wednesday 06 January 2016 21:40
by Evelen
bumping

Re: blockly: user variable set for time, don't work?

Posted: Monday 11 January 2016 21:16
by Evelen
bump

Re: blockly: user variable set for time, don't work?

Posted: Wednesday 13 January 2016 22:25
by Evelen
bump

Re: blockly: user variable set for time, don't work?

Posted: Monday 18 January 2016 15:05
by Philosifer
I've been struggling to get events that mention only user variables to trigger at all.

Event that check changes of system states (e.g. security status) seem ok but if they only have user variables in the if clause they seem not to run.

Maybe add a write to the debug log in your do clause to see if your event is running or not.

Re: blockly: user variable set for time, don't work?

Posted: Tuesday 19 January 2016 19:44
by krollebol
Indeed, I've also noticed that an event with only a user variable in the 'if' doesn't work. But you could probably add an AND with an additional condition that's always true, such as "time > 00:00". Then the event will run every minute. Of course that's not useful if you want to trigger immediately when a user variable changes.

Also setting a user variable for X minutes doesn't work. The value will never be set. Probably this set for X minutes only works for toggling a switch :-(

Re: blockly: user variable set for time, don't work?

Posted: Monday 12 December 2016 12:13
by sorampage
Hi all,


Indeed, an event does not start on the simple change of state of a variable. And this can be a problem ...

Re: blockly: user variable set for time, don't work?

Posted: Monday 12 December 2016 15:12
by sorampage
Evelen wrote:Ok, i want to set my user varibale to "timer_on" for 3 minutes when a lamp is on, than back, but it don't work, the variable don't change to "timer_on".

why?

støvsuger.png

You can use hidden dummy switch .. :)

Re: blockly: user variable set for time, don't work?

Posted: Wednesday 21 December 2016 12:48
by Evelen
sorampage wrote:
Evelen wrote:Ok, i want to set my user varibale to "timer_on" for 3 minutes when a lamp is on, than back, but it don't work, the variable don't change to "timer_on".

why?

støvsuger.png

You can use hidden dummy switch .. :)
have already solved the problem, but just wondering, what is a hidden dummy?