my first blockly

Moderator: leecollings

Post Reply
webtense
Posts: 16
Joined: Friday 16 December 2016 14:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: barcelona,SPAIN
Contact:

my first blockly

Post 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 1026 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
theolsen
Posts: 46
Joined: Wednesday 31 July 2013 11:15
Target OS: -
Domoticz version:
Contact:

Re: my first blockly

Post 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....
webtense
Posts: 16
Joined: Friday 16 December 2016 14:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: barcelona,SPAIN
Contact:

Re: my first blockly

Post 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
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: my first blockly

Post 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
The most dangerous phrase in any language is:
"We always done this way"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest