Page 1 of 1

Problem using TIME user variables in blocky

Posted: Sunday 14 December 2014 14:33
by kubiack
Hello

I have created two "user variables" in Domoticz of type time (one for start, the other one for stop time) named "HeureCreuse Debut" and "HeureCreuse Fin".
I created a simple blocky event which check if the current time is between or outside of the [start-stop] period and trigger a corresponding dummy switch named "HeureCreuse".

This doesn't works and I get the following error in the log :

Code: Select all

2014-12-14 14:15:11 Error: Lua script error (Blockly), Name: HeureCreuse_var_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: unexpected symbol near 'or'
2014-12-14 14:15:11 Error: Lua script error (Blockly), Name: HeureCreuse_var_2 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: unexpected symbol near 'and'
In the blocky event, when I change the user variables to blocky time constants, the event works perfectly (this constant-based version controls my electric water heated since about 1 year now).

A screenshot of my blocky event is attached to this post.

Any ideas ?

Re: Problem using TIME user variables in blocky

Posted: Tuesday 08 December 2015 17:31
by fratton
Always this problem in 2.3684 with time user variables in blockly :(

Re: Problem using TIME user variables in blocky

Posted: Tuesday 08 December 2015 17:53
by Egregius
If 'HeureCreuse FIN' is later than 'HeureCreuse Debut' it will always be on. I guess the or must be and.

Re: Problem using TIME user variables in blocky

Posted: Wednesday 09 December 2015 9:01
by fratton
The problem is that time user variables do not work in blocly since long time

Re: Problem using TIME user variables in blocky

Posted: Wednesday 09 December 2015 12:49
by Egregius
You could use integer variables and store the times as unixtimestamp ;)

Re: Problem using TIME user variables in blocky

Posted: Friday 08 January 2016 0:20
by edraket
Hi,
I'm not using user definied time var's but the build-in blocky timer stuff. But also this does not work. I'm using latest Domoticz on NAS Synology.
Any ideas? As work around I'm using LUA.

Regards, Ed