Blinds blocky

Moderator: leecollings

Post Reply
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blinds blocky

Post by wouterlet »

I used to switch my blinds at sunset. But my wife doesn't want them down before 19:30. So I tried to make a blocky that switches the blinds by sunset, but not before 19:30. In the attachement is my try that should work in my opinion, but nothing happens at 19:30.
Who has an idea?
Attachments
Blocky curtains.png
Blocky curtains.png (42.52 KiB) Viewed 654 times
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blinds blocky

Post by wouterlet »

I don't know if it helps, but in my logfile I see:

2019-11-21 20:03:00.422 Error: EventSystem: Lua script error (Blockly), Name: Gordijnen beneden_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'

I can't conclude what is wrong exactly, maybe you can?
Of course it's the part: time=sunset and (time=sunset>time=19:30)
Whithout that part it works find

Is there another way to write this?
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Blinds blocky

Post by tozzke »

There are multiple things wrong with your blockly. E.G. you can't compare 2 times with each other (sunrise and sunset are nothing more than variable times depending on your location)
try doing it this way:
Image

I added the 'Blind 1 = Open' and 'Blind 1 = Closed' to prevent retriggering
wouterlet
Posts: 109
Joined: Tuesday 02 October 2018 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blinds blocky

Post by wouterlet »

Thanks that was the trick. So no more comparing times. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests