my first blockly

Must be cleaned all topics go to the right subforum
webtense
Posts: 13
Joined: Friday 16 December 2016 15:58
Target OS: Raspberry Pi
Domoticz version:
Location: barcelona,SPAIN
Contact:

my first blockly

Postby webtense » Monday 09 January 2017 23:25

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 289 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: 95
Joined: Wednesday 31 July 2013 11:15
Target OS: -
Domoticz version:
Contact:

Re: my first blockly

Postby theolsen » Monday 09 January 2017 23:34

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: 13
Joined: Friday 16 December 2016 15:58
Target OS: Raspberry Pi
Domoticz version:
Location: barcelona,SPAIN
Contact:

Re: my first blockly

Postby webtense » Tuesday 10 January 2017 9:28

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: 476
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: my first blockly

Postby emme » Tuesday 10 January 2017 9:55

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
That's one small step for a programmer, one giant leap for me!
- - - - -
Raspberry Pi3 + AeonStick G5 + RFXCOMM433 + iRTrans Server + NodeJS
There's no stress in the mess!!


Return to “Scripts [cleaning in progress]”

Who is online

Users browsing this forum: No registered users and 2 guests