Error: EventSystem: Lua script error (Blockly) Topic is solved

Moderator: leecollings

Post Reply
Domostiaan
Posts: 6
Joined: Monday 24 August 2020 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Error: EventSystem: Lua script error (Blockly)

Post by Domostiaan »

After my first successfull Blockly script i tried to create the following.
light goes off at 22:30. Unless the tv is on it stays on until the tv is going off.

i created a collaboration of two events to do this.

however i keep getting the following errors every minute.
searched the forum and google, but there i found that in most situations there were multiple times inside the event.
but i only have one time inside it.

2020-08-26 19:55:00.353 Error: EventSystem: Lua script error (Blockly), Name: Gang uit na AV uit_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'
2020-08-26 19:56:00.364 Error: EventSystem: Lua script error (Blockly), Name: Gang uit na AV uit_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'


How can i get it to work without errors?
Attachments
light going off at 22:30 when tv is not on
light going off at 22:30 when tv is not on
light off.png (14.28 KiB) Viewed 773 times
This one creates the errors --- config to keep the light on after 22:30 when TV is on
This one creates the errors --- config to keep the light on after 22:30 when TV is on
error code.png (40.64 KiB) Viewed 773 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Error: EventSystem: Lua script error (Blockly)

Post by waaren »

In the faulty one you now have something like
if device1 and device2 = On and time = 22:25 set device3 On
Try changing this to look like
if device1 = On and device2 = On and time = 22:25 set device3 On
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Domostiaan
Posts: 6
Joined: Monday 24 August 2020 16:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: EventSystem: Lua script error (Blockly)

Post by Domostiaan »

Thanks alot.

That was indeed the issue.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest