Page 1 of 1

my first blockly

Posted: Monday 09 January 2017 22:25
by webtense
Good to all, I thought that creating events with blockly would be easy and intuitive, but the simplest thing I do not leave,

I do not know what I'm doing wrong
:roll:
domoticz.png
domoticz.png (20.16 KiB) Viewed 1025 times
My idea is to turn on a light, in this case "Luz_Rampa" in Spanish and send me an email

If I could make it go on at dusk and it would turn off the sunrise would be great, but if it does not work this should be the easiest, better not complicate more

Re: my first blockly

Posted: Monday 09 January 2017 22:34
by theolsen
You can set a timer for sunset and sunrise on the device itself without using blockly. That wouldn't send you a notification though.

Anyway, with your blockly you ask if time is greater than or equal to 1800 turn on the lamp - you only need the time to equal 1800 and the lamp will be on.

If you really want to use blockly you could also set it to if time = Sunset....

Re: my first blockly

Posted: Tuesday 10 January 2017 8:28
by webtense
I've tried changing it to = 18:00 and it still does not work for me,

The other option you give me, as it would be, you could help me.

thank you very much

Re: my first blockly

Posted: Tuesday 10 January 2017 8:55
by emme
what kind of script have you created?
Device? Time? Security? All?... is that enabled also? :P

blocky in that way is not functional because you will have no option to turn the lamp off (well you can turn it off, but when the script is called, it will be back on)

so a good solution is the one proposed by theolsen...
change the time condition to:
(time <= sunset) and (time >= dusk)
but to have the script executed ONLY when needed and don't have it spam your email.... I would add one more condition:
((time <= sunset) and (time >= dusk)) and (Luz_Rampa = 'On')
so it will switch on and send an email ONLY if it's off

have the script running as TIME (so it will run once a minute)
ciao
M