Error from blockly that is dysfunctional

Moderator: leecollings

Post Reply
User avatar
Solderbro
Posts: 80
Joined: Tuesday 18 September 2018 15:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Hamburg, Germany
Contact:

Error from blockly that is dysfunctional

Post by Solderbro »

Hello,

this is from domoticz stable, my first blockly that throw an error instead of switching the plug.

2020-08-01 14:31:36.284 Error: EventSystem: Lua script error (Blockly), Name: BL Küchenventilator Cyrus_2 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'

Have never seen such an error from a blockly, what can be wrong?
blockly.png
blockly.png (31.51 KiB) Viewed 710 times
Solderbro
Raspi 3B+RTC, SSD 128GB, Aeotec Gen5, Eurotronic SpiritZ, Fibaro FRGBW, Zipato PIR, Everspring AN180, Neo Coolcam Plug, Fibaro FGMS, Neo Coolcam Doorsensor, Popp Z-Weather
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error from blockly that is dysfunctional

Post by knielen »

Both your if and your elseif have Sunrise = On. So both are always true.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Error from blockly that is dysfunctional

Post by waaren »

knielen wrote: Monday 03 August 2020 14:31 Both your if and your elseif have Sunrise = On. So both are always true.
Not quite.. Sunrise and Sunset are times. So never 'On' or 'Off'

It should be something like
Sunrise.png
Sunrise.png (24.7 KiB) Viewed 676 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error from blockly that is dysfunctional

Post by knielen »

waaren wrote: Monday 03 August 2020 15:10
knielen wrote: Monday 03 August 2020 14:31 Both your if and your elseif have Sunrise = On. So both are always true.
Not quite.. Sunrise and Sunset are times. So never 'On' or 'Off'

It should be something like

Sunrise.png
Aah indeed, always hard to see errors when not programming yourself ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest