Hall lights
Moderator: leecollings
-
- Posts: 10
- Joined: Monday 25 January 2016 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Hall lights
Hello
Can someneone tell me what i'm doing wrong with this blockly.
This is the log
21:59:58.221 Error: EventSystem: Lua script error (Blockly), Name: Hal verlichting na zessen_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable
And this is the blockly
Can someneone tell me what i'm doing wrong with this blockly.
This is the log
21:59:58.221 Error: EventSystem: Lua script error (Blockly), Name: Hal verlichting na zessen_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable
And this is the blockly
- Attachments
-
- verlichting.jpg (49.46 KiB) Viewed 4998 times
Last edited by Ronnyboy on Tuesday 26 January 2016 13:12, edited 1 time in total.
- jvdz
- Posts: 2267
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Hall lights
Your time condition looks wrong. You have:
Time >18:00 < 23:59
Think that needs to be :
Time > 18:00 And Time < 23:59
Jos
Time >18:00 < 23:59
Think that needs to be :
Time > 18:00 And Time < 23:59
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 10
- Joined: Monday 25 January 2016 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
Changed it,but didnt work!
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Hall lights
If (Voordeurcontact = Open and (Time > (( 18:00 < 23:59) & (hal = Off)))
is what you have in your screenshot, totally invalid logic
You have your ands nested incorrectly, try something that looks like:
If - (vooordeurcontact = open) and (hal = off) and ((time > 18:00) and (time < 23:59))
is what you have in your screenshot, totally invalid logic
You have your ands nested incorrectly, try something that looks like:
If - (vooordeurcontact = open) and (hal = off) and ((time > 18:00) and (time < 23:59))
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
-
- Posts: 10
- Joined: Monday 25 January 2016 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
hmm.. tried that to,but no response!
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Hall lights
Hi,
The top one is currently my working Blockly. I have edited it to the lower one to emulate your Blockly.

Might help?
The top one is currently my working Blockly. I have edited it to the lower one to emulate your Blockly.
Might help?
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
-
- Posts: 10
- Joined: Monday 25 January 2016 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
strange,
where did you get that first "and" block from
i cant find it
where did you get that first "and" block from
i cant find it
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Hall lights
Right Click the block & select "External Inputs". It works the same but I find it easier to understand when there are nested "And" / "Or" operators.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
-
- Posts: 10
- Joined: Monday 25 January 2016 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
YES that works !! Thank you very much!
-
- Posts: 10
- Joined: Thursday 08 March 2018 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
Having the same problem, can't see the solution image anymore.
Can someone help me out here
Can someone help me out here
- jvdz
- Posts: 2267
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Hall lights
I would help when you post your script/blockly logic so we can see what is happening.
Jos
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 10
- Joined: Thursday 08 March 2018 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
Wow didnt see youre reply till now haha.
Here is my screenshot. What i want is to give me a notification if my dore is open at night.
I get this error..2019-05-08 17:46:59.429 Error: EventSystem: Lua script error (Blockly), Name: Nacht alarm deur open_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
I get this error with al my blocky scripts if i want to enter a time schedule
Here is my screenshot. What i want is to give me a notification if my dore is open at night.
I get this error..2019-05-08 17:46:59.429 Error: EventSystem: Lua script error (Blockly), Name: Nacht alarm deur open_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: 'then' expected near 'comparevariable'
I get this error with al my blocky scripts if i want to enter a time schedule
- Attachments
-
- deuropen.jpg (50.01 KiB) Viewed 3178 times
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Hall lights
Using a time frame which passes the 0:00 barrier never worked for me.
I created a dummy switch, turn it on and off using timers and use that switch in blockly
I created a dummy switch, turn it on and off using timers and use that switch in blockly
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
-
- Posts: 10
- Joined: Thursday 08 March 2018 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
I tried the time not passing 0:00 but the same error.
Can you tell me ( show me) how you solved that?
Can you tell me ( show me) how you solved that?
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Hall lights
Add dummy hardware
Add dummy switch
Set timer on that
In your blockly check switch == on
Do you have a specific question on this?
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
-
- Posts: 10
- Joined: Thursday 08 March 2018 13:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Hall lights
I tried the "or" but did not work, same error
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Hall lights
Could you show your Blockly? I think something else is still wrong. The 'Open' block in your opening post/first Blockly and the 'On' block in your second screenshot are both positioned incorrectly. As @nayr already said but you didn't follow his advice.
Who is online
Users browsing this forum: No registered users and 1 guest