Problem using TIME user variables in blocky

Moderator: leecollings

Post Reply
kubiack
Posts: 3
Joined: Tuesday 21 January 2014 20:49
Target OS: Linux
Domoticz version:
Contact:

Problem using TIME user variables in blocky

Post 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 ?
Attachments
HC_var.png
HC_var.png (41.46 KiB) Viewed 3779 times
User avatar
fratton
Posts: 5
Joined: Tuesday 08 December 2015 17:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: FRANCE
Contact:

Re: Problem using TIME user variables in blocky

Post by fratton »

Always this problem in 2.3684 with time user variables in blockly :(
Attachments
event.PNG
event.PNG (7.04 KiB) Viewed 3365 times
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Problem using TIME user variables in blocky

Post by Egregius »

If 'HeureCreuse FIN' is later than 'HeureCreuse Debut' it will always be on. I guess the or must be and.
User avatar
fratton
Posts: 5
Joined: Tuesday 08 December 2015 17:23
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: FRANCE
Contact:

Re: Problem using TIME user variables in blocky

Post by fratton »

The problem is that time user variables do not work in blocly since long time
Attachments
timevar.PNG
timevar.PNG (4.1 KiB) Viewed 3340 times
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Problem using TIME user variables in blocky

Post by Egregius »

You could use integer variables and store the times as unixtimestamp ;)
edraket
Posts: 3
Joined: Friday 08 January 2016 0:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Problem using TIME user variables in blocky

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest